f.lux in Linux

Posted in Linux by aliencam | 2 Comments »

At the ASULUG Installfest last week, Natalie suggested to me a cross-platform program called “F.lux”  What this program does is adjust the colour temperature of your screen throught the day, adjusting it based on your geographical location.  It does this to make the screen warmer at night, meaning that it saves your eyes in the long term, gets rid of the annoying blue glow, and if you wake up in the middle of the night and need to look at your computer real quick, the light won’t burn your eyes.  As a result of this, it also will help you keep your sleep schedule, because blue light, like the kind from a normal computer screen, sets your circadian rythym to be awake (seriously, even NASA uses this http://www.space.com/scienceastronomy/080729-st-mars-time.html and think about it, what colour is the sky?)   So by avoiding blue light before you go to bed, you will be able to sleep better and more easily.

anyway, the link to the program is here:


and it took me awhile to get it set up correctly because I didn’t think it was working at first.  My suggestion is to do the following setup setps while it is dark outside in order to be able to see immediate results.

1. Download xflux for Linux
2. Extract the file, and change permissions by right-clicking on it, go to properties > permissions, and make sure it is executable.

3. copy it to the /usr/bin/ folder using the following command:

sudo cp /home/USERNAME/Desktop/xflux /usr/bin/
4. Now test it to make sure your zip code is in the database by entering the following in the terminal, and replacing “ZIPCODE” with your US Zip Code:

xflux -z ZIPCODE

(for me it is xflux -z 85280  because 85281 didn’t work)

(if you are not in the US, use  “xflux -l latitude, longitude” )

if this works (your screen should change colours if it is dark outside. it will change to a pink/yellow/brownish colour, don’t immediately shut it off please, try it for a day or two and you will probably end up liking it) then you need to set up either a CRON job, or set the program to run at startup.  Startup is easier for me because I never know when my laptop will be on, so here is what I did:

open the Sessions menu (System > Preferences > Sessions) and add an item.  For the command, use the command you just tested (probably xflux -z ZIPCODE)  add a title and a description if you want, and click add.

that’s it!


Google Gears Ubuntu x64 Update

Posted in Life in General by aliencam | No Comments »

Someone has posted a precompiled version of the new version of Google Gears for 64 bit Ubuntu distros! (yay thanks, this is too much work to do all the time so I almost never end up updating)

Just save the file, then in Firefox do file> open file > *filename* and install the extension. If you already have it installed, it will update the old version (don’t worry about removing the old version first. )



Some [Linux] Housekeeping

Posted in Guides, Linux, Ubuntu by aliencam | 4 Comments »

hRecent updates have broken functionality of both the fingerprint reader and screen brightness adjustment on my laptop  (Thinkpad X61 Tablet with Ubuntu 8.10).

Fingerprint Reader:

The problem with the fingerprint was that a recent security update had overwritten the /etc/pam.d/*-auth  files (it allerted me to this beforehand, but to prevent issues with the update I allowed it to totally overwrite my files).  If this happened to you, all you need to do is run the script to edit the /etc/pam.d/common-auth file to allow the fingerprint reader to be a method of authentication.

run the following command:

sudo '/usr/lib/pam-thinkfinger/pam-thinkfinger-enable'

nothing should return, but when you restart the authentication daemon (I don’t remember the command offhand, so I just restarted the computer) the fingerprint reader should work again.

Fixing ACPI Brightness Adjustment

After updating to the 2.6.27-11 kernel, brightness controls would not work for me or any of my friends with the Thinkpad X61 laptop.  There is not an update released yet to fix this, and it has been marked as  “low priority”. The low priority kind of makes me upset since sometimes I can’t even see my laptop screen because of it’s low screen brightness, and other times I get half of the battery life I’m used to since the brightness is all the way up.

Anyway, the fix I found for this was on the issue’s bug report.

In order to do this, you need to edit the /etc/modprobe.d/options file and add the line “options thinkpad_acpi brightness_enable=1”. There are many ways to do this, but my preferred is the following:

in a terminal, type:
sudo nano /etc/modprobe.d/options

then arrow down to the bottom, and then type:
# set to get brightness controlls working in kernel
options thinkpad_acpi brightness_enable=1

exit by pressing ctrl-x then enter to save and overwrite the file. Now you can reboot and the brightness control should work just fine.

If you have any questions or the problems are not fixed by these then leave a comment.


Recording Audio From Speakers

Posted in Guides, Life in General, Linux, Ubuntu by aliencam | 5 Comments »

One commenter asked me in another post how to record audio that would otherwise be played through the speakers.  The specivif example this commenter referenced was “recording audio from youtube videos.”  While there are much better ways to rip the audio from youtube videos (my favorite is the online youtube movie/audio ripper vixy.net. You don’t need to download or install anything, just paste in the URL of the youtube video)   recording the audio that your computer is outputting can be useful in other situations as well.   The method has also changed in the most recent Ubuntu 8.10 Intrepid, so if you knew how to do this in 8.04 it might not be the same way anymore.  Here is a guide for my favorite method to do this.

Ubuntu 8.10 included the PulseAudio controller instead of ESD (is this correct? I’m not sure if it replaces ESD totally.) .  In my opinion this is much better than ESD and it has much more control.

Even though pulseaudio may be installed by default, the pulseaudio volume control is not.  To do this, install pavucontrol in synaptic or run the command:
sudo apt-get install pavucontrol

now just press alt-F2 and run “pavucontrol”

If you don’t have any ausio playing at the moment, it should look like this:


In order to record an audio stream other than the default (which should be the mic, unless you have changed settings elsewhere), go to the “recording” tab, and click on the down-pointing arrow (more like an upside-down carat).  Now select the “monitor” of your default audio output.


Now you can start playing whatever audio you want recorded, and it will record that instead of the mic.  If you want tohave this as the default, you can, under the “input devices” tab change the show setting to “all input devices”, then click the arrow next to the audio source monitor you wish to record, and mark it as default.

Hope this helps,


Updating Linuxwacom (drivers and utilities) in Ubnutu Intrepid

Posted in Life in General by aliencam | 15 Comments »

If you have a tablet with a multitouch capable screen in Ubuntu Intrepid 8.10, then you have probably noticed some problems with the touch function.  Of course, if you don’t have the tablet set up at all yet, you’ll want to follow my guide to setting up the tablet in Ubuntu Intrepid first.  I had pretty much given up on well-calibrated touch support in this version, but yesterday “Drew” commented on my middle mouse scrolling setup guide and I followed his intensedebate profile over to his blog, http://geedew.com/blog.  Over there he has a guide on updating wacom-tools to the newest version.  You can read his post at this link or just continue reading here.

If you want to see which version of wacom-tools came with your instalation, or which version youmost recently installed with a package.  In a terminal run:

dpkg -p wacom-tools  | grep Version

and it should return:

Version: 1:

However, if you have tried updating linuxwacom on your instalation of linux previously, that command is essentially useless as it just says what version the package manager most recently installed. (even after updating linuxwacom using this guide, that command will still give the same output).  The new version has much better touch support, allows you to calibrate the touch driver, and allows you to disable touch from the wacom control pannel.  (command is wacomcpl)

First step is to download the newest version of the software here (should be the one at the top of the list) and unzip it.  Open a terminal and change the directory to the new unzipped file. Uou can type “cd” and then drag the file into the terminal window and press enter to do this, or if it is on your desktop, use the command:

cd ~/Desktop/linuxwacom-0.8.2

changing the version number if you have to. Now run the uninstall and install scripts as sudo to update your linuxwacom utilities.

sudo ./prebuilt/uninstall

sudo ./prebuilt/install

save and close your work, and restart X with ctrl-alt-backspace, or restart the computer.

and that should be all to update those. If you get any errors on the uninstall or install commands, try re-downloading the file (that happened to me the first time).

Now, to recalibrate or disable/enable touch, hit alt-f2 (or go into a terminal) and enter “wacomcpl”
This will let you change options related to the tablet’s drivers. To recalibrate, go to “touch” on the left, then “calibrate” and poke the middle of the pink box with your finger.

works great now! Thanks for the heads up Drew.


Thinkpad Middle Mouse Scrolling in Ubuntu 8.10

Posted in Guides, Linux, Lists by aliencam | 21 Comments »

I found a couple blogs that said they got middlemouse scrolling working on a thinkpad, but none of their methods worked on my x61Tablet with 64-bit Ubuntu 8.10 installed.  This version of ubuntu uses evdev instead of the xorg.conf file that previous versions used, so it makes configuring the middle mouse button a little bit more difficult.

The first thing you should do (just for your own records) is this command:

xinput -list-props "TPPS/2 IBM TrackPoint"

that will return the properties of your trackpoint.  (change “TPPS/2 IBM TrackPoint” to “DualPoint Stick” if you have an X200 or  X61s.) I did not do this before changing settings, so I don’t know what the original looks like (if you do, please post it in the comments so I can have a record of it! I posted the final results of that command at the end.)

Now, what you will need to do is create a file, /etc/hal/fdi/policy/mouse-wheel.fdi with the following command:

sudo nano /etc/hal/fdi/policy/mouse-wheel.fdi

then paste in the contents with ctrl-shift-v:

<match key="info.product" string="TPPS/2 IBM TrackPoint">
<merge key="input.x11_options.EmulateWheel" type="string">true</merge>
<merge key="input.x11_options.EmulateWheelButton" type="string">2</merge>
<merge key="input.x11_options.YAxisMapping" type="string">4 5</merge>
<merge key="input.x11_options.XAxisMapping" type="string">6 7</merge>
<merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
<merge key="input.x11_options.EmulateWheelTimeout" type="string">200</merge>

save and quit by hitting ctrl-x, then “y”.

To tell you what each line does:

EmulateWheel should be pretty obvious, you don’t actually have a wheel with a trackpoint, so it emulates one

EmulateWheelButton: which button pretends to be a wheel? the mouse buttons are numbered 1 2 3 in order, so “2” is the middle one

YAxisMapping: which directions should the y-axis go? (4 is up, 5 is down)

XAxisMapping: which directions should the x-axis go? (6 is left 7 is right)

Emulate3Buttons: actually I’m not sure what this does in conjunction with emulatewheel. It probably allows you to use middle-click still (like to close firefox tabs, or whatever else middle click does)

EmulateWheelTimeout: if the button is held for longer than the ammount of time, it switches off the middle mouse click.  Essentially, this is what turns off “middle mouse paste” when you are trying to scroll.

Now, the above configuration DOES NOT work for me, but it seems that it does for everybody else… If it still does not work for you, keep reading for the fix, and please leave a comment so I don’t feel so inept :P. What happens to me is that the xinput list-props command shows the buttons as being mapped correctly, but nothing happens in xev or in real use.  I cannot find errors in any log files or anywhere to indicate why or what is happening.

So, what I do to get it working is in the above file, change “YAxisMapping” and “XAxisMapping” to be misspelled by adding an extra “s” as such: “YAxsisMapping” “XAxsisMapping”

At this point, restart and test it again.  Just misspelling it works for many people.

If it still doesn’t work, create a new file.  This will be a shell script that is run at startup to map the horizontal scrolling correctly (If you don’t care about horizontal scrolling and only use vertical, just stop after you messed up or deleted the XAxisMapping and YAxisMapping lines).Use the following command:

nano /home/$USERNAME/.horizscrollscript

Then paste with ctrl-shift-v, or type in the following contents:

# The following line sets the X-axis mapping to buttons 6 and 7 so that
# horizontal scrolling works.
xinput -set-int-prop "TPPS/2 IBM TrackPoint" "Wheel Emulation X Axis" 8 6 7

then save and close with ctrl-X, then “Y”.  make the file executible with:

chmod +x /home/$USERNAME/.horizscrollscript

Now open the gnome sessions manager (System > Prefferences > Sessions, or alt-f2 and “gnome-session-properties”) and click “add”

for the “Name” field, name it something so you know what it does (I named it Horizontal Scroll Script).

In the “Command” field, enter the path to the file (/home/$USERNAME/.horizscrollscript)

The comment field is optional.  Save and restart, and everything should be working!

Please leave a comment if this does or does not work for you, I’m curious to know if I messed something up and that is why the first part of the tutorial doesn’t work.  ***UPDATE: It seems to work for nearly everybody except me… ugh***

To test everything, you should try this command:

xinput -list-props "TPPS/2 IBM TrackPoint"

and it should return:

Device 'TPPS/2 IBM TrackPoint':
Device Enabled:        1
Middle Button Emulation:        1
Middle Button Timeout:        50
Wheel Emulation Inertia:        10
Wheel Emulation:        1
Wheel Emulation X Axis:        6, 7
Wheel Emulation Y Axis:        4, 5

Wheel Emulation Timeout:        200
Wheel Emulation Button:        2
Drag Lock Buttons:        0

those bolded lines are what we were trying to get! now to test how your computer sees you use those buttons, ust the command:


then you can hit keys on the keyboard and watch what it returns, or put the mouse pointer in the box that pops up and watch that as well.  You should be able to see that scrolling down is 5, up is 4, left is 6 and right is 7. (close xev with ctrl-z or by pressing the “x” on the box.)

The websites I used to formulate this approach are:



***Note:  There is a bug that makes it so that middlemouse scrolling does not work sometimes after a suspend/resume.  Here is the bug report on Launchpad.  There has been a patch released for the actual xorg-evdev, but not one specifically for ubuntu (so you would have to recompile and build evdev while applying this patch at this point)  Here is the URL for the Launchpad bug:


There is a temporary fix also, removing and reloading the “psmouse” module seems to fix it without suspending/resuming again, or restarting the computer.  This is kind of dangerous because it literally unloads the mouse drivers and then reloads them, so you will have to use the keyboard only to enter this in a terminal.  Use these commands:

sudo rmmod psmouse
sudo modprobe psmouse


Thinkpad Fingerprint Reader in Ubuntu 8.10 Intrepid

Posted in Guides, Linux, Ubuntu by aliencam | No Comments »

The version of thinkfinger in the Ubuntu 8.10 repositories does not yet work perfectly.  You can install and configure it close to the same way that it was in 8.04, however with one (annoying) difference.  Previously, you could just slide your fingerptint and it would be entered automatically, however a bug in this version makes it so that you have to slide your finger and then press the enter key.  if this doesn’t bother you, or you want to wait for the “official fix”, the follow these instructions (directions that fix this are  further below):

sudo apt-get install thinkfinger-tools libpam-thinkfinger

tf-tool --acquire

If that gives you an error, “could not get USB device” or similar, restart and try again.  Now it will ask you to slide your finger three times, do so until it reads 3 successful swipes.Then,

tf-tool --verify

It will ask you to swipe your finger one time, to verify the data on file. You no longer have to do the “tf-tool –add-user $USERNAME” command, it has been replaced by the above two commands.

At this point, there (thankfully) is a script that edits /etc/pam.d/common-auth so we don't have to. Execute the script with the following command:

sudo '/usr/lib/pam-thinkfinger/pam-thinkfinger-enable'

At this point everything should be working, just restart and you will be able to login and sudo using your fingerprint reader (keep reading to set it up to work on wake from suspend or screensaver).

If you do not want to have to press enter every time, before you install thinkfinger-tools and libpam-thinkfinger, you need to add the following sources to “Third Party Sources” under “Software Sources”:
deb http://ppa.launchpad.net/jon-oberheide/ubuntu intrepid main
deb-src http://ppa.launchpad.net/jon-oberheide/ubuntu intrepid main

Now, in order to have the fingerprint reader work to wake up from suspend or screensaver, use the following steps:

create a group “fingerprint” with the following command:

sudo groupadd fingerprint

then create a file with:

sudo nano /etc/udev/rules.d/60-thinkfinger.rules

Then paste in the following lines (use ctrl-shift-v to paste into terminal):

# udev rules file for the thinkfinger fingerprint scanner
# gives access to the fingerprint reader to those in the “fingerprint” group
# Taken from:
# http://www.thinkwiki.org/wiki/How_to_enable_the_fingerprint_reader_with_ThinkFinger
# which was taken and modified from:
# http://article.gmane.org/gmane.linux.drivers.thinkfinger/329

# SGS Thomson Microelectronics Fingerprint Reader
SYSFS{idVendor}==”0483″, SYSFS{idProduct}==”2016″, SYMLINK+=”input/thinkfinger-%k”, MODE=”0660″, GROUP=”fingerprint”

# the also-needed uinput device
KERNEL==”uinput”, MODE=”0660″, GROUP=”fingerprint”

Exit nano with ctrl-X, and save by hitting “y”.

Now, edit /etc/pam.d/gnome-screensaver with:

<code>sudo gedit /etc/pam.d/gnome-screensaver</code>

and add the lines:

auth sufficient pam_thinkfinger.so
auth required pam_unix.so try_first_pass nullok_secure

Between the two existing lines. save and exit.

Now add each user who has a fingerprint profile, and change the file permissions with the commands:

gpasswd -a $USERNAME fingerprint
chmod +x /home/$USERNAME/.thinkfinger.bir

Restart the computer, and it should work.  If you have any more problems leave a comment and I should be able to help you, or check out these other links that may help:


and the bug report for the bug that requires you to hit enter:


There is one problem that I don’t know how to fix, every time I boot, I get an authentication box telling me that the application “Do” (I assume gnome-do) requires that the gnome-keyring be unlocked.  This only happens when you login with the fingerprint, not when you type in the password. There is no pam_gnome-keyring.so file, so I don’t know what else to add or change to get this to stop.  I will file a bug on launchpad when I get a chance.

I hope that works for everyone, it did for me!


NOTE: I did this yesterday, and today I noticed the fingerprint reader was getting really hot… I saw a mention of a bug that causes this on thinkwiki, but I think the problem only occurs when I am plugged in instead of on battery. I also know that turning on USB Autosuspend does solve it, and powertop will enable that for you… I will investigate further later.

further note: the problem did not persist. Enabling USB Autosuspend once seems to have fixed the problem indefinitely.  Use the powertop program and it should ask you to enable USB autosuspend if you have this problem. If not, read the thinkwiki entry on thinkfinger, and it should help. If that doesn’t help, leave a comment and I’ll get back to you.

As of Feburary 16th, 2009 an update has broken functionality of thinkfinger. (it wrote over the /etc/pam.d/common-auth file) If the same thing happened to you, I wrote a post describing how to fix this problem.

Keyboard Shortcut Ubuntu 8.10

Posted in Guides, Linux by aliencam | No Comments »

In Ubuntu 8.10, Inrepid there is no obvious way to create a keyboard shortcut to run a command or open a program or similar.  However, I like to have the terminal on a keyboard shortcut (super ~) so, here is how to set up creating a keyboard shortcut in ubuntu 8.10.

press alt-f2 to open the launcher, and launch “gconf-editor”

then go to Metacity> keybinding_commands

choose any of the commands (I didn’t have any taken already, so I chose command_1) then set the value to the command you want to launch (so for myself, I changed the value to “gnome-terminal” to launch the terminal)

Then go to the folder Metacity > global_keybindings

select the “run_command_*” equivelent of the command number you chose in the first step (I would select “run_command_1”) and change the value to the hotkey that you want to launch that command.   So for my command, I want it to be the windows key, and the tilde (~) key, I set it to “<Super>dead_grave” the windows key is always “<Super>” and because I use the international (with dead keys) keyboard layout, I had to set it to “dead_grave” instead of regular “grave” or “tilde” (grave is the ` character, or what you get when you press the tilde key without a shift)

You could also set this in compiz general keybindings, but I prefer to use the gconf-editor because I can make a key run any command I want, and I don’t need to have compiz installed/running for it to work.

Note: this will only work in Gnome, to do a similar thing in any or all window managers, follow this guide: http://ubuntuforums.org/showthread.php?t=79560



Posted in Guides, Life in General, Linux by aliencam | No Comments »

Installing Mathematica in Intrepid does not work easily, I figured out that the problem is that you need libstdc++.so.5 installed. So, you should already have getlibs installed if you have a 64-bit system (if you do not, go to http://ubuntuforums.org/showthread.php?t=474790 and install it from there)

If you have a 64-bit system, in terminal enter:

getlibs -64 libstdc++.so.5

and if you have a 32-bit system, you just need to remove the “-64”.

After installing Mathematica 6.0 in Ubuntu Intrepid 8.10, the bugs in Mathematica 6.0 are still causing the same problems.  These are: when you open mathematica, you get two blank windows spawned, and anyhting typed does not show up at all.

A solution to the extra windows spawning is to go to Edit> Preferences > Advanced, then click “Open Option Inspector.” In there go to Notebook Options, then Winodw Properties, and change Window Frame to “Generic”.

Then you can solve the problem of the text not appearing by always launching mathematica with the command “Mathematica -defaultvisual”, however it is annoying to type this every time, so here is a fix so that you don’t have to do that:

hit alt-f2 to open up a launcher, and launch “gksu nautilus” now be VERY CAREFUL, because you are now browsing the computer’s files as root and you can easily mess up everything.

Go to /usr/local/Wolfram/Mathematica/6.0/SystemFiles/Libraries/Linux-x86-64 (or /Linux if you are 32-bit) and rename the files “libQtCore.so.4” and “libQtGui.so.4” to “libQtCore.so.4.backup” and “libQtGui.so.4.backup”.

then close that window, open a terminal, and enter:

getlibs -64 libQtCore.so.4

getlibs -64 libQtGui.so.4

(removing the “-64” if you are using a 32-but OS)

That should be all, Mathematica should work correctly from now on.

Of course, if you have Mathematica 6.0.1, there aren’t any of these problems anyway, but ASU’s license does not include the updates (nobody cares about us Linux users!)


Ubuntu 8.10; The Intrepid Ibex- a summary

Posted in Life in General, Linux, Lists by aliencam | 5 Comments »

I have to say, I was really excited to make the switch from Ubuntu to Kubuntu this time.  I had Kubuntu installed and everything, but I couldn’t get so many things to work that I didn’t see the worth in staying with it.  I have too much schoolwork and too many other things to do to make it viable.  I have decided that I would like to try again over Christmas break, and then I will certainly try again with Ubuntu 9.04 in April I believe? Little problems, like adept was not working well (I like having all the update/upgrade things be different programs like package manager/synaptic/software sources is )

Anyway, a few people have asked me what is better about Ubuntu 8.10, and why it is worth upgrading.  There are a few changes, most of them are very subtle though, so I couldn’t think of many when these people asked.

Here are some things that “just work” better in Ubuntu 8.10

  • Power Usage: I believe a fresh install of ubuntu 8.04 used about 17-18W, 8.10 “out of the box” is using 16W.  I should, with any luck, be able to get that down to 11W on a regular basis and maybe even 9W when I really want the crazy 7 hour battery life that I can get at that level.
  • Network Manager Applet 0.7.0:  @jbh showed me that I could install it in 8.04, but it provides many improvements to the old network manager, like not spazzing out when you have 2 or more network connections simultaneously, it is shinier, and there are better configuration options.
  • the panels “slide” in from off the screen on boot:  this is just cool.
  • Updated Nautilus: you can change your pidgin(AIM) status from the shutdown/suspend/hibernate/restart menu, and you can have tabs in the file explorer! (the former is just kind of silly, but the latter is really nice)
  • New The GIMP: is it even called “The GIMP” anymore, or is it just regular “GIMP” now? Anyway, wow the new version is amazing compared to what it has been.  Way more user-friendly, more photoshop-like, better preferences menus, and pressure sensitivity works with my tablet in it now!
  • “Touch” functionality works (after xorg.conf configuration detailed earlier)
  • “Create a USB Startup Disk” menu option:  cool! don’t need to do anything complicated to make a USB stick that can install/liveboot ubuntu!
  • The Wifi and Bluetooth LEDs on my laptop actually work now! not that that was a big deal, but it was kind of weird that the wifi light never worked previously.
  • The “Ondemand” kernel module is loaded and “ondemand” is selected by default! this is great for saving power on people’s computers who didn’t set it up before (meaning longer battery life!)

I keep finding new cool things all the time, so this is not a complete list, you can see the “official list” here.  But many of the things I am noting are the kinds of things that aren’t listed on the featureset upgrade page.


Creative Commons License