• Ubuntu安装vncserver实现图形化远程桌面


    安装

    apt-get update
    apt-get install vnc4server

    开启vnc服务

    vncserver

    首次启动会要求设置密码,后面可以使用vncpasswd修改;

    看到 New ‘****:1 (****)’ desktop is ****:1 (****代表主机名)即表示启动vnc成功,在主目录下产生一个.vnc目录

    连接远程桌面

    下载“vnc客户端”软件,在服务器栏输入:

    <ip>:1  (默认端口是1)

    Optional:安装桌面环境

    安装xfce桌面环境
    (1)安装x-windows的基础 :#sudo apt-get install x-window-system-core
    (2)安装登录管理器:#sudo apt-get install xdm (还可以为kdm/gdm)
    (3)安装Ubuntu的桌面:#sudo apt-get install Xubuntu-desktop(还可以为Kubunut-desktop/ ubuntu-desktop )

    更改vnc桌面环境

    vncserver默认使用的窗口管理器是twm,这是一个很简陋的窗口管理器,下面我们把桌面改成xfce[GNOME/KDE]

    备份原有xstartup文件:

    cp ~/.vnc/xstartup ~/.vnc/xstartup.bak

    修改vnc启动文件

    vi ~/.vnc/xstartup

    在“x-window-manager &”后回车输入:

      x-window-manager &
      sesion-manager & xfdesktop & xfce4-panel &
      xfce4-menu-plugin &
      xfsettingsd &
      xfconfd &
      xfwm4 &

    重启服务

    vncserver -kill :1 //这里的:1是桌面号
    vncserver :1 //生成新的会话

    开机自启动

    编辑/etc/rc.local在文件最后一行加入:

    su root -c '/usr/bin/vncserver -name my-vnc-server -depth 16 -geometry 1280x800 :1'
  • 相关阅读:
    96. 不同的二叉搜索树
    95. 不同的二叉搜索树 II
    94. 二叉树的中序遍历
    93. 复原IP地址
    python-007(用户登录(三次机会重试))
    python-006求1-2+3-4+5.....99的所有数的和
    python006(求1-2+3-4+5.....99的所有数的和)
    python-005(1-100奇数和偶数)
    python-004(while循环)
    python-003(if...elif...else)
  • 原文地址:https://www.cnblogs.com/manhua/p/4294515.html
Copyright © 2020-2023  润新知