Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 98653

Summary: GNOME ignores Path in .desktop files
Product: Gentoo Linux Reporter: Gerry <trick>
Component: Current packagesAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Gerry 2005-07-11 04:51:58 UTC
GNOME ignores the Path setting in .desktop files; it doesn't set current work
directory correctly before executing the application.

Reproducible: Always
Steps to Reproduce:
To reproduce, do this:

--- 8< ---
$ cat <<X >/tmp/pathtest
#!/bin/sh
pwd
read
X
$ chmod +x /tmp/pathtest
$ mkdir -p ~/.local/share/applications
$ cat <<X >~/.local/share/applications
[Desktop Entry]
Type=Application
Version=1.0
Encoding=UTF-8
Name=Path test
Path=/tmp
Exec=/tmp/pathtest
Terminal=true
Categories=Application
X
--- 8< ---

Then execute the .desktop file (either via menu or directly).
Actual Results:  
The current work directory is set to my home directory when running the desktop
file.

Expected Results:  
The current work directory should have been set to whatever Path is set to in
the desktop file before running its associated program.
Comment 1 Gerry 2005-07-11 04:57:56 UTC
Wops, forgot to mention Gnome version.  Gnome version is 2.10 (light).
Comment 2 Leonardo Boshell (RETIRED) gentoo-dev 2006-11-08 11:58:58 UTC
This bug has been fixed upstream with >=gnome-desktop-2.14. See http://bugzilla.gnome.org/show_bug.cgi?id=320990.

Also note that setting Terminal=true in a .desktop file will make the terminal program run in the specified path, but the application itself is run in whatever directory the terminal sets (usually $HOME).