Materiaal voor software freedom day

Ter ere van software freedom day stelde ik een CD'tje samen met vrije software voor Windows:

Je kan het iso-bestand en een geweldig amateuristisch covertje downloaden:

Ik heb ook een mini-howto gemaakt over hoe je Ubuntu kan installeren (op voorwaarde dat je al een CD'tje hebt):

Favoriete firefox add-ons

Spam verwijderd

Vanmorgen heb ik een aantal spamcomments verwijderd. Als ik per ongeluk een niet-spam heb verwijderd, sorry daarvoor dan. Bij gelegenheid zal ik eens bekijken hoe ik de spam op deze site aan banden kan leggen.

Software freedom day in Antwerpen

Dit jaar ben ik er op tijd bij :-)

Heeft er iemand zin om mee iets te doen rond Software Freedom Day op 19 september? Liefst in de provincie Antwerpen. Ik denk bijvoorbeeld aan CD's uitdelen aan een of ander station, eventueel met een demo van Linux en/of andere vrije software... Als er mensen geinteresseerd zijn, kunnen we iets concreet op poten zetten.

Voor de facebookers onder ons, heb ik een groep opgezet: http://www.facebook.com/group.php?gid=87824869838&ref=nf

Combinatie Outlook en netiquette

Sommige mensen worden op een of andere manier verplicht om Outlook te gebruiken als e-mailclient. Aangezien Outlook niet uitblinkt wat betreft netiquette (correct quoten, plain text e-mails,...), hier een kleine howto om de grootste problemen op te vangen met Outlook 2003:

Correct quoten

  • Klik 'Extra', 'Opties' in de menubalk.
  • Klik onder het flapje 'Voorkeuren' op de knop 'E-mailopties'
  • Onder 'Bij het beantwoorden van een bericht' kies je voor 'Aanduiding voor elke regel van oorspronkelijk bericht.
  • Vink 'Alle normale e-mail lezen als tekst zonder opmaak' en 'Alle digitaal ondertekende e-mail lezen als tekst zonder opmaak' aan, zodat je plain text kan antwoorden op htmlberichten.

Platte tekst voor e-mails

  • Opnieuw onder 'Extra', 'Opties'
  • Klik op het flapje 'E-mailindeling'
  • Kies 'Tekst zonder opmaak' achter 'Deze berichtindeling gebruiken'

Crunchbang Linux on the Acer Aspire One

