You are not logged in.
I'm very interested in every single detail of some things and that has spawned a random question.
Why do we have multiple virtual consoles(proper term?) ? i.e. if I am looking at my desktop I can simply hit ctrl-alt-f3 for example, and poof! I'm at a new login prompt.
What is/are the purpose(s) for this feature? Can someone name off some scenarios?
Thanks!
Offline
Purpose: you can log into multiple consoles at once.
Not everyone uses tmux / dvtm or X.
You can set the number of consoles and even which of them (e.g. 1, 3 & 4) are spawned in /etc/inittab.
Offline
I don't know why there are 6 rather than 5 or 7, say, but having multiple can be very useful. Suppose you start a process which gets out of control and which you can't find a way to stop - you can often switch to another console, log in and kill it. That's much cleaner than, say, hitting the power button. Basically many of the same reasons you might find a virtual console useful in addition to a gui on tty7, I guess.
I'm not sure if that is historically why. But it is a reason I'm quite pleased there are!
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
I sometimes use two or three consoles when the GUI won't start. I might open a couple of log files and another for fixing the issue. You could use Links (or similar) to browse the web in one console while fixing an issue in another - never tried it myself except when setting a system up.
Just remembered why I use them the most actually - so that I can do a clean shutdown / reboot if the system has died for some reason. I used this sort of idea only the other day to turn off auto login in the Slim config file and reboot when OpenBox died on me. I also used the consoles to fix the issue with the upgrade - I hadn't updated correctly.
Last edited by RichAustin (2012-02-09 23:06:07)
Offline
Purpose: you can log into multiple consoles at once.
Not everyone uses tmux / dvtm or X.You can set the number of consoles and even which of them (e.g. 1, 3 & 4) are spawned in /etc/inittab.
Not to mention that X needs its own console to run on, which means that if you want to launch X from the command line (and everyone does--even GDM and KDM do so, though they usually reserve TTY7 for themselves), you'd better have more than one virtual console ready. If you use "startx" to--well, start X--you'll need one vc to launch it, one for it to run on and one to fall back to if trouble arises. And being left without a fallback can be frustrating: I don't know how many times I've had Windows lag or lock up on me over the last few years, and my first reaction was to hit Ctrl+Alt+F2.
Last edited by ANOKNUSA (2012-02-09 23:07:15)
Offline
I never had much trouble with X. I've used the extra consoles for reading some notes, logs or man pages while compiling or experimenting with X-less setup.
Offline
Of course, not all of us use a login manager either. If you use startx from a command line, this makes it really easy to open another X session.
BTW, did you know you can set things up to start a VirtualBox machine from startx ?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
I've been using it recently to shutdown when KDE becomes unusable after disconnecting an external monitor, something I've so far been unable to solve.
Otherwise, I'd have to press the power button - ctrl + alt + f* is the only way out. (Either the only thing which gets a response or the only thing which gets me something visible or...)
The virtual consoles stay on my laptop screen even when X has put the gui in never never land...
I also used it to take notes through a talk - I didn't want to restart the machine because of noises etc. So I just used vim while X was frozen on tty7. (Didn't work very well because it kept beeping but I think I've managed to kill that now. Why is that the *default*?!)
Last edited by cfr (2012-02-10 01:47:27)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Suppose you start a process which gets out of control and which you can't find a way to stop - you can often switch to another console, log in and kill it.
How is this done? I can't tell you how many times I've boogered up syntax in something I was tinkering with and ended up locking up X or having something happen and I've had to hit the power button and manually boot into run mode 3 to undo it.
Offline
cfr wrote:Suppose you start a process which gets out of control and which you can't find a way to stop - you can often switch to another console, log in and kill it.
How is this done? I can't tell you how many times I've boogered up syntax in something I was tinkering with and ended up locking up X or having something happen and I've had to hit the power button and manually boot into run mode 3 to undo it.
Usually with 'Ctrl+Alt+F#' where # represents the TTY number. F1-F12+ depending on if you enable that many TTYs. Rebooting is usually a last resort in [Li,U]nix.
General information: http://www.linusakesson.net/programming/tty/index.php
Last edited by Earnestly (2012-02-10 15:15:21)
Offline
I meant the kill process. How does one locate (from another console) the process which is out of control, then kill it?
Offline
I meant the kill process. How does one locate (from another console) the process which is out of control, then kill it?
ps
Last edited by Earnestly (2012-02-10 16:55:07)
Offline
BTW, did you know you can set things up to start a VirtualBox machine from startx ?
Are you talking about VBoxHeadless?
[rant]Because that feature is crap in my opinion. Last I checked, you couldn't 'attach a head' later, and you couldn't reconfigure the VM as you could when it was run 'headed', like enabling 'Cable connected' on a network adapter. Thank god I started virtualization with VMware or I might think I had to put up with such nonsense.[/rant]
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
ewaller wrote:BTW, did you know you can set things up to start a VirtualBox machine from startx ?
Are you talking about VBoxHeadless?
[rant]Because that feature is crap in my opinion. Last I checked, you couldn't 'attach a head' later, and you couldn't reconfigure the VM as you could when it was run 'headed', like enabling 'Cable connected' on a network adapter. Thank god I started virtualization with VMware or I might think I had to put up with such nonsense.[/rant]
No, You can actually use VirtualBox itself as a WM. Just pass in the machine you want to run as an argument.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
I meant the kill process. How does one locate (from another console) the process which is out of control, then kill it?
I usually use htop ;P
Offline
Multiple TTYs can act like browser tabs. But honestly, I can't be bothered to log in just to kill a process... If a process goes wild and makes my computer unresponsive, I press Ctrl+Alt+F1 and Ctrl+C to "cancel" the X session. Then I run "startx". It's very effective, usually taking up 3-5 seconds.
On Windows I would probably have to reboot because 9 out of 10 times it's faster than waiting around for the Task Manager to show up, waiting for the "Processes" tab to be drawn, scroll down, click the fricken process, press "End Task", wait for the confirmation, press "Yes". Much, much faster to just reboot.
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
Multiple TTYs can act like browser tabs. But honestly, I can't be bothered to log in just to kill a process... If a process goes wild and makes my computer unresponsive, I press Ctrl+Alt+F1 and Ctrl+C to "cancel" the X session. Then I run "startx". It's very effective, usually taking up 3-5 seconds.
Sometimes you don't want to kill the whole X, just e.g. a game that turned your screen all black.
Offline
DSpider wrote:Multiple TTYs can act like browser tabs. But honestly, I can't be bothered to log in just to kill a process... If a process goes wild and makes my computer unresponsive, I press Ctrl+Alt+F1 and Ctrl+C to "cancel" the X session. Then I run "startx". It's very effective, usually taking up 3-5 seconds.
Sometimes you don't want to kill the whole X, just e.g. a game that turned your screen all black.
Plus that method only works if you start X from a console. If X is started at boot, you have to log into a console even if you do want to kill X completely and restart it.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
alphaniner wrote:ewaller wrote:BTW, did you know you can set things up to start a VirtualBox machine from startx ?
Are you talking about VBoxHeadless?
[rant]Because that feature is crap in my opinion. Last I checked, you couldn't 'attach a head' later, and you couldn't reconfigure the VM as you could when it was run 'headed', like enabling 'Cable connected' on a network adapter. Thank god I started virtualization with VMware or I might think I had to put up with such nonsense.[/rant]
No, You can actually use VirtualBox itself as a WM. Just pass in the machine you want to run as an argument.
How so? I tried running
virtualbox --startvm Windoze
on a virtual console and received an error about finding the X server. Also tried VBoxSDL with no luck.
Running VBox in a virtual console is very interesting to me for some reason... LOL
Offline
How so? I tried running
virtualbox --startvm Windoze
on a virtual console and received an error about finding the X server.
Here is my ~/.xinitrc
#xset b off
setxkbmap -option ctrl:nocaps
case $WM in
kde)
ck-launch-session dbus-launch startkde
;;
gnome)
ck-launch-session dbus-launch gnome-session
;;
compiz)
~/bin/compiz&
ck-launch-session dbus-launch compiz ccp
#ck-launch-session dbus-launch fusion-icon
;;
lxde)
~/bin/lxde&
ck-launch-session dbus-launch startlxde
;;
openbox)
~/bin/openbox&
ck-launch-session dbus-launch openbox
;;
e17)
ck-launch-session dbus-launch
enlightenment_start
;;
vb)
VirtualBox -startvm "Windows XP" -fullscreen
;;
xfce4)
ck-launch-session dbus-launch startxfce4
;;
i3)
ck-launch-session dbus-launch i3
;;
*)
ck-launch-session dbus-launch startxfce4
;;
esac
From the console, use :
WM=vb startx
or, if there is already something running on Screen 0 (OpenBox, Xfce4, whatever) simply:
WM=vb startx -- :1
Note that the examples start VitutalBox. I could just as easily set WM to any of the other environments defined in my .xinitrc.
I have also made this work straight from kdm. I think I created a custom session, but I may have created a .desktop file in /usr/share/apps/kdm/sessions/
I am not using kdm on this machine and I don't remember
edit: Typo
Last edited by ewaller (2012-02-11 23:14:09)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Ah... Thanks for your reply! Now looking into running VirtualBox as a session with GDM.
Offline