Muses

The Perfect Conky Setup

Posted in Gentoo, Linux, Open Source by Rahul on March 8, 2010

EDIT: New Location for post and the blog.

A picture is worth a thousand words, have a look for yourself.

Conky on KDE4

So, how to get this goodness on your computer. Quite easy. Simply follow the following steps and you will have a similarly amazing desktop.

  • Firstly, install conkyForecast.
  • Gentoo users, go here.
  • Ubuntu users, head over to here.

Everyone now head over to weather.com and register yourself. Obtain your XML Partner ID  and License key. Use the following command to search for your location code. Change Zurich to your city name.

$ curl http://xoap.weather.com/search/search?where=Zurich

You can then get the location code from the output of the above command.

Next, copy the conkyForecast configuration file over to your home folder and fill in the Partner ID, Location Code and License Key.

cp /usr/share/conkyforecast/conkyForecast.config ~/.conkyForecast.config
vi ~/.conkyForecast.config

Download the conky configuration file from this link and save it to your home folder as .conkyrc.

Now download Conky Colors from gnome-look. Extract the archive and install all the fonts that are present in the package. Even though not all of the fonts are required for the setup (you can take a quick look at the conky configuration file to see which fonts are actually needed) the fonts are quite nice and having them on your computer won’t hurt at all.

Install conky if you have not already done so. IMP: This theme is tested with conky-1.8.0_rc2 so make sure you are using this or a newer release of conky. If you are on gnome please edit the configuration file to suit your needs (in particular change the location code to get the weather of the city you reside in) and then launch conky. If there are any particular hacks that are needed to integrate conky and gnome, my apologies for not being aware of them. Please feel free to add any such suggestions in the comments section, I will update the post with it.

KDE USERS:

If you are using KDE4, also install feh, an image loader which will help us to integrate conky seamlessly into the KDE environment. Now create this script, which we will use to launch conky.

$ nano conky.sh
#! /bin/bash
conky -&
sleep 3
feh --bg-scale `grep 'wallpaper=' ~/.kde4/share/config/plasma-desktop-appletsrc | tail --bytes=+11`

The above script is supposed to read your wallpaper settings and use that to redraw the background of conky. For some reason, it is not working for me so I hard-coded my wallpaper in to the script.

$ nano conky.sh
#! /bin/bash
conky &
sleep 3
feh --bg-scale /home/rahul/Pictures/Wallpapers/wall_abstract.jpg

Use whatever method suits you. Do remember to make the script executable.


chmod +x conky.sh

Take a final look at conkyrc. Make sure that you have the right location ID for the weather. Use KDE system settings to add this script at startup and voila! We are done. We now have the perfect conky setup. For immediate testing, launch the script.

REFERENCES:

P.S. The music part will only work if you use MPD.

Advertisements
Tagged with: , , , ,

Installing WordPress Locally on Gentoo

Posted in Gentoo, Linux, Open Source by Rahul on February 25, 2010

EDIT: New Location for post and the blog.

There are already a couple of informative articles on this. Good as they are, I managed to run into a couple of problems that are not detailed on these articles possibly due to the fact that they were written a long time ago. Therefore this article, to help others (and me) who in the future wish to achieve the same that I did.

USE Flags

  • dev-lang/php apache2 mysql (in addition to ones already enabled by default)
  • www-apps/wordpress vhosts

Emerge WordPress

  • emerge -av wordpress

Install WordPress using webapp-config

  • webapp-config -I wordpress 2.9 -d wordpress

Configure the MySql database

  • mysql -u root -p (login to MySql)
  • CREATE DATABASE databasename; (create a database, replacing databasename with the name that you wish to choose)
  • GRANT ALL PRIVILEGES ON databasename.* TO username@localhost IDENTIFIED by ‘password’; (Create a user for the above database, replacing username with the name that you intend to use. Similarly with password)
  • FLUSH PRIVILEGES;
  • exit

Configure WordPress

  • vi /var/www/localhost/htdocs/wordpress/wp-config.php (and verify the following settings)
