Thursday, August 11, 2011

StarCraft 2 and Linux - Part 2

I have tried various ways of getting this running well on Linux and read a lot of tutorials on different wikis which led me to believe that every setup is almost unique. In general it will run with any installation method, but to get the best performance out of it you will have to fiddle with the settings a bit and test out what is best for your system.

I could not get the game to install from the DVD so I had to resort to the following method.

Step 1
I had to install the digital downloaded version from
If you bought the game and have the serial number then simply register an account with them, you will need to in any way to play the game, so might as well do it now.
Once you have registered the game you can now download the digital game client. It goes without saying, but to be complete, download the Windows client!

Step 2
Start the client in wine:

wine StarCraft_2_EU_en-GB.exe

It is basically just a peer-to-peer program that allows you to download the game data (7GB in total) from either the official server or from other peers who is seeding the game at the time. Some people get great response and speed improvements from allowing peer-to-peer traffic, while others, like myself, had to disable it to eventually have the game downloaded after 36 hours.


  • Each time you disconnect from the internet (your ISP reset your connection, whatever) you will need to download the client again. It seems that it logs the IP you used to download it and if there are any IP conflicts then you will get an error message "This download is not authorized."
    You will need to log back into and download a new client. The game data is still safe and the client will first check the integrity of the data before continuing the download.
  • The data is saved in /home/[user]/SC2/SC2-WingsOfLiberty-enGB-Installer/
    Make a back-up of the data as soon as the download has finished!

Step 3
Once the download is complete the installer will start. I canceled this. You can always continue and try your luck, but I took the easier route.
Get yourself PlayOnLinux and install it. It should either be in your disto repository or you can download the package file and install it yourself.

Once installed, launch it. Click on Install -> Games -> StarCraft II Wings of Liberty
Now you can just follow the installer instructions and point it to the digital download and install the game, could not be more simple.

Along the way you will need to answer a simple few questions, like how much RAM your graphics card has, but I'm sure you will know how to handle this!

Step 4
Optimizing the game.
There is a lot of different articles on the net regarding performance tuning your installation, I'll link some of them here and you can sift through them to see what works on your system.

I left mine with the default PlayOnLinux configuration and only added a few bits and pieces from here:

Check out the "regedit" part and see what you can pirate from it.

More on Linux and StarCraft 2 performance in general:

Well, that should do it. Got a problem, ask away!

Thursday, August 04, 2011

Starcraft 2 and Linux - Part 1

Okay, I'm a bit late to the party. I only bought the game a couple of days ago after finally getting around to playing the demo.

Last week I installed the StarCraft 2 demo with winetricks and I really enjoyed it, a lot! So after spending a few hours on the demo I finally decided that this game is worth the while and I headed out to buy it.

First check the on-line store at, $80-00 + (R600-00, ZAR), are you kidding me?! NEVER!
So I put that on the ice, no way am I ever going to pay that much for a game.
The rest of the week, whenever I went past a gaming shop I would just quickly pop in to see what they list it for, and finally I got the game for $58-00 (R400-00), now that is more like it, still very expensive for a year old game, but do-able.

At home I popped in the DVD and started the installation... I/O error. No problem, copy the entire DVD to PC, I/O error.
Okay, then dd it to an ISO, I/O error.

Lets try another PC, I/O error. How can this be, it seems the disk is corrupt? Well, yes and no. It seems there is a bug in ext4 that does not handle single large files very well. The main installation file of the game is 7GB large.
You can read more on this here:
Error while copying file
Any of the following topics

So it is either a DVD issue or a file system issue, whatever the case I will need to get the digital copy.

No problem, I'll just download the game client from
What a frustration this was, 36 hours it took me to finally finish the download, 36 hours!
And each time my line DSL is reset, and I get assigned a new IP, the download client would fail with a "this download is not authorised".
I then have to log into, get the new client and start again. Luckily it resumes the download but I had to download a new client at least seven or eight times.

Wow, I bought the hard copy and still have to play a single skirmish.

It seems that the everything went fine with the installation of the digital copy and the game is now being updated, nineteen patches to install.

Once that is done I'll be back with a more "how-to" post on getting the best performance out of StarCraft 2 on Linux.

