| Article | ||
| Contents
|
How to run multiple X-Servers on the same machine Introduction Linux users usually are used to running mutliple desktops on their Window Manager. Typical linux users have atleast 2-4 desktops on their WM(Window Manager). Let's say that you have a 14" inch monitor which gives you limited desktop space even though you have more than one desktop, what would you do ? . That's where multiple X-Servers can come handy. Imagine if you could run Gnome on one tty (terminal), Netscape on one tty and Window Maker on another !. The result ?, you'll have about 2-4 desktops on Gnome, a seperate X-Server running netscape for your browsing and more desktops to work with on Kde !!. Phew, that would be great, wouldn't it ?. This article will help you do just that and more. Read on... Procedure There is no need for any extra software or hardware to be installed for utilising this facility, all you need is a running X-Server. At first check your current display (ie. on which display is X set to start) by issuing the command # echo $DISPLAY (Note : here the # denotes the prompt which you are using) This should give you the current display on which you will be running your X-Server. Now we need to start the X-server by issuing the command # xinit /usr/X11R6/bin/XF86_SVGA :1 This will now start two X-Servers starting from maybe vt7 to vt8 (depending upon your distribution). Here one should substitute their X-Server (ie. SVGA, VGA, FbDev etc) according to their display card (XF86_SVGA denotes the SVGA server). Now when you do a Alt+F7 and Alt+F8 we will see two blank X-Servers running, don't worry when I mean blank I mean that you will get only a display with the X cursor. You can even start a third X-Server by doing a # XF86_SVGA vt9 :3 (just an example, can be changed ) This server will go to display 3 on tty9 and again display a blank screen with an X cursor. So now in this case you have 3 X-servers running on vt7, vt8 and vt9. If you have done this successfully, you are all set to execute your X programs !. Execution Everytime you need to run an X program, you need to specify to which display it should go for it's execution. Let's say you need to run Netscape on display 1, you have to do a #export DISPLAY=:1.0 (The syntax is host:display, in this case localhost:1.0) The current display will be set to display 1 for execution. To check if this is correct you can issue #echo $DISPLAY (the result should say something like :1.0 ) To run Netscape now on display 1. #netscape & (Here '&' specifies that this process should be run in background) That's it, now if you check display 1 by doing a Alt+F7 (this varies) you will se netscape running without a UI (User Interface), that's because this is a vanilla X-Server just running an X program. Similarly you could run Gnome on display 2 #export DISPLAY=:2.0
Or run Kde on display 3 #export DISPLAY=:3.0
Please do remember that you need to specify the display value always to tell on which display the specified program should go to and get executed. That's all there is to it !. Sit back and enjoy the convinience of multiple X-Servers and more desktop space to work with, does bring some life in your machine doesn't it. Some people think that these multiple X-Servers consume a lot of memory, but to my knowledge this doesn't happen. These setup has been done on a Cyrix MII - PR 233 MX with 48 MB ram, 10.2 GB HDD, infamous SiS 6125c display adapter and Window Maker. Don't worry about old display adapters as i got this setup running even on a SiS card !. Have fun and do mail me if you need more help on this topic. Please sign the guestbook with your comments, errata, suggestions etc. if any. Also excuse my grammar as this article was written in a hurry, Awaiting your comments.......
Praveen
Kannan
Back to Top |
|