Xubuntu 13.10

-I used to run Arch on my refurbished Thinkpad X200, until one day, recently,
when I saw that the *buntu family released 13.10 AKA Saucy Salamander (or something).
Now, I’m not a big fan of *buntus, despite the fact that I love Debian, but then
I remembered that about a year and a half ago while working at my former job, I used
Kubuntu on a T410 and it worked very nice. So I downloaded the ISO, put it on a USB
stick and booted it. The first (and only) showstopper was the fact that Syslinux told
me that it couldn’t find some file. Apparently, it’s a known bug for quite a while but
it still ain’t fixed. One of the reasons I don’t like Ubuntu et co. I found a
workaround (press Tab, see the options and simply type the one you want), and
installed Xubuntu.

-I have been using it for the last two weeks and it works very nice, stable, no problems.
Besides, despite some attraction towards the geekier distros, there is something to
be said about the major ones — packages, community, and so on. All in all, I’d rate
Xubuntu 13.10 a 8/10.

Installing xombrero on Fedora 19

First, the dependencies (sorry, taken directly from the log):


libXfixes-devel-5.0.1-1.fc19.x86_64
glib2-devel-2.36.3-1.fc19.x86_64
libXdamage-devel-1.1.4-3.fc19.x86_64
2:libpng-devel-1.5.13-2.fc19.x86_64
gdk-pixbuf2-devel-2.28.2-1.fc19.x86_64
atk-devel-2.8.0-1.fc19.x86_64
libXcomposite-devel-0.4.4-3.fc19.x86_64
libXi-devel-1.7.1-5.20130524git661c45ca1.fc19.x86_64
libXcursor-devel-1.1.14-1.fc19.x86_64
libdrm-devel-2.4.45-1.fc19.x86_64
wayland-devel-1.1.90-0.1.20130515.fc19.x86_64
libXxf86vm-devel-1.1.3-1.fc19.x86_64
libwayland-cursor-devel-1.1.90-0.1.20130515.fc19.x86_64
libwayland-client-devel-1.1.90-0.1.20130515.fc19.x86_64
at-spi2-atk-devel-2.8.1-1.fc19.x86_64
libicu-devel-50.1.2-5.fc19.x86_64
harfbuzz-devel-0.9.18-2.fc19.x86_64
gl-manpages-1.1-6.20130122.fc19.noarch
mesa-libGL-devel-9.2-0.9.20130610.fc19.x86_64
libxkbcommon-devel-0.3.0-1.fc19.x86_64
pixman-devel-0.30.0-1.fc19.x86_64
khrplatform-devel-9.2-0.9.20130610.fc19.noarch
mesa-libEGL-devel-9.2-0.9.20130610.fc19.x86_64
cairo-devel-1.12.14-2.fc19.x86_64
pango-devel-1.34.1-1.fc19.x86_64
cairo-gobject-devel-1.12.14-2.fc19.x86_64
gtk3-devel-3.8.2-1.fc19.x86_64
gtk2-devel-2.24.18-1.fc19.x86_64
1:glib-1.2.10-39.fc19.x86_64
1:glib-devel-1.2.10-39.fc19.x86_64
libgpg-error-devel-1.11-1.fc19.x86_64
libgcrypt-devel-1.5.2-1.fc19.x86_64
ldns-1.6.16-2.fc19.x86_64
unbound-libs-1.4.20-9.fc19.x86_64
gnutls-dane-3.1.11-1.fc19.x86_64
xz-devel-5.1.2-4alpha.fc19.x86_64
libxml2-devel-2.9.1-1.fc19.x86_64
p11-kit-devel-0.18.3-1.fc19.x86_64
libtasn1-devel-3.3-1.fc19.x86_64
gnutls-c++-3.1.11-1.fc19.x86_64
gnutls-devel-3.1.11-1.fc19.x86_64
libsoup-devel-2.42.2-1.fc19.x86_64
webkitgtk3-devel-2.0.3-1.fc19.x86_64
webkitgtk-devel-2.0.2-2.fc19.x86_64
wget-1.14-5.fc19.x86_64

Second, the makefile, as of today, with the latest git tree:

GTK_VERSION?= gtk3
ifeq ("${GTK_VERSION}", "gtk2")
JS_CF=$(shell pkg-config --silence-errors --cflags javascriptcoregtk-1.0)
JS_LD=$(shell pkg-config --silence-errors --libs javascriptcoregtk-1.0)
else
JS_CF=$(shell pkg-config --silence-errors --cflags javascriptcoregtk-3.0)
JS_LD=$(shell pkg-config --silence-errors --libs javascriptcoregtk-3.0)
endif

