Scroll Wheel Function for the Marble Mouse on Linux

Computing, Linux 6 Comments »

Update: Since Ubuntu 8.10 "Intrepid Ibex" Hal has superseded xserver/xorg.conf as the preferred means to configure input devices. However, I couldn’t get the advice at

https://help.ubuntu.com/community/Logitech_Marblemouse_USB

to work for me. The article hints at shaky button mapping, so if you want to go back to the good old days of xorg.conf, you can add

Option "AutoAddDevices" "no"

to the "ServerLayout" section of your xorg.conf file which will effectively disable Hal. More info (in German) is  here:

http://www.blogs.uni-osnabrueck.de/rotapken/2008/08/14/xorg-evdev-und-hal-teil-2/

Update: This post has the settings for hal, and they work just like the old xorg.settings. Migration to hal will likely bring benefits for most, such as plug-and-play hot plugging. You might want to check out this writeup before taking the plunge.

Original post:

As you know I consider the Logitech Marble Mouse the Best Pointing Device, bar none. And the final tweak I wanted to enable the trackball to act as a scroll wheel. For Windows and those suffering from the generally horrid Logitech drivers and utilities (SetPoint anyone?), there’s Marble Mouse Scroll Wheel (original download page seems to be down recently, so here is another download link). But for my installation of Linux Mint/Ubuntu I had tried some advice from the web without success, to the point when X failed to load. Finally the approach suggested by linux (USA) in his Amazon review worked. It lets you use the right small button as a paste button and holding the left small button will let you use marble/ball as an omnidirectional scroll wheel. Here it goes:

You must edit your /etc/X11/xorg.conf file (dont’ forget to backup with cp xorg.conf xorg.conf.bak), for xorg 6.8 the relevant settings look like this:

Section "InputDevice"
Identifier "Configured Mouse"
Driver  "mouse"
Option  "CorePointer"
Option  "Device"  "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "Buttons" "5"
Option "YAxisMapping" "4 2"
Option "XAxisMapping" "6 7"
Option "EmulateWheel" "yes"
Option "EmulateWheelButton" "4"

EndSection

You also need to create an ~/.xmodmap file in your home directory and enter:

pointer = 1 5 3 4 2 6 7

With xorg 7.2 (released 15th Feb. 2007) and newer you have to remove the “YAxisMapping” and change the “EmulateWheelButton” to “8”, so that the entire section looks like this:

Section "InputDevice"
Identifier "Configured Mouse"
Driver  "mouse"
Option  "CorePointer"
Option  "Device"  "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "XAxisMapping" "6 7"
Option "EmulateWheel" "yes"
Option "EmulateWheelButton" "8"

EndSection

Your ~/.xmodmap file will have to contain this:

pointer = 1 9 3 4 5 6 7 8 2 10 11

instead of the above. The protocol setting “ExplorerPS/2” is also important to get the buttons to work even though the device is connected via USB.

To enable horizontal scrolling in Firefox you’ll have to go to the about:config page and set:

mousewheel.horizscroll.withnokey.action 0

The ~/.xmodmap file will likely be loaded automatically when you start your system, but if not you might have to create a ~/.xinitrc file. This page has more info, and here’s more info about monitoring your buttons using the xev utility. Hope it helps.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

UTF-8 Encoding in Netbeans Editor on Linux

Linux, Netbeans No Comments »

The Netbeans 6.1 editor seems to have problems displaying UTF-8 encoded files (Linux Mint Daryna, Ubuntu Feisty), so a source file with Thai (and probably Chinese, Japanese etc.) will look like this if project encoding is set to UTF-8:

Netbeans_utf-8

Changing font, project properties etc. won’t help, so before messing around to much and risking possible data corruption, here’s a workaround: Use Quanta Plus for editing, a fantastic editor I find myself using more and more and which hasn’t let me down. Here’s the section in Quanta Plus:

Quanta_plus_utf-8

Both editors will pick up each other’s edits, so it’s a cinch to use them simultaneously to edit the same files.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

rm * Argument list too long

Linux No Comments »

To delete all files in the current directory, you run the extremely dangerous 

rm *

and

rm -rf *

to recursively remove all files and directories.

However, the command has a 128K buffer limitation in the Linux Kernel. As a workaround you can pipe each file to rm like so:

find . -name ‘*’ | xargs rm

See this article for details.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

The Quest for a Linux Blog Editor

Blogging Software, Linux No Comments »

Many have tried, all have failed (at least to meet some or most of their expectations); in the quest to find a decent and feature-rich native Linux desktop blog editor, anything that can match the outstanding and free Windows Live Writer. The latter of course won’t run on Linux via Wine, unlike another option: After a long and arduous install/try/remove cycle with most Linux blog editors, I have to agree with this article: in the end you’ll end up with BlogJet and install it this way:

As first suggested here for Zoundry, it works with BlogJet as well and is endorsed by its creator: Get IEs4Linux and from WITHIN IE go to File>Open [All Files] and run the downloaded BlogJet installer:

Blogjet_linux

 Not sure if you’ll need the mfc42.dll file as suggested in the Zoundry article. After a quick install you’ll have a fast and well-designed blog editor on your Linux system which is almost as good as Windows Live Writer at most everyday blogging tasks.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Dual-Screen on Ubuntu with Intel 945GM Chipset

Computing, Linux 2 Comments »

You’ve surely read this article on the topic, which describes a long (and arduous) process to set up dual monitors on an Ubuntu system with a lowly graphics chip such as the Intel 945GM.

However, there is a much easier option which is outlined here

For my system, all I had to was add the bold line in /etc/X11/xorg.conf

Section "Screen"
	Identifier	"Default Screen"
	Device		"Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller"
	Monitor		"Generic Monitor"
	DefaultDepth	24
	SubSection "Display"
		Modes		"1280x800"
Virtual                 2048 2048
	EndSubSection
EndSection

I then “activate” the secondary monitor with the command:

xrandr –output LVDS –below VGA

There is a 2048 pixel limit for the height and the width of the total display. For me that’s no problem as I have a vertical setup (secondary screen ABOVE notebook screen), but your mileage may vary if you need the screens side-by-side.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in