Fedora 使用 VNC 远程 Fedora 28 主机

问题重述:

      最近环境中需要使用 Fedora 28 来进行远程桌面,于是就重新配置了一下 VNC 在这里面做一下记录。

过程

  yum 安装工作机上安装 vncviewer 远程主机上安装: vncserver

      连接远程桌面

              连接远程桌面很简单,只要使用 vncviewer 主机名:桌面号

➜  regular vncviewer 10.66.65.15:1

画面大小,可以通过窗口来进行拖动。当然你也可以进行配置初始窗口的大小:

和vncviewer相关的文件在: HOME/.vnc/default.tigervnc HOME/.vnc/default.tigervncHOME/.vnc/x509_ca.pem  $HOME/.vnc/x509_crl.pem 三个文件中,具体关于 vncviewer 相关可以 查看 man 手册。

        配置vnc 服务器

        配置vnc 稍微麻烦了一点,但是当你具备了很好的阅读文档能力,相对就容易很多。

vncserver is used to start a VNC (Virtual Network Computing) desktop. vncserver is a Perl script which simplifies the process of starting an Xvnc server. It runs Xvnc with appropriate options and starts a window manager on the VNC desktop.

vncserver can be run with no options at all. In this case it will choose the first available display number (usually :1), start Xvnc with that display num‐ber, and start the default window manager in the Xvnc session. You can also specify the display number, in which case vncserver will attempt to start Xvnc with that display number and exit if the display number is not available. For example:

    vncserver :13

editing the file $HOME/.vnc/xstartup allows you to change the applications run at startup (but note that this will not affect an existing VNC session.)

  这段,主要是说 vncserver 是 perl 写的脚本,用来控制Xvnc server 的,默认的情况下 每运行一次,依次打开一个服务器,1,2,3,4…. 等。但是你也可以特殊指定 vncserver 13; 编辑 $HOME/.vnc/xstartup 文件,可以允许你改变 在启动时运行的软件

      运行vncserver :

不同用户身份运行vncserver脚本后,使用 vncviewer 进入的桌面也不同。

vncserver :1

      如果你还没口令,那么在第一次运行的时候需要运行口令。   

    重新设置远程运行口令: 可以使用 vncserver

[root@linuxmi ~]# vncpasswd
Password:

  修改启动运行程序:如前面所说的 xstartup 文件, 你可以再启动其他程序,随着远程桌面启动的时候

[root@linuxmi ~]# vim ~/.vnc/xstartup

      查看 vncserver 服务:

[root@linuxmi ~]# vncserver -list

TigerVNC server sessions:

X DISPLAY #    PROCESS ID
:4        21475
:1        18261

  关闭服务:

[root@linuxmi system]# vncserver -kill :1

      当然,你也可以通过 pid 使用 kill -9 来进行终止。

  相关配置文件:

 $HOME/.vnc/xstartup

/etc/tigervnc/vncserver-config-defaults

/etc/tigervnc/vncserver-config-mandatory

$HOME/.vnc/config

$HOME/.vnc/passwd

$HOME/.vnc/host:display#.log     

$HOME/.vnc/host:display#.pid

但是 vnc 支持单用户远程,支持多用户远程登录可以使用xrdp 来进行操作

更多Fedora相关信息Fedora 专题页面 https://www.linuxidc.com/topicnews.aspx?tid=5

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

栗子博客 软件 Fedora 使用 VNC 远程 Fedora 28 主机 https://www.lizi.tw/soft/10067.html

常见问题
  • 1、杰齐1.7仅适用于PHP5.2 2、需Zend支持 3、尽量使用宝塔面板 4、尽量使用Windows 系统,关关对Linux支持不太友好。
查看详情

相关文章

评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务

Fedora 使用 VNC 远程 Fedora 28 主机-海报

分享本文封面