a sort of exam...
linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Sun Jan 8 21:24:50 UTC 2006
> Right, I was given an opportunity to perform a test for a new possible
> job. My question is of the kind of young age students ask: please help
> me to solve this problem ;)
>
> Since however my life is largely at stake (yes) I do not hesitate to ask
> for help. I promisse: I will write that down that the answer was due to
> the help from TLUG :)
>
> OK, here the question is, with explanation (I cite everything exactly as
> I read):
>
> ==citation starts==
>
> Question: At the foundation of X server Clients how do you
> "PROGRAMMATICALLY" create and run multiple and individual X window
> instances?
>
> Explanation: What we nees is to create a multiple instance of X server
> simultanous on the same computer. Each instance should use a different
> Display. How create them PROGRAMMATICALLY and manage each session.
> Technically in gross steps, how would you create/implement the basis of
> a terminal server using X.
>
> ==citation ends==
>
> No, I do not know what "programmatically" means. But the answer must be
> made correct any way.
>
> Any ideas how to approach the problem? there is no time left...
>
> Kind,
> zb.
> --
> The Toronto Linux Users Group. Meetings: http://tlug.ss.org
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
>
Well, from the command line you issue "startx -- :#" where "#" is the X
server number ('0' starts with gui run levels so generally you want to
start with '1' and work up). How to do this "programatically" depends
largely on what program you are using.
For example, from perl I might issue
#!/path/to/perl
use FileHandle;
my $open_x = new FileHandle;
if ($open_x->open("startx -- :1 2>&1 |") )
{
# It opened, you can read the output.
}
else
{
die "Gak! Error was: [$!];
}
$open_x->close;
I must warn though that I have no idea how you would control the X
session once it is open... I use web interfaces for my programs so for
that, you'll need someone else's advice.
HTH
Madison
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list