Fernando J. Pereda’s blag

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

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

May 18, 2008

Chaotic stuff

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

I’ve been working on a couple of utilities to toy around with L-Systems and the Mandelbrot Set.

lsys is a simple utility that would take an axiom, generation rules and a depth. After some crunching (depends on the complexity of the fractal), it will show a window with the fractal. It has some examples bundled with it for further toying. The idea behind gmandel is a nice Mandelbrot Set explorator, reality is a bit far from that though :) . However, it offers something I haven’t seen in most fractal applications, Mandelbrot Orbits. Those are really nice to see to understand the set a bit more. It has facilities to load and save states and lets you save the image you are seeing (yay for fractal wallpapers).


It also has some dull color themes. All the code is really implementing a widget that draws the fractal, the idea is to inherit that widget to display Julia Sets too. But since I’m only spending a couple of hours every two months on this, it might take a while :)

I haven’t bothered with ebuilds for this yet, though the code is publicly available at: git://git.ferdyx.org/lsys.git and git://git.ferdyx.org/gmandel.git. The former needs copme (an option parsing library that doesn’t suck), which can be found at git://git.ferdyx.org/copme.git and for which there’s an ebuild at git://git.ferdyx.org/ferdy-overlay.git.

— ferdy

Blog at WordPress.com.