You are not logged in.

#1 2014-01-09 15:44:49

Hurricane
Member
Registered: 2012-10-18
Posts: 77

[SOLVED]Terminator and some other apps get wrong icon

I copied the terminal.svg icon from Any Color You Like and renamed it terminator.svg so tint2 would just use that icon for the terminal. However, even though I restarted tint2 and logged out when I log back in it still shows the old icon (all the other ones work except that one). How do I get the right icon to show up?

EDIT: This is also happening with VLC, but there is a VLC icon already present in the theme. I don't know why tint2 is being so stubborn.

Last edited by Hurricane (2014-01-13 22:46:19)


Computers are extra dumb, which is why it takes extra smart people to make them work.

Offline

#2 2014-01-09 16:49:47

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED]Terminator and some other apps get wrong icon

Hurricane wrote:

I copied the terminal.svg icon from Any Color You Like and renamed it terminator.svg so tint2 would just use that icon for the terminal. However, even though I restarted tint2 and logged out when I log back in it still shows the old icon (all the other ones work except that one). How do I get the right icon to show up?

It's probably loading it from a different location.

Does

# locate terminator.svg

or

# find / -type f -name "terminator.svg"

show any other locations?

Last edited by x33a (2014-01-09 16:50:24)

Offline

#3 2014-01-09 18:02:18

Hurricane
Member
Registered: 2012-10-18
Posts: 77

Re: [SOLVED]Terminator and some other apps get wrong icon

This is odd. Find doesn't find the one in my Any Color You Like folder.

# find / -type f -name "terminator.svg"
/home/hugo/.icons/Faenza/apps/scalable/terminator.svg
/usr/share/icons/hicolor/scalable/apps/terminator.svg

However, when I list the contents of the folder:

$ ls .icons/ACYL_Icon_Theme_0.9.4/scalable/apps/terminator.svg 
.icons/ACYL_Icon_Theme_0.9.4/scalable/apps/terminator.svg

So the file exists, but find can't find it for some reason.


Computers are extra dumb, which is why it takes extra smart people to make them work.

Offline

#4 2014-01-10 06:37:56

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED]Terminator and some other apps get wrong icon

Do an

ls -l

on that file.

Last edited by x33a (2014-01-10 06:38:13)

Offline

#5 2014-01-10 22:07:48

Hurricane
Member
Registered: 2012-10-18
Posts: 77

Re: [SOLVED]Terminator and some other apps get wrong icon

ls -l shows me that it's a link to a file in a directory:

$ ls -l terminator.svg
lrwxrwxrwx 1 hugo hugo 27 Aug 14  2011 terminator.svg -> ../real_icons/apps/bash.svg

That file exists. Also, Google Chrome's icon is linked to it in the same way and it works:

$ ls - l google-chrome.svg
lrwxrwxrwx 1 hugo hugo 39 Aug 14  2011 googlechrome.svg -> ../real_icons/apps/chromium-browser.svg

I also tried making a link to terminator.svg from /usr/share/icons/hicolor/scalable/apps/ but that didn't work. I even tried renaming the file it's linked to (bash.svg) to terminator.svg. That didn't work either. Another interesting little quirk I've noticed: Google Chrome's icon works. Geany's icon works. However, libreoffice, eclipse, and vlc don't use the right icons as well. Could this be something to do with Openbox?


Computers are extra dumb, which is why it takes extra smart people to make them work.

Offline

#6 2014-01-11 06:49:30

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED]Terminator and some other apps get wrong icon

I doubt that openbox has anything to do with it.

Can you post a screenshot of the icon you want to display and the one being currently displayed?

Offline

#7 2014-01-11 15:31:06

Hurricane
Member
Registered: 2012-10-18
Posts: 77

Re: [SOLVED]Terminator and some other apps get wrong icon

Here's a screenshot of my desktop with Chrome open and with Terminator open so you can see how some are right and other's aren't:
GyVRv4U.png

Here's the picture of the icon I want to put up:
d47uIC2.png


Computers are extra dumb, which is why it takes extra smart people to make them work.

Offline

#8 2014-01-12 05:45:06

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED]Terminator and some other apps get wrong icon

I think this thread might be able to help you out.

http://crunchbang.org/forums/viewtopic.php?id=21405

Offline

#9 2014-01-13 22:45:48

Hurricane
Member
Registered: 2012-10-18
Posts: 77

Re: [SOLVED]Terminator and some other apps get wrong icon

x33a wrote:

I think this thread might be able to help you out.
http://crunchbang.org/forums/viewtopic.php?id=21405

The link you gave me pointed me in the right direction. After looking at the source I ended up with the following solution:

Step 1. Change directories to /usr/lib/python2.7/site-packages/terminatorlib/

$ cd /usr/lib/python2.7/site-packages/terminatorlib/

Step 2. Open up window.py using your favorite editor (must be done as root)

# vim window.py

Step 3. Change the behavior for when icon is None

###BEFORE THE CHANGE
if icon is None:
    icon = icon_theme.load_icon(APP_NAME, 48, 0)

###AFTER THE CHANGE
if icon is None:
    self.set_icon_from_file("<PATH TO YOUR ICON>")
    icon = self.get_icon()

Step 4. Save the file and simply restart terminator. Since python is an interpreted languages the code is compiled into bytecode (the .pyc files) every time it's run, so there's no need to recompile or log back out and back in.


Computers are extra dumb, which is why it takes extra smart people to make them work.

Offline

Board footer

Powered by FluxBB