tisdag 17 september 2013

Howto: Change spotify font size in gentoo linux.

Sometimes you find tips and trix on the web that are amazing. This was exactly what i was looking for and fits my 50T plasma TV perfect.

All credits to jkx for his guide http://www.larsen-b.com/Article/446.html

Spotify use a skin for the client , so changing QT4 fonts doesn’t change anything, we have to fix the skin directly.

This is how you do it in gentoo linux. Before you start remember to do backups.

You need  python and /dev-python/elementtree


1. Search the file resources.zip in /opt/spotify/spotify-client/Data/ . Extract the file skin.xml.

2. Create dir /opt/spotify/spotify-client/Data/unpack and extract resources.zip to it

3. Create a python file with name spotify.py and and past this in - 
(if you have problem with the script,put a b to the right of the 'w' in this line - 
file = open("new_skin.xml", 'w') 
from this bug http://bugs.python.org/issue9458


import xml.etree.ElementTree as xml

tree = xml.parse("./skin.xml")
root = tree.getroot()

for f in root.findall('font'):
 taille = f.get('size')
 if taille:
  taille = int(taille) + 4
  f.set('size',str(taille))


file = open("new_skin.xml", 'w')

xml.ElementTree(root).write(file)


4. After your run spotify.py you should have a file named new_skin.xml. Rename it to skin.xml and put it in unpack dir.


5. Repack resources.zip with command - zip -r resources *


6. Copy resources.zip back  to /opt/spotify/spotify-client/Data/

7. Reboot computer and start spotify 




Inga kommentarer:

Skicka en kommentar