Software

Perl and Javascript

Asus Eee + eeeXubuntu tweaks

This is likely to be a temporary page that goes away once eeeXubuntu is updated with these files (or similar and better ones).

The page addresses two function key tweaks that I wanted. One tweak is the ability to use Fn+F5 to switch between internal LCD and external monitors, the second is the ability to use Fn+F2 for the enabling/disabling of wifi. The information is sort of there but it isn't as clear as the rest and did (until now Tadaa!) required mucho manual hackery. I have now fixed it so that manual hackery in both cases is reduced considerably.

What you need to do is download this file and open it somewhere sensible (say /tmp).
(Update: Some people have reported that the tar is corrupt - I've reuploaded it and checked the download and it works for me. If it doesn't work for you then you can download each file indivuallly by clicking on the names below )
The file contains the following files some of which replace existing files:
X11/xorg.conf Display config file nicked from http://wiki.eeeuser.com/ubuntu. One modification - the virtual display's horizontal dimension is now 2560 not 2048, this allows you to extend left or right to a 1280x1024 monitor (I haven't tested it but if the eee/monitor supports it higher resolutions such as 1600x1200 should also work).
This replaces an exisiting file which you may want to back up first

acpi/events/asus-vga-toggle File to handle the screen toggle event - you may want to edit this.
This replaces an exisiting file which you may want to back up first

acpi/asus-vga-toggle-new.sh New file to handle the screen toggle event - this file is unused unless you edit acpi/events/asus-vga-toggle above to replace the reference to asus-vga-toggle.pl with this file instead. It provides a very simplistic ON - OFF function.
acpi/asus-vga-toggle.pl New file to handle the screen toggle event - this file provides a number of options so you can decide how you want the toggle key to behave. If you edit it you will see a number of lines that can be uncommented to choose which option.
acpi/events/eee-wifi-off New file to handle the wifi off event nicked from http://wiki.eeeuser.com/ubuntu:eeexubuntu:customization
acpi/events/eee-wifi-on New file to handle the wifi off event nicked from http://wiki.eeeuser.com/ubuntu:eeexubuntu:customization
acpi/eee-wifi-on-off.sh New file to handle the wifi on and off events nicked from http://wiki.eeeuser.com/ubuntu:eeexubuntu:customization

to install the files (and backup the existing ones just in case) do the following in a console:
cd /tmp
wget http://www.di2.nu/software/fn-f5-display-fn-f2-wifi.tar.gz
tar -xzf fn-f5-display-fn-f2-wifi.tar.gz
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
sudo cp X11/xorg.conf /etc/X11/xorg.conf
sudo cp /etc/acpi/events/asus-vga-toggle /etc/acpi/events/asus-vga-toggle.backup
sudo cp acpi/events/asus-vga-toggle /etc/acpi/events/asus-vga-toggle
sudo cp acpi/asus-vga-toggle.pl /etc/acpi/asus-vga-toggle.pl
sudo cp acpi/asus-vga-toggle-new.sh /etc/acpi/asus-vga-toggle-new.sh
sudo cp acpi/events/eee-wifi-on /etc/acpi/events/eee-wifi-on
sudo cp acpi/events/eee-wifi-off /etc/acpi/events/eee-wifi-off
sudo cp acpi/eee-wifi-on-off.sh /etc/acpi/eee-wifi-on-off.sh
sudo chmod a+x /etc/acpi/eee-wifi-on-off.sh /etc/acpi/asus-vga-toggle-new.sh /etc/acpi/asus-vga-toggle.pl
Having done this you are almost done, although restarting X-windows (CTRL-ALT-BACKSPACE) is going be needed to get things to work.

The only other thing you might want to do is change the default behaviour for Fn-F5. By default it switches between the LCD and the external monitor (one is on when the other off) but you can easily change it so that the external screen extend sor mirrors the LCD and you have go from 2-stage toggle to a 3-satge cycle (LCD, LCD+external, external). This is how you change it.
Edit the file asus-vga-toggle.pl

sudo mousepad /etc/acpi/asus-vga-toggle.pl

and find the section reprinted below.
# uncomment one of these three lines to choose the actions.
# the "2 way" lines mean you have two choices to toggle between
# the "3 way" lines mean you have a series of 3 states to change between
# the 'XXe' lines extend the display, the m lines merely mirror it
# in the extend lins the second char determines the direction
# a=> above, b=> below, l=> left-of, r=> right-of

my $toggles = '2'; # 2 way: external off, internal off
# my $toggles = '2m'; # 2 way: external off, external mirrors internal
# my $toggles = '3m'; # 3 way: external off, external mirrors internal, internal off
# my $toggles = '2ae'; # 2 way: external off, external extends internal above
# my $toggles = '3ae'; # 3 way: external off, external extends internal, internal off
# my $toggles = '2be'; # 2 way: external off, external extends internal below
# my $toggles = '3be'; # 3 way: external off, external extends internal, internal off
# my $toggles = '2le'; # 2 way: external off, external extends internal left
# my $toggles = '3le'; # 3 way: external off, external extends internal, internal off
# my $toggles = '2re'; # 2 way: external off, external extends internal right
# my $toggles = '3re'; # 3 way: external off, external extends internal, internal off
put a '# ' in front of the my $toggles = '2'; line and delete the '# ' from the line you like best of the others and save. The press Fn-F5 and verify it does what you want. If it doesn't - or if you feel like changing it - then just edit the file again and pick a different line. The new behaviour takes effect immediately.

Site Home