zoukankan      html  css  js  c++  java
  • linux远程桌面连接 VNC Server

    更新源

    # sudo apt-get update
    

    安装vnc4server

    # sudo apt-get install vnc4server
    

    修改vnc远程连接密码

    # vncpasswd
    

    编辑vnc4server的配置文件

    #!/bin/sh
    # Uncomment the following two lines for normal desktop:
    # unset SESSION_MANAGER
    # 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 -ls -title "$VNCDESKTOP Desktop" &
    #x-window-manager &
    gnome-panel &
    gnome-settings-daemon &
    metacity &
    nautilus &
    gnome-terminal &
    

    启动、关闭服务

    # vncserver -kill :1
    # vncserver :1
    

    出现错误:

    Warning: XXX:N is taken because of /tmp/.X1-lock
    

    解决办法:

    # sudo rm /tmp/.X* -rf
    

    使用VNC Viewer远程连接
    其中的2代表第2个窗口,和服务开启的编号一致
    1
    连接成功
    2
    支持Windows和linux之间复制粘贴
    法一:

    # vncconfig -nowin&
    

    法二:

    # sudo apt install autocutsel
    # autocutsel -f
    
  • 相关阅读:
    java中VO、PO、DTO 、DO、POJO、BO、TO
    java可变参数
    排序
    快速排序
    单元测试概述
    Spring 对事务管理的支持
    Spring的事务管理基础知识
    混合切面类型
    基于Schema配置切面
    Spring AOP @AspectJ进阶
  • 原文地址:https://www.cnblogs.com/zhangxuechao/p/11709284.html
Copyright © 2011-2022 走看看