This forum has been archived. All content is frozen. Please use KDE Discuss instead.

User currently logged in to KDE

Tags: None
(comma "," separated)
User avatar
pinguin74
Registered Member
Posts
72
Karma
0
OS

User currently logged in to KDE

Sun Aug 17, 2014 10:23 am
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
luebking
Karma
0

Re: User currently logged in to KDE

Mon Aug 18, 2014 11:11 pm
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"
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: User currently logged in to KDE

Thu Aug 21, 2014 8:09 am
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]


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]