// ** MySQL settings ** //
define('DB_NAME', 'wordpress');     // The name of the database
define('DB_USER', 'username');     // Your MySQL username
define('DB_PASSWORD', 'password'); // ...and password
define('DB_HOST', 'localhost');

Configure apache2

  • vi /etc/apache2/httpd.conf
  • Comment out the following line: LoadModule unique_id_module modules/mod_unique_id.so
  • Add the following to the end: ServerName localhost
  • vi /etc/conf.d/apache2
  • Add the “-D PHP5” to the options passed in APACHE2_OPTS

You are set to go

Gentoo FTW!

Posted in Gentoo, Linux, Open Source by Rahul on October 31, 2009

So, the folks at linux-mag have bench marked Gentoo(x86_64) compiled with march=core2 and -O2,-O3 or -Os and compared it with Ubuntu 9.04. While Ubuntu 9.10 is already out, the software used on Gentoo (seems that the used the stable branch of Gentoo) is closer to 9.04 than 9.10. And what do the results tell us? Exactly what we already knew. Gentoo kicks ass. We already knew that, didn’t we. However, what is interesting is that when most of the people have been harping that optimizing for a particular CPU (which I believe is the primary reason for the differences that we see) is not useful anymore, it seems that the this is really not the case. In my own experience, I concur. My Gentoo system has been far more responsive than my Ubuntu or even Arch systems ever were.

Read the full article here: http://www.linux-mag.com/id/7574/

Tagged with: , , , ,

Changes in the Zen land

Posted in Linux, Open Source by Rahul on October 23, 2009

The past week has seen quite a few changes in the zen domain. Change, they say, is a necessary evil, so rather than dwell on what was we now look forward to what it would now be.

Zen-sources, as it was called, has a new name and a new home. It is now called zen-kernel and the new home can be found at http://zen-kernel.org/. Tutorials on how to install zen-kernel for the Linux distro of your choice are already up and this is where you should be headed. Because zen-kernel is still the way Linux Kernels should be. I would be posting benchmarks results of vanilla kernel vs. the Zen kernel pretty soon. Details will follow later, but right now I am not in favour of using phoronix test suite. I would rather benchmark more day-to-day tasks and see how the respective kernels perform.

Back to the changes in the zen land for now. The zen developers are also looking for a new logo. There is already a lively discussion in place at the Gentoo forums. Head over there, in case you want to take a sneak peek at the submissions that have been made so far.

And now the biggest change so far. This one is certainly for the positive. Zen kernel is now in portage (a big yay for all Gentoo users – it is now even easier to get zen). So, fellow Gentoo users, what are you waiting for? emerge zen-sources awaits you.

Zen Sources: The Way Kernels Should Be

Posted in Linux, Open Source by Rahul on August 31, 2009

EDIT: New Location for post and the blog.

From the main site, which can be found here.

Zen-Sources is a collaborative effort of kernel hackers and enthusiasts to provide the best Linux kernel possible. We include code that is not yet found in the mainline kernel in an attempt to support the latest hardware, new features, security fixes, optimizations, etc.

Now, on to the important stuff:

  1. Installation Guide for Gentoo Linux. (here). I recommend following the hand based git setup. (here).
  2. Arch Linux Install Guide (here).
  3. Ubuntu Guide. (here).
  4. For other distros, see the git mentioned in 1. (or check the repos and forums forums for your distro)

As you might have guessed from my recommendation, I have been using the git based setup on my Gentoo Linux install as my primary kernel. It has worked for me most of the time (there have been instances where the use of a kernel in rc stages has induced a bug or two – but this has seldom been the case and there is always the possibility to switch back to the stable release of zen sources).

There is a long list of projects that are included in zen sources (see the full list here) but the major advantages that I would think worth mentioning are:

  • Zen Tune
  • Brain Fuck Scheduler (don’t judge on the name)
  • BFQ
  • No problem with suspend/hibernate (and this is without TuxOnIce)

I would definitely suggest everyone to have a go at this. You will like it.

I keep coming back to Gentoo!

Posted in Gentoo, Linux, Open Source by Rahul on September 27, 2008

