Find the answer to your Linux question:
Results 1 to 7 of 7
I installed VNC on my CentOS 5.6 machine and I知 able to remote in without a problem from my Windows 7 laptop. However, once connected, I知 presented with an RDP ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2011
    Posts
    27

    Help with VNC access type (RDP vs. Desktop Control)


    I installed VNC on my CentOS 5.6 machine and I知 able to remote in without a problem from my Windows 7 laptop. However, once connected, I知 presented with an RDP type desktop. I want to be able to take remote control and see what the user at the other end see痴, like pcAnywhere on Windows. I知 using RealVNC viewer on my laptop to make the connection.

    Is this possible? If so, can someone help me out with the config or point me in the right direction?

    Thanks

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,454
    There are two ways you can use VNC on your Linux system. As you apparently are, as a remote desktop environment, or as a desktop controller. It is all in how you have configured it. I have done it both ways, and I think you can have it both ways. Unfortunately, I haven't done this in about 5-6 years, so I can't tell you exactly how right now, other than it is possible...
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Apr 2011
    Posts
    27
    Thanks for the feedback. I thought it was possible, but I haven't found a link for describing how to do it yet. Hopefully someone else can jump in and help me out.

  4. #4
    Just Joined!
    Join Date
    Mar 2012
    Posts
    16
    I know exactly what you are looking for, I was in the same boat sometime ago.



    Here you go:



    Step # 1: Assuming you have installed vncserver, You will use this password when connecting with vncviewer

    root@server# vncpasswd
    Password:
    Verify:


    Step # 2 : Edit the config file /etc/Xtt/xorg.conf. Make he following 2 changes:

    a) Paste the following at the end of the file

    Code:
    Section 溺odule
      Load 堵lx
      Load 電be
      Load 兎xtmod
      Load 吐reetype
      Load 鍍ype1"
      Load 電ri
      Load 砺nc
    EndSection
    b) Edit already existing section called "Screen". Add the following line right after "EndSubSection"
    Option 菟asswordFile /root/.vnc/passwd

    After making the change, "Screen" section should look like following:
    Code:
     Section 鉄creen
       Identifier 鉄creen0"
       Device     天ideocard0"
       Monitor    溺onitor0"
       DefaultDepth     24
       SubSection 泥isplay
         Viewport   0 0
         Depth     24
       EndSubSection
       Option 菟asswordFile /root/.vnc/passwd 
    EndSection
    Step # 3: Make sure you have opened the required ports (5900 thru 5904) on the firewall.

    Step # 4 : Configure the vnc server to start upon reboot, and srestar the service.

    root@server# chkconfig level 2345 vncserver on
    root@server# service vncserver restart

    Step # 5: Now you should be able to fo the vnc at port # 0. From the other machine open up the vnc client and do vnc to xxx.xxx.xx.xx:0
    where xxx.xxx.xxx.xxx is your server ip address.

    Hope this helps.







    Quote Originally Posted by jjscott View Post
    Thanks for the feedback. I thought it was possible, but I haven't found a link for describing how to do it yet. Hopefully someone else can jump in and help me out.

  5. #5
    Just Joined!
    Join Date
    Apr 2011
    Posts
    27
    Ok, that didn't work. I made the changes to xorg.conf and when I restarted the system it wouldn't boot all the way up. It was complaining about X Monitor (I think) not being configured properly. I knew what it was right away. I changed the Screen section to match your instructions and in doing so changed the Monitor entry from "HP" to "Monitor0". I'm guessing that has to match the Identifier entry in the Monitor section of the file. Anyhow, once I manually changed this back to HP, the system started up without an issue. At first I started the vncserver as I have in the past, just by typing "vncserver" at the command line. This, by default, starts vncserver with a ":1" for the display. I can connect with my vnc client if I specify <remoteipadd>:1, but I see the gnome desktop and not what the user is seeing. If I try and connect with <remoteipadd>:0, I get "Unable to connect to host".

    I disconnected and kill vncserver on the remote system. Next, I started vncserver with "service vncserver start". Now vncserver will not start. It give the message "Starting VNC server: no displays configured [Ok]"

    Any ideas?

  6. #6
    Just Joined!
    Join Date
    Mar 2012
    Posts
    16
    Did you do the step # 1 logged in as root? do you see /root/.vnc/passwd file ?


    Here is the xorg.conf from my server:

    Code:
    # Xorg configuration created by pyxf86config
    
    Section "ServerLayout"
            Identifier     "Default Layout"
            Screen      0  "Screen0" 0 0
            InputDevice    "Keyboard0" "CoreKeyboard"
    EndSection
    
    Section "InputDevice"
            Identifier  "Keyboard0"
            Driver      "kbd"
            Option      "XkbModel" "pc105"
            Option      "XkbLayout" "us"
    EndSection
    
    Section "Device"
            Identifier  "Videocard0"
            Driver      "radeon"
    EndSection
    
    Section "Screen"
            Identifier "Screen0"
            Device     "Videocard0"
            DefaultDepth     24
            Option "passwordFile" "/root/.vnc/passwd"
            SubSection "Display"
                    Viewport   0 0
                    Depth     24
            EndSubSection
    EndSection
    
    Section "Module"
            Load "glx"
            Load "dbe"
            Load "extmod"
            Load "freetype"
            Load "type1"
            Load "dri"
            Load "vnc"
    EndSection

    Here is the /etc/sysconfig/vncserver:

    Code:
    VNCSERVERS="1:user1 2:user2 3:user3 4:user4"
    VNCSERVERARGS[1]="-geometry 1800x1080 -depth 24"
    VNCSERVERARGS[2]="-geometry 1600x900 -depth 24"
    VNCSERVERARGS[3]="-geometry 1600x900 -depth 24"
    VNCSERVERARGS[4]="-geometry 1800x1080 -depth 24"

    Quote Originally Posted by jjscott View Post
    Ok, that didn't work. I made the changes to xorg.conf and when I restarted the system it wouldn't boot all the way up. It was complaining about X Monitor (I think) not being configured properly. I knew what it was right away. I changed the Screen section to match your instructions and in doing so changed the Monitor entry from "HP" to "Monitor0". I'm guessing that has to match the Identifier entry in the Monitor section of the file. Anyhow, once I manually changed this back to HP, the system started up without an issue. At first I started the vncserver as I have in the past, just by typing "vncserver" at the command line. This, by default, starts vncserver with a ":1" for the display. I can connect with my vnc client if I specify <remoteipadd>:1, but I see the gnome desktop and not what the user is seeing. If I try and connect with <remoteipadd>:0, I get "Unable to connect to host".

    I disconnected and kill vncserver on the remote system. Next, I started vncserver with "service vncserver start". Now vncserver will not start. It give the message "Starting VNC server: no displays configured [Ok]"

    Any ideas?

  7. #7
    Just Joined!
    Join Date
    Apr 2011
    Posts
    27
    Yes, I was logged in as root and could see the /root/.vnc/passwd file.

    Here is a copy of my xorg.conf file:

    Code:
    # Xorg configuration created by pyxf86config
    
    Section "ServerLayout"
            Identifier     "Default Layout"
            Screen      0  "Screen0" 0 0
            InputDevice    "Keyboard0" "CoreKeyboard"
    EndSection
    
    Section "ServerFlags"
            Option      "AllowMouseOpenFail" "yes"
    EndSection
    
    Section "InputDevice"
            Identifier  "Keyboard0"
            Driver      "kbd"
            Option      "XkbModel" "pc105"
            Option      "XkbLayout" "us"
    EndSection
    
    Section "Device"
            Identifier  "Videocard0"
            Driver      "nv"
    EndSection
    
    Section "Monitor"
            Identifier "HP"
            HorizSync       31-62
            VertRefresh     55-75
            ModeLine "1024x768" 63.50  1024 1072 1176 1328  768 771 775 798 -hsync +vsync
    EndSection
    
    Section "Screen"
            Identifier "Screen0"
            Device     "Videocard0"
            DefaultDepth     24
            Monitor "HP"
            SubSection "Display"
                    Viewport   0 0
                    Depth     24
                    Modes "1024x768"
            EndSubSection
            Option "passwordFile" "/root/.vnc/passwd"
    EndSection
    
    Section "Module"
            Load "glx"
            Load "dbe"
            Load "extmod"
            Load "freetype"
            Load "type1"
            Load "dri"
            Load "vnc"
    EndSection
    There were no uncommented entries in the /etc/sysconfig/vncservers. I added the following lines:

    Code:
    VNCSERVERS="1:username"
    VNCSERVERARGS[1]="-geometry 1024x768 -depth 24"
    I restarted the system, logged in as root and ran the following command to start the vnc server: "service vncserver start"
    Here is the output from the CL:

    HTML Code:
    Starting VNC server: 1:username 
    New 'cmp:1 (username)' desktop is cmp:1
    
    Starting applications specified in /home/username/.vnc/xstartup
    Log file is /home/username/.vnc/cpm:1.log
    
                                                               [  OK  ]
    I can now connect from my vnc client to display :1 and not :0. However, I no longer see the Gnome desktop. I see a blank teal screen with a terminal window open and a small VNC Config box behind it. I still cannot connect to display :0.

    If I change the /etc/sysconfig/vncservers to reflect display :0 like this:
    VNCSERVERS="0:username"
    VNCSERVERARGS[0]="-geometry 1024x768 -depth 24"

    and try and start the vncserver service I receive this:

    HTML Code:
    Starting VNC server: 0:isp A VNC server is already running as :0
                                                               [FAILED]
    I took a look at the running processes and found Xorg was running for display :0 with a -nolisten tcp parameter. I'm guessing this would prevent a connection to display :0. Is this true? As you can tell, I really guessing with this stuff!

    root 3414 3413 2 18:48 tty7 00:01:40 /usr/bin/Xorg :0 -br -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7

    Any thoughts?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •