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 Fri 24 Oct 2014, 14:58
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 Posts_count  
Author Message
sunburnt


Joined: 08 Jun 2005
Posts: 5037
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

Edited_time_total
Back to top
View user's profile Send_private_message 
8-bit


Joined: 03 Apr 2007
Posts: 3382
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: 5037
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_website 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
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:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0488s ][ Queries: 11 (0.0036s) ][ GZIP on ]