I did the following to install Crunchbang (8.10) on my Acer Aspire One (SSD). (Most is taken from https://help.ubuntu.com/community/AspireOne, which has more detailed information. This is just a reminder for myself.)

  • Create a bootable usb stick from the iso image using unetbootin.
  • Install crunchbang, choosing ext2 file systems.
  • Download, compile and install madwifi, and add ath_pci to /etc/modules.
  • Add the following to /etc/rc.local to enable the wireless led:
sysctl -w dev.wifi0.ledpin=3
sysctl -w dev.wifi0.softled=1
  • Install luvcview to use the webcam. This doesn't work yet.
  • Download acerfand and acer_ec.pl into /usr/local/bin, and make acerfand executable. Check wether sudo perl acer_ec.pl ?= 58 returns something that could be the cpu temperature (hexacecimal), and add this line to /etc/rc.local to keep the fan down if the CPU temperature is below 70°:
/usr/local/bin/acerfand
  • Edit /etc/fstab and change the the option “relatime” to “noatime”.
  • Add elevator=noop as boot option for the current kernel, and to the # defoptions line.
  • Add the following to /etc/fstab:
tmpfs      /tmp            tmpfs        defaults           0    2
tmpfs      /var/tmp        tmpfs        defaults           0    2
  • Change concurrency=none into concurrency=shell in /etc/init.d/rc
  • For power saving, create a file /etc/sysctl.d/60-aspireone.conf with the following content:
###################################################################
# Settings for the Acer Aspire One
#
# Strongly discourage swapping
vm.swappiness = 1
# As suggested by PowerTOP
vm.dirty_writeback_centisecs = 1500
# Suggested by https://help.ubuntu.com/community/AspireOne
vm.vfs_cache_pressure = 0
vm.dirty_ratio = 20
vm.dirty_background_ratio = 10
vm.laptop_mode = 5
  • Add the following to /etc/rc.local:
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo ondemand > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
cat /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate_max > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate

echo 1 > /sys/devices/system/cpu/sched_smt_power_savings
echo 10 > /sys/module/snd_hda_intel/parameters/power_save

### Decrease power usage of USB while idle
## commented out; doesn't seem to work
# [ -w /sys/bus/usb/devices/1-5/power/level ] && echo auto > /sys/bus/usb/devices/1-5/power/level
# [ -w /sys/bus/usb/devices/5-5/power/level ] && echo auto > /sys/bus/usb/devices/5-5/power/level
  • Add the following line to /etc/profile:
export INTEL_BATCH=1
  • Change the section 'Device' in /etc/X11/xorg.conf.
Section "Device"
        Identifier      "Configured Video Device"
#       Driver          "vesa"
        Option          "MonitorLayout" "LVDS,VGA"
        Option          "Clone" "True"
        Option          "AccelMethod" "EXA"
        Option          "MigrationHeuristic" "greedy"
        VideoRam        229376
        Option          "CacheLines" "1980"
        Option "NoDDC"
EndSection
  • and add this line to the 'Monitor' section:
DisplaySize 195 113

Interesting firefox add-ons:

Add the string browser.cache.disk.parent_directory to Firefox's about:config, and assign the value /tmp/firefox. In 'options', 'security' disable the phishing filter. (dangerous!)

Ubuntu Hardy on my Acer Aspire One

I installed Ubuntu Hardy on my Acer Aspire One. Accidentally in fact.

I wanted to install the Ubuntu Netbook remix on an external USB disk on my AAO, using the image I found here http://oem-images.canonical.com/unr/. I booted the USB image. It warned me it would wipe my hard disk. Nevertheless I booted, and indeed, it started erasing my internal harddisk instead of my external one :-/ (I thought I would be able to choose a target hard disk; I wasn't.)

After the installation, my system wouldn't boot. So I decided to manually install Ubuntu, using the procedure on https://help.ubuntu.com/community/AspireOne.

Everything seemed to work, except the webcam. And even after applying the various tweaks in the wiki article, the system still was slow.

I stil had a copy of the kernel configuration of the original Linpus installation. So I used that one to compile a new kernel, using the old kernel configuration. (See https://help.ubuntu.com/community/Kernel/Compile#Alternate%20Build%20Method:%20The%20Old-Fashioned%20Debian%20Way ) I enabled LVM, because I use this on my external hard disk, for flexible partition management.

Booting the new kernel resulted in two problems. First of all klogd didn't start. Apparently kernel logging was not enabled in the original kernel. So I removed the klogd package, which removed sysklogd and ubuntu-minimal as well.

Sound didn't work either. I guess Ubuntu uses alsa, and linpus uses OSS or something. So I added alsa support to my kernel configuration, including the intel-hda sound thing. After adding this to /etc/modprobe.d/alsa-base, sound was working:

options snd-hda-intel model=toshiba

Now the system boots. To speed it up a little more, I installed xubuntu-desktop, so I can log on into an xubuntu session. I clicked 'Applications', 'Preferences', 'Configuration Manager', 'Autostarted Apps', and only left energy manager, volume management and network manager checked. (My printer isn't supported anyway.)

That's how the system is configured right now. The webcam is not working, and there is probably room for a lot of improvements. My current kernel config is attached.

Improving security of the Acer Aspire One.

By default, every user on my Linux powered Acer Aspire One can sudo any command without having to enter a password. I think this is a bad thing, because this way anyone (or everything) that can access your computer as a local user, can do anything on the system.

The problem is caused by the configuration of sudo, which contains these lines:

## Allows people in group wheel to run all commands
 %wheel ALL=(ALL)       ALL

## Same thing without a password
 %wheel ALL=(ALL)       NOPASSWD: ALL

(to see/edit the sudo config file, issue sudo visudo in a terminal window.) Commenting out the line below 'Same thing without a password' is not an option, because the network (and other things) will not start after starting xfce.

It seems that when xfce is started, a list of commands is executed, some of which are called with 'sudo'. I don't know which script is containing these commands, so I turned on sudo logging. This can be done adding the following lines to the sudo config:

Defaults loglinelen=0 # disable line wrapping in log.
Defaults logfile=/var/log/sudo.log # or some other filename.

When logging on again, you can see in /var/log/sudo.log the commands that were executed with sudo:

/usr/bin/gnome-keyring-daemon
/bin/mv /usr/bin/xfce-mcs-manager.new /usr/bin/xfce-mcs-manager
/bin/mv /usr/bin/xfce-mcs-manager /usr/bin/xfce-mcs-manager.new
/sbin//modprobe ath_pci
/sbin//modprobe wlan_scan_sta
/sbin//modprobe wlan_acl
/sbin//modprobe wlan_wep
/sbin//modprobe wlan_xauth
/sbin//modprobe wlan_ccmp
/sbin//modprobe wlan_tkip
/usr/local/bin/wlanconfig ath0 create wlandev wifi0 wlanmode sta
/sbin//ifconfig ath0 up
/etc/init.d/network start
/etc/init.d/netfs start
/etc/init.d/udev-post start
/etc/init.d/ConsoleKit start
/etc/init.d/cups start
/etc/init.d/wpa_supplicant start
/etc/init.d/NetworkManager start
/etc/init.d/NetworkManagerDispatcher start
/etc/init.d/crond start
/usr/bin/nm-applet
/sbin/iwpriv ath0 powersave 1
/sbin//fdisk -l
/sbin//swapon -a
/sbin//iwpriv ath0 powersave 1

These commands are probably somewhere in a script, but I did not find out yet which one.

Anyway, I added the following lines to the sudo configuration script

Cmnd_Alias JOHAN = /usr/bin/gnome-keyring-daemon,/sbin/modprobe,/usr/local/bin/wlanconfig \
,/sbin/ifconfig,/etc/init.d/network,/etc/init.d/netfs,/etc/init.d/udev-post \
,/etc/init.d/ConsoleKit,/etc/init.d/cups,/etc/init.d/wpa_supplicant,/etc/init.d/NetworkManager \
,/etc/init.d/NetworkManagerDispatcher,/etc/init.d/crond,/usr/bin/nm-applet,/sbin/iwpriv \
,/sbin/swapon

 %test ALL=(ALL)        ALL
 %test ALL=NOPASSWD: JOHAN

Now every user added to the 'test' group, has to enter a password when sudo'ing, except for the commands issued when logging on.

I'm aware of the fact that this is still not the most secure solution. Things like 'swapon' should already be run before the user is logged on. It would also be better to group the commands executed when logging on in a special script. The test users would then only need passwordless sudo rights on this script.

Enable multiple user accounts on a Linux powered Asus Aspire one

Enabling multiple user accounts for the Linpus distribution on my Acer Aspire One was not trivial. After booting, the user 'user' is logged on automatically, and this user was the only one which could use sound and the links to documents, music,... This is why I wrote a quick howto.

Before you start: Make sure you have a bootable usb-stick handy, in case your system refuses to boot after changing a file. I used Debian Lenny beta 2, with an updated kernel.

To display an xterm, press Alt+f2, and enter 'xterm'. You can enable the right-click menu launching 'xfce-setting-show' from the command line, and unchecking 'show desktop menu on right click' under desktop behaviour. (Click the left arrow on your task bar if it is hiding the 'Close' button of the settings dialog.)

Edit /etc/inittab: replace the line

#1:2345:respawn:/sbin/mingetty --autologin user tty1

by

1:2345:respawn:/sbin/mingetty tty1

And decomment

x:5:respawn:/etc/X11/prefdm -nodaemon

(I commented out the lines for virtual consoles 2-6 as well, but ctrl+alt+fx seems disabled somehow.)

In '/etc/rc.d/rc.S', comment out the line

#   /usr/bin/xinit -- -br>/dev/null 2>&1 &

That should do it.