Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 16 Sep 2014, 05:28
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
JWM knows path to icons, why doesn't Fluxbox?
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [10 Posts]  
Author Message
PaulR

Joined: 04 May 2005
Posts: 244
Location: UK

PostPosted: Tue 09 Apr 2013, 09:01    Post subject:  JWM knows path to icons, why doesn't Fluxbox?
Subject description: Bacon
 

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 Smile

Paul

EDIT not sure if it matters but this is on Slacko 5.5.

Last edited by PaulR on Wed 10 Apr 2013, 04:36; edited 2 times in total
Back to top
View user's profile Send private message 
PaulR

Joined: 04 May 2005
Posts: 244
Location: UK

PostPosted: Tue 09 Apr 2013, 16:01    Post subject:  

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.
Back to top
View user's profile Send private message 
PaulR

Joined: 04 May 2005
Posts: 244
Location: UK

PostPosted: Tue 09 Apr 2013, 17:02    Post subject:  

I've now got this piece of code in a function:

Code:

   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
icon-missing.jpg
 Description   
 Filesize   55.96 KB
 Viewed   268 Time(s)

icon-missing.jpg

Back to top
View user's profile Send private message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: Tue 09 Apr 2013, 20:02    Post subject:  

PaulR,

I don't know how Fluxbox sets icon paths but the paths for JWM are in /root/.jwmrc as follows:
Code:
<!-- <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
Back to top
View user's profile Send private message 
PaulR

Joined: 04 May 2005
Posts: 244
Location: UK

PostPosted: Wed 10 Apr 2013, 03:46    Post subject:  

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
Back to top
View user's profile Send private message 
scsijon

Joined: 23 May 2007
Posts: 1040
Location: the australian mallee

PostPosted: Wed 10 Apr 2013, 04:22    Post subject:  

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

_________________
Puppy T290 - BarryK's Racy but with T2 Version 9.0 is under development.
http://www.murga-linux.com/puppy/viewtopic.php?t=94575
Back to top
View user's profile Send private message Visit poster's website 
PaulR

Joined: 04 May 2005
Posts: 244
Location: UK

PostPosted: Wed 10 Apr 2013, 13:50    Post subject:  

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


Paul
Back to top
View user's profile Send private message 
Mobeus


Joined: 26 Aug 2010
Posts: 94

PostPosted: Thu 11 Apr 2013, 10:02    Post subject:  

Paul,

Have you checked how your fluxbox was compiled for image support?

See http://fluxbox-wiki.org/index.php?title=Editing_the_menu

Regards,
Mobeus

_________________
/root for the home team
Back to top
View user's profile Send private message 
PaulR

Joined: 04 May 2005
Posts: 244
Location: UK

PostPosted: Thu 11 Apr 2013, 10:12    Post subject:  

Hi Mobeus

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

Paul
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4351

PostPosted: Thu 11 Apr 2013, 22:44    Post subject:  

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

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [10 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0664s ][ Queries: 13 (0.0071s) ][ GZIP on ]