zoukankan      html  css  js  c++  java
  • vncserver nonroot user

    Start vncserver by non-root user.

     

    User: <your_name>

     

    <your_name>@<your_name>] sudo vi /etc/sysconfig/vncservers

     

    VNCSERVERS="2:<your_name>"

    #VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"

    VNCSERVERARGS[2]="-geometry 1368x768"

     

    <your_name>@<your_name>] vncserver :2 -geometry 1366x768     

     

    New '<your_name>.desktop.aaa.com:2 (<your_name>)' desktop is <your_name>.desktop.aaa.com:2

     

    Starting applications specified in /home/<your_name>/.vnc/xstartup

    Log file is /home/<your_name>/.vnc/<your_name>.desktop.aaa.com:2.log

     

     

    Then connect the server using vnc viewer from your PC through the :2 session.

     

    If you meet such error:

    <your_name>@<your_name>] sudo vncserver :1 -name <your_name> -geometry 1368x768  

    xauth:  error in locking authority file /home/<your_name>/.Xauthority

     

    Just verify the permission of the .Xauthority file.  It should be :

    <your_name>@<your_name>] ll /home/<your_name>/.Xauthority

    -rw------- 2 <your_name> aaa   0 Dec 12 09:15 /home/<your_name>/.Xauthority

     

    <your_name>@<your_name>] sudo chown <your_name>:aaa /home/<your_name>/.Xauthority

    <your_name>@<your_name>] sudo chmod 600 /home/<your_name>/.Xauthority

     

  • 相关阅读:
    测试用例设计方法
    MySQL备份还原、存储过程、事务及周边
    MySQL基础中级进阶
    MySQL基础初级入门
    Linux命令之三剑客awk、sed、grep
    Docker下部署influxdb、Grafana及运行jmeter结果展示
    Node双版本共存及切换使用
    Mac部署Docker
    Docker完美部署MySQL
    VulnHub::DC-2
  • 原文地址:https://www.cnblogs.com/lizmy/p/2814232.html
Copyright © 2011-2022 走看看