Entry
Linux: Switch: Console: How to switch the console between graphics and text? [VMWare]
Dec 3rd, 2003 17:41
Knud van Eeden,
----------------------------------------------------------------------
--- Knud van Eeden --- 12 November 2003 - 10:34 pm -------------------
Linux: Switch: Console: How to switch the console between graphics and
text? [VMWare]
---
Method: use hotkeys:
1. <CTRL><ALT><F1> from graphics to text
2. <CTRL><ALT><F7> from text to graphics
Note: it is not necessary to open a console first
---
Note:
If using VMWare, because this hot keys <CTRL><ALT> are in use and
overtaken
by VMWare, you might choose to temporarily switch to another hot key
combination (goto VMWare, menu 'Edit'->'Preferences'->tab 'Hot keys',
enable radio button 'Ctrl-shift-alt', 'OK', suspend your VMWare
operating system,
and resume it again, to activate). Then switch to text mode to do the
actions, and put back the old VMWare hotkeys when ready.
---
---
Method: edit the configuration file '/etc/inittab'
---
This did only work in Red Hat, Mandrake.
---
Steps: Overview:
1. -login as root, by typing:
su
and give your root password
1. edit the configuration file
/etc/inittab
(possibly make a backup first,
by typing e.g.
cp inittab inittab_bak)
---
Here the vi editor is used:
vi /etc/inittab
then press the <INSERT> key to be able to edit the text
2. -change line:
id:5:initdefault: (this means start in graphics mode)
to the following:
#id:5:initdefault
id:3:initdefault: (this means start in text mode)
3. -Save the file:
<ESCAPE>
:save /etc/inittab
(or possibly :write /etc/inittab)
:q
or even better just one command to save current
file and quit, use:
:wq
4. -reboot Linux, to switch to this text mode
type
shutdown -r now
---
Note: in Linux Debian v3 I could not get this method
to work.
I tried to change
id:2:initdefault:
to
id:3:initdefault:
and also tried to change in the file:
/etc/lilo.conf
the default from:
# append=""
to instead:
append="video=vga16:off"
but it did not work in first try.
---
I discovered that you also can
use in Debian (after you do
a reboot) in the graphical
screen the button 'Menu'.
Use then 'Console login' for
text (or similar <ALT><N>).
---
I finally decided to use the method
<CTRL><ALT><F1> and <CTRL><ALT><F7>
to switch between graphics and text in
a console.
---
But in VMWare <CTRL><ALT> is a hot
key, so will take over if you try that.
---
So I changed first the default settings
in VMWare menu 'Edit'->'Preferences'->
tab 'Hotkeys', enable radio button
'Ctrl-Shift-Alt'->'OK'.
You will have to pause your Linux,
and quit VMWare to make this active.
After that do the <CTRL><ALT><F1> in
a console to install VMWare tools.
---
Remember that you now have to use
<CTRL><ALT><SHIFT> to switch between
Linux and Windows.
---
4. -you will now be in text mode, and presented with the option
to login
5. -login as root again
su
6. -Do further actions
7. -Then reboot or use <CTRL><F7> to switch back to
graphics mode and put it back in the former state.
8. Let Linux start again automatically in graphics mode,
by editing the /etc/inittab file again:
1. -login as root
su
2. -edit /etc/inittab
vi /etc/inittab
3. -change line
id:3:initdefault: (this means start in text mode)
to
id:5:initdefault: (this means start in graphics mode)
4. -save the file:
<ESCAPE>
:save /etc/inittab
:q
9. reboot your Linux in VMWare
---
---
Method: use the 'telinit' command
Steps: Overview:
1. -In graphics mode, open a console
2. -To switch to text mode, type the command:
telinit 3
3. -To switch back to graphics mode, type the command
telinit 5
or similarly
startx
---
Tested in:
Linux Debian v3: command 'telinit 3' exists, but does not do anything
here immediately, it might work
Linux Mandrake v9: 'telinit 3' works, and goes to text mode, but hangs
my VMWare Mandrake v9, and I had to restart it
Linux Red Hat v9: does not work ('telinit' is an unknown command)
Linux Slackware v9:
Linux SuSE v9: works OK
Linux Turbolinux v8: command 'telinit 3' exists, but does not do
anything here immediately, it might work
----------------------------------------------------------------------