Wednesday, July 27, 2011

Remote control your Linux desktop from an Android phone!

I just recently came across this nifty little app that lets you turn you Android phone into a remote mouse of keyboard, and the best part is it works 100% on Linux!

First install this on your Android phone:

Now download and extract this zip file on your Linux desktop machine:
PRemotedroid server

Change into the directory of that you just unzipped and issue this command:

java -classpath bluecove-2.1.jar -classpath blucove-gpl-2.1.0.jar -jar PRemoteDroid-Server.jar

On your desktop you will see the app running in the taskbar, from this you can get the IP and password you will need to sync with your phone.
Set up the app on your phone with these details and under "Connections" you should see the connection you just set up. Long press on the icon to bring up a menu and choose "Use".

You should now be able to use your Android phone as a remote mouse and keyboard! Success!

Tuesday, July 26, 2011

0 A.D. RTS Game

The title leaves much to be desired, but the game hits a sweet spot that has been neglected on Linux for a long time.

I'm not a fan of RTS, but every now and then I get the urge to manage my own country and hopefully live long enough not to ruin it!
Linux has been on the short end when it comes to native RTS games, there are only a handful of them around and a while ago I stumbled onto this little gem from Wildfire Games: 0 A.D.

Let me just start by saying the development on the game is spot on with timely releases and huge improvements with every other update. Since I began playing it last year it has come in leaps and bounds, especially the graphics of this game is impressive!
Quite recently they updated the in-game bots to a more challenging level, so that made the game a bit more realistic, however the AI is not that difficult to beat. It would be nice if the introduced a more advance bot in the future.

Multi-player is still not implemented, and you cannot change any settings off-hand, but hey, this is an Alpha release!

Game play is like every other RTS out there, you gather resources, build your base and attack. There are no unit and building upgrades to be had like the more modern RTS games (StarCraft 2, WarCraft, etc. for example) and the pace of the game is on the slower side, but this makes it perfect for the beginner to pick it up and start learning.
The only "upgrades" to your units can get is the special elite units that will increase damage, range, etc. of your normal units. I really can't tell if this makes a difference, just amass a large enough army and pummel the enemy is my usual strategy.

All this said, the game is still slated as an Alpha release, but what an Alpha this is! I just hope the project doesn't get abandoned and grows into a very fine game. Because of this it would be very unfair to criticize the game, so let me then just add a wish list of feature I hope they implement in future releases:

  • Unit grouping - assigning key numbers to unit groups would be very nice. Micro management without this is impossible.
  • Better bots to practice against - add a higher difficulty bot
  • Better notifications on units build, workers being idle and buildings complete
  • Notifications on units being attacked
Off the top of my head, this is the biggest features I would love to see added. If one is going to play this game at a competitive level then you really need those notifications to draw your attention while busy elsewhere on the map. I usually find myself with workers standing idle and no indication that they were finished building or working on a building. I have this eerie voice in the back of my head of a WarCraft troll shouting: "Jobs done!"

I enjoy the game, and for a challenge get three bots to gang up on you.

Here is some of the game play footage I slapped together of the latest release:

There you have it, a promising start and lets hope a successful game in the near future!

Thursday, July 07, 2011

Team Fortress 2 free! and installing Steam on Linux

If you have Steam installed via WINE, then you should start it up immediately and download Team Fortress 2.

It is free to play and a lot of fun, it runs flawlessly in Linux.

Installing Steam on Linux. There is the easy way and then the way I prefer.

The easy way is to install PlayOnLinux and just follow the prompts once you start the application. This should install all the needed WINE applications and dependent packages.
Once you start PlayOnLinux you can now just choose for it to install Steam and everything should go without a hitch.

If you however find something missing or that WINE complains that something additional is needed, use winetricks to install what is missing. The biggest problem is usually the Tahoma font that is missing or not installed propely, so just install it with winetricks:

winetricks tahoma

Start up Steam and get your game on!

If you like the old school way to install Steam, then this is the way to go about it.

First install WINE, now this can be done by searching for it in your distro package manager, so I'm not going to cover this since it should be straight forward.
Just as a precaution start up winecfg once to create the registry and directories to get everything going.

