scrotwm is an excellent tiling window manager that I have been doing my development work in lately. I have found it amazingly useful, though the docs on it are pretty scarce. As of this writing, there is still no .deb package for it and it is not in the repository, so I have outlined a quick install.
Dependencies
To get scrotwm to compile, you must have the correct development header files and the tools to compile them.
- # apt-get install libx11-dev libxrandr-dev libxt-dev
- # apt-get install xorg gcc make
Installing scrotwm
You can either download a point-release snapshot or you can sync to the latest scrotwm source tree via cvs.
If you chose to sync with cvs, do the following:
- # cd
- # apt-get install cvs
- # export CVSROOT=anoncvs@anoncvs.freedaemon.com:/scrotwm
- # cvs co scrotwm
- The authenticity of host 'anoncvs.freedaemon.com (66.210.104.251)' can't be established.
- RSA key fingerprint is 27:49:40:15:d1:17:45:2b:b0:71:aa:2a:5d:29:d2:9d.
- Are you sure you want to continue connecting (yes/no)? yes
- --- snip --- --- snip --- --- snip ---
If you downloaded a point-release archive, download it to your home directory and decompress it.
- # cd
- # tar xvzf scrotwm-0.9.19.tgz
You should now see some files populated in the scrotwm directory
- # ls scrotwm*
- baraction.sh
- CVS
- html
- initscreen.sh
- lib
- linux
- Makefile
- port
- release.sh
- screenshot.sh
- scrotwm.1
- scrotwm.c
- scrotwm.conf
- scrotwm_es.1
- scrotwm_it.1
- scrotwm_ru.1
Since we are in Linux (in this guide, atleast), we need to cd into the scrotwm/linux directory so that we properly compile the files.
scrotwm contains a BSD style Makefile in it's root directory. If you were to try to make these files in the scrotwm root directory, you would get a Makefile:2: *** missing separator. Stop. error.
- # cd scrotwm*
- # cd linux
- # ls
- CVS
- Makefile linux.c
- util.h
- make
- make install
Hopefully, all will go well and things will compile. If not, start reading the errors right after the make command was initiated and you will usually get an idea of what is going wrong. Feel free to contact me if you hit a roadblock.
Configuration
scrotwm.conf
Luckily for us, it came in the scrotwm files we downloaded earlier.
- # cp ~/scrotwm*/scrotwm.conf /etc
Now you need to decide how you want to start scrotwm. We can either start it manually (startx method) or add it to the existing GDM or KDM selection lists.
start scrotwm (manually) with startx
- # echo 'scrotwm' > ~/.xinitrc
Add scrotwm to GDM/KDM Login Managers
First, we will create a .desktop so that GDM or KDM will have the information it needs to add scrotwm to the selection list of window managers to load.
I use /root/scrotwm.sh for the script, but you can use any path you would like!
- # vim /usr/share/xsessions/scrotwm.desktop
- [Desktop Entry]
- Encoding=UTF-8
- Type=XSession
- Exec=/root/scrotwm.sh
- TryExec=scrotwm
- Name=scrotwm
-
- # vim /root/scrotwm.sh
- #!/bin/bash
- xscreensaver -no-splash &
- xfce4-terminal &
- sleep .2
- scrotwm
Now, we just need to create the script mentioned above.
- # vim /root/scrotwm.sh
- xterm &
- sleep .2
- scrotwm
- # chmod +x /root/scrotwm.sh
Change Default Terminal
We all know xterm isn't for everyone, so I am sure the first thing people will want with this window manager is a terminal you feel most comfortable in. I usually stick to aterm or rxvt, but I thought I would revisit Terminal, a terminal emulator from the XFCE project. It is lightweight, menu and scroll bars are easily hidden, colors are easy to edit, and having the additional right click copy/paste buffers are useful.
- # apt-get install xfce4-terminal
- # vim /etc/scrotwm.conf
- --- snip --- --- snip --- --- snip ---
- spawn_term = xfce4-terminal
- --- snip --- --- snip --- --- snip ---
Now, just edit your boot method to start up your chosen terminal, rather then xterm.
- # <open /root/scrotwm.sh or ~/.xinitrc>
- xfce4-terminal &
- sleep .2
- scrotwm
Screensaver
I also want to use xscreensaver, a collection of screen savers that is easily started along with scrotwm.
- # apt-get install xscreensaver
- # <open /root/scrotwm.sh or ~/.xinitrc>
- xfce4-terminal &
- sleep .2
- scrotwm &
- xscreensaver -no-splash &
binding keys to launch programs
It is very helpful to bind a series of keys to launch the programs you need. You can easily set these keys in scrotwm.conf. We will use the firefox example given in the default config.
- vim /etc/scrotwm.conf
- --- snip --- --- snip --- --- snip ---
- program[firefox] = firefox
- bind[firefox] = MOD+f
- --- snip --- --- snip --- --- snip ---
Starting scrotwm
Now we should be able to boot into the scrotwm window manager! Obviously, starting it will vary from system to system. I will go over the 2 methods discussed above.
startx
If you would like to start it manually, make sure you have the proper info in ~/.xinitrc and issue the startx command.
GDM/KDM
If you are using a login manager, simple restart the KDM or GDM daemon.
- # /etc/init.d/gdm restart
Getting Around
By now, you should have gotten scrotwm up and running. Now all you need to do is learn to get around on the desktop! As always consult man scrotwm for details on more commands and how to get the most out of the window manager!
I will, though, point out the very basics that should get you started.
- ALT is your meta key
- ALT + SHIFT + Q to quit
- ALT + SPACE to toggle through tile display options
- ALT + x closes a tile
- ALT + SHIFT + ENTER opens a new tile