Pressing the key combination <Ctrl><Alt><F1> will switch you to to the first text console at any time. <Ctrl><Alt><F2> will switch you to the second text console, <Ctrl><Alt><F3> to the third text console, etc, up to <Ctrl><Alt><F6>, for the total of 6 text consoles. <Ctrl><Alt><F7> will switch you to the first graphical user interface (GUI) console if one is running. <Ctrl><Alt><F8> to the second GUI console, etc., up to <Ctrl><Alt><F11> for the total of 5 GUI consoles. The 12th console is either used as the 6th GUI (RedHat 6.1) or a place to which kernel messages are continually displayed (Mandrake 7.0, really cool feature). Typically none or only the first GUI console is running.<Ctrl><Alt><F1> means: "Press the left <Ctrl> and <Alt> keys and hold them. Now press <F1>. Release <F1>. Release <Ctrl> and <Alt> keys."
Briefly, sitting at a Linux computer you can have many consoles opened at the same time, and switch between them using the hot keys described above. You have to log in on each to be able to use it--you may log in as the same user (multiple times), or different users. Each login session is quite separate, and you they should not interfere with each other. The first 6 consoles are text-based terminals and are named tty1, tty2 ... tty6 (historical name, "tty" stands for "teletypewriter"). The subsequent consoles are graphical (GUI). These are all *local* consoles. You can also connect to a Linux computer over a network, have your work done on your Linux server and the resulting display sent to your remote terminal on your remote console (which can be Linux- or another operating system-based).
The full-screen text consoles are terminals by themselves. Under the GUI consoles, you can create "slave" pseudo-terminals (in a window) on demand under each GUI console--they will be called pts0, pts1, ....
If you are sitting at a text terminal, you can determine the name of your terminal using the following command:
tty
You can close any text terminal by typing "exit" inside it.
The Linux GUI console is quite similar to other GUI you might have used, e.g., MS Windows, but there are also numerous important differences. I love multiple "desktops" to stay organized--the default setup in KDE offers 4 desktops (it can be customized to between 1 and 16). I run many programs and never close them, so to stay organized I keep connectivity application (netscape with all its windows, knode newsreader, and licq) together on Desktop2, abiword, staroffice and a text editor on Desktop3, games and konqueror with helpfiles on Desktop4, and leave Desktop1 for the more occassional chores. One can switch between desktops by clicking on the "desktop pager" on the "K-panel" or using <Ctrl><TAB>. To toggle between applications on a same desktop, I may click the application window, or on its representation on the "applicaton panel", or use <Alt><TAB>.
This should be set-up during your Linux initial installation unless you skipped the step. To set it up now, you may try, as root, one of these configurators:
Xconfigurator
XF86Setup
xconf
The simplest way is to run the command setup (under RedHat, as root) and access Xconfigurator from there.
To setup X-windows under Linux, you may need to know your hardware. You may want to dust your monitor manual to see what max synchronization frequencies (vertical and horizontal) your monitor supports. The message when the computer boots may give you a clue about what type of video card you have and with how much memory. Read the label underneath your mouse to find out about the mouse. Next time you buy a mouse, get a 3-button "Linux-ready" Logitech or similar (Linux makes a good use of all three mouse buttons).
When testing the X-server, if the screen goes blank, displays funny lines, or otherwise obviously does not function as designed, kill it fast with <Ctrl><Alt><BkSpace> and re-check your monitor sync frequencies. Running wrong frequencies can be bad for your monitor.
If you really have problems, set up a plain vga (640x480) X server first. You can fine-tune it later, after you get some understanding of how things work on your system.
To start your X-server automatically on the system start-up and display a graphical login prompt, you have to change (as root) just one character in the file /etc/inittab . This file specifies something like:
id:3:initdefault:
Change it to
id:5:initdefault:
This sets up the default runlevel to 5, which is X-Windows. The meaning of the different runlevels is explained in the same /etc/inittab file :
0 - halt (Do NOT set initdefault to this)
1 - Single user mode
2 - Multiuser, without NFS (The same as 3, if you do not have networking)
3 - Full multiuser mode
4 - unused
5 - X11
6 - reboot (Do NOT set initdefault to this)
You can change the runlevel from the command line. E.g., this command (has to be executed as root):
init 6
will reboot your computer, while the folowing command would switch your computer to a single-user mode:init 1
RedHat 5.2 does not install kde by default because at the time of the RH5.2 release there was a problem with the license for a library that the kde uses. Otherwise, kde is a very good GUI, the library license problem is now solved, and the RedHats 6.0 up include kde (alongside the more ornamental GNOME). Still, the kde binaries are on your RedHat 5.2 CDs, you just have to install them yourself. (If you don't have the CDs, you can download the binaries from the kde site on the Internet.)
First check if your X-server works by executing:
xinit
[The X-server is a bare-bone X-windows system, without a "Windows Manager." You can execute your X-windows programs from here by typing the program name (with leading ./ or full path) in the X-terminal window, but you will not be able to move or resize the windows, add icons, etc.]
You can exit your X-server by typing exit in the X-terminal window, or pressing <Ctrl><Alt><Bkspace> to kill the X-windows server. (The last solution is perfect should your windows ever hang-don't reboot in such a case.) If your X-server does not work, see the next answer.
Now, login as root. Mount the RH5.2 CD:
mount /mnt/cdrom
Go to the proper directory:
cd /mnt/cdrom/kde/distribution/RedHat/i386/binary
It is useful to use the command line autocompletion (press Tab) when typing long paths or filenames.
Read the README file:
cat README-2rh51-rpms | more
Use the rpm "RedHat Package Manager" to install the necessary packages
rpm -iv packagename
The packages have filenames ending with .rpm. First install the qt libraries, then kde support, then kde libs, then kde base. If you choose the wrong order, the dependency check will fail and the package will not install (rpm will issue a message). This is not serious, just re-install the required package first, and then try the next package again. After you are done with the base, you may want to install all other packages for kde (utill, admin, network, games, graphics, multimedia)--they are not big, so you may consider installing them all. Finally, just to make sure that you installed everything type:
rpm -ivh *.rpm
The options "vh" print some extra info. You will get some messages like "the package is already installed" If there is more than a screenful of them, you can scroll back using <Shift><PgUp>. If you really don't like the command-line-based rpm package manager, you may install the same packages using a GUI front to rpm called glint (available only in RH5.2). Just type "glint" in the X-windows terminal.
Now tell your system that kde is to be your default X-windows manager. In user home directory, create an .Xclients file:
pico .Xclients
which contains just one line:
/opt/kde/bin/startkde
Type in the line and save the file. (Adjust the line as required so the location of the startkde file is correct.) Now, make the file executable to all users:
chmod a+x .Xclients
Check if the permissions were changed:
ls -l .Xclients
[Files with a dot at the beginning are not displayed by a regular ls command, there are something like hidden files under DOS. You must use its name or ls -a .]
If you created the file as root not the user, change the owner and the group of the file to the proper user:
chown user_name .Xclients
chgrp user_name .Xclients
That's it. Now typing startx should start your X-server with the kde as the windows manager.
In my home directory, I create (or edit if it exists) file .xsession using my favourite pico editor:pico .xsession
[Pls note the dot at the beginning of the filename, files with names starting with dots are normally "invisible".]
On my RedHat 6.2 system, the file contains just one line:exec startkde
KDE clearly works best for me, although it feels heavy on older hardware or under load. Here is my list of windows managers available on RedHat or Mandrake installation CD:
startkde (to run kde. on some systems, the command may be kde)
gnome-session (to run Gnome)
xfce (to run XFce, my favourite "lightweight" desktop)
afterstep (to run afterstep)
AnotherLevel (to run AnotherLevel)
fvwm2 (to run fvwm2)
fvwm (to run fvwm)Of course the alternative windows manager will run only if it is installed on your system. The above windows managers are available on RH/Mandrake CDs for you to decide if you want to install them. I use almost exclusively KDE, although the other managers may be smaller and faster. Gnome is a famous X-windows project which is said to be more advanced and is prettier than KDE, but it is still quite buggy, so perhaps not recommended unless you don't mind occasional trouble. RH6.x contains both major X-windows systems, Gnome and KDE.
Yes, you can. When you issue the first startx command on your system, it opens the first X-session on the default display 0. The second X-session must be opened on a different display. For example, this will open a second X-session on the display 1:
startx -- :1
You can have up to 6 concurrent X sessions. Use <Ctrl><Alt><F7> to switch to display 0, <Ctrl><Alt><F8> to second screen, etc. up to <Ctrl><Alt><F12> Try man startx if you need more info.
In a similar fashion, you can open another bare X-server session without a window manager. This will open one on display 2:
xinit -- :2
On this bare-bone X-display I can run a different windows manager (so as to have two different ones running at the same time) by typing in the X-terminal window one of these (see the previous answer for more details):
startkde
gnome-session
xfce
afterstep
AnotherLevel
fvwm2
fvwm
To enable several concurrent GUI logins on different local consoles under RedHat (RedHat uses program gdm for graphical logins), I had to edit the file: /etc/X11/gdm/gdm.conf . I have the following entry at the end of this file to enable 4 login terminals <Ctrl><Alt><F7> to <Ctrl><Alt><F10>:[servers]
3=/usr/bin/X11/X vt10
2=/usr/bin/X11/X vt9
1=/usr/bin/X11/X vt8
0=/usr/bin/X11/X vt7Having four GUI lets me run KDE and GNOME at the same time on one computer with two GUI terminals spare, so my sister can login despite my having screensavers with password-protection.
To enable several concurrent GUI logins on different local consoles under Mandrake (Mandrake uses kdm for graphical logins), I had to modify two files: /etc/X11/xdm/Xservers to include something like:
:0 local /usr/X11R6/bin/X :0
:1 local /usr/X11R6/bin/X :1
:2 local /usr/X11R6/bin/X :2and /etc/X11/xdm/xdm-config to copy all the settings for display 0 to display 1 and 2 so that it includes this:
DisplayManager._0.authorize: true
DisplayManager._1.authorize: true
DisplayManager._2.authorize: true
DisplayManager._0.setup: /etc/X11/xdm/Xsetup_0
DisplayManager._0.startup: /etc/X11/xdm/GiveConsole
DisplayManager._0.reset: /etc/X11/xdm/TakeConsole
DisplayManager._1.setup: /etc/X11/xdm/Xsetup_0
DisplayManager._1.startup: /etc/X11/xdm/GiveConsole
DisplayManager._1.reset: /etc/X11/xdm/TakeConsole
DisplayManager._2.setup: /etc/X11/xdm/Xsetup_0
DisplayManager._2.startup: /etc/X11/xdm/GiveConsole
DisplayManager._2.reset: /etc/X11/xdm/TakeConsoleThis enables me to run gnome and kde at the same time on a single computer with third GUI terminal spare.
- Start X-server on the local machine, e.g.
xinit
- From the x-terminal give the remote machine the permission to display on your local screen:
xhost name_of_the_remote_server
In the really secure environment of my house, I could even give all servers the permission to display on my screen using (don't do it when connnected to the Internet):
xhost +
- Telnet the remote server.
- Start an X-program on the remote server directing the display on your local screen, for example, you may start a window manager:
startkde -display local_machine_name:0.0 &
The symbol "&" puts the command in the background, so that your telnet window is still available to you.
The 0.0 means "display zero, screen 0", which is your first screen on the first display and makes sense since you can have many concurrent sessions of X running on your computer with Linux.
You don't have to specify the "-display" option if your environment variable DISPLAY specifies the correct location on your current terminal, which is the case on my systems by default, but not on everybody else's as I am told. You can check your DISPLAY setting using:
echo $DISPLAY
- After I finish my remote X session, I restore the access control to my X-server using:
xhost -name_of_the_remote_server
or
xhost -
Example. This sequence of commands will run Netscape on the remote machine called marie, directing the display to the X-server with X-windows manager which runs on the local machine hacker:
startx
xhost marie
telnet marie
[login]
netscape -display hacker:0.0 &
[do my stuff]
[logout]
xhost -marie
In principle, you can run a program on any computer on the network, and display the output on any other (not necessarily the one you are sitting at).
I use remote X-windowing a lot to run fat programs (kde, Word Perfect 8, and Netscape) on a slim machine (486-33, 8 MB mem) which would not be able to run those by itself. It is also a convenient and fast way to work with files on a remote system for which the nfs mount is not set up.X-windows was designed to run remotely over the network. Remote X-windowing is a very powerful tool, on top of being quite a pleasant experience. Try it out.
You can even run a program on a remote Linux (or any Unix) computer and redirect the display to a local MS Windows machine if you install an X-windowing program for MS Windows. For a good overview of choices, see: http://www.linuxworld.com/linuxworld/lw-2000-09/lw-09-legacy_1.html
Red Hat 6.2 comes with TrueType font server but no TrueType fonts. You can install your own TrueType fonts though. Here is how I did it.0. From under K-menu (KDE), select "System"-"Font Manager" (or equivalent) and note what fonts you have installed.
1. Check if the "free type" font server is installed:
rpm -q freetype
This queries (option "q") the rpm package manager for the package "freetype". If the package is installed, go to next step. If "freetype" is not installed, install it now from your distribution CD. "freetype" was installed on my system after a "full" RH installation.
2. As root, make a directory that is to hold your TrueType fonts:
cd /usr/X11R6/lib/X11/fonts
mkdir TrueTypeThis directory is referred to in the configuration file /etc/X11/XF86Config so make sure that the name of the directory exactely as shown. If you would like to name the directory differently, you have to edit /etc/X11/XF86Config and make appropriate adjustments. My "default installation" RedHat contained such a line:
FontPath "/usr/X11R6/lib/X11/fonts/TrueType"
3. As root, copy your *.ttf files from the original location to the TrueType font directory that you just created. I took some TrueType from my MS Windows partition, you may need to use different source location:
cd /usr/X11R6/lib/X11/fonts/TrueType
cp /mnt/dos_hda1/windows/fonts/my_private_fonts/*.ttf .Before copying any fonts, make sure that it does not violate your licence agreement.
4. As root, run the following commands:
cd /usr/X11R6/lib/X11/fonts/TrueType
ttmkfdir> fonts.dir
cp fonts.dir fonts.scale5. Close all X-windows applications and log out from X-windows.
6. As root, restart your X-font server (or reboot your computer:
/etc/rc.d/init.d/xfs stop
/etc/rc.d/init.d/xfs start7. Log back to your KDE, and from under K-menu, select "System"-"Font Manager" to see if the fonts installed correctly.
This parts is based on: http://www.computerbits.com/archive/20001000/linux0010.htm
Under X-windows, use mouse: highlight the text to be copied, switch to the location where to copy, and press the middle mouse button to paste. This works nice and fast, as long as during the switching you don't disselect the original text.Some GUI applications do support MS-Windows-style "copy-paste": Select the text. Use the menu item "edit"-"copy". Switch to the location where to copy. Use the menu item "edit"-"paste".
You can also use the cut-paste history. Try running klipper (in X-terminal, KDE).
To capture the content of a window or the entire screen to a graphics file, I use knapshot.
To catch contents of a text console (outside of the GUI console), I could use in X terminal:
cat /dev/vcs1
and then copy and paste whatever I need from the X terminal with a mouse.
The text-based consoles support mouse if you run the gpm daemon. Type gpm to test it--it will run fine if your mouse is appropriately configured. You may want to run mouseconfig to configure your mouse first. To have gpm run automatically on system startup and stay running, select the gpm daemon using the ntsysv utility. Use gpm exactly the same as the GUI cut-paste: highlight the text to be copied, move the mouse cursor to the "copy to" location, and press the middle mouse button to paste.
Go to Part: 4.4 - Basic Configurations (Pinter, soundcard...)