[systemd-devel] Bug in systemd? Running X without a display manager

Alan Stern stern at rowland.harvard.edu
Mon Aug 27 07:32:43 PDT 2012


On Sun, 26 Aug 2012, Dave Reisner wrote:

> On Fri, Aug 24, 2012 at 12:17:08PM -0400, Alan Stern wrote:
> > I need some help with a problem.
> > 
> > I'm currently using Fedora 16, but without a display manager.  I log
> > into a text-mode VT (usually tty1) and run startx manually.  The
> > display uses tty7 and works fine.
> > 
> > But systemd isn't aware of it, or at least, isn't aware that my login 
> > session now owns tty7.  For example, the devices labelled with the 
> > "uaccess" tag have their ACLs adjusted so that I can't use them in the 
> > graphical environment.  (When I switch back to a text-mode VT they work 
> > fine.)
> > 
> > I'm not sure who to blame for this: systemd, dbus, or myself.  Still,
> > it seems like this _ought_ to work okay.
> > 
> > Can anybody help?
> > 
> > Alan Stern
> > 
> 
> You'll need to start X on the same VT that you logged in on. If it's
> tty1, then:
> 
> startx -- vt01

That's a reasonable workaround, but it's not a real fix.

Fedora 16 uses ConsoleKit, and testing shows that ConsoleKit is aware 
of both the test-mode and X session whereas systemd isn't:

[stern at iolanthe ~]$ ck-list-sessions
Session1:
        unix-user = '2102'
        realname = 'Alan Stern'
        seat = 'Seat1'
        session-type = ''
        active = FALSE
        x11-display = ''
        x11-display-device = ''
        display-device = '/dev/tty1'
        remote-host-name = ''
        is-local = TRUE
        on-since = '2012-08-27T13:52:33.245828Z'
        login-session-id = '1'
        idle-since-hint = '2012-08-27T13:53:04.012294Z'
Session2:
        unix-user = '2102'
        realname = 'Alan Stern'
        seat = 'Seat1'
        session-type = ''
        active = TRUE
        x11-display = ':0'
        x11-display-device = '/dev/tty7'
        display-device = ''
        remote-host-name = ''
        is-local = TRUE
        on-since = '2012-08-27T13:52:37.086051Z'
        login-session-id = '1'
[stern at iolanthe ~]$ systemd-loginctl list-sessions
   SESSION        UID USER             SEAT            
         1       2102 stern            seat0           

1 sessions listed.
[stern at iolanthe ~]$ systemd-loginctl show-session 1
Id=1
Name=stern
Timestamp=Mon, 27 Aug 2012 09:52:32 -0400
TimestampMonotonic=100394935
ControlGroupPath=/user/stern/1
VTNr=1
TTY=tty1
Remote=no
Service=login
Leader=992
Audit=1
Type=tty
Active=no
KillProcesses=no
IdleHint=yes
IdleSinceHint=300000000
IdleSinceHintMonotonic=0


Evidently information is getting sent to (or by) ConsoleKit but not to
systemd, or else the information does get sent to systemd and systemd
ignores it.  Either way, this is a bug (although I can't tell where).

Now perhaps ConsoleKit is old hat and nobody cares about it any more.  
I haven't tried doing this under a more recent version of Fedora.  Is 
there any reason to think it would work any better?

Alan Stern



More information about the systemd-devel mailing list