You are not logged in.

#1 2014-04-03 21:12:34

clentfort
Member
Registered: 2013-05-21
Posts: 17

xuserrun stopped working

Hi, I'm using xuserrun out of the AUR (https://aur.archlinux.org/packages/xuserrun/) it used to work flawlessly but since some time it stopped working with following message.

Failed to get session: No session ']elbatnirpnu[' known
Failed to get session: No session ']elbatnirpnu[' known
xuserrun: no X.org server detected running

Well it calls loginctl and queries the for the sessions on seat0 (I'm on seat0, it's the only active seat according to loginctl list-seats) but fails to determine the active sessions and I don't know why! I'm kind of desperate now because I can't figure out which update caused this behaviour.

My login-manager is "LightDM 1.8.8", systemd is "systemd 212 +PAM -AUDIT -SELINUX -IMA -SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ +SECCOMP -APPARMOR".

Offline

#2 2014-04-03 22:04:55

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: xuserrun stopped working

Have you read the comment on https://aur.archlinux.org/packages/xuserrun/ ?

Offline

#3 2014-04-03 22:22:15

clentfort
Member
Registered: 2013-05-21
Posts: 17

Re: xuserrun stopped working

My problem occurs before. If you look at the source (only 38 lines of bash) my problem occurs already on line 18 when it is queried for active sessions.

Offline

#4 2014-04-03 22:25:55

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: xuserrun stopped working

When you remove 'rev' from the line you get

$ loginctl show-seat seat0 -p Sessions | cut -d= -f2
[unprintable]

Offline

#5 2014-04-03 22:34:00

clentfort
Member
Registered: 2013-05-21
Posts: 17

Re: xuserrun stopped working

I'm aware of that. It is not supposed to be "[unprintable]". its supposed to be the sessions on the current seat

Offline

#6 2014-04-03 22:43:53

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: xuserrun stopped working

$ loginctl show-seat seat0
Id=seat0
CanMultiSession=yes
CanTTY=yes
CanGraphical=yes
IdleHint=yes
IdleSinceHint=1396546720900479
IdleSinceHintMonotonic=23160139

There's no info about the Sessions.
I can use the '-p' switch to print info that does exist:

$ loginctl show-seat seat0 -p CanTTY
CanTTY=yes

When I add '-a'

$ loginctl show-seat seat0 -a
Id=seat0
ActiveSession=[unprintable]
CanMultiSession=yes
CanTTY=yes
CanGraphical=yes
Sessions=[unprintable]
IdleHint=yes
IdleSinceHint=1396546720900479
IdleSinceHintMonotonic=23160139
$ loginctl list-sessions
   SESSION        UID USER             SEAT            
        c1       1000 karol            seat0           

1 sessions listed.

https://bbs.archlinux.org/viewtopic.php?id=160607
I'm starting X via 'startx'.

Last edited by karol (2014-04-03 22:47:14)

Offline

#7 2014-04-04 09:17:47

clentfort
Member
Registered: 2013-05-21
Posts: 17

Re: xuserrun stopped working

So it wont include the Sessions for you either. But why is that so? Is there another (easy) way to figure whos the currently active X user.

Offline

#8 2014-04-04 10:23:01

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: xuserrun stopped working

I guess they changed the code and don't print the data anymore. gdbus can still get the session ids:

gdbus call --system --object-path /org/freedesktop/login1/seat/seat0 --dest org.freedesktop.login1 --method org.freedesktop.DBus.Properties.Get org.freedesktop.login1.Seat Sessions | grep -o "('[^']\+'" | sed "s/.*'\(.*\)'.*/\1/g"

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#9 2014-04-04 17:38:31

clentfort
Member
Registered: 2013-05-21
Posts: 17

Re: xuserrun stopped working

Thanks, I will try to figure out how I can get the same information using that path.

Offline

#10 2014-04-04 18:27:40

HiImTye
Member
From: Halifax, NS, Canada
Registered: 2012-05-09
Posts: 1,072

Re: xuserrun stopped working

wouldn't something like this work?

w -f | grep "$DISPLAY" | awk '{print $1}' | uniq

edit: forgot the '-f' have it aliased wink

Last edited by HiImTye (2014-04-04 18:30:02)

Offline

#11 2014-04-06 15:40:53

clentfort
Member
Registered: 2013-05-21
Posts: 17

Re: xuserrun stopped working

This might work better/easier.

Offline

Board footer

Powered by FluxBB