Disabling "flat-volumes" in pulseaudio
2015
mones
Today I've just faced another of those happy ideas some people implements in software, which can be useful for some cases, but can also also be bad as default behaviour.

The problems caused were already posted to Debian mailing lists, fortunately, as well as its solution, which basically in a default Debian configuration means to:

$ echo "flat-volumes = no" | sudo tee -a /etc/pulse/daemon.conf
$ pulseaudio -k && pulseaudio

And I think the default for Stretch should be set as above: raising volume to 100% just because of a system notification, while useful for some, it's not what common users expect.

Note: edited to fix first command as explained in comments. Thanks!

Building on a RPi without disc
2015
mones
Nothing like a broken motherboard to experiment alternative ways of building software. This time I've tried to use a Raspberry Pi and, to avoid wearing out the SD card too much, a NFS mount on a Synology NAS. It happens both items were generously donated by two different Claws Mail users some years ago, thanks to them! ;-)

So, after installing all build dependencies and a build helper, how long it took?

configure-claws: Tue May 9 13:28:55 UTC 2017
cd b-claws && env PKG_CONFIG_PATH=/opt/claws/lib/pkgconfig ./configure --enable-maintainer-mode --prefix=/opt/claws > /home/mones/nfs/claws/log-configure-claws.txt 2>&1 && cd ..
configure-claws: Tue May 9 13:34:09 UTC 2017
compile-claws: Tue May 9 13:34:09 UTC 2017
cd b-claws && make -j2 > /home/mones/nfs/claws/log-compile-claws.txt 2>&1 && cd ..
compile-claws: Tue May 9 15:44:28 UTC 2017

Yep, that is more than 5 minutes for configuring and more than 130 minutes for compiling. Not for being in a hurry, but I've built kernels which took more, some decades ago :-)

And if you want to know how to break a motherboard...
Read more...Collapse )

Nice surprise
2015
mones
Absorbed like I was with the task of finishing the university project (see previous post), I did not even realized a little patch I have done to fix an untranslated string in dblatex was finally accepted some months ago!

Since the parameter name is different (and admittedly a better name) from my proposal, to keep the project generating a proper document I will have to make some change, a thing I wasn't expecting to do after having presented it :-).

Finally!
2015
mones
Somewhat tired and, later, busy with work, I didn't find time to write about it, but for completing the previous post, I'm doing it now. So, let's go back to January 20th...

Past couple of weeks have been somewhat stressing, as expected: after printing the books, had to bind them, deposit the books in the alumni section and pay the corresponding tuition fee. Later had to remind them that this was a project under a confidentiality arrange and had to inform the review committee about that.



Finishing the slides was another stressing factor. Today I was still changing minor things. Of course I didn't even try to do some presentation test... no time for that. Lose some time setting up nodejs for playing the slides with work's laptop, because mine doesn't have VGA output and my suspects (later confirmed) were University projector was not going to have anything more modern.

Today I choose the wrong room, but later discovered that the room I was assigned was taken by some other group (!) so I've had little choice. Despite arriving earlier I spent most of the time fighting with the projector, which refused to detect my work laptop. After the committee arrival they talked to the other group and we swapped rooms. The projector worked fine in this one, and the presentation could be done. There was more questions than I was expecting, but after finishing and some minutes of waiting the desired result was announced.

Next week I requested the official title in the alumni section, though I could do this by email, but not without paying yet another fee, of course. In this country titles are taking 6 months to be delivered, as they come from the Ministry of Education¹, so no more news are expected until summer.

So, finally, I'm now a Computer Science Engineer ;-)

¹ Why printing a colour A3 sized title takes six months is still a mystery to me. Anyway by the time I got my BSc title (+20 years ago) they were taking years, so this is definitely an improvement.

This is how 2 years of work look...
2015
mones
...after printing it for submission in triplicate:
Three copies of MSc project next to a x260 laptop

At least this was somewhat cheap (34.80 euros) because it's printed black and white. Printing in colour was prohibitive.

Next step: bind them in a dark blue hard-cover with golden letters :-)

10 years of clawsker!
2005
mones
Today on #claws irc channel some conversation derailed into talking about hidden preferences (of Claws Mail) and clawsker's name, the Perl applet which can help you to edit them.

