> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> I'm trying to start a vnc server via an expect script which
> does a "su -
> <another_username>".
> It looks pretty simple, but although the vnc server starts it
> seems it does not
> run execute xstartup properly and I get the grey background.
> I do not think it is a problem with the xstartup script
> itself since when
> execute the su command form a terminal everything works perfectly.
>
> Here is roughly what I'm doing :
>
> | #!/usr/local/bin/expect
> |
> | spawn su - $username -c "/path/to/vncserver"
> | expect "Password: "
> | send "$password\r"
I know this will not work. The standard system call to ask for a password is
forced not to work from things like expect scripts. This is an ongoing
struggle between the 'get-password-system-call' and tools like expect. Since
the get-password-system-call is more close to the system, it will win in
most cases. I bet the next somehow works: Start the expect sctipt and at the
moment the password is asked, type the password with the keyboard. I fond
this working for several unix variants.
> | expect eof { puts "Received EOF." }
> | exit 0
>
I don't know what the goal of this all is. There are several ways to
automatically login. With gnome and kde, you can do some controlled
automatic login if it is used on a predefined display. See if the next works
for you: `Xvnc :4 -query localhost`. (if this does not work, activate XDMCP
as described on http://www.sourcecodecorner.com/articles/vnc/linux.asp .)
Then (for gnome display manager) start gdmconfig and setup some automatic
login.
Just some ideas. Since I dont have usage for this, I don't use it and hence
cannot help on details.
CBee
_______________________________________________
VNC-List mailing list
[EMAIL PROTECTED]
http://www.realvnc.com/mailman/listinfo/vnc-list