Make CTRL+Arrow keys move forward/backward one word in terminal

April 20, 2007

EDIT: This was fixed in gutsy 7.10.

In all text editors, CTRL+Left or Right moves forward or backward one word however by default this is not the behavior of the various terminal emulators in ubuntu. First open your ~/.inputrc. You might have to create this file.

gedit ~/.inputrc

Now paste following lines:

"e[1;5C": forward-word
"e[1;5D": backward-word
"e[5C": forward-word
"e[5D": backward-word
"ee[C": forward-word
"ee[D": backward-word

Now save the file and run this command to update the system without rebooting:

source ~/.inputrc

You should now be able to open a terminal, and move forward and backward one word at a time using CTRL + left or right.


Make Konqueror use your default view mode in new tabs

April 5, 2007

There seems to be a bug in konqueror where it uses the icon view mode in new tabs even if you have detailed list (or any other mode) selected as the default view mode in the File Management view profile. I found a workaround today on the konqueror bug page.

It’s actually pretty simple and involves no terminal commands. In konqueror, go to Settings, Configure Konqueror. Scroll down and click on “File Associations.” In this section expand “inode” and then click on “directory.” Now, go to the “Embedding” tab. Under “Services Preference Order,” move “Detailed List View” to the top.

Now when you open a new tab in konquerer it will use the detailed list view mode.

EDIT: PCLinuxOS users read here. To set detailed list view as default in PCLinuxOS: Open Konqueror (via System Menu->Home Folder), set view mode to “Detailed List View” and save this setting to the save view profile “File Management”. (Thanks to Dexamillion for this – see his comment below)


Disable firefox going back/forward on horizontal scroll

April 1, 2007

This is actually quite simple and I have seen many forum posts about this problem. All you have to do is type “about:config” in your browser, and use the search tool to find the following options:

mousewheel.horizscroll.withnokey.action (change it to 0)

mousewheel.horizscroll.withnokey.sysnumlines (change it to “true”)

Now restart firefox and that annoying behavior should be fixed.


Mp3 support for amaroK in (k)ubuntu linux

April 1, 2007

It took me awhile to find out how to get mp3 support in amaroK, so I thought I’d share how I did it. It’s quite simple. In order for this to work you must already have mp3 support in other non-xine applications. To find out how to do that you can go here.

Once you are sure you have mp3 support in non-xine applications, all you have to do is install the libxine-extracodecs package:

sudo aptitude install libxine-extracodecs

Now just restart amaroK, and you should be good to go.

If this doesn’t work, you can try running

/usr/lib/amarok/install-mp3

If it still doesn’t work, try running amarok as root. If it successfully plays mp3s when run as root, try this:

mkdir ~/.xine/plugins/ && cp -r /usr/lib/xine/plugins/1.1.4/ ~/.xine/plugins/

That command copies the plugins installed for the root user into your home directory. You should now be able to run amarok like usual (as a user) and play mp3s.


Enable horizontal scrolling on synaptics touchpads in ubuntu linux

April 1, 2007

For some reason horizontal scrolling on synaptics touchpads is disabled by default in ubuntu. This tip will show you how to enable it.

Before we start, it is important to make a backup of the file we are going to edit. If you make a mistake it is possible that your desktop environment will not start. So, open a terminal (Applications, Accessories, Terminal) and run the following command:

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup_touchpad

If you do make a mistake and end up without a desktop environment (X won’t start) then simply hit ctrl+alt+F1 to get to a virtual terminal and run the following commands:

sudo cp /etc/X11/xorg.conf.backup_touchpad /etc/X11/xorg.conf
sudo /etc/init.d/gdm restart

You should probably write down the above commands if you don’t know what they mean.

Now that we made a backup, we can edit the file:

sudo gedit /etc/X11/xorg.conf

Find the section similar to this:

Section “InputDevice”
Identifier “Synaptics Touchpad”
Driver “synaptics”
Option “SendCoreEvents” “true”
Option “Device” “/dev/psaux”
Option “Protocol” “auto-dev”
EndSection

Add the following line before the “EndSection” part, under the other options:

Option "HorizEdgeScroll" "1"

After saving the file and restarting X (Ctrl + Alt + Backspace) horizontal scrolling using the bottom edge of your touchpad should be enabled.

Sometimes the area that the touchpad interprets as a scroll event is too big or too little. To fix this, we can do some tweaking. We don’t want to have to restart X each time we make a change so thankfully we can tweak touchpad settings on the fly before writing them to xorg.conf. First, run:

syndaemon -d && synclient -l

The latter command will output a list of all your touchpad settings. Find the section that looks something like this:

RightEdge = 5250
BottomEdge = 4300

Your values will most likely be different. The “RightEdge” value is the x coordinate of the invisible line of where the touchpad will translate vertical movement into a scroll event. Same for the “BottomEdge” value.

So, if you want to make the area for horizontal scrolling smaller, increase the BottomEdge value from 4300 to 4400:

synclient BottomEdge=4400

You can do this any number of times on any setting that synclient -l outputs. When you’re done, make sure to change the settings in your /etc/X11/xorg.conf like we did above, otherwise after you reboot your settings will be lost. Also remember to follow the syntax of the other options in the touchpad section of xorg.conf.