Posts Tagged ‘archlinux’

It has been a while since I played with Archlinux. Meanwhile AUR has transitioned and now uses version controlled PKGBUILDs. So here is how to go about it.

Let us take the example of the package cower.

If you visit that page you will find a “Download snapshot” link under the Package Actions box to the right of the page near the top of the page. Just click on it and you will download a compressed tarball; cower.tar.gz in this case. Uncompress that to find the actual PKGBUILD in it. I also noticed a hidden file called .SRCINFO in the same folder. Now you can simply issue the command “makepkg -irs” in the same directory and you are all set.

The other way is to git clone the repo. The repo link is right at the top of the page under Git Clone URL. If you clone the repo you will find the PKGBUILD and .SRCINFO and .git directory in there. Again use “makepkg -irs” to install the package.

Read Full Post »

on trying to plot any thing in ipython using matplotlib i got the following error

This application failed to start because it could not find or load the Qt platform plugin “xcb”.

Available platform plugins are: eglfs, kms, linuxfb, minimal, minimalegl, offscreen, xcb.

Reinstalling the application may fix this problem.
Aborted (core dumped)

for example the following command will produce the error

ipython -c 'import pylab; pylab.plot()'

matplotlib backend: Qt5Agg

uname -srvmo :: Linux 3.16.1-1-ARCH #1 SMP PREEMPT Thu Aug 14 07:40:19 CEST 2014 x86_64 GNU/Linux

$ pacman -Q ipython python-matplotlib
ipython 2.2.0-1
python-matplotlib 1.4.0-2

solution :: install libxkbcommon-x11

Read Full Post »

on archlinux with openbox window manager and no desktop environment

Linux  3.11.1-1-ARCH #1 SMP PREEMPT Sat Sep 14 20:31:35 CEST 2013 i686 GNU/Linux

vifm 0.7.5-1

ncurses 5.9-5

gtk2 2.24.20-1

xterm 297-1

rxvt-unicode 9.18-7

tmux 1.8-1

vifm crashes on launch from the terminal with the following message:

vifm: color_manager.c:47: colmgr_init: Assertion `(color_pair_map != ((void *)0) || avail_pairs == 0) && “Not enough memory.”‘ failed. Aborted (core dumped)

turns out that the crash is being caused by the TERM environment variable being set to xterm-256color or screen-256color in xterm or xterm/tmux combo. in rxvt-unicode the TERM was set to rxvt-unicode-256color. setting TERM to xterm or screen is not causing any crash.

i have been bugged by this for some time now but only found out the reason today.

Read Full Post »

make sure that your ~/.Xresources file contains the following line

XTerm*metaSendsEscape: true

Read Full Post »

yasnippet is not available in the archlinux repos so we will install it from the AUR

first go to AUR home and search for yasnippet … u will get the following page

download the tarball from that page .. in my case the link to the tarball was

put the tarball in a convenient location and extract it to get an emacs-yasnippet directory. within that folder you will find 2 files: PKGBUILD and yasnippet.install

now from within the emacs-yasnippet directory run the following command

makepkg -s

the -s flag will ensure that all dependencies are installed first.

when i ran the command i got the following error

$ makepkg -s
==> ERROR: Fakeroot must be installed if using the ‘fakeroot’ option
in the BUILDENV array in /etc/makepkg.conf.

which means that the fakeroot program is missing …
some more digging told me that i might be missing the base-devel group of packages

so i first have to install it

sudo pacman -Ss base-devel

this will install all the packages needed for building software.

now let me try running makepkg again …

makepkg -s

…ok it was successful this time and now the folder contains the following files and folders

emacs-yasnippet-0.6.1c-2-any.pkg.tar.xz  pkg  PKGBUILD  src  yasnippet-0.6.1c.tar.bz2  yasnippet.install

all is fine now.. we will simply install now using pacman

sudo pacman -U emacs-yasnippet-0.6.1c-2-any.pkg.tar.xz

that is it you are done …

of course you must add the following in your .emacs to use yasnippet

(add-to-list 'load-path "/usr/share/emacs/site-lisp/yas")
(require 'yasnippet)
(yas/load-directory "/usr/share/emacs/site-lisp/yas/snippets")
  1. yasnippet
  2. AUR

Read Full Post »


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:

  1. urxvt -pe tabbed or urxvtperl
  2. 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.

  1. .Xdefaults
  2. urxvt
  3. tmux
  4. archlinux
  5. openbox

Read Full Post »