am having a lot of fun experimenting with archlinux and learning the proper way to approach linux … the arch philosophy. so far i have had lots of fun learning various things about the way linux operates … the archwiki is a wonderful place to learn about so many things … the #archlinux irc channel on freenode is a great great place with wonderful ppl always ready to
help you and suggest the best practices to follow … while there is no need for me to write down the trivialities i m about to blog about (as they are already mentioned on the archwiki) but i will do it nonetheless as i have nothing
better to do at the moment … 😛
i m currently using openbox as a standalone window manager and am using the rxvt-unicode (urxvt) terminal program. in fact i m using the urxvt daemon (urxvtd) and simply launching the urxvt client (urxvtc) which attaches itself to the daemon. this greatly reduces memory requirement. i have a low end laptop IBM Thinkpad R51 (238MB ram/ 1.4GHz Pentium M processor) and i love to use firefox which means i must conserve as much memory as possible.
moving on to the central matter of this post now …
i had great difficulties in using urxvtc as i was used to gnome-terminal and its tabs. i was missing it greatly … so i set about searching for a tabbed terminal that was light on system resources. turns out that that urxvtc already was tab capable. there are two ways of using tabs in urxvt:
- urxvt -pe tabbed or urxvtperl
- urxvt-tabbed
approach 1:
to use urxvtperl simply add the following to your ~/.Xdefaults
URxvt.perl-ext-common: default, tabbed
that is it. the only problem i m facing right now is i do not know how to bring about the changes without having to restart my session. so like a fool all i do is log out and log in again. please let me know if you have a sensible solution to
bring in to effect changes made to .Xdefaults. anyways … now when you log in and launch urxvt/urxvtc you will see the following:
to open a new tab simply hit Shift+DownArrow and to move between tabs use Shift+LeftArrow and Shift+RightArrow. this works great but looks ugly in my opinion.
approach 2:
instead of changing the .Xdefaults you may also launch the tabbed version like this:
urxvtc -pe tabbed
now let us have a dekko at the urxvt-tabbed version which is gtk2 based.
urxvt-tabbed is installed automatically when you install urxvt … i installed urxvt as follows
sudo pacman -S rxvt-unicode-256color
that will also install the urxvt-tabbed version.
however when i launched urxvt-tabbed i got the following error:
Can’t locate Gtk2.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.10.1 /usr/share/perl5/site_perl/5.10.1 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl /usr/lib/perl5/current /usr/lib/perl5/site_perl/current .) at /usr/bin/urxvt-tabbed line 14.
BEGIN failed–compilation aborted at /usr/bin/urxvt-tabbed line 14.
turns out that i was missing gtk2-perl which is in the extra repo of arch so i did a
sudo pacman -S gtk2-perl
and that solved my problem with urxvt-tabbed which looks like this:
unfortunately i could not discover any keyboard shortcuts to create new tabs and move between them … 😦
so urxvtperl looks ugly but has keyboard shortcuts, urxvt-tabbed looks professional but is keyboard unfriendly … none of this really solves my problem …
so i presented my dilemma to the local gentoo guru, vivek who is taken aback and immediately retorts with:
“why do you need tabs? why don’t you use screen or tmux?”
hmmmm… this was interesting … why not indeed?
sudo pacman -S tmux
so the current set up i m using is as follows:
urxvtd -q -f in ~/.config/openbox/autostart.sh
urxvtc and then start a tmux session there
you r good to go!
the good thing about tmux over screen is that the info bar at the bottom is a great help … it also displays date and time which i was missing as i have no panels installed in openbox nor am i using conky.
p.s. i will try and arrange so that tmux automatically gets started when i launch urxvtc … but that is for later 🙂
remember that urxvt respects .Xdefaults NOT .Xresources.
- .Xdefaults
- urxvt
- tmux
- archlinux
- openbox
urxvt respects .Xresources if you launch “xrdb .Xresources” at startup. didn’t try with .Xdefaults.
running xrdb you can instantly apply your changes to urxvt, without logging out.
1 difference between tabbed & tmux is that tabbed is mouse friendly, while tabber is not (AFAIK). But most likely people who use these things don’t really care about mouse friendlyness 🙂
Thanks for your comment. I am not aware of ‘tabber’ which you mentioned in your comment. Did you meant ‘tmux’? In any case tmux has some mouse support — you can select windows and panes using mouse, you may resize panes using mouse etc. Also this project is being actively developed so ‘mouse friendly’ might increase if the demand for it goes up.
>so like a fool all i do is log out and log in again. please let me know if you have a sensible solution
I do
echo | xrdb
xrdb -merge ~/.Xresources
(yes I know, -merge is pointless here)
thanks for stopping by and commenting.