VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

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.

Pages: [1] 2

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

macondo

  • Vectorite
  • ***
  • Posts: 248
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 :).

INSTALLATION
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

KEYBIND
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

CONFIGURATION FILE
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


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

bind j focusdown
bind l focusright
bind h focusleft

##Alt-tab
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%-

--

HOW DO YOU MAKE IT WORK?
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à!

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

Code: [Select]
#!/bin/sh

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 »
Logged
VL 7.1 Light - icewm - jwm
“Just because you're paranoid doesn't mean they aren't after you.” ― Joseph Heller, Catch-22
Sergio Mendes - Brasil 77 Vintage '74 https://www.youtube.com/watch?v=3JxMa7uSH64&html5=1

Colonel Panic

  • Vectorian
  • ****
  • Posts: 535
Re: HOWTO: Ratpoison Basic Configuration
« Reply #1 on: January 10, 2016, 01:53:01 am »

Thanks for this; I'm looking at ratpoison (and stumpwm, a derivative of ratpoison) at the moment, not to replace the window managers I use but as a supplement to them.

I believe Salix has a version based on ratpoison, and maybe it or a different tiling window manager should be included in Vector as well.
Logged

macondo

  • Vectorite
  • ***
  • Posts: 248
Re: HOWTO: Ratpoison Basic Configuration
« Reply #2 on: January 10, 2016, 06:12:46 am »

Colonel Panic:
I wrote this howto a few years ago, all I have changed are my keybinds nowadays. I left Salix a few months ago because of an argument with gapan (one of the developers) about ratpoison. Their Salix-ratpoison distro is based on ratpoison 1.4.5 beta and is unusable IMHO, gapan fixed it so the user can only use C-t as the only bind key you can use and the fonts did not work well. I asked for the actual version (version 1.4.8).  and his answer was that I should do update rp  myself to the latest version.

I moved to Vectorlinux and asked for the recent version of ratpoison (1.4.8) and 24 hours later I had it, no fuss, no moss, and no name calling. The devs at VL really try to help you.
The most recent version for rp is one.four. eight, (the smiley icon gets on the way.) and VL has it on the repos.
« Last Edit: January 10, 2016, 08:09:48 am by macondo »
Logged
VL 7.1 Light - icewm - jwm
“Just because you're paranoid doesn't mean they aren't after you.” ― Joseph Heller, Catch-22
Sergio Mendes - Brasil 77 Vintage '74 https://www.youtube.com/watch?v=3JxMa7uSH64&html5=1

macondo

  • Vectorite
  • ***
  • Posts: 248
Re: HOWTO: Ratpoison Basic Configuration
« Reply #3 on: January 10, 2016, 09:06:55 am »

This is my latest .ratpoisonrc:

Code: [Select]
alias term exec qterminal
escape F13

exec xrdb -merge "$HOME"/.Xdefaults
warp on
startup_message off
set winname class
defborder 0
set padding 0 0 0 0
defbarpadding 0 0
exec xsetroot -solid black -cursor_name left_ptr
bind semicolon colon
set bargravity nw
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 F1 exec rpws 1
bind F2 exec rpws 2
bind F3 exec rpws 3

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

bind j focusdown
bind l focusright
bind h focusleft

##Alt-tab
definekey top M-Tab next
definekey top M-ISO_Left_Tab prev

### Atajos de teclas/Keybindings

definekey top F1 exec qterminal
definekey top F2 exec xfe
bind f exec firefox
definekey top F4 kill
definekey top F7 exec geeqie
definekey top F8 exec xchat
definekey top F9 exec libreoffice5.5
bind d exec dmenu_run
bind r restart
bind w windows
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 qterminal -e scrot -cd 10

# Sound Volume

definekey top C-Down exec amixer -q set Master 9- unmute && ratpoison -c "echo Master Vol Down"
definekey top C-Up exec amixer -q set Master 9+ unmute && ratpoison -c "echo Master Vol Up
definekey top C-0 exec amixer -q set Master 0 mute && ratpoison -c "echo Master mute"

My bind key is the Caps Lock (next to your left pinky) as explained by Dion Moult.
http://thinkmoult.com/ratpoison-an-efficient-and-minimalist-wm/

The default bind key is Ctrl+t (C-t) but you can use C-d, C-z, etc
example:
Code: [Select]
bind C-d
just put it in your .ratpoisonrc.
« Last Edit: January 10, 2016, 09:25:08 am by macondo »
Logged
VL 7.1 Light - icewm - jwm
“Just because you're paranoid doesn't mean they aren't after you.” ― Joseph Heller, Catch-22
Sergio Mendes - Brasil 77 Vintage '74 https://www.youtube.com/watch?v=3JxMa7uSH64&html5=1

Colonel Panic

  • Vectorian
  • ****
  • Posts: 535
Re: HOWTO: Ratpoison Basic Configuration
« Reply #4 on: January 12, 2016, 02:01:58 pm »

Dear macondo,

Thanks for replying and for including your latest version of ratpoison.rc, which I'll have a look at. I like the look of Salix when I can get it to install but my last attempts to install it didn't work because there's a file missing (home/.dmrc), so IIRC it doesn't load a window manager when you boot it up.

It's a shame that people are rude on forums to others who ask for help - the only winners in that scenario are Microsoft.
Logged

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3412
Re: HOWTO: Ratpoison Basic Configuration
« Reply #5 on: January 12, 2016, 02:04:05 pm »

That .dmrc stuff sounds like old config file for login managers.  VL may have a different approach to that now.

Colonel Panic

  • Vectorian
  • ****
  • Posts: 535
Re: HOWTO: Ratpoison Basic Configuration
« Reply #6 on: January 12, 2016, 02:08:00 pm »