I don’t know why, but somehow after using Gentoo it is impossible for me to use any other Linux Distro. I wanted to try KDE-4.1.1 quickly and I anyhow wanted to do a fresh install of my linux system (for some reason, I like reinstalling Linux) so I just went ahead and burned Kubuntu Ibex Alpha 6. No problems with the installation there, everything was as easy as pi, and then I booted into KDE-4.1.1. The first bootup was slower than an ant, and then there were all these applications installed that I did not want to be there. I wanted a pure KDE-4 desktop, no KDE-3.x app, even if that meant some loss in functionality. But, no, that is not Ubuntu’s philosophy. Nothing wrong in that, it is just not what I wanted. But I still wanted to try KDE-4.1.1 for some time, so I installed the necessary codecs and stuff and played around with it for some time. But it just felt so wrong – so unlike Gentoo. Everything was already configured, and in some cases there was no easy way to change the defaults. Most of the configuration in xorg.conf was listed as “Using Defaults” or something similar, how do I know what the defaults are? And then of course there is the fact that it is not a rolling release. And many other small issues, which without being a show stopper, were just as effective as flies and mosquitoes in irritating me. So, I could only tolerate it for 45 minutes and I went ahead and installed Gentoo again.

Sure, it took a lot longer than Ubuntu to install (compile 😉 ) everything on gentoo, yet I must say it was worth the wait. It is so easy to configure everything, just because there are no defaults, or let us say, no sane defaults. I have a resolution of 1280 X 1024 in my terminal, the font rendering is extremely smooth and is easily configurable. And yes, the system is more far more responsive and I have a pure KDE-4 system, there is no kdelibs-3* and qt-3* installed.

And in general, portage and all the gentoo associated tools feel better, maybe because I have become more accustomed to them. And final point, I do not have to install g++, it is already installed. The toolchain is already there to compile anything that I want.

Tagged with: , ,

A gnome user’s tryst with KDE4.1

Posted in Linux, Open Source by Rahul on August 2, 2008

I have been a gnome user for nearly the past two years. Having started my Linux experience with Ubuntu, which shipped gnome as default, I never felt the need to switch. There was nothing the Windows XP DE provided (and I used) that was missing in gnome. Wireless with network-manager was the only problem that I encoutered however I soon found an excellent alternative in WICD – and that has been the default for me from then.

However, KDE4 came along with a lot of fanfare. However, the reports suggested that there were a lot of bugs with it and the official view seemed to suggest that it was more of a development release and therefore I decided to stick with gnome. But then came along 4.1 and the feedback from other users was encouraging. I decided to give it a try. However, Gentoo (my current Distro) did not have ebuilds for the 4.1 branch in the official tree yet. A simple search at the forums yielded the answer that the gentoo devs are working on it and they were expected to hit the tree sometime in the near future. Meanwhile, those who were really interested can get 4.1 from the kdesvn-portage overlay. Not wanting to wait, I went ahead and fetched the overlay. Next step was to install kde4.1. After tweaking with the use flags and unmasking the packages (they are all hard masked) , I went ahead and installed the following split ebuilds:

kdebase-startkde
kdemultimedia-meta
kdegraphics-meta
kdeadmin-meta
kdegames-meta
kdm (separately)

It took a while to compile (:P) and the download speed was legendary ( <20 kbps) so it was ready when I woke up the next morning. No idea how long it took to compile (luckily there were no breakages during the night).

Well, I changed the default login manager to kdm, logged out and was presented with the kdm login screen. Nothing special there, no difference in functionality compared to gdm.

Well, I logged in and the default KDE4.1 splash screen was definitely very nice eye candy. Defintely better than the default gnome splash screen. The default wallpaper was quite artistic as well. Surprisingly, it read my gnome-session properties. I had a few scripts added to the startup and they were executed in KDE as well. That was quite nice.

So, a side by side comparison of the apps that are provided in the DE.

Dolphin > Nautilus (Dolphin feels more responsive, and is faster)

