当前位置: 首页 > article >正文

ubuntu20使用tigervnc远程桌面配置记录

一、安装tigervnc

sudo apt install tigervnc-common
sudo apt install tigervnc-standalone-server

二、增加配置文件

安装完后新增配置文件:vim ~/.vnc/xstartup

#!/bin/sh
#Uncomment the following two lines for normal desktop:
#unset SESSION_MANAGER
#exec /etc/X11/xinit/xinitrc
#gnome-session --session=gnome-classic &

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
#xsetroot -solid grey
vncconfig -iconic &
dbus-launch --exit-with-session gnome-session &
#x-terminal-emulator -geometry 1280x1024+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &

三、设置密码

命令vncpasswd设置密码

walle@WALLE:~$ vncpasswd
Password:
Verify:
Would you like to enter a view-only password (y/n)? n  //这里选择n

四、启动

walle@WALLE:~$ vncserver -localhost no -geometry 1920x1080 :1
Cleaning stale pidfile '/home/walle/.vnc/WALLE:1.pid'!

You will require a password to access your desktops.
New 'WALLE:1 (walle)' desktop at :1 on machine WALLE

Starting applications specified in /home/walle/.vnc/xstartup
Log file is /home/walle/.vnc/WALLE:1.log

Use xtigervncviewer -SecurityTypes VncAuth,TLSVnc -passwd /home/walle/.vnc/passwd WALLE:1 to connect to the VNC server.

-localhost no 需要加上才能支持远程访问
-geometry 设置远程分辨率
:1 远程绘话号

vncserver -list 可以列出当前的会话列表
vncserver -kill id 可以关掉对应的远程会话
笔记本屏幕一直打开亮着,可以进行以下配置:

sudo vi /etc/systemd/logind.conf
HandleLidSwitch=ignore

五、连接

window可以使用MobaXterm软件连接
在这里插入图片描述


http://www.kler.cn/a/537127.html

相关文章:

  • 华水967数据结构2024真题(回忆版)
  • [250202] DocumentDB 开源发布:基于 PostgreSQL 的文档数据库新选择 | Jekyll 4.4.0 发布
  • 云计算——AWS Solutions Architect – Associate(saa)1、什么是云,AWS介绍
  • 结构体排序 C++ 蓝桥杯
  • MySQL时间类型相关总结(DATETIME, TIMESTAMP, DATE, TIME, YEAR)
  • JAVA异步的TCP 通讯-客户端
  • react的antd组件中上传图片组件,点击预览却打开新页面,将其改为放大预览
  • centos虚拟机迁移没有ip的问题
  • 论文笔记:Rethinking Graph Neural Networks for Anomaly Detection
  • 第8章《VTK交互》
  • 计算机网络知识速记:HTTP与HTTPS
  • 前端知识自检
  • 模板的进阶
  • android camera hal request
  • unity学习31:Video Player 视频播放相关基础
  • 【Axure教程】标签版分级多选下拉列表
  • makefile 的strip,filter,ifeq,ifneq基础使用
  • 朝天椒USB服务器在湖南电力的应用案例
  • docker run和docker exec的区别及开机启动
  • Centos执行yum命令报错
  • NSS-DAY1
  • 解决错误:CondaHTTPError: HTTP 000 CONNECTION FAILED for url
  • openCV函数使用(二)
  • mac环境下,ollama+deepseek+cherry studio+chatbox本地部署
  • 基于Spring Boot的历史馆藏系统设计与实现(LW+源码+讲解)
  • 通信易懂唠唠SOME/IP——SOME/IP-SD服务发现阶段和应答行为