First name was not clawsker, it was a more like Sylpheed Claws Hidden Preferences Editor, which I of course abbreviated to the unspeakable schpe — unless you know German, I guess… ;-)

Looking for the initial script, it turned out it's still on my hard disc:

$ tree -Ds claws/dev/oldscripts/schpe/
claws/dev/oldscripts/schpe/
├── [ 4096 Sep 3 2006] mock
│   ├── [ 24456 Sep 3 2006] schpe.glade
│   ├── [ 24456 Sep 3 2006] schpe.glade.bak
│   ├── [ 315 Sep 3 2006] schpe.gladep
│   └── [ 315 Sep 3 2006] schpe.gladep.bak
└── [ 1160 Aug 22 2006] schpe

1 directory, 5 files


Notice it's dated just 10 years and 1 day ago, yay!

That version wasn't even functional, was just a skeleton and an attempt to made a GTK+ GUI with Glade, which, by that time wasn't as good as probably is today (although I've never used it again).

Fortunately that idea was abandoned in the following months and the first release in 2007 enjoyed a hand-made GUI, probably more laborious but better suited, IMHO.

I'd love to…
2005
mones
undo all bugs I'd been sneakily making along the years…

But some people call them features ;-)

Another target reached
2005
mones
Just sent v0.95 of my project for review. Was nothing previously set, I simply continued writing, expanding and fixing things, with the hope of completing something… it's not fully completed, but sending it for review reduces some pressure at least.

And after tagging it then noticed:
$ git rev-list --all --count
600

So, yeah, that's 600 commits since the beginning in all branches.

If I had planned it I would have failed miserably to get such exact count ;-)
Tags: , ,

Maximum number of clients reached Error: Can't open display: :0
2005
mones
Today it happened again: you try to open some program and nothing happens. Go to an open terminal, try again and it answers with the above message. Other days I used to reboot the session, but that's something I don't really think should be necessary.

First thought about X gone mad, but this one seems pretty well behaved:

$ lsof -p `pidof Xorg` | wc -l
5

Then noticed I had a long running chromium process (a jQuery page monitoring a remote service) so tried this one as well:

$ for a in `pidof chromium`; do echo "$a "`lsof -p $a | wc -l`; done
27914 5
26462 5
25350 5
24693 5
23378 5
22723 5
22165 5
21476 222
21474 1176
21443 5
21441 204
21435 546
11644 5
11626 5
11587 5
11461 5
11361 5
9833 5
9726 5

Wow, I'd bet you can guess next command ;-)

$ kill -9 21435 21441 21474 21476

This of course wiped out all chromium processes, but also fixed the problem. Suggestions for selective chromium killing welcome! But I'd better like to know why those files are not properly closed. Just relaunching chromium to write this post yields:

$ for a in `pidof chromium`; do echo "$a "`lsof -p $a | wc -l`; done
11919 5
11848 222
11841 432
11815 5
11813 204
11807 398

Which looks a bit exaggerated to me :-(
Tags: ,

Oneliner for today
2005
mones
Unfortunately I'm still busy trying to finish the documentation of my M.Sc. project. This one was built after several attempts to convert the tables for the use case descriptions spread through several AsciiDoc files into a list of 3rd level titles joining both the use case Id and title (and some dummy content to keep the processor happy):

grep --after-context=1 '^|Identificador' "$a" *_cu_*.txt 
| cut -f3 -d\| 
| sed 's,^--$,,;s,^\+,,' 
| sed ':a;N;$!ba;s,\n\n,\n,g' 
| sed ':a;N;$!ba;s,\+\n,~,g' 
| awk -F~ '{print $1 " ``"$2"\47\47"}' 
| perl -n -e '
use open qw(:std :utf8);
chomp; $n = length;
print "$_\n" . "^" x $n . "\n\nLorem ipsum...\n\n";
'


Imagine it all in one single line, of course. It's an awful beast, but it worked!

It required several visits to google to know how to properly replace newlines with sed, how to print single quotes with awk and how to make perl's lenght function behave as desired with UTF-8 input, though I was already aware of this one ;-)

?

Log in

No account? Create an account