3 Working with X-windows
3.1 How do I install kde on RedHat 5.2?
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 latest RedHat (6.0) includes kde (and 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
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.
72
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 . 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 requierd 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:
73
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.
3.2 How do I setup video card, monitor and mouse for the X-server?
This should be set-up during your RH5.2 Linux 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 (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 and re-check your monitor sync
frequencies. Running wrong frequencies can be bad for your monitor.
If you really have problems, set up a basic vga (640x480) server first. You can fine-tune it later, after
you get some understanding of how things work on your system.
3.3 How to X-window remotely?
- 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:
xhost +
- Telnet the remote server.
74
- 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.
3.4 Can I have multiple sessions of X running at the same time?
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
to switch to display 0,
to second screen, etc. up to 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:
fvwm2 (to run fvwm2)
startkde (to run kde)
afterstep (to run afterstep)
fvwm (to run fvwm)
AnotherLevel (to run AnotherLevel)
gnome-session (to run Gnome)
Of course the alternative windows manager will run only if it is installed on your system. The above
windows managers are available on your RH5.2 CD for you to decide if you want them (with the
exception of Gnome, which is not present on RH5.2 but is the default on RedHat 6.0 and 6.1). 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.0 and 6.1
contain both major X-windows systems, Gnome and KDE.
3.5 Can I have a GUI login prompt?
To start up your X-server automatically on the system start-up and display a graphical login prompt,
you have to edit just one character in the file /etc/inittab . This file specifies something like:
id:3:initdefault:
Change it to
id:5:initdefault:
76
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 with a command like this (as root):
init 6
which will reboot your computer.
Monetize your web traffic on mobile today.Earn highest revenues for your mobile web.
No comments:
Post a Comment