Additional packages that you may need and find useful for other applications as well is cabextract and wine-Gecko. Search for them in your distro package manager and install it as well.

Next, download the Steam installer and issue the following command in the download directory and follow the instructions that follow:

wine start SteamInstall.msi

Again, once this is done install the Tahoma font with winetricks.

That should do it! Happy gaming!

Linux Mint

Just a quick update regarding Linux Mint.

I'm very pleased with the performance on the Netbook and have decided to convert all the remaining Ubuntu machines over to Linux Mint.

This signals the end of a rather shaky *buntu journey for me and frankly, I couldn't be happier.

Until next time.

Monday, June 06, 2011

The hunt to replace Ubuntu

I recently ran into a problem, Ubuntu 11.04!

I'm facing a problem and it seems that this is going to become all the more troublesome in months to come. The problem is finding a suitable distro for my Acer Aspire One A0531h Netbook.

The recent incarnation from the Ubuntu stable sports the somewhat new Unity interface. In the past this was the exact reason I did not install Ubuntu Netbook-Remix since I did not like the interface one bit.
Now, however, it seems like the newly added features, bells and whistles makes it a bad choice for a Netbook. I could get nowhere with this on the Netbook, and the fact that you cannot modify anything (panels, menu placement, etc.) made it one heck of a frustrating experience.

When Ubuntu insisted that everyone and their mother should place the close, maximize and minimize buttons on the left, I just shrugged it off with a smirk and fixed the error of their ways with gconf-editor.
Now, however, it is nearly impossible to configure anything Unity related.

"Well change back to Gnome Classic you fool!" I hear you shout.
I did, but the performance stayed the same. I could now configure everything, but I could hardly do any work on it, it was a case of the little Netbook that just couldn't.
It feels like they broke something in baselayout since nothing wants to work like it should, no matter what WM or DE I tried!

