Further Lighten antiX Ratpoison!
Sudo and Ratpoison!
Many thanks to macondo.
Sudo is installed by default in antiX
Edit the file /etc/sudoers
# nano /etc/sudoers
and added the last 2 lines for myself and my wife (the only other user) and left it looking like this:
# sudoers file. # # This file MUST be edited with the "visudo" command as root. # # See the man page for details on how to write a sudoers file. # # Host alias specification # User alias specification # Cmnd alias specification # User privilege specification root ALL=(ALL) ALL onthego ALL=/usr/sbin/mesm %users ALL=/usr/bin/apt-get -s upgrade macondo ALL = NOPASSWD : ALL giovi ALL = NOPASSWD: /sbin/halt, /sbin/reboot
then I tested it, as user:
$ sudo apt-get update && sudo apt-get dist-upgrade
works fine. My wife can only shutdown and reboot.
Ratpoison is a very light wm that only uses 1,4 MB RAM (acording to ps aux), whereas icewm and fluxbox use 4-5 MB RAM, so if you got an old box..
To install, a simple:
#apt-get install ratpoison
The version for rp in the ubuntu repos is not the latest (1.4.0) and I wanted the latest (1.4.1). I couldn't remember what came by default with antiX so I installed everything:
$ sudo apt-get install zip unzip bzip2 build-essential xorg-dev checkinstall
it told me some were already the latest versions and proceeded to install the rest. I created a new folder in my /home and named it 'source', then went to the rp website:
and downloaded the source to my /home/macondo/source folder, read the INSTALL section, then moved/cd to rp's location:
$ cd /home/macondo/source/rat<TAB> to autocomplete the name
once there, I proceeded to compile it:
as user: ./configure make sudo checkinstall -D (D for Debian and S for Slackware)
then installed the newly made .deb:
sudo dpkg -i rat <TAB key> <Enter>
and that was it, added this to my .ratpoisonrc:
alias term exec aterm escape F8 warp on startup_message off set winname class defborder 0 defpadding 0 0 0 0 defbarpadding 0 0 exec xsetroot -solid black -cursor_name left_ptr bind semicolon colon bind colon exec
alias showroot exec ratpoison -c fdump; ratpoison -c 'select -' -c only alias unshowroot exec ratpoison -c "frestore at $HOME/.rpfdump" bind B showroot
###Shortcut for apps bind F12 exec xfe bind F11 exec xchat bind F10 exec xzgv bind F9 exec aterm -e elinks bind o exec opera bind f exec firefox bind F6 exec sylpheed-claws-gtk2 bind F5 exec aterm -e scrot -c -d 10 bind x exec xtrlock bind r restart bind Delete exec sudo halt bind W exec ~/bin/windows bind c exec aterm
#numpad numbers work to select window bind KP_0 select 0 bind KP_1 select 1 bind KP_2 select 2 bind KP_3 select 3 bind KP_4 select 4 bind KP_5 select 5 bind KP_6 select 6 bind KP_7 select 7 bind KP_8 select 8 bind KP_9 select 9
F8 + c <will launch aterm, etc> F8 + o <launches opera> F8 + f <launches firefox> F8 + Delete <shutdown> F8 + r <restart> F8 + a <will give you time and date> (in the upper right corner) F8 + w <will show what windows you got open> F8 + k <closes the app you're using> F8 + s <splits the screen horizontally> F8 + S <splits the screen vertically> F8 + Q <unsplits, back to normal>
To move between screens a la alt-tab, there are 3 ways:
F8+F8 F8+Enter F8+Space bar
For a Run box, add the following to the bottom of the .ratpoisonrc file:
# top-level shortcuts (don't require prefix key) definekey top C-space exec definekey top Print exec aterm -e scrot -c -d 10
Ctrl + spacebar will give me run box on the right hand corner, good for sudoing and launching apps as user.
The reason I use F8 as my meta key is because I don't have to move my hand from the keyboard, but you could replace F8 with the keys Pause, Insert, or the default Ctrl+t (C-t). In order to take a screenshot all I have to do is press the Print key, nifty huh?