1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371
|
<!--startcut ======================================================= -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<META NAME="generator" CONTENT="lgazmail v1.4F.u">
<TITLE>The Answer Gang 80: Starting many X sessions</TITLE>
</HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000"
LINK="#3366FF" VLINK="#A000A0">
<!--endcut ========================================================= -->
<P> <hr>
<!--startcut ======================================================= -->
<CENTER>
<!-- *** BEGIN navbar *** -->
<!-- *** END navbar *** -->
</CENTER>
</p>
<!--endcut ========================================================= -->
<!--startcut ======================================================= -->
<P> <hr>
<!-- begin tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::-->
<p align="center">
<table width="100%" border="0"><tr>
<td align="right" valign="center"
><IMG ALT="" SRC="../../gx/navbar/left.jpg"
WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="middle" border="0"
><A HREF="../index.html"
><IMG SRC="../../gx/navbar/toc.jpg" align="middle"
ALT="[ Table Of Contents ]" border="0"></A
><A HREF="../lg_answer.html"
><IMG SRC="../../gx/dennis/answertoc.jpg" align="middle"
ALT="[ Answer Guy Current Index ]" border="0"></A></td>
<td align="center" valign="center"><A HREF="../lg_answer.html#greeting"><img align="middle"
src="../../gx/dennis/smily.gif" alt="greetings" border="0"></A>
<A HREF="../tag/bios.html">Meet the Gang</A>
<A HREF="1.html">1</A>
<A HREF="2.html">2</A>
<A HREF="3.html">3</A>
<A HREF="4.html">4</A>
<A HREF="5.html">5</A>
<A HREF="6.html">6</A>
<A HREF="7.html">7</A>
</td>
<td align="left" valign="center"><A HREF="../../tag/kb.html"
><IMG SRC="../../gx/dennis/answerpast.jpg" align="middle"
ALT="[ Index of Past Answers ]" border="0"></A
><IMG ALT="" SRC="../../gx/navbar/right.jpg" align="middle"
WIDTH="14" HEIGHT="45" BORDER="0"></td></tr></table>
</p>
<!-- end tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::::-->
<!--endcut ========================================================= -->
<P> <hr> <P>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<center>
<H1><A NAME="answer">
<img src="../../gx/dennis/qbubble.gif" alt="(?)"
border="0" align="middle">
<font color="#B03060">The Answer Gang</font>
<img src="../../gx/dennis/bbubble.gif" alt="(!)"
border="0" align="middle">
</A></H1>
<BR>
<H4>By Jim Dennis, Ben Okopnik, Dan Wilder, Breen, Chris, and...
(<a href="tag/bios.html">meet the Gang</a>) ...
the Editors of Linux Gazette...
and You!
<br>Send questions (or interesting answers) to
The Answer Gang
for possible publication
(but read the <a href="../tag/ask-the-gang.html">guidelines</a> first)
</H4>
</center>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<p><hr><p>
<!-- begin 3 -->
<H3 align="left"><img src="../../gx/dennis/bbubble.gif"
height="50" width="60" alt="(!) " border="0"
>Starting many X sessions</H3>
<p align="right"><strong>Answered By Ashwin M, Heather Stern, Jay R. Ashworth, Chris Gianakopoulos, Robos
</strong></p>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ashwin]
Hi,
</blockQuote>
<blockQuote>
I am a relative newbie to Linux, hence this tip may be common or may
have been already published.
</blockQuote>
<blockquote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather] This is a particularly clear description of it, and the thread turned
a curious direction as well. Welcome to the pages of The Answer Gang,
Ashwin.
</blockquote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ashwin]
Yes! You can have more than one X session running at the <em> _same</em> time! By
default your X session will be running on virtual terminal 7 (that is
why you use Ctrl-Alt-F7 to get to it).
</blockQuote>
<blockQuote>
To start a new X session get to a terminal session (F1 - F6) and type
"startx -- :1". A new X session starts up. Now to go back to the older X
session, use Ctrl-Alt-F7. For the new X session use Ctrl-Alt-F8.
</blockQuote>
<blockQuote>
(For more X sessions use the next numbers after 1 like 2,3 and so on.
They don't have to be in order like 1 next 2 and so on. No matter what
number you use here the Ctrl-Alt-Fx number will be assigned the next
available number after 7)
</blockQuote>
<blockquote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather] Strictly speaking, the first available open terminal; on most major
distro setups that's 7, after your 6th text console, but if you're an
oddball like me who uses enough text consoles that you set up, say, 10,
then it would show up on console 11 instead.
</blockquote>
<blockquote>Of course if you do that too, make sure Xdm or its cousins don't think they
are supposed to take a console used by a text getty.
</blockquote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ashwin]
Now, why would anyone need another X session? Some reasons could be -
</blockQuote>
<blockQuote><ul>
<!-- *) To use different window managers at the same time like -->
<LI>To use different window managers at the same time like
<!-- KDE and GNOME. -->
KDE and GNOME.
<!-- *) To run X sessions logged in as different users. -->
<LI>To run X sessions logged in as different users.
<!-- *) To try out things with the XFree86 system (like fonts and such) -->
<LI>To try out things with the XFree86 system (like fonts and such)
</ul></blockQuote>
<blockQuote>
You may think "why would I need this?". But, once you know this trick
you will find new ways to use it for your work
<IMG SRC="../../gx/dennis/smily.gif" ALT=":-)"
height="24" width="20" align="middle">
</blockQuote>
<blockQuote>
Note:
I found this not to work on some (very few) systems with old video cards
and less VRAM.
</blockQuote>
<blockQuote>
thanks,
Ashwin
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Chris G]
That's a cool tip. I just tried it out, and it works with Version 3.3.6 of
X.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
My favorite reasons to run multiple X sessions on the same machine are:
</blockQuote>
<blockQuote><ul>
<!-- *) Jim and I are both using the machine... so we want our own X session -->
<LI>Jim and I are both using the machine... so we want our own X session
<!-- each. Since we're running in different chroot spaces (for an -->
each. Since we're running in different chroot spaces (for an
<!-- experiment) on one of the machines around here that's kind of handy. -->
experiment) on one of the machines around here that's kind of handy.
<!-- *) to have different native bit depths, also for experiment. Happily -->
<LI>to have different native bit depths, also for experiment. Happily
<!-- getting to be rare, but there is occasionally software that is -->
getting to be rare, but there is occasionally software that is
<!-- happiest only at one color depth. If you're designing graphics -->
happiest only at one color depth. If you're designing graphics
<!-- for use at multiple color depths I swear this is the fastest way to -->
for use at multiple color depths I swear this is the fastest way to
<!-- tell which colors will wash out. -->
tell which colors will wash out.
</ul></blockQuote>
<blockQuote>
In the modern era you <EM>could</EM> also
use Xnest to provide the reduced depth to the stupid app, but it's
less confusing to do the above than to make sure you're running
something inside the nest.
</blockQuote>
<blockQuote>
Not that it's hard mind you - make the nest's first client an xterm with
a custom color fg and bg, then launch things you want in the nest from
the special xterm.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Robos]
Well, I knew this, but did you know that the keyboard and mouse are
bound to one? Meaning you can't - like I tried - run two xsessions on
two grafik cards and share the keyboard between them. This is only
possible if you use a ps/s keyboard and a usb version. I want to do
that, but I haven't got the usb keyboard yet that I would like: small
form factor (84 keys), english layout (I'm in germany) and usb...
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Jay]
You are <EM>supposed</EM> to be able to do that.
</blockQuote>
<blockQuote>
And indeed, a quick test proves that you can.
</blockQuote>
<blockQuote>
RH 7.1, and whichever X ships with that. I did Ctrl-Alt-F1 to a text
login, logged in as root, did 'startx -- :1', and was whisked over to
tty8, where I got a <A HREF="http://www.kde.org/">KDE</A> desktop as root (that being the default choice
on my laptop).
</blockQuote>
<blockQuote>
Ctrl-Alt-F7 switched me right back to the desktop I'm on (KDE under
KDM, logged in as myself), and I could C-A-F8 right back to the other
one; mouse and keyboard worked in both.
</blockQuote>
<blockQuote>
And indeed they should: X switches to a free vt before it binds the
hardware, and what it <EM>gets</EM> is the virtualization of the hardware that
it produced by the multi-console driver. It doesn't bind directly to
the hardware.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Robos]
Well, a misunderstanding and a wrong memory on my part (I run
memtest86 later on me, it always takes so long...). I meant that I
wanted to run two xservers on two graphic cards and have two keyboards
too. My motivation: Running quake3 and chatting with my pals in irc at
the same time. Thought about either two xservers or one xserver and
one mga framebuffer. But, as said, no usb keyboard yet.
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Jay]
What is <EM>hard</EM> is having two X servers on different physical display
adapters <EM>with separate keyboards</EM>. Hard, but often very useful.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Robos]
And cheaper than two computers, not to mention the noise reduction.
</STRONG></P>
<blockquote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather] While I had interpreted this confusion as wanting both X servers to
listen to the keystrokes in tandem, implying that they'd both be
grabbing keyboard events from the same pool. Which given his usage
example, of course is not what you'd want
<IMG SRC="../../gx/dennis/smily.gif" ALT=";)"
height="24" width="20" align="middle"> I could see some
vague reason why somebody might want to do it (test the same app on two
video cards at once) and I can certainly imagine the USB model of how
devices work being much better for handling it.
</blockquote>
<blockquote>X 4 lets you designate entirely different screen layouts to be stored
in its config file, and you can specify which one to use by passing
-layout "layout[1]" (or whatever ID you named it) down to X. Of
course your usual methods of starting X may try to protect you from
doing this, but with startx it's pretty easy:
startx -- -layout secondhead :2
</blockquote>
<blockquote>With X 3.3.x you probably have to just keep seperate config files.
</blockquote>
<blockquote>If anyone out there is crazy enough to be trying this, let us know
how it works out for you. And then there's always the Linux
Terminal Server Project:
<A HREF="http://www.ltsp.org"
>http://www.ltsp.org</A>
</blockquote>
<blockquote>Or better yet the K-12 Linux Terminal Server Project:
<A HREF="http://k12ltsp.org/contents.html"
>http://k12ltsp.org/contents.html</A>
</blockquote>
<!-- end 3 -->
<P> <hr> </p>
<!-- *** BEGIN copyright *** -->
<H5 align="center">This page edited and maintained by the Editors
of <I>Linux Gazette</I>
<a href=""
>Copyright ©</a> 2002
<BR>Published in issue 80 of <I>Linux Gazette</I> July 2002</H5>
<H6 ALIGN="center">HTML script maintained by
<A HREF="mailto:star@starshine.org">Heather Stern</a> of
Starshine Technical Services,
<A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
</H6>
<!-- *** END copyright *** -->
<!--startcut ======================================================= -->
<P> <hr>
<!-- begin tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::-->
<p align="center">
<table width="100%" border="0"><tr>
<td align="right" valign="center"
><IMG ALT="" SRC="../../gx/navbar/left.jpg"
WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="middle" border="0"
><A HREF="../index.html"
><IMG SRC="../../gx/navbar/toc.jpg" align="middle"
ALT="[ Table Of Contents ]" border="0"></A
><A HREF="../lg_answer.html"
><IMG SRC="../../gx/dennis/answertoc.jpg" align="middle"
ALT="[ Answer Guy Current Index ]" border="0"></A></td>
<td align="center" valign="center"><A HREF="../lg_answer.html#greeting"><img align="middle"
src="../../gx/dennis/smily.gif" alt="greetings" border="0"></A>
<A HREF="../tag/bios.html">Meet the Gang</A>
<A HREF="1.html">1</A>
<A HREF="2.html">2</A>
<A HREF="3.html">3</A>
<A HREF="4.html">4</A>
<A HREF="5.html">5</A>
<A HREF="6.html">6</A>
<A HREF="7.html">7</A>
</td>
<td align="left" valign="center"><A HREF="../../tag/kb.html"
><IMG SRC="../../gx/dennis/answerpast.jpg" align="middle"
ALT="[ Index of Past Answers ]" border="0"></A
><IMG ALT="" SRC="../../gx/navbar/right.jpg" align="middle"
WIDTH="14" HEIGHT="45" BORDER="0"></td></tr></table>
</p>
<!-- end tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::::-->
<!--endcut ========================================================= -->
<P> <hr>
<!--startcut ======================================================= -->
<CENTER>
<!-- *** BEGIN navbar *** -->
<!-- *** END navbar *** -->
</CENTER>
</p>
<!--endcut ========================================================= -->
<!--startcut ======================================================= -->
</BODY></HTML>
<!--endcut ========================================================= -->
|