Logitech G9x Laser Mouse
I got lucky enough to have received a G9x Laser Mouse as a gift recently. Up until this day, I’ve always used whatever mouse came with the computer and never had come to a thought of using otherwise. Being presented with a more advanced mouse, I can’t tell you how much I’m enjoying it.
Logitech defines the G9 as a ‘gaming mouse’. I’m not sure this is a ‘game mouse’, the G9 seems to apply more to the advanced user, but.. ehhh. It has seven mouse buttons, DPI switching, built-in memory for profiles, and an optional grip. The seven mouse buttons are: left-click, right-click, middle-click on scroll-wheel, left-scroll, right-scroll, forward and backward buttons (for use in browsers). The G9 includes a nice, big, fat scroll wheel that has a switch to change from the expected click-scrolling to hyper-scrolling. Hyper-scrolling is a blast. It’s like spinning a Lazy-Susan and just watching it go :).

All settings are hardware-based and get saved to the G9’s built-in memory so there is no need to copy the Window’s settings. The memory is capable of five different profiles that can be customized for gaming, graphic design… The G9 is customizable through Logitech’s Setpoint software which unfortunately isn’t available for Linux. I tried to run the Setpoint installer through Wine on Linux but was unable to. I had to resort to configuring the G9 with my Windows install. With Setpoint a good number of settings can be adjusted: buttons, scroll-speed, mouse speed/acceleration, profiles, LED color… However, some settings are dependent on Windows (mouse acceleration, DPI association with program…), but a good number of them work in both Linux and Windows.
The G9 is a great fit in the hand and I like how it is wider than typical mouses. The buttons have nice touches to them, and I like the weights you can add that make the mouse a bit heavier. The scroll wheel works nice for scrolling though it is a bit loose. This creates a small vibration when scrolling and a bit of loose space from left to right. The buttons of the scroll wheel are the blind spot of the G9 – all three buttons on the scroll wheel are a bit rigid. Mouse button three isn’t too difficult, but doing scroll left makes you move your finger to the edge and push pretty good. I also found that hyper-scrolling wasnt’ real useful. The wheel spins almost freely and I found it’s difficult to go through text in this wheel mode and be able to keep text steady.
Liking this mouse quite a bit, if just feels good. It has a comfortable design, good fit, slides well, good cord length. It also works good in Linux. On my Arch Linux install, most functions worked without any additional configuration. The only bit that doesn’t work is the scroll-left and scroll-right which I have yet to find out how to do. Also I discovered that the LED color can be changed in Linux with a nice program called g9led. Overall, very glad I got this.
Update: Discovered how to remap the keys here… alls golden. Note that previous versions of the G9 may have the buttons mapped slightly different.
Adobe… disappointing. New Flash Player Could be a Greater Risk.
Previously I’ve had so much trouble with Flash that I’ve had to remove it from my system. It wasn’t the concerns of performance that led to this but rather of security. Security holes in Flash make it possible for attackers to do code execution on the system. This isn’t just word of ear, I’ve experienced this first-hand, from flash video stoppages, to manipulating files on my computer. This can and has allowed a hacker(s) full access to my system. It’s pretty hard to live without Flash though on today’s web, and later I learned that this behavior can be curbed by disallowing Flash cookies. Don’t think that common Firefox add-ons that erase the cookies periodically or when you close Firefox will do the trick, for it to work, all cookies have to be disallowed (the script at the end of article can do this). Back on track, I was hoping that the new version of Adobe Flash Player (version 10.0.42.34) would fix these problems. The new version has six critical patches. So after waiting for nearly 11 months for the update, I was pretty excited. Unfortunately, almost immediately after installing it, my system has been compromised again. And, this time, Flash cookies are disabled. To bad html5 video couldn’t agree on a codec, would have been nice to see a challenge, until then I’m going to have to stick with Flashplugin-10.0.32.18. :(
flashprotect
This script toggles enabling flash cookies. It toggles because some Flash videos require them.
#!/bin/bash
# flashprotect - redirect flash config files to dev null
# Text color variables
bldylw='\e[1;33m' # yellow
bldred='\e[1;31m' # Red
bldgrn='\e[1;32m' # Green
bldblu='\e[1;34m' # Blue
txtrst='\e[0m' # Text Reset
# Create (or restore orginial) directories if they don't exist
if [ ! -d ~/.macromedia ] && [ ! -L ~/.macromedia ]; then
if [ -d ~/.macromedia.bck ]; then
mv ~/.macromedia.bck ~/.macromedia
echo -e "${bldblu}*${txtrst} Restored backup ${undwht}~/.macromedia${txtrst} folder (no original found)"
else
mkdir ~/.macromedia
echo -e "${bldblu}*${txtrst} Created ${undwht}~/.macromedia${txtrst} folder (none found)"
fi
fi
if [ ! -d ~/.adobe ] && [ ! -L ~/.adobe ]; then
if [ -d ~/.adobe.bck ]; then
mv ~/.adobe.bck ~/.adobe
echo -e "${bldblu}*${txtrst} Restored backup ${undwht}~/.adobe${txtrst} folder (no original found)"
else
mkdir ~/.adobe
echo -e "${bldblu}*${txtrst} Created ${undwht}~/.adobe${txtrst} folder (none found)"
fi
fi
# Do ~/.macromedia and ~/.adobe match (both directory or links)? If no then fix.
if [ -d ~/.macromedia ] && [ -L ~/.adobe ]; then
rm -f ~/.adobe
if [ -d ~/.adobe.bck ]; then
mv ~/.adobe.bck ~/.adobe; else
mkdir ~/.adobe
fi
echo -e "${bldblu}*${txtrst} Made both ${undwht}~/.macromedia${txtrst} and ${undwht}~/.adobe${txtrst} directories (mismatch)"
fi
if [ -d ~/.adobe ] && [ -L ~/.macromedia ]; then
rm -f ~/.macromedia
if [ -d ~/.macromedia.bck ]; then
mv ~/.macromedia.bck ~/.macromedia; else
mkdir ~/.macromedia
fi
echo -e "${bldblu}*${txtrst} Made both ${undwht}~/.macromedia${txtrst} and ${undwht}~/.adobe${txtrst} directories (mismatch)"
fi
# Toggle /dev/null and orginal directories
if [ -d ~/.macromedia ] && [ -d ~/.adobe ]; then
mv ~/.macromedia ~/.macromedia.bck
mv ~/.adobe ~/.adobe.bck
ln -sf /dev/null ~/.macromedia
ln -sf /dev/null ~/.adobe
echo -e "${bldgrn}*${txtrst} Flash cache/settings protected"; else
rm ~/.macromedia
rm ~/.adobe
mv ~/.macromedia.bck ~/.macromedia
mv ~/.adobe.bck ~/.adobe
echo -e "${bldred}*${txtrst} Flash cache/settings allowed"
fi
Taking a KDM Screenshot
To take a screenshot of KDM or Ksplash, here’s a couple tricks. Didn’t find this information readily, so hopefully this helps someone out.
In ‘/usr/share/config/kdm/Xsetup’ add this line:
sleep 10 && import -window root /tmp/kdm.png &
Xsetup runs root commands before the login screen appears. This can’t be run from the command line because Xsetup adds environment variables that allows you to do this (not sure what they are). The ’sleep 10′ second time is going to depend on how quickly your Xorg server loads. If it comes up slowly, increase that value.
For Ksplash screenshots, the only reliable way I’ve found to do this, is the ‘Test the theme’ in System Settings. First:
scrot -q 100 -d 14 Preview.png
Then start the test.
Setting Up a Scripting Environment
When you first start learning Linux, you don’t realize lot of it lies beneath the surface. Linux still holds on to it’s developmental roots and a good deal of it’s power can be found directly from the command line. You won’t find this type of ability in Windows, and though Mac OS X has some of it, few people know about it (and takes a bit more to set it). If you need to do powerful or automated commands with Linux (whether it be switch mouse buttons, or launch multiple programs at once), you can almost always turn to the command line and create a bash script for it.
This guide will show you how to set up a scripting environment that will show you were to place scripts, how to easily get to them, and execute them like you would a regular command.
Directory Setup
Bash is very powerful, there’s been few things that I can do from a window that I can’t do from the terminal, and many more from the terminal. First thing you’ll want to do is set up a directory to place your scripts in. This directory should be in your home folder and preferably it’s best to have it invisible. This may sound inconvenient at first but since these commands are run from the terminal they can be easily gotten to. I like to create a directory called ~/.bin to store my scripts in, other people will call it ~/.scripts. Your choice. If you want to follow Linux filesystem guidelines, use ~/.local/bin. ‘Dot files’ are not shown unless explicitly stated. First create the directory from the terminal:
mkdir ~/.bin
The tilda character (~) signifies that the directory is the home directory and is quicker than typing /home/user. Now to easily get to that directory create a shortcut to it in the bash configuration file. Shortcuts in the bash configuration file are called aliases. Edit the ~/.bashrc and add:
alias cdb="cd ~/.bin"
Save it and now ’source’ the bash configuration file to reload the bash environment with the new settings:
source ~/.bashrc
Now type:
cdb
And you will be in your script directory.
Run Scripts Just Like Regular Commands
Now you can begin creating scripts or put scripts you find here. Creating a script is outside this tutorial but once you have one, you will need to make it executable:
chmod +x script-name
Now to be able to run the script like a regular command, you are going to have to define to bash a new executable path. Anytime you run a command in bash, it looks for programs or scripts that are in the path. You can find the current paths that bash knows by:
echo $PATH
To add your bash script directory to the path, you will need to edit the ~/.bashrc again.
Your bash configuration file may already have some paths defined. Look for a ‘export PATH…’ line. If it does, you can just add your script directory to the line. If it doesn’t, you will need to add the script directory and define the current bash paths. If you don’t do the latter, this command will define just the path you list and your programs… will not be executable in the traditional way. To do this, type:
export PATH="~/.bin:$PATH"
Different paths are separated by a ‘:’ and you can add as many as you wish. Again for bash to know the path, the local bash environment will need to be ‘re-sourced’:
source ~/.bashrc
Now just type your command and you’re ready to go.
If you like to learn more about copying scripts (or text) from a window and pasting it to a file from the command line, see Command Line to Clipboard.
The Best Lightweight Browser
I just went through and reinstalling my system from a computer I hadn’t updated for a year and a half. For everything I needed, Gnome 2.22 and Firefox 3.0 did just fine. The computer is an iBook 300MHz that can use all the umphh it can get. Though it worked alright for a long time, I got a little picky and just wanted a lighterweight desktop (even a tricked out Gentoo can only do so much). The most important thing I needed was a web browser that was responsive. Firefox 3.0 actually didn’t do too bad… until it had been running a while. I was also hoping to get a few of the more popular features that modern browsers have like saving sessions and form-autofill.
Three Tries
I was all prepared to install Chromium on the iBook. I had planned to cross-compile on a faster computer (Chromium source code is like a 5GB download). Chromium really is the king of webkit browsers (and browsers in general) for resources and speed – so I really wanted to give it a try. I found out thought that the V8 javascript engine has a lot of x86 instructions built directly into it so that wasn’t an option. I decided to try the other lightweight browsers: Midori, Arora and Epiphany.
Midori
Midori runs fast, and seems to be well built. Unfortunately Midori wasn’t able to save login and password information and that ruled it out. To be fair though, the version of Midori in the Arch PPC repos is six months old and it probably has this feature by now.
Arora
I installed LXDE and OpenBox on my desktop to have a lightweight system. So with only the bare gtk libraries already installed, I wasn’t real crazy to install QT as well. Installing Arora though only required QT and one other dependency. From what I’ve been told, QT by itself can be good for lightweight desktops. Arora is coming along nicely. I tried the git version of Arora and it did pretty good. Arora is still in early in development though and there were glitches in the framework: tabs behaved unexpectedly when reaching the end of the window, the close tab button would disappear at times. Arora was fast but not as fast as Midori. Looks like webkit-qt is still playing a bit of catchup.
Epiphany
Epiphany is the same browser I had tried a couple years ago. Only more, and a bit less. When Epiphany used Gecko it was alright. It was a little bit better than it’s Firefox counterpart, but had the same problem after having run for a bit of time. I’m glad the Epiphany developers have decided to go with webkit. It renders fast, and the time I have been using it, it seems just as snappy even after I have been using it for awhile. There are webpages that Epiphany won’t know how to save a login and password, and it has no configuration option to remember your session. The Gnome Epiphany FAQ gives a nice phhhh and says that you can force kill the application (pkill epiphany) to get this behavior. I tested heavy pages like ESPN and Stack Overflow, and not a problem, even with multiple pages open.
Conclusion
Quite liking my new desktop now. Epiphany (for the most part) I am real happy with. Also for those that are interested: LXDE is a great choice for a lightweight desktop without many comprimises. I added stjerm to go along with the desktop because I do alot of my work from the terminal. I still like it quite a bit. I learned a couple more tricks about it and updated the webpage.
Kensington SlimType Keyboard (64365) Review
“Let your fingers do the walking”.
That old Yellow Pages slogan applies good to us that are on the keyboard often. We learn pretty quickly that a good tool makes all the difference. I learned this previously when I got a bargain keyboard that had broken keys originally, and later one had a shift key that quickly became very picky on how it was to be pressed, and then failed resume from sleep (which was a killer to debug). Since I am on the keyboard quite a bit, this was something I began to think about over and over.
The Kensington Slimtype keyboard has a laptop-like keyboard feel. There are two types of keyboards: low-profile, and those that have the high key presses. The best keyboard I use is on an old iBook G3 clamshell. It allows quick keypresses with a soft response that never bunch or conflict. When I saw Brians’ keyboard, I was a bit surprised people still used them. Seemed like a lot of extra work to press the key another half inch. I’m guessing a lot of this is about what a person is used to. People that use the Happy Hacking Keyboard have told me that they have a less likely chance of accidental keypresses using these keyboards. This isn’t true to me, but can accept that each has their own. If you like low profile keyboards, the SlimType does very well.
On the SlimType, the keypresses are nice and responsive. Not quite as low profile as on most laptops but actually the difference provides a good feel. The keys provide obvious click feedback and there is no doubt to when the key has been pressed. However, the bounce response a little too obvious. When I first started typing it felt like it was fighting me – the clicks a little too pronounced and bounces too springy. I found I had to run my hands over the keys a several hundred times (might be a bit of an exaggeration) and I got the feel I like. After I did this I found the typing to be fast and could closely replicate the speed I do on the iBook.
The gripping on the keys is subtle and useful. Kensington puts a nice texture on the keys that prevents slidding and it gives it a good tactile feel. This is my favorite feature on the keyboard but that perspective may be a bit skewed because I never had it before.

The keyboard layout makes the SlimType considerably narrower than a normal keyboard. This is very useful for desktops that have limited space. The reduced width mainly comes from how the keys are laid out, but the keys are a bit slimmer too (about a 1/16th of an inch from A to ;). This isn’t a big difference but I do find myself doing an awkward keypress on a rare occasion. The rest of the keyboard layout does take a bit of time to get used to. The numbers are layered a bit different and the function keys are slim. The Home, PgUp, PgDn are the most difficult to get used to and are on a single column right next the the Enter, Backspace… keys. And when I say right next to them, I mean it. There is no gap between them and I am still trying to get use to them after two weeks – old habits die hard :). If you were pretty loose about the space on the right side of the keyboard before (i.e. the gap between the Enter, Backspace.. and Home, PgUp…) you might find yourself accidentally pushing these keys from time to time. Also the arrow keys are taking some re-learning too being shifted to the left as well.
There are seven multi-media keys on the keyboard that cover the basic uses, unfortunately they don’t have the same quality as the other keys (they click awkwardly and and roll a little). Since they don’t get used often I don’t consider them a huge minus.
The keyboard profile is thin, not even a half-inch high. And allows those of us that rest our wrists on the desktops a lot more comfort. Not the proper position, I know :).

