FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 04-21-2008, 11:51 PM
NoOp
 
Default How to tell a folder from a launcher in ~/.local/share/applications

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 :-)


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-23-2008, 07:22 PM
Michele
 
Default How to tell a folder from a launcher in ~/.local/share/applications

Hello NoOp,

Thanks for the nice link however I still cannot figure out the following:
> >
> > 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.

I will expand a bit.

I have created a new menu into the Office menu called OOo2.4
Now I thought that by writing in my [desktop entry] the following
category I would be ok:

Category=Application;Office;OOo2.4;

Instead the application appears in the Applications > Office.

I then decided to reopen alacarte (the menu editor) and drag the
application into the new menu. THis produces the following result:
a) a new launcher (.desktop) file is created in my ~/.local/share/applications
b) the category entry of this new launcher is just a semicolon, i.e.
Category=;

I have now done what I wanted to do, but for my education I would like
to know how to push a launcher into a custom made submenu editing the
launcher file.

Thanks,

Michele

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-23-2008, 09:06 PM
NoOp
 
Default How to tell a folder from a launcher in ~/.local/share/applications

On 04/23/2008 12:22 PM, Michele wrote:
> Hello NoOp,
>
> Thanks for the nice link however I still cannot figure out the following:
>> >
>> > 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.
>
> I will expand a bit.
>
> I have created a new menu into the Office menu called OOo2.4
> Now I thought that by writing in my [desktop entry] the following
> category I would be ok:
>
> Category=Application;Office;OOo2.4;
>
> Instead the application appears in the Applications > Office.
>
> I then decided to reopen alacarte (the menu editor) and drag the
> application into the new menu. THis produces the following result:
> a) a new launcher (.desktop) file is created in my ~/.local/share/applications
> b) the category entry of this new launcher is just a semicolon, i.e.
> Category=;
>
> I have now done what I wanted to do, but for my education I would like
> to know how to push a launcher into a custom made submenu editing the
> launcher file.
>

To be quite honest - I don't know. These might be of some help:

<http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-0.9.4.html>
http://standards.freedesktop.org/menu-spec/menu-spec-1.0.html

If you do figure it out, please post back with what you've found out.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 05:34 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org