![]() Registered Member ![]()
|
Hi there,
is there a variable or anything that can give you the user name of the user currently logged into a KDE session? I just found LOGNAME, but I dunno if this is a KDE specific variable. How can you request the current logged in user from KDE? Thanks |
![]() ![]()
|
I'm not sure what you're trying to do, but "whoami" (or "id -un") will print the username of the calling user.
If you want a list of all users currently running a KDE session, try "ps -Ao %U%c | grep ksmserver" as a starting point. For a list of all currently logged in users, try "finger" |
![]() Administrator ![]()
|
In addition, the variable $USER often also contains the username of the current user - although this could be distribution specific.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]