D-Bus User Bus

Thiago Macieira thiago at kde.org
Mon May 24 23:41:06 PDT 2010


Em Terça-feira 25. Maio 2010, às 00.11.15, Lennart Poettering escreveu:
> * In a gdm world we only have 1 graphical session plus N
>   ssh/console/cron/screen sessions at the same time for the same user,
>   on a machine. For the GUI session it hence makes little sense if we
>   have one bus per session or one per user. And for the
>   ssh/console/cron/screen sessions there
>   is little point in running their own dbus-daemon.
> 
> Putting that together it would be much nicer to allow
> ssh/console/cron/screen sessions to simply join the graphical session
> that is already set up.

The work for that is zero. This is how it works right now. The key is to set 
DISPLAY correctly, not the DBUS_SESSION_BUS_ADDRESS variable.

$ dbus-launch --autolaunch `cat /var/lib/dbus/machine-id `
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-
OK1Kq1JGlh,guid=054fb6317ed7b76f1769911200000074
DBUS_SESSION_BUS_PID=2450
DBUS_SESSION_BUS_WINDOWID=4194305

$ ssh -X localhost 'dbus-launch --autolaunch `cat /var/lib/dbus/machine-id `'
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-
OK1Kq1JGlh,guid=054fb6317ed7b76f1769911200000074
DBUS_SESSION_BUS_PID=2450
DBUS_SESSION_BUS_WINDOWID=4194305

$ ps 2449 2450
  PID TTY      STAT   TIME COMMAND
 2449 ?        S      0:00 /usr/bin/dbus-launch --exit-with-session --sh-
syntax
 2450 ?        Ss     3:41 /usr/bin/dbus-daemon --fork --print-pid 5 --print-
address 7 --session

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20100525/b8450542/attachment.pgp>


More information about the dbus mailing list