The footing grips very good and the keyboard is a bit heavier than other keyboards I’ve used that helps typing by keeping the keyboard in place.
Pluses
- Low profile keys, can type fast
- Textured keys
- Weight and footing
- 5 year warranty from a company that are good about their warranties
- Thin and narrow
- All the keys work in Linux and suspend! (ok, haven’t tried the Windows key)
Minuses
- Keypositions take some getting used to.
- Arrow keys to the left of what you usually expect.
- Chrome border – ugly and takes up extra space.
Conclusion
Absolutely great for normal typing after the spring had been taken out of them. If you like the laptop keyboard profile, you will very probably like this keyboard. It’s quick, responsive, and has a good tactile feel. For $30 I can’t really be too rough, without the Chrome border and no space between the Enter,Backspace… and Home, PgUp… it would have gotten a 4.5.
4/5 stars.
Command Line Dictionary Update
I do alot of work from the terminal so I like to have a dictionary available there. Previously if you read about my command line dictionary post you know that I used some html parsing with curl to do this, lately though I’ve learned about Sdcv and it’s absolutely great. Since I’m not always on the internet this option works alot better with the same results. I also added a thesaurus too. You can find it here.
Sleep Button in KDE 4 Workaround
If you noticed that pushing the sleep button does nothing in KDE 4 (as of this writing <=4.3.3), this is because of a bug in KDEs’ power management tool Powerdevil. It appears that in most cases Powerdevil does not recognize the Xorg servers’ XF86Sleep key. To fix this, you may be able to rebind the sleep key in the KDE control panel.
Add a New Input Action
Open System Settings then Input Actions. Then add a new Global Shortcut:

