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 Sat 19 Apr 2014, 23:14
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
.desktop file is supposed to make Menu entry? [Solved]
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
sunburnt


Joined: 08 Jun 2005
Posts: 4982
Location: Arizona, U.S.A.

PostPosted: Thu 25 Mar 2010, 23:53    Post subject:  .desktop file is supposed to make Menu entry? [Solved]  

Here`s a file I made and put in: /use/share/applications/driveman.desktop
Code:
[Desktop Entry]
Encoding=UTF-8
Name=DriveMan   Drive Manager
Icon=mini-fdisk
Comment=DriveMan Drive Manager
Exec=/root/my-applications/driveman/driveman
Terminal=false
Type=Application
Categories=X-FilesystemMount
GenericName=DriveMan Drive Manager

Nothing is added to the Puppy Menu.
I don`t see how it adds itself to a sub menu, no mention of it that I can see...
Do I really have to add a line to: /root/.jwmrc like this:
Code:
JWMRC=$(</root/.jwmrc)
H=`echo "$JWMRC" |head -$((`echo "$JWMRC" |grep -n Filesystem |sed 's/:.*$//'`+1))`
T=`echo "$JWMRC" |tail +$(($N+1))`
M='<Program label="  DriveMan   Drive Manager" icon="mini-fdisk">/root/my-applications/driveman/driveman</Program>'
echo -e "$H\\n$M\\n$T" > /root/.jwmrc

Last edited by sunburnt on Sun 04 Apr 2010, 16:54; edited 1 time in total
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3280
Location: Oregon

PostPosted: Fri 26 Mar 2010, 00:10    Post subject:  

Depending on the version of Puppy you may have to open a terminal, type "fixmenus" and then restart JWM.
Puppy 431 will automatically do it IF the program is installed as a PET.
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 4982
Location: Arizona, U.S.A.

PostPosted: Fri 26 Mar 2010, 00:25    Post subject:  

I rebooted just to be sure, apparently there`s something I`m missing ( Wow... That`s new... Wink ).

I never did understand how the .desktop files generated Menu entries.
I get how the .desktop files are used to add entries to the default Puppy menu in: /root.jwmrc
But as I said, I see no info. in the .desktop file about how they are placed in the menu.
Somehow I would think it would have to reference the sub-menu it`s to go in.
Back to top
View user's profile Send private message 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Fri 26 Mar 2010, 01:20    Post subject:  

It's based on the category. Which category belongs to which menu is listed in /etc/xdg/menus/hierarchy. The fixmenus script uses the stuff in /etc/xdg/templates and /etc/xdg/menus to create the menu file that you get in ~/. Depending on which WM is being used, I believe fixmenus also uses jwm-xdgmenu, icewm-xdgmenu, etc.

I just tested the desktop file you posted and it worked for me (4.1.2). Except, in your post you said it was under the "use" directory, instead of "usr". I assume that was just a typo in your post, and that you did in fact place it under "usr".

Make sure you run fixmenus.

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send private message Visit poster's website 
sunburnt


Joined: 08 Jun 2005
Posts: 4982
Location: Arizona, U.S.A.

PostPosted: Fri 26 Mar 2010, 02:25    Post subject:  

Thanks for the tutorial Pizzasgood; I always appreciate the help!
I knew the menu setup was rather complex and used many files to do it`s thing.
Fixed an error, the .desktop file had, no "xpm" extention on the icon file name. Looks great!
I set my app. to copy the .desktop file, fix the menus, and restart jwm.

And yes... The "e" key is too close to the "r" key for rapid typing. Razz
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 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.0438s ][ Queries: 11 (0.0037s) ][ GZIP on ]