Miroslav,
That works great. Can you tell me if it can be taken a step further and run
something in that xterm window? For example, run a shell script that loads a
java program in that window? Or just load the java program directly?
Thanks.
----- Original Message -----
From: "LUPTAK,MIROSLAV (HP-Slovakia,ex1)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 26, 2001 11:18 AM
Subject: RE: Autostart additional process
> Hi, James.
>
> Once the vncsession is started and you know the display number, you can
run
> on that vnc session any X application if you first export the DISPLAY
> variable with correct value.
>
> In the script from James, this could be done by
> .....
> if eval $vnc_cmd; then
> echo "DONE"
> else
> echo "***VNC FAILED***"
> fi
> # Run xterm on the vnc session on Linux
> su -l $user -c "DISPLAY=:$disp xterm &"
> # For HP-UX, use "-" instead of "-l"
> # su - $user -c "DISPLAY=:$disp xterm &"
> disp=$(( $disp + 1 ))
> .....
>
> Regards,
>
> Miroslav Luptak
>
> > -----Original Message-----
> > From: James Pifer [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, September 26, 2001 15:21
> > To: [EMAIL PROTECTED]
> > Subject: Re: Autostart additional process
> >
> >
> > Anyone have any ideas here? Is this possible? I want to have
> > an additional
> > process start in another xterm window on a vnc session that is already
> > created. This way it's starts on boot (following the vnc
> > session) and when I
> > vnc to that session, it's already there and running.
> >
> > Thanks,
> > James
> >
> > ----- Original Message -----
> > From: "James Pifer" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, September 25, 2001 2:24 PM
> > Subject: Autostart additional process
> >
> >
> > > I'm using the following script that I found on the mailing
> > list archive
> > for
> > > autostarting a VNC session for root. Is there a way for me
> > to start an
> > > application in that session as well? How about a second
> > xterm window?
> > >
> > > vnc_users="root"
> > > disp=1
> > > for user in $vnc_users
> > > do
> > > echo -e "Starting VNC server for $user (display no.
> > :$disp)...\c"
> > > vncstart="/usr/bin/vncserver :$disp -depth 16 -geometry
> > 1024x768"
> > > vnc_cmd="su -l $user -c \"$vncstart\" >/dev/null"
> > >
> > > if eval $vnc_cmd; then
> > > echo "DONE"
> > > else
> > > echo "***VNC FAILED***"
> > > fi
> > >
> > > disp=$(( $disp + 1 ))
> > > done
> > >
> > > Thanks,
> > > James
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, mail [EMAIL PROTECTED] with the line:
> > > 'unsubscribe vnc-list' in the message BODY
> > > See also: http://www.uk.research.att.com/vnc/intouch.html
> > >
> > ---------------------------------------------------------------------
> > ---------------------------------------------------------------------
> > To unsubscribe, mail [EMAIL PROTECTED] with the line:
> > 'unsubscribe vnc-list' in the message BODY
> > See also: http://www.uk.research.att.com/vnc/intouch.html
> > ---------------------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, mail [EMAIL PROTECTED] with the line:
> 'unsubscribe vnc-list' in the message BODY
> See also: http://www.uk.research.att.com/vnc/intouch.html
> ---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, mail [EMAIL PROTECTED] with the line:
'unsubscribe vnc-list' in the message BODY
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------