Name it ‘Sleep’ or whatever you like. Add a Comment if you wish and in the Trigger tab select your hotkey. Try setting the sleep key first. For me, setting the hotkey to the sleep key didn’t work because I believe that Powerdevil already has it bound. There have been others though that look to have sucessfully done so.
I bound mine to Scroll Lock (hope I don’t need it anytime soon) then in the Action tab entere the dbus command to suspend to ram:
qdbus org.kde.kded /modules/powerdevil suspend 2
If this doesn’t work, try ’suspend 1′. If you would like to suspend to disk:
qdbus org.kde.kded /modules/powerdevil suspend 4
Doukutsu (aka Cave Story) with an Xbox Controller
What do you know, Doukutsu (aka Cave Story) can be played with a Gamepad! For a Xbox controller this is how I set the controls:
And how to configure it:
Works great. I love this game. If you don’t want to install Wine (the configuration tool requires Wine) you can download this config file and place it as ‘~/.doukutsu/Config.dat.
tar -xvf doukutsu-config.tar.gz -C ~/
It’s an executable file (probably because the Wine app edited it), haven’t bothered changing it :).
To Parted Magic with <3
I’ve never gotten into a good grove when it comes maintenance of a hard drive. Usually this process involves me loading a LiveCD like Ubuntu, downloading the tools I needed (Gparted, shredder, Partiso…) and going through the slow proccess from there. On occasion when I have to do this process over I have to download all the tools again and it’s just not that much fun to try to remember where the package manager is and what the package names are. This is probably one of those cases where everyone has heard about it but me, but I just discovered Parted Magic and I’m… in… love.
Parted Magic is just a really well put together tool. It boots with a number of options in Grub (a nice feature [and the default] is that Parted Magic will load into RAM). The Grub menu also features SuperGrub which I’ve never tried before but am glad it’s there in case anything goes wrong. This is the first CD that I’ve booted to RAM (expect the Gentoo minimum install CD [which doesn't really count]) and the ability to take off the sludge of constantly churning, throughput-hogging CD drive is nice. Programs start in a snap and I feel that in my time I’m actually doing something instead of pretending I want another sip of coffee.
Parted Magic keeps it lightweight and uses the LXDE Desktop. I have never tried the LX Desktop Environment before but it is very responsive – something you can kinda forget about with modern desktops. Beside being fast, for the basic tasks I really didn’t find anything on LXDE I could not do on my KDE desktop. Thankfully too, Parted Magic keeps it lightweight by only including the needed programs so you won’t find yourself digging to find a program. Since I like to keep to the basics on my desktop (and trust me on KDE that isn’t an easy thing to do), I really appreciated this.
Parted Magic had all the tools I needed to be able to install a new hard drive. Since I wanted my old system on the new drive, I used Gparted to format it, then Clonezilla (yes, it’s included) to image it over. Afterwords, I resized the partitions with Gparted, then shredded the old drive with the Erase Disk utility. Other handy tools are also included like a mounting tool that makes mounting/unmounting quick and easy, TestDisk for possible repair of a damaged partition table, Photorec to recover Photos on a damaged drive, other cloning tools and believe it or not Firefox (which I think is a good idea in case you ever get in trouble). If you install on a USB stick you also have the ability to save the settings so they will be remembered on the next boot. This is really nice feature but must still be new as I found it would only work part of the time when the USB stick is loading.
Overall Parted Magic is a nice tool that I deperately needed. Thanks to Patrick who developed this tool and making my life in Linux alot more pleasant.
One More KDE 4 Gmail Checker
Not so far back, I was attempting to cope without a mail notification program on my KDE 4 destkop and not doing so well about it. There are plenty mail notification applets available on Linux most are for Gnome though and they pulled in alot of dependencies (mail-notification , gnubiff, checkgmail-notify-osd). For KDE a couple plasmoids exist (gx-mail-notify, emailnotify). I like both of these, particularly gx-mail-notify (the later though I found to be buggy). I also thought about kbiff from KDE 3 but it doesn’t look like it’s going to be updated to KDE 4. I’d been using KCheckGmail but somehow, someway, it broke recently. Yeah, I tried replacing the plasmarcs and recreating KCheckGmails’ configuration file but got nothing. Besides re-building all my KDE configurations again (~/.kde4) (which I’m not going to do [but does work when I created a new user]) I was up the creek. Luckily though I stumbled upon KGmailNotifier when I was on KDE apps. Marcel has taken KGmailNotifier just recently and updated it to KDE 4. The first thing I noticed is that KGmailNotifier doesn’t use the KDE 4 notification system and instead uses it’s own built-in popup. The effect is nice and has a nice display though I found that sometimes it will miss a mouse click. Beside that is a nice application. Both KCheckGmail and KGmailNotifier offer about the same functionality so I could go either way. For now I’m happy that I got my mail notifications back. Thanks for your work marcel.








