`who` does not show with lightdm logged in users.
To display some warnings after pressing some acpi-keys on my laptop, i need to detect the display and the actual Xauthority.
With some shell-functions provided by the package 'acpi-support' in the file /usr/share/
getXuser() {
user=$(who | awk "/:$displaynum)/ { print \$1; exit }")
if [ x"$user" = x"" ]; then
user=$(who | awk "/:$displaynum/ { print \$1; exit }")
fi
if [ x"$user" != x"" ]; then
export XAUTHORITY=
else
export XAUTHORITY=""
fi
}
getXconsole() {
console=
displaynum=`ps t tty$console | sed -n -re 's,.*/X .*:([0-
if [ x"$displaynum" != x"" ]; then
export DISPLAY=
getXuser
fi
}
Only after I have detected/exported the DISPLAY and XAUTHORITY I can display my zenity windows (with questions and warnings). But unfortunately `who` does not show the logged in user when that user is only logged in at a lightdm session. With the older dm's (gdm, kdm etc) this has always worked.
To reproduce this, you must run `who` from another tty, not from within a gnome-terminal opened inside the x-session because the logged in gnome-terminal provides the information but it disapears after closing the gnome-terminal.
Is this a bug or a feature?
If this is a feature, how does the detection work now or where/with what tool do I have to look?
Regards,
Raphael Gradenwitz
Question information
- Language:
- English Edit question
- Status:
- Expired
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: