[CentOS] Unablce to open VNC

Tue Feb 6 17:52:19 UTC 2007
Theo Band <theo.band at xanadu-wireless.com>

Guillermo Garron wrote:
> On 2/5/07, William L. Maltby <CentOS4Bill at triad.rr.com> wrote:
>> On Mon, 2007-02-05 at 15:43 -0400, Guillermo Garron wrote:
>> > On 2/3/07, Todd Cary <todd at aristesoftware.com> wrote:
>> > > Theo -
>> > ><snip>
>>
>> > > Todd
>> >
>> > I really like your aproach to this, so i wrote a small guide, to do
>> > it, you can read it here.
>> >
>> > http://linux.go2linux.org/?q=node/15
>>
>> Excellent! However, if some newer users follow the guide, they may
>> wonder why the lines subsequent to the "exec ..." have no effect. To
>> forestall questions you might want to mention that.
> Can you please help with that, 'cause I could be one of those users
> asking that :)
>
> regards,
>
>
exec means replace the current shell by the command specified. 
Everything that follows is therefor not executed. If you remove the exec 
then it will work as well, and the commands after will get executed in 
sequence _after_ the vncserer dies. This might be handy is some 
occasions like starting and stopping ssh agents:

cat ~/.vnc/xstartup
#!/bin/sh
unset SESSION_MANAGER
eval $(ssh-agent)
/etc/X11/xinit/xinitrc
kill $SSH_AGENT_PID
exit

Theo