You are not logged in.

#1 2016-01-18 13:31:45

johnnyn
Member
Registered: 2015-10-26
Posts: 26

[SOLVED] DM > VT session > DM?

Greetings,

is it possible to log in to a text mode VT session from a graphical display manager (like LightDM), just as one can get an X session?
I'm talking about going to the real text mode terminal, like when I press Ctrl+Alt+F1, and get back to the graphical DM when the text mode session ends.

That is: Boot -> DM -> tty1 session -> DM.

I have tried messing about with a .desktop file in /usr/share/xsessions/

No luck.

My .desktop file looks like this:

[Desktop Entry]
Encoding=UTF-8
Name=Backup
Comment=Make backup
Exec=/usr/bin/bash
TryExec=/usr/bin/bash
Type=XSession

I have tried...

Exec=/usr/bin/backup.sh
Exec=/usr/bin/agetty
Exec=/usr/bin/agetty -a johnny

...in combination with...

Type=XSession
Type=Application

I would like to get rid of a silly setup where my mother does her system backups by logging in as the user "backup", which then automatically runs a text mode script in an xterm in icewm.
She just has to log in, wait for the backup script to finish, and then close the xterm window to get back to the DM, from where she can log in to her own account (or shut down the computer if she wants to).
It is the only thing we use icewm for, so if I can get the DM to run the backup script directly in a virtual terminal (tty1-6), we can uninstall icewm, and keep my mother's system that bit more tidy (and I will have learned something new smile)

Cheers Johnny smile

Last edited by johnnyn (2016-01-18 18:39:26)

Offline

#2 2016-01-18 14:58:53

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: [SOLVED] DM > VT session > DM?

There is no need for a WM, you can just run your term (xterm) with the geometry flag to run at fullscreen.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2016-01-18 17:44:18

johnnyn
Member
Registered: 2015-10-26
Posts: 26

Re: [SOLVED] DM > VT session > DM?

Thank you Trilby smile

That of course works.

Out of curiosity, if I really really really wanted to go to a text mode VT from the DM, and automatically return to the DM when the VT was exited, would that be possible? And if so, how?

Cheers, Johnny smile

Last edited by johnnyn (2016-01-18 18:28:46)

Offline

#4 2016-01-18 18:11:14

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: [SOLVED] DM > VT session > DM?

Not easily no, and not at all in the way you describe.

You could set up a .desktop session that killed the DM (systemctl stop whateverDM) and you would be dropped back to the controlling VT.  But then when you exited from the VT you'd just be looking at the username prompt to log in to the VT.  Perhaps you could kill the DM and have any 'backup' script that you'd have the user run restart the DM when it was done doing whatever else you needed it to do.

You could also have the .desktop target run chvt to change to another vt.  But again, you'd need to have the user specifical chvt to get back to tty7 (if that's where the DM is running).

Either of these approaches would be very tricky and very error-prone, which seems it would really defeat your purpose.  A fullscreen terminal emulator though would be simple, and would not require any packages to be installed that you wouldn't otherwise have (no WM needed).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2016-01-18 18:38:43

johnnyn
Member
Registered: 2015-10-26
Posts: 26

Re: [SOLVED] DM > VT session > DM?

Thank you Trilby smile

Getting a text mode VT session is clearly both "messier" and less "bullet proof" than a WM-less X session with xterm.

Thanks for your insights and help smile

Cheers, Johnny smile

Last edited by johnnyn (2016-01-18 18:40:24)

Offline

Board footer

Powered by FluxBB