Re: how to start X service

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Might be helpful to you.
http://www.faqs.org/docs/lnag/lnag_xwindows.html
 4.3.6 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 <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

 4.3.7 Can my sister have second GUI login prompt so she does not have to
kill my X-session to start hers?

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 vt7

Having 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 :2

and /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/TakeConsole

This enables me to run gnome and kde at the same time on a single computer
with the third GUI terminal spare.

 4.3.8 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 (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

 Nilesh
-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subjecthttps://www.redhat.com/mailman/listinfo/redhat-list


[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux