2010-03-09 22:11

Here is a small C program I wrote some years ago: Clictap. It’s very convenient and I’m still using it to watch my movies.

It makes use of Xlib and Xtest libraries to replace your mouse buttons by keyboard keys.

I made a small Debian package a few days ago:

clictap_0.6-1_i386.deb

soon included in the official repositories ?

Configuration file example including profiles for totem, xmms, rhythmbox and mplayer:

# ClicTap configuration file
# You can copy this example to ~/.clictap.conf

# When this key is pressed, Clictap will ungrab your mouse and quit
# Examples :
# quit_key q
# quit_key ctrl+q
quit_key q

# Profile used by default
default_profile mplayer

# List of profiles
# For each profile, a set of buttons to keys translations is given,
# each translation on a separate line.
# For a translation, the first field is the set of buttons,
# the second is the set of keys.
# Buttons are specified by their numbers.
# Keys are specified by their KeySym (Key Symbols).
# To know the button numbers and KeySyms, use the xev program to test X events.
# Example :
#
# profile foo
# 	1   a
# 	2   b+c
# 	3+1 space
# 	3+2 Control_L+d

profile totem
	1 b
	2 p
	3 n
	4 Up
	5 Down

profile xmms
	1 w
	2 c
	3 b
	4 Up
	5 Down

profile rhythmbox
	1 Alt_L+Left
	2 Control_L+space
	3 Alt_L+Right
	4 Control_L+Up
	5 Control_L+Down

profile mplayer
	1 Left
	2 space
	3 Right
	4 asterisk
	5 KP_Divide

profile mplayersub
	1 x
	2 space
	3 z
	4 asterisk
	5 KP_Divide

profile test
	1 XF86AudioLowerVolume
	2 space
	3 z
	4 asterisk
	5 KP_Divide
2010-03-09 22:11 · Tags: , , , ,
2009-10-23 14:32

Here is how I configured dual screen under Debian unstable.

Xrandr

By default, the video card displays the same on both screens.

We first type the xrandr command to show the available video outputs.

Then, we issue the magical command:

xrandr --output DVI-1 --left-of DVI-0

Notes:

  • If xrandr displays an error, add the Virtual parameter to the /etc/X11/xorg.conf file and restart X (see below).
  • Try --right-of if it’s inverted !

Xorg settings

And to set the changes permanently, we edit /etc/X11/xorg.conf:

Section "Device"
        Identifier      "ATI Technologies Inc RV380 [Radeon X600 (PCIE)]"
        Driver          "ati"
 
        Option          "Monitor-DVI-0" "Screen 1"
        Option          "Monitor-DVI-1" "Screen 2"
EndSection

Section "Monitor"
        Identifier      "Screen 1"
EndSection
Section "Monitor"
        Identifier      "Screen 2"
        Option          "RightOf" "Screen 1"
EndSection

Section "Screen"
        Identifier      "Default Screen"
        Device          "ATI Technologies Inc RV380 [Radeon X600 (PCIE)]"
        Monitor         "DELL 1704FPT"
        DefaultDepth    24
        SubSection "Display"
                Depth           24
                Modes           "1280x1024" "1152x864" "1024x768" "800x600" "720x400" "640x480"
                Virtual         2560 1280
        EndSubSection
EndSection
  • In the “Device” section, we list the different screen as “Monitor-OutputName”.
  • Then we put one section by screen, setting the second screen position.
  • The subsection “Screen > Display” must contain the “Virtual” parameter with a pixel area big enough to contain both resolutions.

Note: you can also try the graphical grandr frontend.

Gnome panels

You now have two screen under Gnome : a main one and a second.

If you want your panels on the other screen, just move them (right click on panel > Properties, uncheck Extend, move the panel, check Extend again).

I also suggest you to add another panel with a new window list on your second screen.

References:

2009-10-23 14:32 · Tags: , , ,