Please login or register.

Login with username, password and session length
Advanced search  


Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: HOWTO: Ratpoison Basic Configuration  (Read 4667 times)


  • Vectorite
  • ***
  • Posts: 128
HOWTO: Ratpoison Basic Configuration
« on: July 08, 2012, 04:29:14 pm »

HOWTO: Basic Ratpoison Configuration

This is a basic configuration, i haven't learned all the tricks to it but i do know what works for me :).

Right now it is in the 'testing' repo (thanks to stretchedthin), so uncomment it, update and install...
Code: [Select]
# slapt-get -u && slapt-get -i ratpoison-1.4.5 xxx (make sure you install the version you need 32 or 64 bits)

I installed the 32 bit version and it's running like a Deere, i'm writing this howto from it on Leafpad.

Ratpoison is at first pretty ugly and the mouse cursor is an X, so you have to configure it.
Install 'dmenu'

Code: [Select]
# slapt-get -i dmenu

The way it works is: you press a 'bind' key plus another letter you assign to a package you want to launch.
In my opinion it's easier to do this configuration from the window manager or whatever desktop environment you're using at the moment.
The default keybind (or bind key) is C-t (Control + letter t) but to me, it's cumbersome and painful on the wrist or fingers.
If you google you'll find tons of material on '.ratpoisonrc' or 'ratpoison configuration' to each his own.

I found  this article by Dion Moult which explains how to change the bind key to the Caps Lock (the key next to your left pinky finger). It's a very good article, you should read it.
It explains how to make the Caps Lock key your bind key:
Create the file .xmodmaprc in your /home:

Code: [Select]
$ touch .xmodmaprc

Once created, enter it with favorite editor:
Code: [Select]
$ nano .xmodmaprc

And paste this:
Code: [Select]
remove lock = Caps_Lock
keycode 66 = F13

Put xmodmaprc in your .xinitrc:

Code: [Select]
xmodmap .xmodmaprc

It's called .ratpoisonrc, so you create it:

Code: [Select]
$ touch .ratpoisonrc

Then you enter it:
Code: [Select]
$ nano .ratpoisonrc

You'll notice is blank, then paste and post something like this:

Code: [Select]
alias term exec xterm
escape F13

exec xrdb -merge "$HOME"/.Xdefaults
warp on
startup_message off
set winname class
defborder 0
set padding 0 12 0 0
defbarpadding 0 0
exec xsetroot -solid black -cursor_name left_ptr
bind semicolon colon
set bargravity sw
set winfmt %n %s %t
set fgcolor yellow
set bgcolor black
set font "Terminus-12"

alias showroot exec ratpoison -c fdump; ratpoison -c 'select -' -c only
alias unshowroot exec ratpoison -c "frestore at $HOME/.rpfdump"

### Escritorios virtuales/Workspaces
exec rpws 1
exec /usr/bin/rpws init 6 -k

## bind = F13
bind F1 exec rpws 1
bind F2 exec rpws 2
bind F3 exec rpws 3

bind J exchangedown
bind K exchangeup
bind L exchangeright
bind H exchangeleft

bind j focusdown
bind l focusright
bind h focusleft

definekey top M-Tab next
definekey top M-ISO_Left_Tab prev

### Atajos de teclas/Keybindings
bind e exec pcmanfm
bind f exec firefox
bind m exec claws-mail
bind u exec xchat
bind l exec leafpad
bind r restart
bind h exec sudo /sbin/halt -p
bind p exec sudo /sbin/reboot
bind o exec libreoffice3.5
bind space exec xterm
bind d exec dmenu_run
bind w windows
bind k kill
bind Escape abort
bind q only

rudeness 12

##To launch a Run box (Ctrl+Space bar):
definekey top C-space exec

# To make a screenshot (Press the Print key)
definekey top Print exec xterm -e scrot -cd 10

# Sound Volume
bind KP_Multiply exec amixer set Master 5%+
bind KP_Divide exec amixer set Master 5%-


To launch a terminal: press bind key (caps lock) a white small square will appear and then press the space bar, and the xterm (or whatever you specify in .ratpoisonrc) will appear.

Ditto for all the other apps.

You want to abort in the middle of an operation? Bind key + Escape.

Close an app? bind + k

What windows you got open? bind + w

Want to go to one of them? bind + the window #

Want to launch dmenu? bind + d

After every change 'restart rp' with: bind + r

What time is it? bind + a

Snapshot? press the key Print.

You miss fbrun? Control key + Space bar

If you want to split the screen horizontally: bind + s

Vertically? Bind + S

Go back to normal? Bind + q

To reboot or halt, become a member the 'wheel' group, #visudo, and uncomment the one with the NOPASSWD option and do your sudo magic, then press bind + h or p and voilĂ !

You can launch it from your .xinitrc, or GDM (thanks to strechedthin) here's my .xinitrc:

Code: [Select]

setxkbmap -option terminate:ctrl_alt_bksp
xsetroot -solid black
xrdb -merge .Xdefaults
setxkbmap es &
unclutter -idle 2 &
numlockx &
xmodmap .xmodmaprc
exec ratpoison

$ startx

It should work otherwise, reboot.

Please feel free to contribute to this howto and correct any mistakes, was done in a hurry.

« Last Edit: July 27, 2014, 06:39:02 am by macondo »
VL 7.1 Light - jwm
"Sometimes a man finds his destiny on the road he took to avoid it"