edit menu entry
Tofloor
poster avatar
davidwillis
deepin
2013-08-08 12:25
Author
I may be missing something, but how do I edit a menu entry.  For example I want to change the firefox icon to firefox -P to open the profile manager.  

Thanks
David
Reply Favorite View the author
All Replies
electricface
deepin
2013-08-08 17:33
#1
you can Modify the firefox desktop file (location: /usr/share/applications/firefox.desktop) with this command
  1. sudo gedit /usr/share/application/firefox.desktop
Copy the Code
modify this line "Exec=firefox %u" to "Exec=firefox %u -P $YourProfile"
Reply View the author
davidwillis
deepin
2013-08-09 05:46
#2
Thanks.   And one other thing, how do I add a new entry.  So say I want two entries for something, such as a file manager that has root privileges and one that does not, or multiple entries for different firefox profiles with different icons?

Thanks
Reply View the author
Feng Yu
deepin
2013-08-09 08:41
#3
Thanks.   And one other thing, how do I add a new entry.  So say I want two entries for something, such as a file manager that has root privileges and one that does not, or multiple entries for different firefox profiles with different icons?

Thanks
For DE(Desktop Environment) , 'entries' are just some '.desktop' files.
So you can modify '.desktop' file as you want.
For example,if you want to add an entry named "file manager(root)" that has root privlieges,you can do it at last steps:
1.copy the ".desktop" file of "file manager"(location:/usr/share/applications/nautilus.desktop) to a new file in the dir "/usr/share/applications/"(such as nautilus-root.desktop).
2.If you can find that you have two entries also named "files", that means you can do the next step.
3.Modify the ".desktop" file that you have just copyed(may be it named nautilus-root.desktop). Modify the "name" attribute to differentiate between two "file managers" and "Exec" attribute as "Exec=su-to-root -X -c nautilus --new-window %U" that can switch your privileges for root by right password , and also you can modify "icon" attribute if you want.

So that firefox as the same.

Oh,I fogot to say that modify the system files you have to use root permission.
Maybe then the next command lines can works:
  1. sudo cp /usr/share/applications/nautilus.desktop /usr/share/applications/nautilus-root.desktop
  2. sudo sed -i 's/Files$/Files(root)/g;s/文件$/文件(root)/g;s/^Exec=.*$/Exec=su-to-root -X -c nautilus --new-window %U/g' /usr/share/applications/nautilus-root.desktop
Copy the Code
Reply View the author
davidwillis
deepin
2013-08-09 12:14
#4
Thanks.  I will give that I try when I get home tonight.
Reply View the author