LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-26-2009, 11:12 AM   #1
anonguy9
LQ Newbie
 
Registered: Mar 2009
Posts: 25

Rep: Reputation: 16
Specify an application's alt-tab icon


I'm on PCLinuxOS, using Openbox.

When I have an xterm, and I alt-tab to see my list of icons, xterm has a boring icon. Some other programs are also boring, but not all. Firefox, for example, has a nice icon. How do I specify an icon for an un-iconed app, or change an icon for an existing one?

I've done some hunting around on my system and I've done some searching. I'm seeing all kinds of stuff and nothing seems to be quite right, so I need some help.

I'd prefer commandline instructions, but if there's a GUI tool I ought to know about, then give me its commandline name.
 
Old 03-27-2009, 08:01 PM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
IIRC: The alt-tab icons use the set assigned to the application by the icon theme.
 
Old 03-27-2009, 10:26 PM   #3
anonguy9
LQ Newbie
 
Registered: Mar 2009
Posts: 25

Original Poster
Rep: Reputation: 16
Ok. I'll start with .. what's an icon theme? Isn't that a KDE thing?

I do notice some directories and files associated with KDE and its icons. I remember stomping around there, but I'm not sure where the main configuration files are, and how I could modify whatever's being used right now.

I checked some apps, and there are two with icons.
- leafpad
- firefox

Based on this, I looked in /usr to see if there was a theme directory which had both a leafpad image and a firefox image. I came up dry. I do seem to have multiple themes there, but I'm not sure how to tell what I'm using (if any).

I also did some more googling with "icon theme" and some other search terms, and didn't get anything definitive. There are some documents out there on openbox-related stuff, but none of those seem to be correct for what I'm trying to do.
 
Old 03-27-2009, 11:53 PM   #4
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
http://muaythaimaster74.blogspot.com...os-part-3.html
... there's an art to searching with google - for the above I searched:

openbox icon theme pclinuxos

Quote:
The gtk themes work nicely, as do the icons, once you figure out how to make openbox access them. To access your icons you create a file called .gtkrc.mine in your home directory and add your icons in this format
gtk-icon-theme-name = "name"

Where "name" is my choice for the icon theme. You can see what icon themes you have installed in /usr/share/icons. Simply substitute for your preferred icon theme. Then you log out of openbox and back in and your icons will have been changed!

Obconf handles themes, and you can install new themes into /usr/share/themes for Obconf to easily find.
Of course - if it's just one or two apps you want to change - you can edit the icons directly. Just hunt for all the icons for that app (most will be links) and substitute the image, in appropriate format, that you'd prefer.
 
Old 03-29-2009, 02:57 AM   #5
anonguy9
LQ Newbie
 
Registered: Mar 2009
Posts: 25

Original Poster
Rep: Reputation: 16
Aha, thanks Simon.

Strange, I didn't think to search from that angle. I thought that icons were a generic system-wide Linux/X11 type thing.

I did read a bit on gtk themes while researching, but when I went looking on my system I didn't seem to find anything related to it, so I thought it didn't apply to me.

I guess I was wrong on both counts.


I'll definitely look into this. I don't just want to change a few icons, because there seems to be a default icon shared with many applications. I just want to specify an icon for one or two of my common and icon-absent apps.
 
Old 03-29-2009, 11:58 AM   #6
anonguy9
LQ Newbie
 
Registered: Mar 2009
Posts: 25

Original Poster
Rep: Reputation: 16
Thanks for the leads, but no luck so far.


Sorry for the long post.. I'm keeping track of everything I've done so I don't backtrack and repeat myself.


Manage themes with obconf.

Specify your own custom one in ~/.gtkrc.mine

Code:
 gtk-icon-theme-name = "nuoveXT-aero"
By default, themes are found in /usr/share/icons, e.g. /usr/share/icons/nuoveXT-aero/

helper script idea:

Code:
MYTHEME=nuoveXT-aero
ICONDIR=/usr/share/icons

success=no
for i in `find $ICONDIR -maxdepth 1 -type d`;do
  if [ "$i" = "$ICONDIR"/"$MYTHEME" ]; then success=yes ; fi
done
if [ "$success" = "no" ]; then
  echo fail!
elif [ "$success" = "yes" ]; then
  echo "[ok] - $ICONDIR/$MYTHEME"
  echo gtk-icon-theme-name = \""$MYTHEME"\" > ~/.gtkrc.mine
else
  echo BAD BUG 1
fi
BUT, openbox actually uses the themes in /usr/share/themes, e.g. my current /usr/share/themes/minimal/openbox-3/themerc

