• Using VNC on a debian/Ubuntu server with a OS X Mac


    I got a brand new MacBook Pro 13" 2016. I used to work on GNU/Linux for decades. 

    I don't want to change my working environment and life style. So I am going to connect to my work station remotely. This is why I need VNC.

    VNC is a stand protocol. We can find some free/opensource VNC software for both client and server.

    There are two I mainly use, tightvnc and tigervnc.

    You can use any VNC client to connect to a VNC server. But some VNC producers promote their own products to give you better experience.

    1. Install VNC client

    VNC client option 1)

    If you are on mac, you can go http://www.tightvnc.com to download a tightvnc client. It is developed using Java. So for a OS X user, you would need to install Java first.

    VNC client option 2)

    Or, you can download tigervnc http://tigervnc.org 

    2. Install VNC server on Linux server

    For debian to install tightvncserver

    `sudo apt-get install tightvncsever -y`

    For tiger vnc server, you can go the site http://tigervnc.org , and download the latest server package for your system.

    3. Settings on VNC server

    3.1) create a VNC password using

    `vncpasswd`

    3.2 ) create a VNC startup file at path /home/yourname/.vnc/xstartup  

    `touch  /home/yourname/.vnc/xstartup  `

    `chmod a+x /home/yourname/.vnc/xstartup`

    3.3 ) edit it

    #!/bin/sh
    export XKL_XMODMAP_DISABLE=1
    
    # Uncomment the following two lines for normal desktop:
    
    
    unset SESSION_MANAGER
    unset DBUS_SESSION_BUS_ADDRESS
    
    #exec /etc/X11/xinit/xinitrc &
    
    [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
    [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
    
    xsetroot -solid grey
    vncconfig -iconic &
    
    
    x-terminal-emulator -geometry 80x24+10+10  -title "$VNCDESKTOP Desktop" &
    x-window-manager &
    
    #x-window-manager
    #kde-session &
    #/etc/X11/Xsession
    
    dbus-launch startxfce4
    #startkde
    #dbus-launch startkde #&

    I used KDE before. But KDE crashed a lot. So I used xfce4 for instead as the desktop environment.

    4. Start the VNC server

    # for tightvnc server
    tightvncserver -geometry 800x600 :1
    
    # for tigervnc server
    tigervncserver -geometry 800x600 :1
    
    # to kill the server
    tightvncserver -kill :1
    
    # or
    tigervncserver -kill :1

    5. Connect to the VNC server from your Mac

    java -jar tightvnc-jviewer.jar

    Then input the VNC password you ever stored.

    Honestly, using tiger VNC client and tiger VNC server gives me the best VNC experience. 

    You can even watch videos using tiger VNC. Isn't it awesome?

  • 相关阅读:
    从Go语言编码角度解释实现简易区块链——打造公链
    CSAPP:位操作实现基本运算
    虚拟机Ubuntu系统无法连接网络解决方案
    CSAPP:逆向工程【二进制炸弹】
    分析一套源代码的代码规范和风格并讨论如何改进优化代码
    【Recorder.js+百度语音识别】全栈方案技术细节
    webpack4.0各个击破(5)—— Module篇
    webpack4.0各个击破(4)—— Javascript & splitChunk
    webpack4.0各个击破(3)—— Assets篇
    javascript基础修炼(4)——UMD规范的代码推演
  • 原文地址:https://www.cnblogs.com/spaceship9/p/6386758.html
Copyright © 2020-2023  润新知