Thursday, 14 March 2013

Installing Spotify on Fedora - now with a installation kit

Edit: These instructions are now almost one year old, if you're using Fedora 17 or newer try one of the links for the community packages on the bottom of this post or in the comments section.

Me and coworker compiled instructions to install Spotify on Fedora and packed them in a nice little tar file for everyone to use.
Get the file here:

Instructions (On the README file): http://dl.dropbox.com/u/17266999/spotify-install-kit.tar
(If you rather not install stuff you got from dropbox, you can still follow these instructions since they have the steps for not using the file I'm linking.)


yum install wget rpmdevtools rpm-build yum-utils cpan
rpmdev-setuptree

#get stuff from interwebs if you don't have it, skip if using "compile kit"
wget http://leamas.fedorapeople.org/spotify/0.8.8/spotify-client.spec

#install dependencies
spectool -g spotify-client.spec
yum-builddep spotify-client.spec

#compile Alien
git clone Alien.git (or the url for the git repo if you're not using the "compile kit")
cd Alien
./Makefile.PL
make
sudo make install

#build the rpm
cd ..
cp * ~/rpmbuild/SOURCES/. #don't use -r !

env QA_RPATHS=$((0x02|0x08)) rpmbuild -bb spotify-client.spec
sudo yum install [rpm] #at the end of the build the output lists the .rpm file it wrote, copy paste that

#Launch!
spotify

On a Fedora 18 64 bits machine these instructions just worked
On Fedora 16 64 bits I had to remake the links for a few of the .so files because it was originally pointing for /usr/lib64
 but locate found them on /lib64

Links:
http://community.spotify.com/t5/Help-Desktop-Linux-Mac-and/Linux-Fedora-RPM-package-for-F17-F18/m-p/237688#M8446
http://leamas.fedorapeople.org/spotify/
http://repository.spotify.com/pool/non-free/s/spotify/
https://github.com/leamas/spotify-make

Tuesday, 12 March 2013

Installing a windows network printer on Fedora using SAMBA (and CUPS)

The place where I work at only supports Windows computers for the employees, the Exchange server is heavily linked in the back bone of the "administration system" - and I say administration because we produce software that is installed on Linux machines, we manage Linux machines and all clients have Linux machines. However the calendar, mail and network shares are all done with windows technology. 
If I followed the rules I'd have a windows computer and I'd run a VM just to have a Linux to do my actual work in.... which is kinda silly. So I dual boot Fedora on my laptop to be more productive on my job and "fend for myself" on the other things.
Installing the new network printers was interesting, the helpdesk provided everyone with guides on how to install on Linux and OSX, but mostly because the management gets Macbook Airs as a perk, so I guess they weren't happy when they couldn't install the printers, either way, the Linux instructions were incomplete.
With the help of another co-worker who also uses Fedora based computer we were able to configure the printers correctly.

Requirements:

I had to install the following packages (though my coworker didn't have to):

  • samba-client
  • samba-common
  • samba
  • system-config-samba
  • samba-winbind-clients

These packages were already on my system:
  • cups-pk-helper
  • bluez-cups
  • cups-libs
  • cups
  • cups-libs
  • ghostscript-cups
  • gutenprint-cups-
  • python-cups
The best way we found to configure this was using cups web interface, located at http://localhost:631/admin 
We took a bunch of screen shots, they should explain better than words, note that on the network path for the printer we had "ptin/" which is the domain where our users are.
Other important thing, if you have special characters on your user name or password you'll have to uri encode them, I have a '%' on my password which became '23%' and yes, you'll have to reconfigure when you change the password :( .





(Note: For the right printers show up on my list I had to go to Lexmark's site and download the following file: openprinting-ppds-postscript-lexmark-20130226-1lsb3.2.noarch.rpm and I think it's great that they provide it, they've ranked up on my consideration.)

Monday, 11 March 2013

Fedora - Unexpected Inconsistency, moving to KDE and other Linux stuff

Oh Mondays.
Monday last week started out great and by great I mean with a broken system, I don't know why or how this happened, I blame using the "hibernate" function as it never seems to work properly for me on any OS.

The fix:

efsck /dev/disk/by-label/_Fedora-16-86_64
(That path was for the hard drive he was complaining about) 
Then I pressed "yes" to everything he asked me, I mean, he asked "would you like to fix this?", what was I supposed to say? "Maybe"?
Fixing...

I was unable to login properly as the package metacity was crashing and gnome was all sort of weird. So I did whatever a sensible person would do, I jumped in the console and installed KDE.
It's been a strange journey, not that I mind learning new things.
First thing I did was to rebind my keyboard console shortcut (which is one of the most popular posts on this blog, a testament to fedora's user friendliness or lack of thereof), cool thing though, KDE allowed me to use the Ctrl-Alt-T (like you had on Ubuntu) that for some reason Gnome didn't let me use. Second thing I did was update said blog post.
First of all, I discovered that I had to install "npmixer" to have a little volume slider on the taskbar, for some reason it was not installed by default.
Then I had to manually set the keyboard shortcut for "volume up" and "volume down" as these keys, though recognized by the system was not working.

Changing volume on the console:

amixer set Master 1%- 
amixer set Master 1%+
These two commands are the ones I used to bind my key, they allow to easily control 100 levels of volume on the keyboard. 
Since I was doing this stuff anyway, I poked around musique to find a way to bind the "play/pause".

Musique console commands:

musique --toggle-playing
musique --next
musique --previous
I've bound these commands to shift+volumeup/down and play/pause buttons on my keyboard.
I still haven't made it possible to launch the calculator with the calculator button, despite the fact I've bound the command "gcalctool"  (which opens it) the they calc key... I think this key is special, haven't looked into it yet.

Auto Mount Drives

Other thing I noticed, how easy it is to have hard drives to automount on login! I tried to follow some scary and complicated guides I found on google about it, but on KDE you just have to tick a few boxes.
Go to Settings -> Removable Devices, should be self explanatory.


Amusingly, I've also found that to take screen shots one needs to install ksnapshot (yum install ksnapshot) and I'm yet to bind it to the keyboard shortcut.

Finally, my favourite feature of all time, you can specify different desktop wallpapers to different displays! Just right click on the background of the display you want to change and go to "Desktop Settings" and settings there are display specific, might sound  basic, but I love this feature and it annoys me it's not present much of anywhere else... In fact, as far as I know, it only also this simple on OSX.

This allows me to have two different wallpaper origin for each display, this is important since one of them has better resolution (you can notice that as the screen on the right has a lot of black space bellow the memory and cpu widgets, but in reality they're at the bottom of the screen).
However for some reason so far I have not been able to make KDE remember the display settings, every time I boot I have to tell him that my VGA screen is on the left of the LCD one - and yes, I've saved it as default.