wrong working directory on autostart .desktop files

Bug #1787400 reported by Adrian Eduardo Rolla
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Raspbian
New
Undecided
Unassigned

Bug Description

At desktop startup, .desktop files located at ~/.config/autostart are started with wrong working directory.

When Exec=... comand is started in ~/ working directory should be the one specified in Path=... key of .desktop file.
Instead, at desktop startup, Exec= command is started at ~/ as working directory.

How to reproduce the bug:
Foo.desktop contents
[Desktop Entry]
Version=1.0
Type=Application
Name=Foo
Comment=
Path=/home/pi/Downloads
Exec=bash -c "pwd && while true; do sleep 100; done"
Icon=
Terminal=true
StartupNotify=false

When destop starts up, ~/.config/autostart/Foo.desktop is launched.
Output in terminal of pwd command is:
/home/adrian

Instead of /home/pi/Downloads as it should be by specified key Path=/home/pi/Downloads

Bug does not happin if after desktop is up and running, you manually launch foo.desktop, which shows: /home/pi/Downloads as it should be.

This same bug happens on Raspbian and in Xubuntu 16.04
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.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.