VNCserver - Redhat

This is a discussion on VNCserver - Redhat ; Hi, I tried to setup VNC server. If I log in under the user x1, I can start the vncserver with vncserver:1 Now, I wish to start into a script, vncserver :1 (into Rc.d/rc.local) Seems to work. but how does ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: VNCserver

  1. VNCserver


    Hi,

    I tried to setup VNC server.

    If I log in under the user x1,
    I can start the vncserver with vncserver:1

    Now, I wish to start into a script, vncserver :1 (into Rc.d/rc.local)

    Seems to work. but how does the script know, under which username, I
    wich to start ???
    Last time, It start vncserver, under Root !!!?!?!?!?! (Not what I want..)

    In my rc.local, I just added :
    vncserver :1

    Thanks

  2. Re: VNCserver

    Steve wrote:
    > Hi,
    >
    > I tried to setup VNC server.
    >
    > If I log in under the user x1,
    > I can start the vncserver with vncserver:1
    >
    > Now, I wish to start into a script, vncserver :1 (into Rc.d/rc.local)
    >
    > Seems to work. but how does the script know, under which username, I
    > wich to start ???
    > Last time, It start vncserver, under Root !!!?!?!?!?! (Not what I want..)
    >
    > In my rc.local, I just added :
    > vncserver :1
    >
    > Thanks


    You need to use the 'su' or 'sudo' command to force the tool to start as
    another user.

  3. Re: VNCserver

    On 2008-04-05, Steve wrote:

    > I tried to setup VNC server.
    >
    > If I log in under the user x1,
    > I can start the vncserver with vncserver:1
    >
    > Now, I wish to start into a script, vncserver :1 (into Rc.d/rc.local)
    >
    > Seems to work. but how does the script know, under which username, I
    > wich to start ???
    > Last time, It start vncserver, under Root !!!?!?!?!?! (Not what I want..)


    If you invoke vncserver as the user whose environment you wish to use,
    simply attaching to that screen and authenticating will give you that
    environment. If you want this process to start automatically you could
    use e.g. "su -l [username] -c vncserver :1" from rc.local to do so.

    Otherwise, you can also configure vncserver to launch xdm|gdm|kdm to
    login under whatever user you happen to need at the time. This can be
    managed by inetd or xinetd to start and stop the vncserver as needed.

    --

    John (john@os2.dhs.org)

+ Reply to Thread