LIBS= glib-2.0
ifeq ("${GTK_VERSION}", "gtk2")
LIBS+= gtk+-2.0 webkit-1.0
CFLAGS+=-I/usr/include/gtk-2.0
else
LIBS+= gtk+-3.0 webkitgtk-3.0
CFLAGS+=-I/usr/include/gtk-3.0
endif
LIBS+= libsoup-2.4 gnutls libbsd
#my addition
CFLAGS+= -I/usr/include/glib-2.0/
CFLAGS+= -I/usr/lib64/glib-2.0/include/
CFLAGS+= -I/usr/include/pango-1.0/
CFLAGS+= -I/usr/include/atk-1.0/
CFLAGS+= -I/usr/include/cairo/
CFLAGS+= -I/usr/include/gdk-pixbuf-2.0/
#end of additions
CFLAGS+= -O2 -Wall -ggdb3 -D_GNU_SOURCE -I. -I.. $(shell pkg-config --cflags $(LIBS)) $(JS_CF)
LDADD+= $(shell pkg-config --libs $(LIBS)) $(JS_LD) -ldl -lX11

PREFIX?= /usr/local
BINDIR?= $(PREFIX)/bin
LIBDIR?= $(PREFIX)/lib
APPDIR?= $(PREFIX)/share/applications
MANDIR?= $(PREFIX)/share/man
RESDIR?= $(PREFIX)/share/xombrero

