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 06-28-2010, 12:05 PM
Olivier Nicole
 
Default How to add a menu entry for all users

Hi,

Ubuntu 10.4, many users on the workstation.

I want to add an Application menu entry for all the users.

I could find many resources that describe how to create/modify a file
in /usr/share/applications.

But then what? How to make that file effective? How to add it to the
menu hierarchy?

Best regards,

Olivier

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 06-28-2010, 03:02 PM
Markus Schönhaber
 
Default How to add a menu entry for all users

28.06.2010 14:05, Olivier Nicole:

> Ubuntu 10.4, many users on the workstation.
>
> I want to add an Application menu entry for all the users.
>
> I could find many resources that describe how to create/modify a file
> in /usr/share/applications.
>
> But then what? How to make that file effective? How to add it to the
> menu hierarchy?

If you already have a *.desktop file to launch your application (for
example myapp.desktop) you can add it to the menu for all users by doing
something like
sudo xdg-desktop-menu install --novendor --mode system myapp.desktop
If you do it this way, the exact place where the launcher appears in the
menu hierarchy depends on the the value of the Categories entry in
myapp.desktop.

See
man xdg-desktop-menu
or
<http://manpages.ubuntu.com/manpages/lucid/en/man1/xdg-desktop-menu.1.html>
for more information.

--
Regards
mks

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 06-29-2010, 04:09 AM
Olivier Nicole
 
Default How to add a menu entry for all users

Thanks,

> If you already have a *.desktop file to launch your application (for
> example myapp.desktop) you can add it to the menu for all users by doing
> something like
> sudo xdg-desktop-menu install --novendor --mode system myapp.desktop

I tried that already but with no success.

Now I noticed something weird.

During a Gnome session, if I rename or copy the
/usr/share/applications/myapp.desktop file, the menu is updated for
that session.

If I have several users connected at that time (with switch user), the
menu is updated accordingly for every connected users.

But after I disconnect and reconnect the menu is back to the default!

That is really odd!

TIA,

Olivier

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 06-29-2010, 07:18 AM
Markus Schönhaber
 
Default How to add a menu entry for all users

29.06.2010 06:09, Olivier Nicole:

>> If you already have a *.desktop file to launch your application (for
>> example myapp.desktop) you can add it to the menu for all users by doing
>> something like
>> sudo xdg-desktop-menu install --novendor --mode system myapp.desktop
>
> I tried that already but with no success.

Since the above command works just fine for me: what exactly did you try?
Especially: where was your myapp.desktop file located when you executed
xdg-desktop-menu?
Was there already a copy of myapp.desktop in some of the places relevant
for the menu system, for example in
~/.local/share/applications
/usr/share/applications
/usr/local/share/applications
?
Was a myapp.desktop created in /usr/local/share/applications?

> Now I noticed something weird.
>
> During a Gnome session, if I rename or copy the
> /usr/share/applications/myapp.desktop file, the menu is updated for
> that session.
>
> If I have several users connected at that time (with switch user), the
> menu is updated accordingly for every connected users.
>
> But after I disconnect and reconnect the menu is back to the default!

Might be some kind of caching, which is causing this.
Does issuing
sudo xdg-desktop-menu forceupdate
after copying the .desktop file make a difference?

--
Regards
mks

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 06-29-2010, 07:44 AM
Olivier Nicole
 
Default How to add a menu entry for all users

Markus,

> >> sudo xdg-desktop-menu install --novendor --mode system myapp.desktop
> >
> > I tried that already but with no success.
>
> Since the above command works just fine for me: what exactly did you try?
> Especially: where was your myapp.desktop file located when you executed
> xdg-desktop-menu?
> Was there already a copy of myapp.desktop in some of the places relevant
> for the menu system, for example in
> ~/.local/share/applications
> /usr/share/applications
> /usr/local/share/applications
> ?
>

In /usr/share/applications

> Was a myapp.desktop created in /usr/local/share/applications?

It seems that the new entries *MUST* be created in
/usr/local/share/applications, not in /usr/share/applications.

At least in .../local... it is working.

But I did not see that mentionned anywhere.

Thank you.

Olivier

--
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 12:21 PM.

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