I tried Kubuntu, nope, still too sluggish, Xubuntu, nope, still no big improvement (not being a XFCE fan didn't do it any favours), what about installing OPENBOX?
Nope, still sluggish and going nowhere.
At this point I could not believe it! In Ubuntu 10.10 I installed the dead standard 32-bit version and it worked, very well I may add, but now with Ubuntu 11.04 something went horribly wrong!

I gave up at this point and turned to trusty Arch Linux, installed it with OpenBox and I was happy, until...

Until the day I had to do a presentation and I stood there dancing like a fool since I could not get the projector to work on Arch Linux, but it worked like a charm on Ubuntu before. I had to borrow a Windows laptop to finish the job, terrible and humiliating.

That is when I realized that I needed a complete solution, a "one size fits all" solution, a replacement for Ubuntu.
I love Arch Linux, it will stay on my desktop PC for a long time to come, and had I been at home on the internet I could have solved the Netbook problem in two ticks, without a doubt, but the problem is that a Netbook, for me, should be "locked and loaded" 24/7 without needing  extra fiddling. You never know what you will be called on to do and then you do not have time to fiddle around on the internet! The Netbook is not just a toy for me, I do some serious work on it and the mobility of the device suits me fine.

Granted, in hindsight, I could have tested it on a normal PC monitor first, so  we will share the blame 50/50?

Back on track, I need a complete solution, something that just works with minimal fuss.
Tried Fedora after hearing some good things about it, but the lack of configuration from Gnome 3 made it a no-go for the limited screen resolution of the Netbook.
Some E17 distros, some of the laptop features did not work "out of the box", back to the drawing board, could then just as well have stayed with Arch Linux.

After living with Arch Linux while the hunt continued, I remembered a distro that I tried many moons ago, Linux Mint.

Eureka! I hope.

At the moment I'm very happy with it, it just works, and works well on the Netbook. I love the look and feel and so far the Netbook is very responsive.
I still have to test a few things but I think this may just be the distro of choice for my Netbook from now on.
Once I have a solid opinion on the distro I'll post my thoughts, for now I'm happy.

Lets just hope they do not break their future releases like Ubuntu did...

Fonts and Firefox/Chromium

Just a quick post:
If you get strange looking fonts with Firefox or Chromium (this does not seem to include Opera), then you may want to look at installing the ms-font package for your distribution.

In Arch Linux:
yaourt -S ttf-ms-font

Sunday, May 08, 2011

Presentation on Netbook?

If you have a Netbook you will no doubt be well aware of it's short comings.
I have an Acer Aspire One, 160 GB hard drive, 2 GB of memory, no problem, it is however the Atom processor that has it's limitations.

I recently wanted to show a LibreOffice Impress presentation on the Netbook, but I ran into all sorts of trouble, in short, it just could not handle it.
If I remove all the animations then it is do-able, but you can see the Netbook struggling to cope, the strain of running an office suite and a large presentation of top of that is a bit beyond this Netbook.

KOffice is an option, but it distorted the presentation and I was not about to rewrite the whole thing on the Netbook in KOffice or any other application.

That is when I stumbled upon this neat trick, doing the presentation from a PDF viewer!

All you need is the default KDE document viewer or Adobe Reader.

Open the presentation in LibreOffice Impress and export it as a PDF file, next, open the exported PDF in your document viewer of choice.

You will see something like this:

Go to View -> Fullscreen. In Adobe Reader the presentation will begin immediately, in KDE document viewer there is one more step:

In KDE document viewer, once you have the file in "Fullscreen" mode, you will see a button in the top right hand corner, "Start a presentation":

That is it, nothing to it!

It works just the same as any normal presentation, mouse click or arrow buttons to navigate and esc to quit, but without the office suite load added to the Netbook.

Granted you cannot do anything fancy with it, but it saved my bacon and it is more compatible between different platforms than even the open document format!

Give it a spin, and if you have more tips or suggestions, let me know!

Tuesday, March 08, 2011

Android and Linux tethering

If you have no idea what tethering is, then fear not, Wikipedia to the rescue!

Tethering is a method to share the Internet connection of an Internet-capable mobile phone. This sharing can be via cable, or wirelessly over Bluetooth or Wi-Fi — if Wi-Fi, the tethering feature is often branded as a mobile hotspot and can typically service several devices.

Most Android phones have a feature to make this simple, but either the ROM I flashed my device with has a bug or my service provider does not support WIFI hotspot, whatever the case I need to connect via the USB cable.

In short, this is how to go about it:

  • Install OpenVPN

    sudo apt-get install openvpn

  • Enable USB debugging on your phone. Settings > Applications > Development > USB debugging.

  • Download or install the Android SDK
    On Arch Linux you just install both android-sdk and android-sdk-platform-tools. If you need to download it:

  • Now extract the package:

    tar xvzf -C /opt

  • Run "android" and install the platform tools needed:

    cd /opt/android-sdk-linux_x86/tools

    From the menu, choose "Available packages" and install the Android SDK platform-tools.

  • Add the /opt/android-sdk-linux_x86/platform-tools directory to your path:

    nano -w .bashrc

    You will need to log out and back in for the path to be recognized.

  • We now need our device ID:

    Bus 001 Device 009: ID 22b8:41da Motorola PCS

  • Next we create the needed udev rules so that the device gets recognized:

    sudo nano -w /etc/udev/rules.d/91-android.rules
    SUBSYSTEM==”usb”, SYSFS{idVendor}==”id″, MODE=”0666″

    On my phone the last part will look like this, change yours according to your device ID:
    SUBSYSTEM==”usb”, SYSFS{"22b8:41da"}==”22b8″, MODE=”0666″

  • You can connect your phone to the PC now, if it is not already connected, remember to make sure you have USB debugging enabled.
    If all went well your phone should now be picked up:

    adb devices
    List of devices attached 
    04039C5D09016014 device

  • Download and install AzLink:

    adb install azilink.apk

    You should see the AzLink app in the phone applications menu now.

  • On your PC:

    adb forward tcp:41927 tcp:41927

    On your phone, open the AzLink application and check the option "Service Active". You should see a message under Status:
    "Waiting for connection"

  • Download and run the following on your PC:

    sudo openvpn azilink.ovpn

    On your phone the status should now change to:
    "Connected to host"

    You can now kill all network connections on you PC (wifi and lan) and disable them for the moment, we do not need them any more.

  • Finally, the last step.
    Do not close the terminal from where you ran the commands just now! Doing so will kill your connection to the phone.
    In a new terminal we only now need to edit our resolv.conf and we should have internet access!

    nano -w /etc/resolv.conf

You should be able to browse the internet now from your phones data connection (GPRS, HSDPA, etc.)

Reply with your comments and if you encounter any problems!

Tuesday, February 22, 2011

Key mapping and binding in Openbox

If you have used Linux for any amount of time you will know that there are little vendor support and this can be frustrating if you would like to use all 18 000 keys on your brand spanking new keyboard!

I have this keyboard, the Microsoft Natural Ergonomic 4000, and we know that Microsoft will not have any support for it under any other operating system save Windows, hey, do not look at me like that, they actually make some decent keyboards!

So, we will have to map and bind all those extra keys ourselves.

Luckily, binding keys in Openbox is actually a fairly simple task, you only need xev and your favourite editor. This is going to be fast and dirty, but it is really simple and you should have no problems at all.

First of, open the following file:

# nano -w .config/openbox/rc.xml

Next, run xev, in a terminal just type:

# xev

You can press one key at a time on the keyboard to get the key code, this is important. The output will look something like this:

KeyPress event, serial 39, synthetic NO, window 0x2a00001,
    root 0x15a, subw 0x0, time 245502289, (1104,290), root:(1136,701),
    state 0x10, keycode 195 (keysym 0x1008ff48, XF86Launch8), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

What we are interested in is this part:
(keysym 0x1008ff48, XF86Launch8)

Go back the file you opened earlier, scroll down the file until you come across this section in the file:


There will be a lot of text in that section, general Openbox key bindings. You can look over them and change them as you want, remember to make a back-up of the original file first!

Just above </keyboard> at the end of the keyboard section we are going to enter our own custom key binding like this:

<keybind key="XF86Launch8">
      <action name="Execute">

Do this for all the keys. I suggest doing one key at a time for obvious reasons. Log out, log back in and test out all your keys.

Perfect right? Told you it was easy!

Here is the map to all the custom keys on my keyboard.

<keybind key="XF86HomePage">
      <action name="Execute">
    <keybind key="XF86Search">
      <action name="Execute">
    <keybind key="XF86Mail">
      <action name="Execute">
    <keybind key="XF86AudioMute">
      <action name="Execute">
        <execute>/usr/bin/amixer set Master 0</execute>
    <keybind key="XF86AudioLowerVolume">
      <action name="Execute">
        <execute>/usr/bin/amixer set Master 2-</execute>
    <keybind key="XF86AudioRaiseVolume">
      <action name="Execute">
        <execute>/usr/bin/amixer set Master 2+</execute>
    <keybind key="XF86AudioPlay">
      <action name="Execute">
        <execute>/usr/bin/audacious --play-pause</execute>
    <keybind key="XF86Calculator">
      <action name="Execute">
    <keybind key="XF86Launch5">
      <action name="Execute">
    <keybind key="XF86Launch6">
      <action name="Execute">
    <keybind key="XF86Launch7">
      <action name="Execute">
        <execute>/usr/bin/soffice -writer</execute>
<!--   Reserved for future use, do not need it now 
#    <keybind key="XF86Launch8">
#      <action name="Execute">
#        <execute></execute>
#      </action>
#    </keybind> -->
    <keybind key="XF86Launch9">
      <action name="Execute">

You can bind the extra keys on your mouse in the same way in Openbox under the mouse section in that file!

Wednesday, February 16, 2011

Caps lock in Linux. Do you really need it?

I'm just stumped that we still have some archaic tech on our keyboards that we never ever seem to use, SysRq, ScrLk and of course, CAPS LOCK!

How many times has it happened that you accidentally hit the caps lock key and suddenly YOU HAVE TO RE-TYPE A COMPLETE SENTENCE because of this. Shift should be fine, right?

Hitting it by accident while gaming is also getting old fast!

Okay, end rant... here is what you need to do to disable it or map it to another key:

$ xmodmap -e "remove lock = Caps_Lock"

If you only want to disable it for the current session, or put this in your /etc/bash.bashrc to disable it permanently and system wide:

if [ "$PS1" ]; then
# Disables the CapsLock button
xmodmap -e "remove lock = Caps_Lock"

But now you have a dead key, but fear not, you can map it to any action you would like, like for instance shit?

xmodmap -e "remove lock = Caps_Lock"
xmodmap -e "add shift = Caps_Lock"

Again, you can of course map it to any key you want, shift just seems logical to me.


Monday, February 14, 2011

Content filtering made easy

There are quite a few options on the market to filter web content, like pornography, but most of these require either a server setup or some other time spend configuring files that is totally overkill for a normal household network.

Most of us have a router/modem and a couple of PC's that connect to this.
Here is a very easy method to filter you online experience!

  • OpenDNS
    Get yourself the free account at OpenDNS.
    Once you have created the account it will guide you through an easy setup where you can choose how to configure your hardware. I suggest choosing the router method, all it requires you to do is to manually change the nameserver or DNS servers in your router/modem to:

    If your router is also acting as the DHCP server, remember to change those DNS/nameserver settings as well!

    Make the required changes in your dashboard, adding and removing filters as you wish and save it.You can now read up a bit on dynamic IP's to educate yourself a bit.
  • DNSomatic
    Now we head on over to DNSomatic. Your account details used for OpenDNS should work here as well.
    Click the "Add Service" to get you started. That is all, I told you it is easy!
    Again you can look around to educate yourself a bit if you are so inclined.

  • ddclient
    Next install ddclient. It should be in your distro repositories so it should be easy to install.
    We only need to edit one file:

    $ nano -w /etc/ddclient/ddclient.conf

    Put the following in there:

    ## DNS-O-Matic account-configuration
    use=web,,      \
    protocol=dyndns2,                  \
    login=your account user name,                 \
    password=your password                 \

    Change only the username and password you used to the ones you used to log into the DNSomatic site. You can now manually run ddclient to update your IP, or you can simply add it to a cron job. If you only want to update your IP once every hour (your ISP does not reset your account more often than that), then just do the following:

    $ ln -s /usr/sbin/ddclient /etc/cron.hourly/opendns

    My ISP resets the IP address at irregular intervals, so I had to add this to crontab to get ddclient to run every thirty minutes.

    $ crontab -e
    */30  * * * * /usr/sbin/ddclient

That is it. Try it out to see if your filtering is working and adjust the settings in OpenDNS as you see fit. Happy and safe browsing for the whole family!

The tech savvy users can stop reading now, this section is a bit overboard, but I would like to add it for people who do not want to take any risks while testing to see if everything works like it should.

Testing OpenDNS the safe way

The easiest way to see if it works is to test it by trying to enter a forbidden/filtered site. You will immediately see an OpenDNS error message warning you that this site is being blocked.

To be on the safe side, let me walk you through this without leading you into unnecessary temptation.
In OpenDNS after you have logged in, click on dashboard and then click on settings.
Click on your IP address and under "Manage individual domains" enter a safe site here that you do no mind getting blocked, something like:

Add it and wait around 5-10 minutes for everything to get updated.

Now each time you want to know if ddclient is working without taking risks, just try and access If the normal page displays then your ddclient isn't updating your IP correctly, if it is blocked then you know it is working.

Without getting technical this is a safe way to test and see if it works correctly.

Thanks to shane2peru for the initial writeup.

Saturday, February 12, 2011

Top 10 list 2011

It has been a couple of years since I last reviewed my "Top 10 list" of Linux applications, so let's have a go at it again and see what has changed and why.

1. Music player - MP3Blaster
Web browser - Firefox
3. CD/DVD burning application - K3B
4. Video player - Kaffeine
5. Image editor - Gimp
6. BitTorrent client - Ktorrent
7. IRC client - Xchat / irssi
8. Terminal application - Yakuake
9. Image viewer - Eye of GNOME
10. text editor - Nano

1. Music player - none
I cannot remember when last I listened to a song on the PC, months, years ago. I do not even have a music player installed, the closest to one is probably VLC. I do, however, use MP3Blaster on occasion for work to play sound files over ssh, but that is not on my desktop PC.

Web browser - Firefox
Google Chrome has been around for a while and I did grow fond of it, but there are just too many bugs still to recommend it. I have some issues with YouTube videos, ironic, I know, and Firefox handles plug-ins and extensions just that little better. So, I'm partial towards Firefox, but only just. Chrome IS going to launch a full system take-over on my desktop any time now...

3. CD/DVD burning application - K3B
Can't beat the best of the best, so yea, K3B it is.

4. Video player - VLC
Kaffeine made place for VLC and this is pretty much the only media player I ever use.

5. Image editor - The Gimp
Again, Gimp just stays at the top for the moment. Don't think that spot is not being contested, no sir, there are some serious alternatives on the rise.
Well, sort of.
You see, The Gimp is a complete solution, giving you everything you could ever need and shake a stick at for your graphical needs, the alternatives that are giving The Gimp a run for it's money, on the other hand, are application specific, for the lack of a better word, like F-Spot for photo manipulation, Krita and MyPaint for image creation/manipulation.
So far The Gimp still comes out tops for me.

6. BitTorrent client - none
I do not use torrents any more, but rather news servers, and if you need a good news server client, then sabnzbd is the way to go.

7. IRC client - none
I do not use IRC any more, it has been ages since last I logged in to any IRC server, I'm not that chatty any more...

8. Terminal application - Yakuake for KDE and Gnome Terminal for Openbox
When I run Openbox I want as little KDE dependence as I possibly can have. Yea, I have a thing against the recent plasma libs and kde libs that chews my resources...

9. Image viewer - Eye of GNOME
Not much to choose from here, either choose GTK based viewer or KDE based viewer... for now Eye of Gnome is doing what it must.

10. Text editor - Nano
I still use this editor almost every single day, this is one must have for me, and I do everything with nano, from coding simple scripts to building websites, awesome editor, not too complex and certainly not too much of a ligthweight.

Well, seems like age is catching up and I do not "play" on Linux any more, I need it for day-to-day work...

Openbox random desktop wallpaper script

There are a lot of ways to change the desktop background of Openbox, but for this tutorial we are going to focus our thoughts on feh.

To set the background in Openbox, simply open a terminal and type the following command:

# feh --bg-scale /path/to/file.jpg

If you want to only use a single wallpaper for your desktop, the put this line in your autostart file:

# nano -w ~/.config/openbox/
# feh --bg-scale /path/to/file.jpg &

Remember the & at the end, very important!

Random wallpaper script
Let's take this one step further and take a look at a script that will randomly change the desktop wallpaper each time we log into Openbox.

Here is the script first:

ALIST=( `ls -w1 /path/to/folder/containing/wallpapers` )
let "number = $RANDOM"
let LASTNUM="`cat $WALLPAPERS/.last` + $number"
let "number = $LASTNUM % $RANGE"
echo $number > $WALLPAPERS/.last

feh --bg-scale $WALLPAPERS/${ALIST[$number]}

Name it something easy and save it, on my PC all my scripts (conky, wallpaper, etc.) is saved in the same folder (~/.scripts). Let's name it

Make it executable:

# chmod +x .scripts/

Test the script by running it from a terminal:

# cd .scripts
# ./

If all went well you should see the desktop background changing. On my machine the script complained about a file (.last) not being present in the wallpaper directory, so just create that file:

# cd /path/to/wallpaper/folder
# nano .last
ctrl+o to save the file
ctrl+x to exit

No need to write anything in it, just create it.
If everything is working as expected, simply add the script to your autostart file:

# nano -w .config/openbox/ 

~/.scripts/ &

If you have problems with the script not being found, use the full path to the file:

/home/user/.scripts/ &

Log out and log back in, you should see a new wallpaper now!

Other alternatives
There are some scripts out there that allows you to change the desktop wallpaper with a menu click inside the Openbox right-click menu, if you want to try them out you can have a look here.

Wednesday, February 09, 2011

Autostart applications and services in Openbox

To autostart applications you need to have the following file:


Chances are good that it is not there so lets create it and put out startup applications in there:

# nano -w ~/.config/openbox/

In a previous post I described how to install dcompmgr and Avant Window Navigator, lets add this to the file to autotstart at next login:

dcompmgr --gl &
avant-window-navigator &

Note the &, this is very important, without it the applications will not be started in the background and they will not run properly or at all.
dcompmgr has only a handful of options to choose from, you can view it by typing dcompmgr --help in a terminal.

Safe your work and exit, in nano:

ctrl+o to safe
ctrl+x to exit

Make the script executable:

# chmod +x ~/.config/openbox/

Log out and log in again, the services or applications should have automatically started.

If you find something not working, go over your commands again and make sure they are typed correctly, most of the time it is only a simple typo or the & that is left out.

Application Launcher for Openbox

If you log into Openbox for the first time you are greeted with nothing except a basic and generic right click Openbox menu. At least that is how it is in ArchLinux, also note that I have no other Desktop Environment or Window Manager installed...

The first thing I was looking for is an easy to use application launcher.

You can edit the Openbox menu yourself, or use something like obmenu to help you edit it, or even generate a menu with an app like MenuMaker. Great, but in my old age I'm looking for ease, for comfort, something that I can just click and there you have it, every single app and service available is listed.

This is where Avant Window Navigator comes in. What started out as me just looking for a neat Kde/Gnome like application launcher ended up bringing along a somewhat complete solution to my initial needs.

To install AWN you will need some composite manager to help out and bring out all the effects of AWN. I have tried quite a few and finally settled on dcompmgr.
Xompmngr and Cairo Composite Manager were very unstable and crashed when relocating tabs in Firefox, switching between some windows, etc.

The only time dcompmgr has let me down so far is when I play Steam games, but I'll come to that later.

  • Install your composite manager of choise.
    After you have it installed, start it from a terminal:

    # dcompmgr

    Notice that I did not put the & to start it in the background, this way I can see what is wrong if it crashes and fix it. If we are happy later on that everything is working like it should, then we can run it in the background.

  • Now install Avant Window Navigator and Avant Window Manager extra applets.
    If you do a search in your package manager for Avant or AWN you will see all available packages for AWN, choose what you think you will need and install it.

    Start it from another terminal like we did with dcompmgr:

    # avant-window-navigator

    If all goes well you should now see the standard AWN bar somewhere on your screen (middle top or middle bottom), go into the AWN settings and edit it to your hearts content.
    What I added to solve my application launcher problem is the "Yet Another Menu Applet".

    After adding the volume control, date and a few applications to the taskbar I ended up with this setup:

I'll get to the icon theme a bit later. But that is it, a functional "office friendly" application launcher, nice!

There are times when the composite manager will crash for some odd reason, like mentioned earlier dcompmgr crashes whenever I start Steam or play a Steam game. You can always start the composite manager from a terminal, but even if you open it in the background you need to have that terminal open at all times otherwise the program will stop.

The solution to this is to bind the composite manager to a key on the keyboard and then use this to start the composite manager whenever you need to. Painless and elegant.

Look for the post on binding key to see how to do it.

Openbox, the lazy way...

I have recently switched over to OpenBox because I just had enough of random KDE bugs, especially with regards to plasma eating 99% of the CPU, and so far I'm very, very pleased with the result.

For the uninitiated out there, there is one thing you have to remember is that people think you know everything to know about coding and scripting once you tackle a more "advanced" window manager, so be prepared for hours of frustration while trying to figure out the smallest detail. Take heart though, someone like you have gone through it before and is willing to share his knowledge.

To me the main problem with Fluxbox, Openbox and all the other *box window managers is that they are not geared for the person who has productivity as a high priority. As an office worker you do not have time to call up a terminal type out the command for OpenOffice Writer.
You want to browse a file in a file manager, click on it and let the rest just happen.

That is why, after this long silence, I'm going to blog my progress and what I did to make OpenBox as "office friendly" as one can get.
Each post will be a different feature to make it easy to follow and reproduce without reading stuff that doesn't concern you at that time.

Just a few notes before I get started:
I'm not going to handle the installation of all the various software. I'm using Arch Linux and have no idea what some of the software are named and how they are installed on other distros.
Use Google for that, if you want to know how to install Avant Window Navigator on Ubuntu then search for:
"Avant Window Navigator"+Ubuntu+install

This goes for all other software as well.

If you have questions, ask!
I will answer whatever problems you have, so fire away!

That is that. Enjoy!

Enjoy some videos after reading the blog!