4

I'm trying to convince the Spotify Linux client to run from my home directory on a RHEL 6 machine (I don't have root privs, and running the Windows client through Wine results in audio stutter since the only audio driver available is the PulseAudio driver). I've extracted the data from the deb file and put them in my custom software prefix ~/sw/.

The binary finds all the necessary libraries but doesn't start cleanly. When I invoke the binary, an error dialog saying "Failed loading skin" pops up, and the following is written to the terminal:

14:27:25.770 I [breakpad.cpp:36] Registered Breakpad for product: spotify

14:27:25.925 I [translate.cpp:117] Reloading all languages
14:27:25.925 E [core-utilities:862] Loading of skin file(core.splang) failed ''(basepath: )
14:27:25.925 E [core-utilities:862] Loading of skin file(desktop.splang) failed ''(basepath: )
14:27:25.925 E [core-utilities:862] Loading of skin file(spider.splang) failed ''(basepath: )
14:27:25.926 I [breakpad.cpp:94] Searching for crashdumps: /ltg/arnskj/.cache/spotify/*.dmp

14:27:25.951 E [core-utilities:862] Loading of skin file(skin.xml) failed ''(basepath: )

All three splang files and skin.xml are present in ~/sw/share/spotify/theme/default but it obviously doesn't find them (the Debian package installs them to /usr/share/spotify/...).

Is there some way I can convince Qt to check additional directories when doing this? Or, as a last resort, does anyone know which Qt function is doing this, so that I can try to fudge it with a shim in $LD_PRELOAD (nasty, I know, but it might work).

arnsholt
  • 141
  • 3
  • There's http://blog.fridns.se/spotify-in-red-hat-6/ as well. But that has the same problem of wanting to live as a system package, and not in my ~. – arnsholt Aug 25 '11 at 15:00
  • Have you tried creating symoblic links from the Debian default directories to where you put the files using ln -s? I'd think you could probably trick the binary that way to load the appropriate skin. – sbtkd85 Aug 25 '11 at 19:07
  • Problem is, I can't. I'm just a normal user, and /usr/{bin,share} are owned by root. – arnsholt Aug 26 '11 at 08:19
  • 1
    Unless there is a way to pass in the root path to the binary via command line when you launch the application, I'm not sure if you'll be able to do this. If the paths are hard coded in the binary you are stuck. If they rely on system variables (more likely) you'll still need root access to adjust things like the PATH variable. The only other thing I can think of is using a VM which seems like overkill, but if you have VirtualBox installed with Windows you could try that. – sbtkd85 Aug 26 '11 at 13:04

1 Answers1

3

I did find this method for installing Spotify which I've confirmed does install cleanly on my Fedora 20 system. Given the method this install utilizes it should be adaptable to other RHEL based distros. There are 2 RPMs that you need to download from this URL:

These packages are actually part of the project PostInstallerF, but can be used independently.

After downloading these packages I installed them like so:

$ sudo yum localinstall openssl-spotify-1.0.0-1.fc20.x86_64.rpm \
    spotify-client-0.9.11.27.g2b1a638.81-1.fc20.noarch.rpm 

Installing these will actually install a script that will download the official DEB file that you can watch in an xterm as this script does its work.

                  ss #1

After installing Spotify the installer will run Spotify.

                                       ss #2

The beauty of using this package + script is that it will maintain keeping Spotify up to date automatically. Every 62 days the script will remove Spotify, triggering a re-download and re-install.

excerpt from script, /usr/bin/spotify

# Deleting old source
if [ -f /tmp/spotify-client*.deb ]; then                  
find /tmp/ -name spotify-client*.deb -ctime +$DAY -exec rm -rf {} \;
fi

# Deleting the program each 62 days, It will updating Spotify automatic.

find /home/$CURRENUSER/.local/share/spotify/ -name spotify-client -ctime +$check -exec rm -rf {} \;
find /home/$CURRENUSER/.local/share/spotify/ -name libs -ctime +$check -exec rm -rf {} \;
find /home/$CURRENUSER/.local/share/applications/ -name spotify-client.desktop -ctime +$check -exec rm -rf {} \;
find /home/$CURRENUSER/.local/share/spotify/ -name spotify -ctime +$check -exec rm -rf {} \;

The package also created a .desktop shortcut in my Cinnamon desktop so from then on, I can run Spotify from there as well.

slm
  • 369,824