wrong working directory on autostart .desktop files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Xfce4 Session |
Confirmed
|
Medium
|
|||
xfce4-session (Ubuntu) |
Triaged
|
Undecided
|
Unassigned |
Bug Description
Using Xubuntu 16.04
At desktop startup, .desktop files located at ~/.config/autostart are started with wrong working directory.
How to reproduce the bug:
Foo.desktop contents
[Desktop Entry]
Version=1.0
Type=Application
Name=Foo
Comment=
Path=/home/
Exec=bash -c "pwd && while true; do sleep 100; done"
Icon=
Terminal=true
StartupNotify=false
When destop starts up, ~/.config/
Output in terminal of pwd command is:
/home/adrian
It should be instead:
/home/adrian/
Bug does not happen if after desktop is up and running, you manually launch foo.desktop, which shows:
/home/adrian/
as it should be.
Any other Exec=command that is depending on working directory shows the same issue, just used this simplest example to enable anyone to reproduce the bug. Hope it helps.
Thanks.
affects: | ubuntu → xubuntu-meta (Ubuntu) |
affects: | xubuntu-meta (Ubuntu) → xfce4-session (Ubuntu) |
Changed in xfce4-session: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
Changed in xfce4-session (Ubuntu): | |
status: | New → Triaged |
I've symlinked a .desktop file into ~/.config/ autostart.
The program executes fine when it's menu item is clicked, but it does't work on log-on.
This is because xfce4-session is ignoring the Path entry in the .desktop file that should set the working directory for the executable - and the app is broken enough to fail if it's started in the wrong directory.
I'm using xfce4-session as packaged for Fedora 16: xfce4-session- 4.8.3-1. fc16.x86_ 64.