Fernando J. Pereda’s blag

October 26, 2008

Reading II

Filed under: blag — Tags: , , , — Fernando J. Pereda @ 11:13 pm

Currently Reading

— ferdy


Recent cool discoveries: unlockit and rlwrap

Filed under: blag — Tags: , , , , — Fernando J. Pereda @ 11:00 pm

I’m easily annoyed by hardware and software. Recently, I’ve been annoyed by my iPhone 3G insisting on wasting my money by downloading useless shit over my cellular data network without even asking. Since I have WiFi almost everywhere and I don’t want to get a data plan, I wanted to disable the feature completely. Unfortunately, the iPhone wouldn’t let you do that easily. Fortunately, http://unlockit.co.nz/ exists. That disables the cellular network by setting an invalid APN and can be easily reverted when you really need it. Good stuff.

I’ve also been doing some lisp lately and was a happy clisp user until I had to do some CPU and memory intensive computations. sbcl works much better than clisp on OSX and has a profiler; however it lacks readline support (and I refuse to use emacs to interface with it). Without looking for it, I found this extremely cool application called rlwrap that turns any annoying non-readline shit into a nice readline-enabled application. Yay!

— ferdy

October 19, 2008

EeePC 901: Fighting the suckiness

Filed under: blag — Tags: , , , , — Fernando J. Pereda @ 3:04 pm

Ok, so the machine is very nice but the software is very annoying. These are some ‘first tweaks’:

Edit /etc/X11/xorg.conf and set a bigger Virtual so that you can use a big resolution if you are going to use the Eee with an external monitor. You will still need to use xrandr by hand because their GUI has the resolutions hardcoded.

Copy IceWM’s config and set KeySysWindowList and KeySysWinListMenu to something. Don’t leave it empty or the power button will open the annoying window list.

Some people seem to like that shitty tabbed interface called ‘Easy Mode’ that is AsusLauncher. But the thing is that I really hate it, removing it is stupidly tricky, dirty and hacky. AsusLauncher is not a proper display manager, it is an aplication that just runs on top of icewm and asks you for a password. To remove it, this is what I did:

Copy /usr/bin/startsimple.sh to ~/.xsession and remove all the useless stuff. I left mine like this:


BRN=`cat /etc/acpi/brn` >dev/null 2>&1
if [ -z "$BRN" ]; then
echo $BRN > /proc/acpi/asus/brn

sudo /usr/bin/sessreg -a -l :0.0 -u /var/run/utmp user 
if [ -d /home/user/Desktop ]; then
    if [ -d /home/user/.Desktop.bak ]; then
        rm -rf /home/user/.Desktop.bak
    if [ -d /home/user/.Desktop ]; then
        mv /home/user/.Desktop /home/user/.Desktop.bak
    mv /home/user/Desktop /home/user/.Desktop
xhost + si:localuser:root # Allow local user root only to access the diplay

xset dpms 0 0 0
sleep 2

[ -e /var/lock/xandros-rclock/webcam.lock ] && sudo rm /var/lock/xandros-rclock/webcam.lock
[ -e /var/lock/xandros-rclock/webcam.owner ] && sudo rm /var/lock/xandros-rclock/webcam.owner
sudo rm -f /tmp/nologin
rm -f /tmp/.fastlaunch

exec icewm-session

There is something racy going on with that script, the sleep 2 line seems to be important. Then some stuff has to go into .icewm/startup to start network and battery applets and AsusLauncher (yes, AFTER icewm started….). This is hacky but seems to do a good job:


touch /home/user/.doingLogin
/opt/xandros/bin/AsusLauncher &
while [ -f /home/user/.doingLogin ] ; do sleep 0.2 ; done
killall AsusLauncher

powermonitor &
minimixer &
networkmonitor2 ra0 &
networkmonitor2 -i eth0 &
networkmonitor2 -i ppp0 &
/usr/bin/dispwatch &
/usr/bin/keyboardstatus &
/opt/xandros/bin/start_netserv &
/usr/local/bin/asusosd &

If the order of applets in the notification area is important it is possible to tweak where they appear by adding some sleep commands. I don’t particularly care though.

The acpi script that reacts to the power button will check whether AsusLauncher or KDE are running and if neither is, it just sends USR2 to init. This is a bit too much, editing this file was easy, my /etc/acpi/powerbtn.sh looks like this:

