HaylBlog

Saturday, January 28, 2006

Busy Busy Busy

Okay, I am yet again going to become busier. I have agreed to participate in a french-club at school. So, Mondays after school I will be blabbing in french at school for a couple hours. What does this mean? It means even less time for the IRC Channel, its blog and this blog :(

Friday, January 27, 2006

Current Screenshots

Here are a couple of screenshots of my Gnome 2.12 desktop on my laptop (1280x800).

Clean Screenshot

Messy Screenshot

Thursday, July 28, 2005

Configuring a Wacom Graphire Graphic Tablet for X

1. Kernel Modules

To get a Wacom Graphics Tablet to work, first verify that the correct modules are in your kernel.

In the "Device Drivers" / "Input Device Support" Section

(1600) Horizontal screen resolution
(1200) Vertical screen resolution
(M) Event interface

I modularize evdev but you can compile it right in if you want to. Obviously your screen resolution settings may be different than mine depending on what screen resolution you run at.

In the "Device Drivers" / "USB Support" Section

(*) USB Human Interface Device (full HID) support
(*) HID input layer support
(*) Wacom Intuos/Graphire tablet support

I just compile them right in you can modularize them if you want to.

Recompile your kernel if needed, if not then continue on.

Next, you need to have your system load evdev on boot. With Gentoo, you would add evdev to /etc/modules.autoload.d/. Other distros have similar mechanisms, please refer to your documentation. [if you modularized any other of the modules, you may need to load them this way as well]

2. Modifying xorg.conf


Lastly, add the appropriate lines to the X Config file (Xorg: /etc/X11/xorg.conf, XFree: /etc/X11/XF86Config)

Add the following Input Devices:

# Wacom Pen Devices (stylus, eraser, cursor)
Section "InputDevice"

Identifier "stylus" # Wacom Graphics Tablet
Driver "wacom"
Option "Type" "stylus"
Option "Device" "/dev/input/event0"
Option "Mode" "absolute"
Option "USB" "on"
Option "Speed" "3.0"
Option "Threshold" "10"

EndSection

Section "InputDevice"

Identifier "eraser" # Wacom Graphicvs Tablet
Driver "wacom"
Option "Type" "eraser"
Option "Device" "/dev/input/event0"
Option "Mode" "absolute"
Option "USB" "on"
Option "Tilt" "on"
# Option "TiltInvert" "on"
Option "Threshold" "10"

EndSection

Section "InputDevice"

Identifier "cursor" # Wacom Graphics Tablet
Driver "wacom"
Option "Type" "cursor"
Option "Device" "/dev/input/event0"
Option "Mode" "absolute"
Option "USB" "on"
Option "Tilt" "on"
# Option "TiltInvert" "on"
Option "Threshold" "10"

EndSection

#Wacom Mouse
Section "InputDevice"

Identifier "Mouse - Wacom Graphire"
Driver "mouse"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/input/mouse0"
Option "ZAxisMapping" "5 4"

EndSection

Add the following to the "ServerLayout Section":

# Wacom Tablet and Pen
InputDevice "stylus" "AlwaysCore"
InputDevice "eraser" "AlwaysCore"
InputDevice "cursor" "AlwaysCore"
# Wacom Mouse
InputDevice "Mouse - Wacom Graphire" "AlwaysCore"

Reboot if you had to compile a new kernel, or just load the modules and restart X if you already had all the required ones.

NOTE: You do not have to configure the Mouse Input Device or put it into the Server Layout if you do not want to use it.

3. Configuring The GIMP


If everything is configured correctly, then the Gimp will pick up the tablet atuomatically. Add the devices and assign pointers to them from File | Preferences | Input Devices (Gimp 2.x). It is generally considered best to set the Wacom devices to "screen".

Saturday, July 23, 2005

Securing the GRUB boot loader

If your PC is accessible by many people and you don't want them to be able to boot to single user mode, or change any boot options unless they enter a secure (MD5) password, then here is how to do it. (you will need to have a password on your BIOS and disable CD/Floppy boot as well for this to be totally effective)

Two menu files will be required for GRUB.

1. Create the MD5 password:

[ someuser@linuxbox ~ ] $ su
Password:
[ root@linuxbox /home/ddicks ] # grub-md5-crypt
Password:
Retype password:
$1$R3Sj50$rhFdPzjapU81VaHgE8IS5/

The long string of 'junk' is the encrypted password.

2. GRUB Configuration

Edit /boot/grub/menu.lst (or grub.conf) file so that only the normal boot options are available and also, add the MD5 password with a pointer to a second menu file (menu-admin.lst) (the second file name can be anything you want).

timeout 10
splashimage=(hd0,0)/grub/splash.xpm.gz
password --md5 $1$R3Sj50$rhFdPzjVpU81VNHgE8IS5/ /boot/grub/menu-admin.lst

title=Gentoo GNU/Linux - Kernel 2.6.5
root (hd0,0)
kernel (hd0,0)/bzImage-2.6.5 root=/dev/hda3

Create a /boot/grub/menu-admin.lst file (or other file name you chose):

default 0
splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo GNU/Linux - Kernel 2.6.5
root (hd0,0)
kernel (hd0,0)/bzImage-6.5 root=/dev/hda3

title=Gentoo GNU/Linux - Kernel 2.6.5 (recovery mode)
root (hd0,0)
kernel (hd0,0)/bzImage-2.6.5 root=/dev/hda3


NOTE: the menu-admin.lst file does not require a MD5 password option as you will have already have had to enter it to get to that menu.
Now, if you press the 'p' key when the first grub menu comes up, and enter the password, the second menu "menu-admin" will appear.

Configuring a Scroll/Wheel Mouse for X

1. X Configuration Changes

(Xorg-X11: /etc/X11/xorg.conf, XFree: /etc/X11/XF86Config)

Section 'InputDevice'
Identifier 'Intellimouse'
Driver 'mouse'
Option 'Protocol' 'IMPS/2'
Option 'Device' '/dev/usbmouse'
Option 'Buttons' '7'
Option 'ZAxisMapping' '6 7'
EndSection

2. Remapping the buttons

(add the following to ~/.xsession (or whatever other X startup script you are using)).

#remap the mouse pointer buttons
xmodmap -e 'pointer = 1 2 3 6 7 4 5'

3. Window Manager Configuration for WMs that do not properly support back/forward buttons on mice

Install xvkbd

In the settings for your keybinds/mousebinds in your WM or DE:

set mouse button 6 to:
xvkbd -xsendevent -text '\[Alt_L]\[Left]'

set mouse button 7 to:
xvkbd -xsendevent -text '\[Alt_L]\[Right]'

(NOTE: If your mouse does not have back/forward buttons, omit the 'Buttons' Option in the X Config, and use '4 5' in the 'ZAxisMapping'.) "

iPod on Linux with GtkPod

The iPod mounts like a hard disk. In fact, they are very handy to use for transporting any type of files from system to system in addition to being a great portable music player.

Directory listing of a mounted iPod:

[ someuser@linuxbox /mnt/ipod ] $ ll
total 12
drwxrwxrwx 2 someuser users 4096 Jan 1 1980 Calendars
drwxrwxrwx 2 someuser users 4096 Mar 15 2003 Contacts
drwxrwxrwx 6 someuser users 4096 Feb 8 2003 iPod_Control

The iPod is fully functional under Linux - even to the point of being able to use the new aac files if you use GtkPod.

I have a Mac iPod that I reformatted to VFAT (you have to reformat them to VFAT for it to work, the support for the Mac File System is not good enough under Linux kernels yet) that I hook up with FireWire. I installed some iPod software on a Windows XP PC and used that to format it to VFAT. You can also just format it using native Linux FAT filesystem tools. GtkPod can create the necessary 'base' files required for the iPod to work.

For a FireWire iPod, the following kernel modules are required:

IEEE 1394 (FireWire) support (EXPERIMENTAL)
OHCI-1394 support
SBP-2 support
Raw IEEE1394 I/O support

SCSI disk support

For a USB 2 iPod, the following kernel modules are required:

Support for Host-side USB
USB device filesystem
EHCI HCD (USB 2.0) support
USB Mass Storage support

SCSI disk support

The iPod will be mounted like a scsi drive. Add the following to /etc/fstab:

/dev/sda2 /mnt/ipod vfat defaults,user,noauto,sync,umask=000 0 0

It is mounted as sda2 because when the modules are loaded and the iPod is connected, sda1 is the iPod firmware.

I leave these modules running all the time:
ieee1394, ohci1394, raw1394

I load the vfat and sbp2 modules in the ~/.gtkpod/gtkpod.in script when the GtkPod program loads, and unload them when it exits ~/.gtkpod/gtkpod.out"