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/
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...
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 )
Last edited by johnnyn (2016-01-18 18:39:26)
There is no need for a WM, you can just run your term (xterm) with the geometry flag to run at fullscreen.
Thank you Trilby
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?
Last edited by johnnyn (2016-01-18 18:28:46)
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).
Thank you Trilby
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
Last edited by johnnyn (2016-01-18 18:40:24)