Tagged: Linux Toggle Comment Threads | Keyboard Shortcuts

  • hardikmehta 2:24 pm on March 7, 2010 Permalink | Reply
    Tags: , , , Linux,   

    Switched to Archlinux 

    At last a new post after a long time !

    Lately, I was very busy with real life issues and concerns so could not find time to write.

    In spite of being a fan of debian [1], I decided to change my operating system. I was completely happy  with sidux [2] which is essentially debian sid with a pinch of spice, but wanted to try something new and different. I had heard a lot of good things about Archlinux [3]. First I decided to try it on a virtual machine and was impressed by the simplicity of the system. It is highly configurable and yet simple when it comes to configuring it to your taste.  For me the common thing is that sidux and Archlinux both are rolling distributions.  Arch claims to be optimized for i686, so at least theoretically it should be faster than sidux. Though,  I don’t have any benchmarks to support this. Debian has may be the highest number of binary packages available, but Arch has AUR [4] and ABS [5], so it becomes easy to compile a package from sources.

    Another reason, I switched to Arch was that I was experimenting with lightweight window managers like fluxbox, openbox, dwm, xmonad etc. The community at Archlinux provides a great support and knowledge base for them. In fact I got encouraged to try those window managers by browsing through the screenshot threads in the Archlinux forums. On the other hand, sidux officially  supports only Kde, and I somehow felt that the community at sidux discourages the use of alternatives to kde and also other lightweight applications.

    Although, it was not GUI based like sidux, the installation of Arch went rather smoothly. Archwiki [6] is an indispensable resource. I have a 4 years old Dell Inspiron 6000. The system seems to run smoothly. There are less daemons running compared to sidux, so the boot time is less. I have more or less the same setup as my sidux installation with openbox as main window manager and kde 4 as a fallback ! I am also maintaining my plasmoid plasma_pyweather [7], so I don’t want to get rid of kde altogether.

    I don’t know yet, if I will continue with Arch or go back to sidux again. I have realized that you need to read all the messages carefully when you upgrade the system with pacman, this was also true for sidux, but the forum with upgrade warning was a great help.  Anyway, I hope to post interesting things about my experience using Arch.

    Here some screenshots for those who want to see it to believe.

    Arch clean

    Arch dirty


    1. Debian GNU/Linux
    2. sidux
    3. Arch Linux
    4. Arch User Repository
    5. Arch Build System
    6. Arch Wiki
    7. A weather plasmoid in python

    • Med Berdai 7:32 pm on March 8, 2010 Permalink | Reply

      Hi fellow Archer 🙂

      I’ve been using it exclusively for almost 2 years now, it never failed me and I didn’t miss Debian at all. Arch Linux is absolutely one of best GNU/Linux distros out there.

      Now that I grown feed up of Arch Linux being so reliable I started messing with FreeBSD and LinuxFromScratch 🙂

      Happy hacking,


  • hardikmehta 7:35 am on August 4, 2009 Permalink | Reply
    Tags: bash, , , , , , kde, , Linux, , plugin, , weather forecast, , xml, xslt, xsltproc   

    A script to display weather forecast for conky 

    Conky is undoubtedly the most configurable, versatile and amazing program I have ever come across.  With very little effort you can get a very sleek looking desktop. I have seen people using it to display all kinds of information under the sky.  Although, it can only display pure text, there is a possibility to use different symbolic fonts to display text based images.  Moreover, it is also very efficient program. Its own footprint is very small compared to most of the gadget frameworks like adesklets, gDesklets and of course plasma.  Configuration is also relatively easy. The best way is to copy configuration file from some one else and keep on changing it until you get what you want.  Another application worth mentioning here is dzen2. Dzen2 has ability to render any text graphically, although it lacks the built in variables of conky. In archlinux there is an application package called conky-cli which is a stripped down version of conky without X11 dependency. A combination of conky-cli and dzen2 is then used to make taskbars for minimalistic desktops like xmonad, wmii, dwm etc. Personally, I haven’t tried this combination yet.

    conky screen shot

    Ubuntu and Archlinux forums have dedicated threads with conky screen shots and config files. I came across many screen shots with weather information, forecast and small symbols with weather conditions. Most of them were using a perl script (for which I cannot find the link now) to fetch, parse and show the weather information from weather.com.  The weather symbols were ttf fonts.  I didn’t want to take the script one-to-one and perl is anyway too cryptic for me to  decipher. I decided to take the concept and develop something similar on my own.

    So I created the google weather script. It is a simple bash script to fetch the xml file using google weather api, I changed the source because although weather.com was providing good information, they were changing the format of the request too often, their terms and conditions of usage were also not very comprehensible for me. Then I use different style-sheets to process the xml response and show different information depending on the argument passed to the bash script. I also use the weather.ttf fonts to render the symbols for different weather conditions.  For transforming xml, I use the xsltproc tool.

    Here is the conky running under kde4 desktop. With different desktop environments       conky needs to be adjusted  a bit. Another weakness of conky in integrating external scripts is that the output must be pre-formatted before supplying it to conky. Conky just takes the text and renders it.  In principle any executable can be called from conky to display its output.

    Conky has many built-in variables for displaying common system parameters which are well documented on the official documentation page. Besides the common parameters like cpu / memory usage, uptime, upload-download speed, top 3 cpu using processes and top 3 memory using processes, the screen shot on the left also displays the dictionry.com word of the day rss feed, which I find extremely useful. It also uses a similar script and xslt transformation. There is also a built-in rss feed processor in conky.

    I use mpd for playing music. There is also built-in mpd support in conky and can be used to display information about current song being played. If you want to show different information at different places on the desktop, it is also possible to have multiple instances of conky running at the same time with different configuration files.

    As evident  in the screen shot it is difficult to adjust the spacing of the weather output due to mixing of different types and sizes of  fonts.  My script only considers some frequent weather conditions, but it can easily adapted to support many different weather conditions.  The spacing must be adjusted for individual setup by editing the line no. 16 in the  file fcConditions.xslt

    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
        <xsl:include href="conditionsInclude.xslt"/>
        <xsl:output method="text" disable-output-escaping="yes" encoding="utf-8"/>
        <xsl:template match="xml_api_reply">
            <xsl:apply-templates select="weather"/>
        <xsl:template match="weather">
            <xsl:for-each select="forecast_conditions&#91;position() >= 2]">
               <xsl:call-template name="get-condition-symbol">
                    <xsl:with-param name="condition">
                        <xsl:value-of select="condition/@data"/>
                <xsl:if test="position() != 3">
                    <xsl:text> </xsl:text>

    I have hard-coded the update interval to 1 hour. This can also be changed very easily to the required value by changing the value of the update variable in the weather.sh file.

    # don't get the file if created within an hour

    I use mainly following configurations for conky.

    I have released the script with GPL V3 license, so feel free to use it if you like it. Please comment about any bug reports, improvements, questions or suggestions.

    • antibalas 4:40 am on October 30, 2009 Permalink | Reply

      great work.

    • foenOsteotNox 12:17 am on December 11, 2009 Permalink | Reply

      I’m often searching for recent blogposts in the WWW about this issue. Thx!

    • webrev 7:13 pm on August 6, 2010 Permalink | Reply

      Love the google weather script. Thanks. Can someone tell me how to change the temp units to standard. I have changed in weather.sh

      1. s=standard units, m=metric units


      But it still reports as metric.

      • hardikmehta 8:16 pm on August 6, 2010 Permalink | Reply


        Thanks for using the script. The UNITS variable is obsolete with the google api implementation. It worked with the weather.com version.

        With google apis, it is a bit different. The default locale of the url is “us” which is used in the script. In this case the temperatures are provided in both metric and standard units. See temp_c elements in the xml http://www.google.com/ig/api?weather=Munich,Germany

        If you want a localized output please append hl=[iso locale code] to the url, but then the output is also in the language specifed by the locale, so the script is not guranteed wo to work with it.

        example of German locale (de)

        I hope this helps. Feel free to ask if you have further questions.

    • Ben Brown 5:54 pm on February 23, 2011 Permalink | Reply

      Just wanted to let know how much I appreciate the work you did on the weather program for conky. I don’t understand all the programs and coding, but I am working my way through the code and have been able to get it to work for me here in Michigan, USA.

      Again, thank you so much for sharing this with the community.

      • hardikmehta 6:01 pm on February 23, 2011 Permalink | Reply

        Hi, Thanks. Glad that it worked for you.

    • Agnelo de la Crotche 2:26 pm on May 21, 2011 Permalink | Reply

      Great job! What about packaging it for different distros in OBS (https://build.opensuse.org) ?

  • hardikmehta 4:02 pm on May 13, 2009 Permalink | Reply
    Tags: , , chroot, Linux, pacman, ramfs, recovery, system recovery, upgrade, virtual machine, virtualbox   

    Arch Linux recovery 

    Since some time, I have been experimenting with archlinux[1] as guest in VirtualBox.  Due to some unknown reasons the VirtualBox[2] hanged during package upgrade on the arch setup (pacman -Syyu). I had no other choice than to kill the VirutulBox process in the middle. I think it happened when the packages were being configured. After that when I rebooted the guest OS, it gave me the “ramfs$” prompt and refused to mount any disks. There were some errors stating the uuids of the disks, but for me the errors were beyond comprehension. Being a beginner in archlinux usage, I didn’t know how to recover from this situation.

    Purely instinctively, I downloaded the latest iso of archlinux and mounted it as cd drive on the virtual machine and booted the virtual machine from that iso. I logged in as root and mounted the corrupted archlinux drives / and /home and chrooted to my installation root. After chrooting, I started upgrading the system with pacman as usual. Here the summary of the commands I used almost in the same order.

    # mount /dev/sda1 /media/oldroot (of course I had to create the directory under /media)
    # mount /dev/sda2 /media/oldhome
    # chroot /media/oldroot
    # pacman -Syyu

    The upgrade went fine and after rebooting I got the arch setup exactly how I left it. I don’t know if this recovery was method was a fluke or recommended way to recover arch, but it worked for me. I would definitely like to know what could have happened and the correct procedure to recover from such cases. Although, it was a virual machine and there was no data at risk, It would have taken a lot of time and effort to get the same archlinux setup which I had. I must say chroot is an amazing tool.


    1. Arch Linux
    2. VirtualBox
    • Gaute 1:06 am on June 4, 2011 Permalink | Reply

      Thank you, this was useful. I always re-install Arch from scratch when something get messed up. Next time I will chroot 😀

  • hardikmehta 6:25 pm on April 19, 2009 Permalink | Reply
    Tags: , , Linux, sid, , x11, xserver-xorg   

    Successfully upgraded sidux with KDE4 and Xserver-Xorg 

    Last week, I could successfully upgrade(dist-upgrade in debian terms) sidux.

    This is very significant,  because I have been using sidux since its 2007-01 version and I have never reinstalled the system. The last week’s upgrade brought in new KDE 4 and also Xserver-Xorg.

    The upgrade  went smooth with the help of the how-to   posted by the sidux team. Kudos to them.

    Because of the new X-server upgrade, I had problems with tapping of my synaptics touchpad on my dell inspiron. Here is a general how-to posted on sidux site, which may apply to other systems with some changes.

    There was only a small issue with kmix which showed the wrong channel as default one, this is not at all a big deal considering the critical nature  of the upgrade. I may discover some other minor issues in the course of time, but they will surely be fixed.

    I use openbox as my main WM (Window Manager), but I also keep Kde installed as fallback DE (Desktop Environment) and to be honest, I was also curious about how the new Kde will be. As an eternal WM hopper I am constantly looking for something new :).

    Such upgrades are only possible with rolling distributions like debian and  hard work by the sidux team to integrate the changes as smoothly as possible. This cannot even be imagined with release based operating systems or linux distributions.

  • hardikmehta 9:04 pm on April 14, 2009 Permalink | Reply
    Tags: , , Linux, lxde, mc, midnightcommander, , , tint2, trayer, urxvt, visibility   

    Quest for Window Manager: Openbox 

    Although, I loved using Fluxbox, I started feeling it a bit monotonous and limiting in configuration options. Then I came to know about Openbox. Openbox is also a *box style window manager which is very lightweight and highly configurable. The website also claims it to be more compliant with the freedesktop.org standards. LXDE is actually openbox as window manager with a fixed set of accompanying programs. Openbox can integrate very well with KDE or GNOME, actually in Debian if you install openbox, you will automatically have a choice of booting into “openbox-kde” , “openbox-gnome” or openbox session. I generally prefer the pure openbox.

    The most apparent  difference a fluxbox user will notice while starting  the default configuration of Openbox will be that the good old taskbar generally also containing  a clock and a systemtray is gone. This doesn’t mean that you cannot use any taskbar with openbox, but by default there is none. This gives the user freedom of using any separate taskbar program ( e.g. fbpanel, pypanel, tint2 just to name a few) that suits her.  And in case you are happy with the ALT+TAB menu, you don’t have to use any taskbar or panel. As can be seen in the screenshot, I use tint2 as taskbar. Since we don’t have any systemtray by default, there are some programs like stalonetray, trayer etc which can be used. That of  course if you want to use any.

    Instead of being able to do everything under the sun, openbox does the only one  task i.e. managing the windows and It does it well. In my opinion this is consistent  with the philosophy of Unix commands which perform a very small task and they do it well. Another thing which I like  as a programmer is that the configuration file is xml based. This is of course a negative point for others who don’t find xml “human readable”. In fact I have seen many excellent looking and extremely geeky desktops which are configured by people having very little or no programming experience. So I think it is not at all required to be a programmer  to be able to tailor your desktop to your needs. It is enough just to have basic command-line skills, patience to read the documentation and spare hours in the night for tinkering.

    As a drawback the first thing comes into my mind is that unlike fluxbox, the themes don’t include the panel or the taskbar. In fluxbox if you decide to change the theme the fbpanel is included in the theme configuration and automatically adapts to the new colors and fonts. As the panel is not part of openbox, the theme configuration obviously doesn’t include it so in case you are using a standalone panel, you may have to change its configuration to match the openbox theme.  This I think is not a problem for people who don’t use any panel or intentionally want the granularity of configuration.

    I would not discuss the details of installation, configuration and customization here because  I don’t want to document again what is already well documented.  Openbox wiki on its home page has a very nice documentation.  On ubuntu forums, I found an extensive installation and configuration guide for openbox here, which is more or less the second official guide.

    Here are my two sidux desktops running openbox with conky, adesklets, tint2, visibility, trayer, urxvt etc..


    Click image to view fullsize


    Click image to view fullsize

    Here are the links to my openbox, tint2 and visibility configuration files.

    Main config file: ~/.config/openbox/rc.xml
    Startup file: ~/.config/openbox/autostart.sh
    Menu file: ~/.config/openbox/menu.xml
    Tint2 config: ~/.config/tint2/tint2rc
    visibility config: ~/.config/visibility/config

  • hardikmehta 6:04 pm on February 15, 2009 Permalink | Reply
    Tags: , , , Linux, ,   

    Quest for Window Manager: Fluxbox 

    I am sure much has been written  about different window managers under GNU/Linux operating system. Here I present my journey and experience with them. This is how it started.

    I was a Windows user. I started to hear about Linux and got inspired to try knoppix live cd. It was really a nice experience and I started admiring how Linux stays out of your way when you want to work with your system. Then I decided  to install a suitable distribution on my hard disk, but the problem was that I had only 4.5 GB hard disk at that time, so I started searching for  a light distribution which could fit. The choice then fell on feather linux. It is really a very  light (under 128mb) but nice knoppix based distribution, so after installation it is essentially debian with some knoppix quirks. The only problem I faced with feather linux at that time was that it came with  fluxbox as the default window manager.

    To be honest, at first, fluxbox looked  frightening due to my  KDE background, no launch button, only right-click menu and even for a simple task like getting the same wallpaper every time you boot, you have to edit a configuration file. But after leaning to work with it, I started admiring fluxbox. I also found it easy to configure by editing simple text based config files. With time, I got so fond of fluxbox that even when I had ample disk space to install KDE, I opted for fluxbox when I installed my first real debian based (as feather linux was based on knoppix) distribution, sidux. As the name suggests sidux is based on debian sid and one of the most cutting edge and fastest distros, more on sidux some other time. Here is how my desktop looks running sidux and fluxbox tweaked to my taste and with some other gadgets I like.


    Fluxbox is highly configurable and very well documented. The wiki here a good place to start to learn how to configure fluxbox.

    My fluxbox configuration files can be found here:

    I can also provide the supporting scripts which I have written and may be referenced by the above files.

    Now, the only short coming of fluxbox in my opinion is that there is a limit how much you can configure it. After some time I had a feeling that my desktop was becoming monotonous. Also considering the resource consumption, fluxbox is not the slimmest among the  light window managers.

    Moreover, I had started following the monthly screenshot threads on the highly geeky  archlinux and ubuntu forums. There the posts are like “pimp my desktop” shows, the screenshots are so tempting that you are compelled to ask them how they achieved that look or what program was that little clock in the corner. So, I also had a wish to “pimp my desktop” and try something new.

    • ruchir 4:53 am on March 30, 2009 Permalink | Reply

      Good information about linux operating system and various options.

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc
%d bloggers like this: