How to tell a folder from a launcher in ~/.local/share/applications
NoOp
glgxg at sbcglobal.net
Mon Apr 21 23:51:34 UTC 2008
On 04/21/2008 03:04 PM, Michele wrote:
> Hello,
>
> I have created a new directory in my Applications > Office menu and I
> would like to copy inside it the launchers for a different version of
> openoffice that I have installed (as well as different user profiles).
> Rather than using System > Preferences > Main Menu which is slow and
> painful I would like to make copies of the existing launchers and edit
> them with a text editor.
>
> The problem is that I cannot understand how to place a launcher
> (.desktop file) into a specific subdirectory in my Office menu.
> ~/.local/share/application is "flat" and I do not know where to look
> at into the .desktop file to understand where the launcher will appear
> in the menu tree.
> My directory is in ~/.local/share/desktop-directories but I do not
> know how to link my directory to the launchers.
>
> Another question: can I then move all the launchers to /usr/share/ so
> that all the other users can have the same menu entries?
>
> Cheers,
>
> Michele
>
This will give you an example:
<http://www.linuxtopia.org/online_books/linux_beginner_books/unofficial_ubuntu_starter_guide/index_144.html>
To create the menu entry:
<quote>
To install File Browser (Root)
1. sudo gedit /usr/share/applications/Nautilus-root.desktop
2. Insert the following lines into the new file
[Desktop Entry]
Name=File Browser (Root)
Comment=Browse the filesystem with the file manager
Exec=gksudo "nautilus --browser %U"
Icon=file-manager
Terminal=false
Type=Application
Categories=Application;System;
3. Save the edited file (sample)
</quote>
And then:
killall gnome-panel
That will create the entry in the Applications|System Tools menu. To
have the entry in the Office section (for example), you'd change:
Categories=Application;System;
to
Categories=Application;Office;
That's a simple example. Now you can do the same for your OOo apps. You
can either edit an existing file:
cd /usr/share/applications/
ls
sudo gedit <existingappname>.desktop
Or create your own from scratch - example:
The following is saved as: openoffice.org3.0-writer.desktop
[Desktop Entry]
Name=OpenOffice.org 3.0 Writer
Comment=OOo3devBeta
Exec=/opt/ooo-dev3.0/program/swriter
Icon=/usr/share/icons/Human/scalable/apps/ooo-writer.svg
Terminal=false
Type=Application
Categories=Application;Office;
Note: the entries in ~/.local/share/application will take priority over
those in /usr/share/applications/, so you can move the .locals to /usr
if you wish. Or use the new "File Browser (Root)" that you created in
the first part to do it :-)
More information about the ubuntu-users
mailing list