However, I see other themes like /usr/share/themes/Wonderland/gtk-2.0/gtkrc


By the way: "export|grep gtk" gives me nothing.


Someone else said to edit /home/user/.gtkrc-2.0-kde with:
Code:
 gtk-icon-theme-name="Oxygen-Refit"

To force a test, I tried:

Code:
 echo gtk-icon-theme-name = \"nuoveXT-aero\" > ~/.gtkrc.mine
 su
 cd /usr/share/icons/nuoveXT-aero/22x22/apps/
 mv firefox.png firefox.png-
 mv firefox-icon.png firefox-icon.png-
 # And to avoid Firefox falling back on a default, I tried:
 cp web-browser.png firefox.png
 mv web-browser.png firefox-icon.png
No luck. This theme isn't being used. I configured openbox largely by hand, and so I have this:

~/.config/openbox/rc.xml

It references my minimal theme, so maybe I should just copy the structure from somewhere else and give minimal some icons. Then maybe I can hijack the firefox icon.

Code:
 su
 cd /usr/share/icons/nuoveXT-aero/
 cp -a nuoveXT-aero minimal
 cd minimal/22x22/apps/
 mv firefox.png firefox.png-
 mv firefox-icon.png firefox-icon.png-
 cp web-browser.png firefox.png
 mv web-browser.png firefox-icon.png
No joy. It looks like ~/.gtkrc.mine is not being used to set the theme, because obconf is still set on minimal. So let's try modifying minimal. I looked, and /usr/share/icons/minimal/index.theme says that the toolbar default is 24, so I tried correcting that:

Code:
 cd /usr/share/icons/minimal/24x24/apps/
 mv firefox.png firefox.png-
 mv firefox-icon.png firefox-icon.png-
 cp web-browser.png firefox.png
 mv web-browser.png firefox-icon.png
No joy. Now let's assume that the icons are being scaled from elsewhere. So I'll try deleting all but the largest icons.

Code:
 su
 cd /usr/share/icons/minimal/
 # WARNING: rm -rf AS ROOT, so don't screw up this command!
 find -maxdepth 1 -type d \
 ! -name extra \
 ! -name . \
 ! -name 128x128 \
 -exec rm -rf {} \;

 cd 128x128/apps/
 mv firefox.png firefox.png-
 mv firefox-icon.png firefox-icon.png-
 cp web-browser.png firefox.png
 mv web-browser.png firefox-icon.png
No luck. I know that /usr/share/themes/minimal is being used, and I want it to continue to be used, but it feels like all these icons are not coming from /usr/share/icons/minimal/

I checked for an icon default. I see /usr/share/icons/default has only index.theme but inside it only has

# [Icon Theme]
# Inherits=whiteglass

Since everything is commented out

I did not edit /usr/share/icons/minimal/index.theme and so it's just a copy from the other theme, so it would be a bit incorrect inside.

Btw, I also looked at every icon in /usr/share/icons/nuoveXT-aero/24x24/ and I could not find the icon being used for the applications which I want to update. So something's definitely awry.

I'm out of ideas. I'll continue to read through a couple of threads I found. Maybe I'll find something new to try.

I'm also going to check specifically for more skinning/style/theme info for openbox. Maybe there will be some insight there.
 
Old 03-29-2009, 10:14 PM   #7
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
openbox actually uses the themes in /usr/share/themes, e.g. my current /usr/share/themes/minimal/openbox-3/themer

... while you are learning, use the themes in /usr/share/themes.
Unfortunately I do not have an installation of open box to compare with.
Check that the icons you replace are the actual files and not links.
IIRC: changing the firefox icon is a little different to others - try a different application for your test.


For me:
$ export | grep gtk
declare -x GTK_RC_FILES="/etc/gtk/gtkrc:/home/simon/.gtkrc-1.2-gnome2"

... do you understand why this step was important?
 
  


Reply

Tags
icon, openbox, pclinuxos, theme, xterm


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
<alt><tab> AlleyTrotter Slackware 2 03-20-2008 03:34 PM
FC 4. Modify ALT+TAB behaviour to CTRL+TAB xtracto Linux - Software 1 09-22-2005 02:06 PM
Switching window focus (like alt+tab in windows) and Ctrl+Alt+F1 X windows problem... DiZASTiX Linux - Software 3 01-20-2005 04:56 PM
how to Alt + Tab? Moebius Linux - Games 2 08-30-2004 07:08 PM
Alt-Tab and Alt-F4 in Fluxbox? tavilach Linux - Software 2 07-17-2004 04:03 PM


All times are GMT -5. The time now is 11:13 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration