canonical / lightdm

Display Manager
GNU General Public License v3.0
813 stars 137 forks source link

dm-tool requitres more than XDG_SEAT_PATH #329

Open GRbit opened 7 months ago

GRbit commented 7 months ago

When I tried to run dm-tool from tty, I've seen a message Not running inside a display manager, XDG_SEAT_PATH not defined But after setting this variable to the one that I have in my current lightdm session, I still see this message.

I was able to fix that by reading all XDG variables and setting them in my tty

 $ env | grep XDG | sed 's/^/export /' | tee xdg
export XDG_CONFIG_DIRS=/etc/xdg
export XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
export XDG_MENU_PREFIX=xfce-
export XDG_SEAT=seat0
export XDG_SESSION_DESKTOP=xfce
export XDG_SESSION_TYPE=x11
export XDG_GREETER_DATA_DIR=/var/lib/lightdm/data/grbit
export XDG_CURRENT_DESKTOP=XFCE
export XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
export XDG_SESSION_CLASS=user
export XDG_VTNR=7
export XDG_SESSION_ID=509
export XDG_RUNTIME_DIR=/run/user/1000
export XDG_DATA_DIRS=/usr/share/xfce4:/usr/local/share:/usr/share

I don't which exact variable is required, but the error message need to be fixed to specify this variable. Currently it complains to empty XDG_SEAT_PATH even if it is set properly.