Skip to main content
added 14 characters in body
Source Link
Nikhil Mulley
  • 8.4k
  • 34
  • 50

I think if you know the pid of the gnome session manager, then you read the environment from /proc filesystem.

GNOME_SESSION_PID=<PID_OF_GNOME_SESSION> 
READ_SESSION_COOKIE="$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$pid$GNOME_SESSION_PID/environ|cut -d= -f2-)"

Use the SESSION id then, with other programs like notify-send or dbus* tools.

Cheers.

I think if you know the pid of the gnome session manager, then you read the environment from /proc filesystem.

GNOME_SESSION_PID=<PID_OF_GNOME_SESSION> 
READ_SESSION_COOKIE="$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$pid/environ|cut -d= -f2-)"

Use the SESSION id then, with other programs like notify-send or dbus* tools.

Cheers.

I think if you know the pid of the gnome session manager, then you read the environment from /proc filesystem.

GNOME_SESSION_PID=<PID_OF_GNOME_SESSION> 
READ_SESSION_COOKIE="$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$GNOME_SESSION_PID/environ|cut -d= -f2-)"

Use the SESSION id then, with other programs like notify-send or dbus* tools.

Cheers.

Source Link
Nikhil Mulley
  • 8.4k
  • 34
  • 50

I think if you know the pid of the gnome session manager, then you read the environment from /proc filesystem.

GNOME_SESSION_PID=<PID_OF_GNOME_SESSION> 
READ_SESSION_COOKIE="$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$pid/environ|cut -d= -f2-)"

Use the SESSION id then, with other programs like notify-send or dbus* tools.

Cheers.