You are not logged in.

#1 2016-06-09 00:13:08

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,143
Website

[RESOLVED] Login to both xorg and console

If I need to drop to console (Ctrl-Alt-F1) and login to do some maintenance, when I'm done xorg/lightdm might have restarted, bringing me back to the login screen. Out of a weird concern of some voodoo happening, I go back to the console and type "exit" and then use Ctrl-Alt-F7 to return to lightdm-gtk-greeter.

Is there any harm that can be done if I return to the xorg session without exiting the console (I'm logged in twice, aren't I)?


I don't care what you do at home. Would you care to explain?

Offline

#2 2016-06-09 01:00:34

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,657
Website

Re: [RESOLVED] Login to both xorg and console

AFAIK it's OK to be logged in multiple times. In the past I've been logged in at several TTYs  simultaneously (handy when you don't have X) with no apparent harm done. OTOH I don't think you can be logged into more than one X session.

Not 100% sure, but I don't think it's even possible to have two different users running X simultaneously.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#3 2016-06-09 01:34:57

Eraph
Member
From: /au/qld/bne
Registered: 2016-02-29
Posts: 282
Website

Re: [RESOLVED] Login to both xorg and console

Wouldn't a new VNC session count as a new X session? I've since moved to X11vnc because I like to use the same session as what I was logged into before, but typically VNC servers seem to log you in with isolated sessions.
By extension, I'd be very surprised if two different users couldn't run X sessions at the same time, but I'm willing to be proven wrong.


Lenovo IdeaPad Yoga 13 | BunsenLabs Hydrogen (x64)
Intel Core i7-3537U | Intel HD4000 | 8GB DDR3 | 256GB SSD

Offline

#4 2016-06-09 02:05:19

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: [RESOLVED] Login to both xorg and console

From my (limited) experience, I've logged into 3 TTY's at the same time. No harm, just remember which ones you're logged into! And if it's a computer that others use, make sure you remember to log out of all of them.  The only harm I see is that there is no prompting for a password like light-locker/light-dm provides.

And I agree that I don't think you can open more than one X session. It's always on TTY7. I mean you can have more than one desktop in openbox, but it's still the same session


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#5 2016-06-09 04:32:05

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,143
Website

Re: [RESOLVED] Login to both xorg and console

@johnraff, I suspected as much. Marking this RESOLVED.


I don't care what you do at home. Would you care to explain?

Offline

#6 2016-06-09 05:50:34

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: [RESOLVED] Login to both xorg and console

hhh wrote:

Is there any harm that can be done if I return to the xorg session without exiting the console (I'm logged in twice, aren't I)?

none, even as different users.

johnraff wrote:

I don't think it's even possible to have two different users running X simultaneously.

https://wiki.archlinux.org/index.php/Xorg and
https://wiki.archlinux.org/index.php/Multihead
suggest that multiple Xsessions are perfectly possible; i don't see why not with different users, too.

Offline

#7 2016-06-09 06:19:04

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [RESOLVED] Login to both xorg and console

johnraff wrote:

I don't think you can be logged into more than one X session.

You can if you use `startx -- -vtX` to override the automatic TTY7 startup for X smile

@hhh -- you may occasionally have a 1min30s delay in shutdown if you have any dbus services running in the other TTY than the one from which you initiated the shutdown, otherwise I think it's fine.

Offline

#8 2016-06-10 02:53:45

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,657
Website

Re: [RESOLVED] Login to both xorg and console

Head_on_a_Stick wrote:
johnraff wrote:

I don't think you can be logged into more than one X session.

You can if you use `startx -- -vtX` to override the automatic TTY7 startup for X.

I was looking at things like ~/.Xauthority and /tmp/.XO-lock and assuming they were indeed lockfiles.

...and on a setup with LightDM, X is started, by root, before any user logs in. FWIW, on my BL system the running command is

/usr/bin/X :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch

And with that X session running:

john@bunsen1:~$ sudo startx -- -vt3
[sudo] password for john: 

Unrecognized option: -vt3

john@bunsen1:~$ sudo startx -- :0 vt3

(EE) 
Fatal server error:
(EE) Server is already active for display 0
	If this server is no longer running, remove /tmp/.X0-lock
	and start again.

john@bunsen1:~$ startx -- :0 vt3
xauth:  timeout in locking authority file /home/john/.Xauthority
^C^C
X: user not authorized to run the X server, aborting.

Last edited by johnraff (2016-06-10 03:17:27)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#9 2016-06-10 06:35:36

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [RESOLVED] Login to both xorg and console

^ Ah, my apologies  :8

For Debian, just switch to a TTY and use:

startx

Just tested this on my bare-metal BL system -- all six TTYs have X sessions with LightDM still active on TTY7
smile

EDIT:

empty@TheLab ~ % pgrep X
917
1365
1616
1822
2032
2236
2440

Last edited by Head_on_a_Stick (2016-06-10 06:36:37)

Offline

#10 2016-06-10 08:09:34

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,657
Website

Re: [RESOLVED] Login to both xorg and console

Hmm... there must be a bit more to this.
Switch to tty3, login, startx.
Some delay, then an "xauth timeout" error.
Back to tty7, ~30s later it goes black. I think I've been brought back to tty3, because that's black too (it looks like an X session with nothing in it) and back to tty7 is normal.
This state (normal tty7, black tty3) continues for a minute or two, and pgrep shows two X processes running.
Then, next time I check tty3, X has exited and it's back to a prompt, leaving errors splattered over the screen.

xauth:  timeout in locking authority file /home/john/.Xauthority

and "no protocol specified" "xinit: giving up" repeated here and there. (Shift+Pageup doesn't work so I can't see any more.)
TTY7 still normal, and pgrep shows the second X process gone.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#11 2016-06-13 02:14:30

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,657
Website

Re: [RESOLVED] Login to both xorg and console

Head_on_a_Stick wrote:

... just switch to a TTY and use:

startx

My turn to apologise. This works.

What messed it up before was that my ~/.Xauthority had been taken over by root, due to my unnecessary use of sudo in an earlier experiment.

There are a couple of complications: tint2 on tty7 died and had to be restarted, and compton only seems to work on one of the open sessions at a time - restart it on tty7 and it dies on tty2, restart on tty2... but there are two X sessions running somewhat independently. cool


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

Board footer

Powered by FluxBB