Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28

Thread: Headless server / VNC

  1. #21
    Join Date
    Oct 2009
    Ubuntu 16.04 Xenial Xerus

    Re: Headless server / VNC

    I've been forwarding X over ssh for a while now and it totally rocks compared to VNC. It's secure and you don't need to have an extra service running on your machine.

    If you are just using a server locally and don't need any access from the internet, I guess you could use VNC, but it wouldn't be that secure. To use the builtin vino server, you would need to set the machine to autologin and then set the server to use a password or whatnot.

    If it doesn't have access to the internet, you should be "ok" but I'd not use VNC on a server I could just SSH into.

    @HermanAB: I use XMing on Windows machines along with Putty to forward X over SSH. Works fine so far.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  2. #22
    Join Date
    Jan 2008

    Re: Headless server / VNC

    For anyone still looking for a 10.04 solution to this, see posts # 21 and 24 in this thread:

    Using the xorg.conf in # 21 and the grub edit in # 24 worked for me. I can now (finally!) boot the system without a monitor attached.

  3. #23
    Join Date
    Jun 2010

    Re: Headless server / VNC

    Quote Originally Posted by benbrookshire View Post
    I agree, for the most part I try to admin via command line. But I like having the GUI to fall back on. I'm not an expert, so some things are beyond me if I don't have the GUI.
    I use freenx and the no machines client on my windows desktop for that very reason.

  4. #24
    Join Date
    Jun 2007
    Perth, Oz
    Ubuntu 10.04 Lucid Lynx

    Re: Headless server / VNC

    Quote Originally Posted by HermanAB View Post
    Rather install openssh-server and connect to it like this:
    $ ssh -X -C -c blowfish user@server "gedit /etc/fstab"

    or even
    $ ssh -X -C -c blowfish user@server "gnome-panel"

    and go click happy.
    Thanks for this, helped me out no end. In case anyone needs to know, adding the -t argument to the ssh ***mand create a pseudo-terminal which enables you to run sudo ***mands if necessary.

  5. #25
    Join Date
    Nov 2009
    Kubuntu 10.04 Lucid Lynx

    Re: Headless server / VNC

    Create this /etc/X11/xorg.conf

    Section "ServerLayout"
    Identifier " Configured"
    Screen 0 "Screen0" 0 0
    InputDevice "Mouse0" "CorePointer"
    InputDevice "Keyboard0" "CoreKeyboard"

    Section "Files"
    ModulePath "/usr/lib64/xorg/modules"
    FontPath "catalogue:/etc/X11/fontpath.d"
    FontPath "built-ins"

    Section "Module"
    Load "vnc"
    Load "extmod"
    Load "dbe"
    Load "glx"
    Load "record"
    Load "dri2"
    Load "dri"

    Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"

    Section "InputDevice"
    Identifier "Mouse0"
    Driver "mouse"
    Option "Protocol" "auto"
    Option "Device" "/dev/input/mice"
    Option "ZAxisMapping" "4 5 6 7"

    Section "Monitor"
    Identifier "Monitor0"
    VendorName "Monitor Vendor"
    ModelName "Monitor Model"

    Section "Device"
    ### Available Driver options are:-
    ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
    ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
    ### <percent>: "<f>%"
    ### [arg]: arg optional
    #Option "HWcursor" # [<bool>]
    #Option "Xinerama" # [<bool>]
    #Option "StaticXinerama" # <str>
    Identifier "Card0"
    Driver "vmwlegacy"
    BusID "PCI:0:15:0"

    Section "Screen"
    Identifier "Screen0"
    Device "Card0"
    Monitor "Monitor0"
    SubSection "Display"
    Viewport 0 0
    Depth 1
    SubSection "Display"
    Viewport 0 0
    Depth 4
    SubSection "Display"
    Viewport 0 0
    Depth 8
    SubSection "Display"
    Viewport 0 0
    Depth 15
    SubSection "Display"
    Viewport 0 0
    Depth 16
    SubSection "Display"
    Viewport 0 0
    Depth 24
    Option "SecurityTypes" "VncAuth"
    Option "UserPasswdVerifier" "VncAuth"
    check you have the extension available :

    # ls -l /usr/lib64/xorg/modules/extensions/*vnc*
    -rw-r--r-- 1 root root 619600 2011-03-26 23:24 /usr/lib64/xorg/modules/extensions/

    I copied it from another linux (fedora) after spending too much time to find the package, if somebody knows the name of the package that would be great

    I use this config in VMWare VM and it works like a charm

  6. #26
    Join Date
    Feb 2011

    Re: Headless server / VNC

    Hello everyone,

    I was really frustrated trying to setup a headless Ubuntu server through VNC as most of the solutions mentioned in number of forums has not worked for me, Messing with xorg.conf file in every possible way and not being satisfied with the results, i decided to post my version of how to setup a headless ubuntu server through VNC.

    Instead of messing around with the the
    xorg.conf file i decided to use the "xrandr" command and hard code it into /etc/gdm/Init/Default so this is what i have done

    note: im no expert in linux, so test these settings before applying them also some of my comments are coming out of guessing more than true facts.
    note: always keep a backup copy of the Init/Default file in case anything goes wrong you can start the server in recovery mode and overwrite the corrupted file with the backup.
    xrandr reference:

    -In a terminal run: gksudo gedit /etc/gdm/Init/Default
    which opens the Init/Default file

    -I've inserted right below the "OLD_IFS=$IFS" line:
    xrandr --newmode "1280x768_60.00" 79.50 1280 1344 1472 1664 768 771 781 798 -hsync +vsync

    xrandr --addmode CRT1 1280x768_60.00

    xrandr --output CRT1 --mode 1280x768
    note: i have tested these commands first in terminal before pasting them into the Init file.
    note: running xrandr command alone should give u info about which display options u have also the "virtual screen" info u need which in my case was CRT1 connected to the VNC X display

    -also because i wanted for the x11vnc to auto start and be running even if i logoff my session i have added these lines after the "/sbin/initctl -q emit login-session-start DISPLAY_MANAGER=gdm" line:

    /usr/bin/x11vnc -rfbauth /home/myaccount/.vnc/passwd -o /tmp/x11vnc.log -bg -shared -forever -noxdamage -progressive 256 -xrandr "resize" -rfbport 5905
    note: i have added the -xrandr "resize" command which allows x11vnc screen to be resized without giving a blackscreen or crashing the server

    - Then saved my file and restarted

    Hope this info be much of a help for some of you as this has worked great for me without having to change anything in the xorg.conf file.

  7. #27
    Join Date
    May 2010

    Re: Headless server / VNC

    I've found a solution to the 800x600 resolution issues.

  8. #28
    Join Date
    Oct 2011

    Headless server / x11vnc / resolutions > 1600x1200

    This is my solution for bigger resolutions. VESA only seems to support max. 1600x1200.

    # Driver "dummy" needs package xserver-xorg-video-dummy.
    # If resolutions up to 1600x1200 are enough for you, you may use driver "vesa".
    # VideoRam needs to be big enough (8192 or 16384), otherwise there might be error messages in /var/log/Xorg.0.log.
    Section "Device"
        Identifier  "Headless x11vnc Video Device"
        Driver      "dummy"
    #   Driver      "vesa"
    	VideoRam    16384
    # Modelines calculated at (removed trailing "_60.00" in mode names).
    # HorizSync, VertRefresh ranges need to be big enough, otherwise there might be error messages in /var/log/Xorg.0.log.
    Section "Monitor"
        Identifier  "Headless x11vnc Monitor"
        HorizSync 22 - 83
        VertRefresh 50 - 76
        # 1024x768 @ 60.00 Hz (GTF) hsync: 47.70 kHz; pclk: 64.11 MHz
        Modeline "1024x768" 64.11 1024 1080 1184 1344 768 769 772 795 -HSync +Vsync
        # 1152x864 @ 60.00 Hz (GTF) hsync: 53.70 kHz; pclk: 81.62 MHz
        Modeline "1152x864" 81.62 1152 1216 1336 1520 864 865 868 895 -HSync +Vsync
        # 1280x800 @ 60.00 Hz (GTF) hsync: 49.68 kHz; pclk: 83.46 MHz
        Modeline "1280x800" 83.46 1280 1344 1480 1680 800 801 804 828 -HSync +Vsync
        # 1280x1024 @ 60.00 Hz (GTF) hsync: 63.60 kHz; pclk: 108.88 MHz
        Modeline "1280x1024" 108.88 1280 1360 1496 1712 1024 1025 1028 1060 -HSync +Vsync
        # 1360x1024 @ 60.00 Hz (GTF) hsync: 63.60 kHz; pclk: 116.01 MHz
        Modeline "1360x1024" 116.01 1360 1448 1592 1824 1024 1025 1028 1060 -HSync +Vsync
        # 1440x900 @ 60.00 Hz (GTF) hsync: 55.92 kHz; pclk: 106.47 MHz
        Modeline "1440x900" 106.47 1440 1520 1672 1904 900 901 904 932 -HSync +Vsync
        # 1600x1200 @ 60.00 Hz (GTF) hsync: 74.52 kHz; pclk: 160.96 MHz
        Modeline "1600x1200" 160.96 1600 1704 1880 2160 1200 1201 1204 1242 -HSync +Vsync
        # 1680x1050 @ 60.00 Hz (GTF) hsync: 65.22 kHz; pclk: 147.14 MHz
        Modeline "1680x1050" 147.14 1680 1784 1968 2256 1050 1051 1054 1087 -HSync +Vsync
        # 1920x1080 @ 60.00 Hz (GTF) hsync: 67.08 kHz; pclk: 172.80 MHz
        Modeline "1920x1080" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync
        # 1920x1200 @ 60.00 Hz (GTF) hsync: 74.52 kHz; pclk: 193.16 MHz
        Modeline "1920x1200" 193.16 1920 2048 2256 2592 1200 1201 1204 1242 -HSync +Vsync
    # Use modes defined in "Modeline" entries above.
    Section "Screen"
        Identifier  "Headless x11vnc Screen"
        Monitor     "Headless x11vnc Monitor"
        Device      "Headless x11vnc Video Device"
        DefaultDepth 24
        SubSection "Display"
        Depth 24
        Modes "1024x768" "1152x864" "1280x800" "1280x1024" "1360x1024" "1440x900" "1600x1200" "1680x1050" "1920x1080" "1920x1200"

Page 3 of 3 FirstFirst 123

Tags for this Thread


Posting Permissions

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