Oct 9
Running Spotify on Ubuntu
icon1 Krishnamurthy Koduvayur Viswanathan | icon2 linux, software | icon4 10 9th, 2011| icon3No Comments »

I found it really painful that I could not run the Spotify Linux client natively on my Ubuntu box because I have a free Spotify account. I was recently told that I could try running it using Wine. For some reason, I have never really given Wine much thought, but this was enough incentive for me to give it a shot.

It was not really straightforward, but the following worked for me:

  1. Install Wine: Open Synaptic package manager, and select Wine. Click apply.
  2. Open the “Configure Wine” feature. Click on the audio tab, and select OSS drivers. Set hardware acceleration to emulation. Keep the other default values. Click OK.
  3. Download the Spotify Windows Installer on to your local disk. Right click it, select the permissions tab, and select the “Allow executing file as program” checkbox.
  4. Right click the executable and select “Open with Wine….” option.
  5. After the installation, launch the client (it automatically launched for me).
  6. Try playing a song from your Spotify playlists. If it works, then you are golden, else look further.
  7. In my case, it reported to have a problem with my soundcard.
  8. For some reason, if I launch Spotify directly using Wine as wine “C:/users/kv/Application Data/Spotify/spotify.exe” (or whatever the executable path is on your machine”, it was not using the right audio drivers).
  9. So I try using padsp, which is the PulseAudio OSS wrapper which I think came natively bundled on my Ubuntu box.
    padsp starts the specified program and redirects its access to OSS compatible audio devices (/dev/dsp and auxiliary devices) to a  PulseAudio sound server (directly from the man page).
  10. Running it as padsp wine “C:/users/kv/Application Data/Spotify/spotify.exe” worked for me. Sound works without a hitch. I created a launcher on my desktop with the command above. Now I can run spotify on linux using wine with a double-click.

Sep 7
Getting Pidgin, getting Gtalk
icon1 Krishnamurthy Koduvayur Viswanathan | icon2 linux | icon4 09 7th, 2007| icon31 Comment »

I installed Ubuntu 7.04 which has Gaim preinstalled in it. For some reason I was not able to get Gtalk working on gaim. I checked up the google support page and found that there weren’t any instructions specific to gaim, and now there is Pidgin. So I decided to get Pidgin hoping that GTalk would work on it.

First I downloaded the Pidgin source from http://pidgin.im/ because that seemed to be the preferable thing to do. I realized that I will first have to install some prerequisites before I compile the source. So I did this:

sudo apt-get install libgtk2.0-dev libxml2-dev gettext libnss-dev libnspr-dev

The first package libgtk2.0 dev installs GTK2.0 development headers. I also installed the build-dep gaim package which installs the list of dependencies on your machine that the ubuntu developers used for gaim. After that I uninstalled gaim and gaim-data using synaptic.

Once you are done with that, you are ready to compile the Pidgin source code. First extract the source from the tar archive. Then run ./configure. My friend told me that a regular ./configure won’t suffice here because things like google talk may not work. So I configured it with the following switches:

./configure –enable-dbus –enable-nm –enable-mono –enable-gnutls=yes –enable-nss=yes –enable-gtkspell=yes –enable-plugins

That it:
make
sudo make install

That installs Pidgin on the system. To get GTalk working on my Pidgin, in addition to the instructions listed on the google support page, I also had to click on the advanced tab of the account setting and check the “Force old (port 5223) SSL”, set connection port to 5223 and connect server to talk.google.com.

Sep 3
Development man pages
icon1 Krishnamurthy Koduvayur Viswanathan | icon2 linux, programming | icon4 09 3rd, 2007| icon3No Comments »

I was doing some elementary IPC programming on linux, and was looking for the man pages of the library calls that I was using in my programs (for functions like “perror”, “execlp” etc.) ‘cos its been a while since I have done anything in C. The way to get the manual page for these calls is:

kv$ man 3 “functionName”

where the number 3 specifies section number 3, which stands for library calls.

Now, it so happens that the development man pages are excluded by default in Ubuntu linux. A quick google search told me that the name of the package I was looking for is “manpages-dev.

Do:
kv$ sudo apt-get install manpages-dev

and you get the documentation for all the methods that you want!