JWM knows path to icons, why doesn't Fluxbox?

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
PaulR
Posts: 249
Joined: Wed 04 May 2005, 18:45
Location: UK

JWM knows path to icons, why doesn't Fluxbox?

#1 Post 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.
Last edited by PaulR on Wed 10 Apr 2013, 08:36, edited 2 times in total.

PaulR
Posts: 249
Joined: Wed 04 May 2005, 18:45
Location: UK

#2 Post 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.

PaulR
Posts: 249
Joined: Wed 04 May 2005, 18:45
Location: UK

#3 Post 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
Attachments
icon-missing.jpg
(55.96 KiB) Downloaded 347 times

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#4 Post 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

PaulR
Posts: 249
Joined: Wed 04 May 2005, 18:45
Location: UK

#5 Post 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

scsijon
Posts: 1596
Joined: Thu 24 May 2007, 03:59
Location: the australian mallee
Contact:

#6 Post 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

PaulR
Posts: 249
Joined: Wed 04 May 2005, 18:45
Location: UK

#7 Post by PaulR »

Thanks scsijon, I'll look into that once I've cracked the 'find' problem! :)


Paul

User avatar
Mobeus
Posts: 94
Joined: Thu 26 Aug 2010, 15:49

#8 Post 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
/root for the home team

PaulR
Posts: 249
Joined: Wed 04 May 2005, 18:45
Location: UK

#9 Post by PaulR »

Hi Mobeus

Yes, I've read that thanks - I'm presently trying to recompile Fluxbox with png support :)

Paul

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#10 Post 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
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Post Reply