Page 1 of 1
JWM knows path to icons, why doesn't Fluxbox?
Posted: Tue 09 Apr 2013, 13:01
by PaulR
I'm modifying my JWM menu export utility (
http://murga-linux.com/puppy/viewtopic.php?t=85526 ) so icons can be included in the exported file.
The problem I have is that only the icon filenames appear in .jwmrc but I have to add the full path to get it to work in Fluxbox's 'menu' file, for example:
[exec] (Chtheme GTK theme chooser) {gtk-chtheme} </usr/local/lib/X11/mini-icons/mini.window3d.xpm>
How do I add this folder to Fluxbox's known paths (or would it be better to just pre-pend the path programmatically in the export routine)?
Actually, I haven't checked if all the menu icons are stored in this directory. A better option might therefore be for me to make sure that all the paths known to JWM are known to Fluxbox... how can I do that?
TIA
Paul
EDIT not sure if it matters but this is on Slacko 5.5.
Posted: Tue 09 Apr 2013, 20:01
by PaulR
Right, I can probably get round this by executing:
#find / -name <iconfilename>
for each icon that doesn't already have an explicit path. It will be flipping slow but it should work and the program will most likely only be used as a one-off.
Posted: Tue 09 Apr 2013, 21:02
by PaulR
I've now got this piece of code in a function:
Code: Select all
command$ = "find / -name " & iconText$
iconText$=EXEC$(command$)
'if there were multiple instances of the icon file, get first line of output only
RETURN LEFT$(iconText$, INSTR(iconText$, NL$)-1)
Sometimes is spits out a line like this:
find: ` /proc/12154': No such file or directory
(note the odd apostrophes)
I thought this might be something to do with how puppy maps directories (TBH that's way over my head at present!) but, despite this seems to return the correct text - here's an entry from the generated 'menu' file where one such event happened:
[exec] (mtPaint image editor) {/usr/bin/mtpaint} </usr/share/pixmaps/mtpaint.png>
I've checked and that file does exist but oddly the icon doesn't actually show up in the Fluxbox menu - see the screenshot.
Help appreciated... I'm confused!
Cheers
Paul
Posted: Wed 10 Apr 2013, 00:02
by seaside
PaulR,
I don't know how Fluxbox sets icon paths but the paths for JWM are in /root/.jwmrc as follows:
Code: Select all
<!-- <Icons> -->
<!-- <IconPath>$HOME/.icons</IconPath> -->
<IconPath>/usr/local/lib/X11/mini-icons</IconPath>
<IconPath>/usr/local/lib/X11/pixmaps</IconPath>
<IconPath>/usr/share/pixmaps</IconPath>
<IconPath>/usr/local/share/pixmaps</IconPath>
<!-- </Icons> -->
So if you can find how to add the above paths to Fluxbox, I think it should work.
Edit: Sorry, I just realized that Fluxbox doesn't have that capability to refer by icon name without the path. It looks like a programmatic method to find and set the icon path as you described is needed. You may get more help in the Bacon thread.
Cheers,
s
Posted: Wed 10 Apr 2013, 07:46
by PaulR
Thanks seaside.
Reading up on 'find' I think I can fix the problem by using the -prune option to avoid searching /proc. Why the icon doesn't display in Fluxbox when the path is correct though is another mystery! I suspect some weird embedded character. I'll try a fix later...
Paul
Posted: Wed 10 Apr 2013, 08:22
by scsijon
paul, it could be the icon size your using.
I had that problem with mage2 until I worked it out. Fixing it the easy way seems to be with setting global font size for some reason with JWM.
I sugest you try a smaller one for a test and see what happens,don't forget you need a full reboot for the result to 'kick-in'. If necessary, you can always resize them slightly to overcome the problem if that is all it is.
regards
scsijon
Posted: Wed 10 Apr 2013, 17:50
by PaulR
Thanks scsijon, I'll look into that once I've cracked the 'find' problem!
Paul
Posted: Thu 11 Apr 2013, 14:02
by Mobeus
Paul,
Have you checked how your fluxbox was compiled for image support?
See
http://fluxbox-wiki.org/index.php?title ... g_the_menu
Regards,
Mobeus
Posted: Thu 11 Apr 2013, 14:12
by PaulR
Hi Mobeus
Yes, I've read that thanks - I'm presently trying to recompile Fluxbox with png support
Paul
Posted: Fri 12 Apr 2013, 02:44
by technosaurus
its not the image support, puppy puts crap in all sorts of non-standard locations... one of which is /usr/share/mini-icons which is a symlink to /usr/local/lib/X11/mini-icons and contains mostly xpm images ... another is /usr/share/midi-icons which is a symlink to /usr/local/lib/X11/pixmaps and contains mostly png images for puppy's theme
... fonts are another big non-standard, so if the text looks bad, that is why