[Bug 1580673] Re: DBusActivatable launches app in root directory

Marco Trevisan (Treviño) mail at 3v1n0.net
Tue May 31 14:08:10 UTC 2016

Mh I think the issue is upstart and dbus-session related more than an
unity issue.

In fact: 
 $ ls /proc/$(pgrep -u $USER dbus-daemon | head -n1)/cwd -l
 lrwxrwxrwx 1 marco marco 0 mag 31 15:58 /proc/940/cwd -> /

Thus the process that has the role of launching these kind of apps, and
it's the one responsible for setting the proper CWD.

Unfortunately, it seems that just calling chdir in
/usr/share/upstart/sessions/dbus.conf is not enough.

** Changed in: unity (Ubuntu)
       Status: Triaged => Invalid

** Also affects: dbus (Ubuntu)
   Importance: Undecided
       Status: New

** Also affects: upstart (Ubuntu)
   Importance: Undecided
       Status: New

You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dbus in Ubuntu.

  DBusActivatable launches app in root directory

Status in dbus package in Ubuntu:
Status in unity package in Ubuntu:
Status in upstart package in Ubuntu:

Bug description:
  I'm the maintainer of a tiling terminal application called Terminix
  (https://github.com/gnunn1/terminix). By default, terminix has
  DBusActivatable=true in it's desktop launch configuration. However
  when this is enabled, Unity will launch Terminix with the CWD set to
  the root ('/') directory rather then the user's home. This doesn't
  happen for all users, but it is consistent in that if the user has the
  issue they always have the issue.

  This causes issues for my users because Terminix uses it's CWD when
  first launched to determine what the shell's initial directory should
  be. You can see bug reports on this issue at the following links:


  I can reproduce on Unity 16.04 in a VM, I can see that the while the
  CWD is set to the root directory, the PWD environment variable is set
  to the user's home directory as expected. For now I'm working around
  it by checking if the --gapplication-service parameter was passed, if
  so if the CWD!=PWD I set the CWD to PWD.

  Another thing that works is changing DBusActivatable=false in the
  desktop file, however I'd prefer to avoid maintaining two desktop

  I'd really like to understand why this happening and confirm if it's
  something I'm doing wrong on my side. This configuration works fine in
  other launchers like Gnome Shell, it's only Unity where I have the
  issue. I used the dbus-monitor to inspect messages when Unity launches
  Terminix and I'm not seeing an obvious problem.

To manage notifications about this bug go to:

More information about the foundations-bugs mailing list