Gwenview > eog (no comparison here, gwenview in this regard is like the picture manager in vista)

Dragon Player = Totem (Totem is the front end for gstreamer and Dragon Player for xine, so there is not much of a difference. I am not discussing about the backend here. 🙂 )

kwin and Metacity (kwin is supposed to have compisite effects, but it does not work for me, so I do not know. :P) Other than that, it works fine.
EDIT: This is solved, kwin has to be built with openGL support if you want OpenGL as the compositing method. 😛

ksnapshot > gnome-screenshot (has more options)

konsole = gnome-terminal (not much difference)

Multimedia Keys (kde) < Multimedia Keys (in gnome) -> I have set the preferences for volume control at least a couple of times in systemsettings and it seems to stop working after some time. No dea why.

HAL Integration (kde) < HAL integration (gnome) -> First of all, no external drives would be automounted by default. It pops up in this new device notifier where you have to click on the new device to mount it. I mean, what the hell is this. If I plug in an external hard drive, I want it to be mounted and not wait for me to tell it to mount itself.
Secondly, my windows partition is not mounted by default. It pops up in the new device notifier when I log in, but when I click on it, it tells me something about having to thing extra options. So, I have to mount it manually. Quite irritating.

kmenuedit > alacarte. However, for some reason, I cannot get kmenuedit to recognize that gimp has an icon. 🙂

Plasma Panels > gnome panel. Not a surprise considering they were working on it for so long and it was one of the major feature of 4.0.

Konqueror and Kmail I did not try, same with kopete. Firefox, Thunderbird and Pidgin work for me.

As for the default audio player, I do not know why JuK is installed. It is of no use, when Amarok is there.

Other than that, there is not much of a difference, and it did not take me (I have never used KDE before) to get used to the settings and all.

But, I must say, that the system responsiveness of KDE4.1 is better than that of gnome-2.22. It loads at a faster rate, and is faster when it run as well. And of course, the looks and the finish are better than gnome, in my opinion. Therefore, this time it looks like that kde4.1 is there on my computer to stay.

Below is a screenshot of my desktop with one gtk app, one qt app, and one native kde4 app.

Tagged with: , , , , ,

Why I Use Gentoo?

Posted in Gentoo, Linux, Open Source by Rahul on June 22, 2008

So, I have been asked this question many times. And of course the assumption is that I am some sort of a masochist who enjoys wasting time on compiling packages. However, that is not entirely true. There are some other reasons why, after trying Ubuntu (started linux with it), Gentoo and then Arch I settled on Gentoo.

The main reasons in a nutshell would be:

1. Rolling Release – Arch does the same thing, while you could achieve the same if you keep using the development releases of Ubuntu. (However, once a feature freeze sets in, you have a wait of couple of months before new packages move into the repos). Arch, in fact, is more bleeding edge that gentoo. However, that is an advantage and a disadvantage as well. While it allows you to have the most bleeding edge system, minor breakdowns are expected. The same can be said for Gentoo – however, with the option of hard masking (not normal masking) a saner solution exists.

2. Portage – No other package management compares to it. Period. Not even the mighty and holy apt.

3. etc-update/dispatch-conf – Haven’t discovered a better way to manage configuration files in a better way in any other distribution. Very useful, if you like to edit your configuration files and do not want them to revert back with an update.

4. eselect – Modular configuration framework. In my opinion, the best feature of Gentoo.

5. Slotting – Install more than one version of the same package.

6. It forces you to learn command line – it is quite useful when you become used to it.

7. And before I forget, the famous USE flags. Trust me, once you get to know them, they are really helpful. And of course, there is no counterpart in any other distribution – this is a unique feature of gentoo (or rather source based distributions)

However, it is not that rosy. There are some disadvantages as well. The most obvious is the time consumed in compiling the packages and in getting the system installed. However, once everything is ready which would take anywhere between 3 days to a week, you would have a great system and you do not have to put in too much effort in maintaining it.

But still. only those who want to spend some time in building a system should try gentoo. Other than that, there is always Ubuntu, which is the best distribution if you are new to Linux.

Tagged with: ,