SRCS= $(shell ls ../*.c)
SRCS+= linux.c
OBJS= $(SRCS:.c=.o)
DEPS= $(addsuffix .depend, $(OBJS))

CC?= gcc

BUILDVERSION= $(shell sh $(CURDIR)/../buildver.sh)
ifneq ("${BUILDVERSION}", "")
CFLAGS+= -DXOMBRERO_BUILDSTR=\"$(BUILDVERSION)\"
endif

all: javascript.h tooltip.h xombrero

javascript.h: ../js-merge-helper.pl ../hinting.js ../autoscroll.js
perl ../js-merge-helper.pl ../hinting.js ../input-focus.js \
../autoscroll.js > javascript.h

tooltip.h: ../ascii2txt.pl ../txt2tooltip.pl ../xombrero.1
nroff -c -Tascii -mandoc ../xombrero.1 | \
perl ../ascii2txt.pl | \
perl ../txt2tooltip.pl > tooltip.h

xombrero: $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ $(LDADD)

%.o: %.c
@echo "Generating $@.depend"
@$(CC) -MM $(CPPFLAGS) $(CFLAGS) $ $@.depend
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<

install: all
install -m 755 -d $(DESTDIR)$(BINDIR)
install -m 755 -d $(DESTDIR)$(LIBDIR)
install -m 755 -d $(DESTDIR)$(MANDIR)/man1
install -m 755 -d $(DESTDIR)$(RESDIR)
install -m 755 -d $(DESTDIR)$(APPDIR)
install -m 755 xombrero $(DESTDIR)$(BINDIR)
install -m 644 ../xombrero.1 $(DESTDIR)$(MANDIR)/man1/xombrero.1
install -m 644 ../xombrero.css $(DESTDIR)$(RESDIR)
install -m 644 ../xombrero.desktop $(DESTDIR)$(APPDIR)
install -m 644 ../xombreroicon16.png $(DESTDIR)$(RESDIR)
install -m 644 ../xombreroicon32.png $(DESTDIR)$(RESDIR)
install -m 644 ../xombreroicon48.png $(DESTDIR)$(RESDIR)
install -m 644 ../xombreroicon64.png $(DESTDIR)$(RESDIR)
install -m 644 ../xombreroicon128.png $(DESTDIR)$(RESDIR)
install -m 644 ../tld-rules $(DESTDIR)$(RESDIR)
install -m 644 ../style.css $(DESTDIR)$(RESDIR)
install -m 644 ../hsts-preload $(DESTDIR)$(RESDIR)
install -m 644 ../torenabled.ico $(DESTDIR)$(RESDIR)
install -m 644 ../tordisabled.ico $(DESTDIR)$(RESDIR)

uninstall:
rm -f $(DESTDIR)$(BINDIR)/xombrero
rm -f $(DESTDIR)$(MANDIR)/man1/xombrero.1
rm -f $(DESTDIR)$(PREFIX)/share/applications/xombrero.desktop
rm -f $(DESTDIR)$(RESDIR)/xombreroicon.png
rm -f $(DESTDIR)$(RESDIR)/xombreroicon16.png
rm -f $(DESTDIR)$(RESDIR)/xombreroicon32.png
rm -f $(DESTDIR)$(RESDIR)/xombreroicon48.png
rm -f $(DESTDIR)$(RESDIR)/xombreroicon64.png
rm -f $(DESTDIR)$(RESDIR)/xombreroicon128.png
rm -f $(DESTDIR)$(RESDIR)/xombrero.css
rm -f $(DESTDIR)$(RESDIR)/tordisabled.ico
rm -f $(DESTDIR)$(RESDIR)/torenabled.ico
rm -f $(DESTDIR)$(RESDIR)/tld-rules
rm -f $(DESTDIR)$(RESDIR)/style.css
rm -f $(DESTDIR)$(RESDIR)/hsts-preload
if [ -d $(DESTDIR)$(RESDIR) ]; then rmdir $(DESTDIR)$(RESDIR); fi
clean:
rm -f xombrero $(OBJS) $(DEPS)
rm -f javascript.h
rm -f tooltip.h

-include $(DEPS)

.PHONY: all install clean

Thinkpad X200, Fedora and laptop shopping

What does one do when one doesn’t like the current offerings from Lenovo
because they try to make you eat some Windows with all interesting models?
What does one also do when one doesn’t like other offers from “Linux-friendly”
vendors? Well, one does look over the Internet for about two months looking for
a solution until one hits oneself in the head: of course! Refurbished hardware!

In short, I got myself a X200 today, refurbished, with the docking station of
course, and I love it. I use Fedora 19 with Fluxbox on it and it’s great. Battery
life isn’t of course as legends say about the X-series, since it’s a refurb model,
but I’m not getting out anyway and if I do, I always have the docking station to rely
on. As far as I can see, this laptop has everything one needs, and everything seems
to work OOTB. Everything I’ve tested, in all honesty, that is. Maybe this will help
someone out there not waste two months looking for something that just ain’t
there anymore. And, with the risk of sounding old, they just don’t make them
like they used to. :)

Thunderbird, IMAP and ‘server xxxxxxxx has disconnected. The server may have gone down or there may be a network problem.’

If you’ve seen this, you might be mislead into thinking that the remote end
is at fault (the IMAP server) or that you really have connectivity issues.
Before you curse your admin or your ISP, take another option into consideration:
if the server has a smallish number of connections per user (in my case it’s
true, I am the admin :), this might be the cause. So, one goes to Edit ->
Account settings -> $account -> Server settings -> Advanced ->
Maximum number of server connections to cache. In my case, 2 worked just fine.
You are welcome to start from 2 and perhaps up the value until you start
seeing the error again.

dvtm, Arch and terminfo

I can’t really imagine my life as a Linux user without tmux and dvtm. On my work
laptop with Fedora 18 it works nicely with XFCE and Konsole. However, on my Arch
box with XFCE and Konsole (or Gnome’s terminal for that matter) it doesn’t play as
nice as it sets a TERM variable that’s not to the liking of vim, and besides, keys
are working differently. One cand do export TERM=xterm in the dvtm
window, but that’s tedious, as it has to be repeated in every window you open.
So, RTFM. The manual page says ” By default dvtm uses its own terminfo file and
therefore sets TERM=dvtm within the client windows. This can be overridden by
setting the DVTM_TERM environment variable to a valid terminal name before
launching dvtm.”. You can write an alias for that so it would be easier if you wish.

CentOS 6 and phpMyAdmin, SSL and other nice things.

-I never liked web GUIs very much, but now I had to install php MyAdmin on a test
server as proof of concept. So, here’s what I did in order to get SSL up and
running:
1. Install CentOS :)
2. Install httpd and mysql.
3. Install mod_ssl and openssl.
4. Then, as root:
-openssl genrsa -des3 -out apachekey.pem 2048
-openssl req -new -key apachekey.pem -out apachekey.csr
-openssl x509 -req -days 365 -in apachekey.csr -signkey apachekey.pem -out apachecert.pem
-mkdir /etc/pki/tls/http
-cp apachecert.pem /etc/pki/tls/http/
-cp apachekey.pem /etc/pki/tls/http/
5. Edit /etc/httpd/conf.d/ssl.conf :
SSLCertificateFile /etc/pki/tls/http/apachecert.pem
SSLCertificateKeyFile /etc/pki/tls/http/apachekey.pem
DocumentRoot “/var/www/html/ssl”
6. mkdir -p /var/www/html/ssl
7. Then:
-cd /etc/pki/tls/http
-cp apachekey.pem apachekey.pem.cryp
-openssl rsa -in apachekey.pem.cryp -out apachekey.pem
-chmod go-rw apachekey.pem
-service httpd restart