That .dmrc stuff sounds like old config file for login managers.  VL may have a different approach to that now.

Very prompt reply, thanks!

Maybe, though I can't recall having the same problem with Vector or indeed any other distro I've tried.

.dmrc is a very simple file - just a text file with one line and a pair of brackets enclosing the name of the window manager it's going to load, such as [fluxbox].
« Last Edit: January 12, 2016, 02:10:22 pm by Colonel Panic »
Logged

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3412
Re: HOWTO: Ratpoison Basic Configuration
« Reply #7 on: January 12, 2016, 02:08:55 pm »

Can you post a full copy of the file?  We should do some research as to which package provides or expects it.

The solution appears to be rather simple.

As you (non-root user), do this
Code: [Select]
touch ~/.dmrc
chmod 644 ~/.dmrc

That should solve your problem.  If you *need* to put anything inside .dmrc, edit the file.

A web search reveals the permissions must be right on this file, otherwise, it will complain.
« Last Edit: January 12, 2016, 02:12:59 pm by M0E-lnx »
Logged

Colonel Panic

  • Vectorian
  • ****
  • Posts: 535
Re: HOWTO: Ratpoison Basic Configuration
« Reply #8 on: January 12, 2016, 02:15:53 pm »

Can you post a full copy of the file?  We should do some research as to which package provides or expects it.

I've saved a copy to my pendrive, and the full contents are;

[Desktop]
Session=fluxbox

I was wrong, it was two lines :)

[EDIT; I've just seen your edit. Thanks for the advice, I'll try that next time I have that problem.

« Last Edit: January 12, 2016, 02:17:58 pm by Colonel Panic »
Logged

Colonel Panic

  • Vectorian
  • ****
  • Posts: 535
Re: HOWTO: Ratpoison Basic Configuration
« Reply #9 on: January 23, 2016, 09:51:02 am »

I finally managed it, but it took a few more steps which I got from a Ubuntu forum. They are as follows (assuming you've logged into the distro and are at the console);

sudo chown username /home/username/.dmrc

chmod 644 /home/username/.dmrc

sudo chown username /home/username    

chmod 755 /home/username

Log out of your current session and back in. Rebooting is not necessary but will accomplish the same thing (I actually did reboot to be on the safe side - CP).

If you get a ".gvfs" error message, which I didn't;

umount /home/[username]/.gvfs

rm -r /home/[username]/.gvfs

http://ubuntuforums.org/showthread.php?t=976610
« Last Edit: January 23, 2016, 09:53:33 am by Colonel Panic »
Logged

Colonel Panic

  • Vectorian
  • ****
  • Posts: 535
Re: HOWTO: Ratpoison Basic Configuration
« Reply #10 on: June 04, 2016, 04:57:02 am »

A quick update; I've just installed the latest testing version of Vector 7.2 Light (B3.1) to my hard drive, and have installed Ratpoison in it. I'm using macondo's configuration file (for which thanks) except I've substituted Esc-F12 for F13, changed the text colour to green and changed the "kill" hotkey from F4 to k.. It makes very good use of the rpws utility, which allows ratpoison to access extra workspaces (three in this case).

« Last Edit: June 04, 2016, 09:40:20 am by Colonel Panic »
Logged

nightflier

  • Administrator
  • Vectorian
  • *****
  • Posts: 4226
Re: HOWTO: Ratpoison Basic Configuration
« Reply #11 on: June 04, 2016, 01:20:49 pm »

CP, sorry to go off-topic, but you used the current Light iso for install? Did you select IceWM? How is it performing for you?
Logged

Colonel Panic

  • Vectorian
  • ****
  • Posts: 535
Re: HOWTO: Ratpoison Basic Configuration
« Reply #12 on: June 05, 2016, 10:29:45 am »

Thanks for asking. I did, but switched to Ratpoison later.

As for how is it going, I can use it for all the things that I spend the bulk of my time doing, so it's certainly usable. However, I think it's lacking some of the libraries I use to install some of the other programs I use (is there a version of Osmo which doesn't need gtkspell added in, for example?). Maybe that's why it's the Light version.

Most users probably wouldn't have a problem with that and would be happy with the software Light already comes with, but I'd also like to be able to set up access to my two pendrives and Windows partition when I install the system, as I can in Slackware, Salix and Zenwalk (in fact those two distros just went with the standard Slack install procedure).

I know I can do it by editing fstab, but I can never remember what values to enter into the table and I don't think users should have to (unless you want Vector to be for advanced users only).

Thanks for asking anyway,

CP .
« Last Edit: June 05, 2016, 12:05:17 pm by Colonel Panic »
Logged

nightflier

  • Administrator
  • Vectorian
  • *****
  • Posts: 4226
Re: HOWTO: Ratpoison Basic Configuration
« Reply #13 on: June 05, 2016, 02:19:41 pm »

Thanks for the reply. You're the first one to mention using this version of Light, so thought I'd ask. :)

We set one of the goals for Light to fit on a CD, so yes, it does not have everything that Standard has. I am not familiar with Osmo, don't see it in the repo. 

Target audience is admittedly small, but we're sharing what we use, and like, with those who are interested.
Logged

Colonel Panic

  • Vectorian
  • ****
  • Posts: 535
Re: HOWTO: Ratpoison Basic Configuration
« Reply #14 on: June 05, 2016, 04:25:41 pm »

Thanks for replying nightflier. Here's a link to some information about Osmo;

https://sourceforge.net/projects/osmo-pim/

It's certainly doable with Vector as it comes as standard in Absolute, which is also based on Slackware.
Logged
Pages: [1] 2