Re: 2 XServers on 1 terminal?

1998-10-21 Thread servis
*- Alexander Kushnirenko wrote about 2 XServers on 1 terminal?
| Hi,
| 
| Could I run 2 X servers on one comupter?  So that Alt-F7 correspond to first 
| session, and Alt-F8 for the second session?  There are 2 people working on 
one 
| computer, and we don't want to mess each other X sessions.
| 
| Thanks,
| Sasha.
| 
| 

If you are using xdm edit /etc/X11/xdm/Xservers so you have one line
for the first display and one line for the second display.

:0 local /usr/X11R6/bin/X vt7
:1 local /usr/X11R6/bin/X vt8

If you are using startx then you can do

startx -- :0

for the first display, and

startx -- :1

for the second.


-- 
Brian 
-
Never criticize anybody until you have walked a mile in their shoes,  
 because by that time you will be a mile away and have their shoes. 
   - unknown  

Mechanical Engineering  [EMAIL PROTECTED]
Purdue University   http://www.ecn.purdue.edu/~servis
-


SOLVED: 2 XServers on 1 terminal?

1998-10-21 Thread Alexander Kushnirenko
Hi, 

Disregard my previous message.  I already learned how to do it.

 Could I run 2 X servers on one comupter?  So that Alt-F7 correspond to first 
 session, and Alt-F8 for the second session?  There are 2 people working on 
 one 
 computer, and we don't want to mess each other X sessions.

Sasha.



Re: SOLVED: 2 XServers on 1 terminal?

1998-10-21 Thread Jeff Noxon
On Tue, Oct 20, 1998 at 06:16:40PM -0500, Alexander Kushnirenko wrote:
 Hi, 
 
 Disregard my previous message.  I already learned how to do it.
 
  Could I run 2 X servers on one comupter?  So that Alt-F7 correspond to 
  first 
  session, and Alt-F8 for the second session?  There are 2 people working on 
  one 
  computer, and we don't want to mess each other X sessions.
 
 Sasha.

How?

Thanks for the enlightenment,

Jeff


Re: SOLVED: 2 XServers on 1 terminal?

1998-10-21 Thread Alexander Kushnirenko
Hi, Jeff!

   Could I run 2 X servers on one comupter?  So that Alt-F7 correspond to 
   first 
   session, and Alt-F8 for the second session?  There are 2 people working 
   on one 
   computer, and we don't want to mess each other X sessions.
 How?
 
It's actually described in details in file /etc/X11/xdm/Xservers
.
# Example:
# :0 local /usr/X11R6/bin/X :0 vt9 -bpp 16
# :1 local /usr/X11R6/bin/X :1 vt10 -bpp 8
  Just uncomment those 2 lines.  I found it reading in 
/usr/doc/X11/README.Debian (They turn out to be quite useful for most of 
configuration problems).

Sasha.

 Thanks for the enlightenment,
 
 Jeff




Re: 2 XServers on 1 terminal?

1998-10-21 Thread E.L. Meijer \(Eric\)
 
 Hi,
 
 Could I run 2 X servers on one comupter?  So that Alt-F7 correspond to first 
 session, and Alt-F8 for the second session?  There are 2 people working on 
 one 
 computer, and we don't want to mess each other X sessions.
 

Yes.  To add another session, you could go to a text console, and type

startx -- :1

and you have a second session under F8.  If you want xdm to run two
sessions, I think you should add something to /etc/X11/xdm/Xservers,
though I'm not certain what.  You will only want to do this on a
machine with plenty memory though!  Also note that the DISPLAY variable
for the second session should be my.machine.somewhere:1.0 if you have
to set it manually.

HTH,
Eric

-- 
 E.L. Meijer ([EMAIL PROTECTED])  | tel. office +31 40 2472189
 Eindhoven Univ. of Technology | tel. lab.   +31 40 2475032
 Lab. for Catalysis and Inorg. Chem. (TAK) | tel. fax+31 40 2455054


Re: 2 XServers on 1 terminal?

1998-10-21 Thread Joey Hess
E.L. Meijer Eric wrote:
 Yes.  To add another session, you could go to a text console, and type
 
 startx -- :1

For what it's worth, I have a small program that allows you to type instead,
startx -- `getdisplay` -- that's useful for things like launching a new X
session from a menu, or when you're not sure what's a valid free display
number. I'm sure it has race conditions and things, but it works for me.
Attached.

-- 
see shy jo
/* by Wakko */


#include unistd.h
#include string.h
#include netinet/in.h
#include stdio.h
#include errno.h
#include sys/socket.h

/* well, not what you'd think, but it's a start! */
int get_first_x_display()
{
 int sock, port;
 struct sockaddr_in sin;

 for (port = 6000;port  8000;port++)
 {
  /* Create a port to listen for the host. */
  sock = socket(AF_INET, SOCK_STREAM, 0);
  if (sock  0)
  {
   perror(Can't connect socket);
   exit(0);
  }
  /* Initialize socket address. */
  memset(sin, 0, sizeof(sin));
  sin.sin_family = AF_INET;
  sin.sin_addr.s_addr = INADDR_ANY;
  sin.sin_port = htons(port);
  /* Bind the socket to the address. */
  if (bind(sock, (struct sockaddr *)sin, sizeof(sin)) = 0)
  {
   close(sock);
   return port - 6000;
  }
  close(sock);
 }
 return -1;
}  

void main()
{
 printf(:%d\n, get_first_x_display());
}


2 XServers on 1 terminal?

1998-10-20 Thread Alexander Kushnirenko
Hi,

Could I run 2 X servers on one comupter?  So that Alt-F7 correspond to first 
session, and Alt-F8 for the second session?  There are 2 people working on one 
computer, and we don't want to mess each other X sessions.

Thanks,
Sasha.