# /etc/acpi/powerbtn.sh
# Initiates a shutdown when the power putton has been
# pressed.

if [ ! -f /home/user/.doingLogin ] ; then
        DISPLAY=:0 su -c /opt/xandros/bin/shutdown_dialog user &

At this point, you’ve lost direct access to some of the applications that were there in the EasyMode interface, the paths for those applications are in /opt/xandros/share/AsusLauncher/simpleui.rc. Grab the ones you want and add them to IceWM’s menu.

I think I’ve done some more tweaks but those are the big ones. I’m hating this Xandros thing more and more, and I guess I’ll install Debian sooner rather than later.

— ferdy

October 15, 2008

EeePC 901: First impressions

Filed under: blag — Tags: , , , , , , — Fernando J. Pereda @ 2:59 pm

Last friday, I got myself a shiny EeePC 901. The machine is extremely nice and the bundled software JustWorks if you have very simple needs and are happy with the very few packages that are available. Battery life is very good too with wifi constantly on.

However, there are a number of oddities in the Xandros installation, some are just annoying and others really piss me off. Without any specific order:

  • It comes with mono, python, java, make, cpp, gdb but without gcc? And no, it is not available in their repos eiher.
  • You can’t enable/disable bluetooth without disabling the wireless card. It is possible to do it on the command line so it is just a software stupidity.
  • The installed vim version lacks support for mouse and there’s no gvim or a full vim package in their repos. Also, no indent is either installed or installable.
  • The GUI does not support WPA2 though it is possible to use it through wpa-supplicant
  • A Windows XP theme for icewm? Come on…
  • Stupidly big fonts and cursors, because there’s so much screen space to spare.
  • Their apt repositories are b0rked and some updates don’t work.
  • The only PDF reader available is acroread.
  • StarOffice instead of OpenOffice? Yeah, quoting spb: “for full enterprise readiness“.
  • No kernel source, so building additional modules (iptables, additional filesystems, …) is impossible.
  • External, USB drives get mounted as ‘D:’, ‘E:’, ‘F:’….
  • Your user has to be ‘user’ and many things hardcode /home/user. Yes, it is easy to change, it is just annoying
  • Samba and parport are enabled by default and there is no way to stop or disable them from the gui.
  • The terminal is hidden, an uxterm is available through Ctrl+Alt+T

That list is not complete but it is enough to ilustrate the point that the Xandros installation really sucks.

First things to do to get a not stupid environment:

  • Edit /usr/sbin/services.sh and /etc/fastservices and remove stuff like samba, portmap and lindvd.
  • Install xandros-wpa-supplicant needed for networks such as eduroam.
  • Copy /etc/X11/icewm to ~/.icewm to enable multiple workspaces and remove the SOS and tips buttons.
  • Install a proper theme (ThinBlack is a very good one) and a proper cursor theme such as DMZ-Vanilla.
  • Run sudo dpkg-reconfigure locales AND edit /etc/kde3/kdeglobals to get the system in english instead of dealing with wonky translations. Run something like aptitude or synaptic to remove locale-specific packages.
  • Run kcontrol to set smaller fonts

In theory, it is possible to use the debian apt repositories using pinning, however, I’m wondering if that’s better than just installing Debian on the EeePC.

All in all, a very nice machine and hardware and a very stupid software. Fortunately, the latter can be replaced.

— ferdy

October 6, 2008

Generated versions of PMS

Filed under: blag — Tags: , , , , , , — Fernando J. Pereda @ 12:13 pm

Yesterday I linked some PDF versions of PMS in its ‘home page’. This makes PMS more accessible to those that can’t or won’t install a proper TeX system since reading the LaTeX sources is a PITA.

I’ll generate and link versions approved by the Gentoo Council by checking out their signed tags and those versions that the PMS editors deem important. I’ll also link to current HEAD, but this won’t be automated so it might lag a bit if I’m extremely busy.

Also, for those that can’t be bothered reading technical documentation aimed at people implementing a package manager and want to know what’s new in EAPI2, Ciaran McCreesh has published a series of blag posts explaining the new features and whence they came. Make sure to take a look at What’s in EAPI 2?

— ferdy

September 15, 2008

iPhoto movies in FrontRow

Filed under: blag — Tags: , , , — Fernando J. Pereda @ 5:33 pm

