Page 1 of 1

[Solved] Gnome 3 is not using /usr/local/share/applications

PostPosted: Jul 5th, '14, 23:02
by keitolainen
Hello,

I recently switched to Mageia 4 (using Gnome 3) from OpenSuse and I'm having an issue with Gnome not finding desktop files I have put in /usr/local/share/applications. They don't show up in the application menu at all, either using a search or looking under all applications. These are mostly programs that I want all users to have access to, so I don't want to use $HOME/.local/share/applications. Is there a simple setting somewhere that will let these files be read? Desktop files in /usr/share/applications work properly.

Thanks

Re: Gnome 3 is not using /usr/local/share/applications

PostPosted: Jul 6th, '14, 17:49
by doktor5000
Did you validate the .desktop files with
Code: Select all
desktop-file-validate
? And please provide the content of one of the files that isn't shown in menu.

Also, as normal user, please post the output from
Code: Select all
set | grep XDG


You may also want to look at https://developer.gnome.org/menu-spec/#paths and/or https://developer.gnome.org/integration ... es.html.en
But why not simply copy the file to /usr/share/applications?

Re: Gnome 3 is not using /usr/local/share/applications

PostPosted: Jul 6th, '14, 18:57
by keitolainen
Thanks for the response. Those programs are all showing up in the menu now, after a few reboots. The only thing I can think of that changed is that I added "/usr/local/games" to PATH in /etc/profile. I'm guessing that since the exec commands in the desktop files weren't in the path, they didn't show up in the menu. Does that make sense?

To answer your questions though, here is one of the files that wasn't showing up:
Code: Select all
[Desktop Entry]
Categories=Game;
Encoding=UTF-8
Name=Bastion
GenericName=Bastion
Comment=Indie Action Role-Playing Game
Exec=bastion
Icon=/opt/bastion/Bastion.png
Type=Application
desktop-file-validate throws a warning about the Encoding key being deprecated, but otherwise it seems fine.

Here is the other output you asked for:
Code: Select all
$ set | grep XDG
XDG_CONFIG_DIRS=/etc/xdg:/etc/xdg/gnome
XDG_MENU_PREFIX=gnome-
XDG_RUNTIME_DIR=/run/user/500
XDG_SEAT=seat0
XDG_SESSION_ID=1
XDG_VTNR=1

I hope that helps anyone having a similar problem.

Re: Gnome 3 is not using /usr/local/share/applications

PostPosted: Jul 6th, '14, 19:14
by doktor5000
keitolainen wrote:The only thing I can think of that changed is that I added "/usr/local/games" to PATH in /etc/profile. I'm guessing that since the exec commands in the desktop files weren't in the path, they didn't show up in the menu. Does that make sense?

No that's unrelated, Probably the reboot forced a rebuild of the menu, usually that happens during runtime.
keitolainen wrote:Here is the other output you asked for:
Code: Select all
$ set | grep XDG
XDG_CONFIG_DIRS=/etc/xdg:/etc/xdg/gnome
XDG_MENU_PREFIX=gnome-
XDG_RUNTIME_DIR=/run/user/500
XDG_SEAT=seat0
XDG_SESSION_ID=1
XDG_VTNR=1

I hope that helps anyone having a similar problem.


Have a look at the links in previous post, IMHO you're missing $XDG_DATA_DIRS
Code: Select all
[doktor5000@Mageia4 ~]$ set | grep XDG
XDG_CONFIG_DIRS=/etc/xdg:/etc/xdg/kde4
XDG_CURRENT_DESKTOP=KDE
XDG_DATA_DIRS=/usr/share:/usr/share:/usr/local/share
XDG_MENU_PREFIX=kde-
XDG_RUNTIME_DIR=/run/user/500
XDG_SEAT=seat0
XDG_SESSION_ID=1
XDG_VTNR=1


And thumbs up for Bastion ;) Hope they'll release the linux build for Transistor soon ...

Re: [Solved] Gnome 3 is not using /usr/local/share/applicati

PostPosted: Jul 6th, '14, 21:31
by keitolainen
Will do, thanks again.