Ok, so we all know that Apple makes software, and that its software is sometimes full of fail:

Even if their software usually integrates nicely, it really irritates me that some details are completely left out. For instance, iPhoto will import and manage movies from a digital camera. Then, when you are going to show the photos to the family with, for instance, FrontRow, the movies won’t come up. They’ll be ignored in the ‘Photos’ tab, and nothing will show up on the ‘Movies’ tab either.

Oh well, bash comes to the rescue:

	local DEST="${HOME}/Movies/iPhoto Movies/" d
	rm -rf "${DEST}"
	mkdir "${DEST}"
	find "${HOME}/Pictures/iPhoto Library/Originals/" \
		-iname '*.avi' -or -iname '*.mov' | while read f ; do
		mkdir "${d}" 2>/dev/null
		ln "${f}" "${d}"

I just hate to have to do this by hand.

— ferdy

September 8, 2008

GMandel meets Julia sets

Filed under: blag — Tags: , , , — Fernando J. Pereda @ 3:08 am

I was bored and decided to hack support for viewing Julia sets into GMandel. The code could be nicer, but that will come tomorrow. I should really stop slacking and make a proper hierarchy of widgets (GFractMandel and GFractJulia should inherit a common GFractWidget) to make the code more manageable but this will do for now.

These are some examples of Julia sets generated with GMandel:

I strongly recommend The Computational Beauty of Nature to those interested or curious about this kind of stuff. It is a nice book that can even be read without too much mathematical or computer science background. One of the nice things about fractals and chaos is that you can see most the stuff yourself through pretty pictures.

— ferdy

August 24, 2008

Security Trivia IV

Filed under: blag — Tags: , — Fernando J. Pereda @ 2:02 pm

This one is easy and sweet. Your goal is to make this program crash and explain why that happened, good luck:

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
	if (argc != 4) {
		fprintf(stderr, "DIAF\n");
		return EXIT_FAILURE;

	char c[3];
	unsigned i;
	for (i = 0; i < sizeof(c); i++)
		c[i] = atoi(argv[i + 1]);

	if (c[0] + c[1] + c[2] == 0) {
		fprintf(stderr, "No no\n");
		return EXIT_FAILURE;

	c[1] += c[0] + c[2];
	printf("%d\n", c[0]/c[1]);


Before spoling your own fun looking at the comments, try to do it yourself. Really, it is easy, and will make you understand C better.

— ferdy

June 29, 2008

Mood change, I’m happy today

Filed under: blag — Tags: , — Fernando J. Pereda @ 7:18 pm

I’m quite happy today. Not because I had lots of fun at yesterday’s party, for which I’m completely dead after having danced salsa for more than 3 hours. I’m really happy because the Gentoo Infrastructure Team investigated what the Exherbo team reported (see details in my latest post).

This, incidentally, means that nobody can act like a sheriff with complete impunity. I won’t comment on the outcome of it, not because I dislike it, but because I think it wouldn’t be fair after all. If someone is interested, they can read the bug themselves.

Update: Alexander wrote a followup post about the whole thing: Follow-Up: Attack on Exherbo.org machine. I can’t do anything else than joining him in his thanks to the Gentoo Infrastructure Team.

— ferdy

PS: Some people have shown disagreement with the way I write stuff (not with what I write about). It seems I’m overly negative and bad publicity for Gentoo. If you feel that way, I apologise. My intention is to give information that I honestly think is relevant about both Gentoo and myself. I’ll try to be less negative in future, even though I’ll still post about what I think is relevant and/or important.

June 28, 2008


Filed under: blag — Tags: , , — Fernando J. Pereda @ 4:57 pm

I can’t find a different word to describe this situation. I’m usually very proud of being part of Gentoo, even if I don’t agree with every single thing Gentoo does (hey, unlike others, I’m able to live with people disagreeing). But what happened yesterday is really really sad and shameful.

The explanation is long but, fortunately, Alexander wrote a nice blag post explaining what happened:

Attack on Exherbo.org Machine

Do read it. It is important to know the kind of people you work with, and the kind of people you trust certain resources to. I hope Gentoo does something about this. It is of such a bad taste that I don’t want to get started… You can follow the process here: https://bugs.gentoo.org/229895 . I really do hope Gentoo does something.

— ferdy

« Newer PostsOlder Posts »

Create a free website or blog at WordPress.com.