vnc server [論壇 - 新手村]


正在瀏覽:   1 名遊客


 到底部   前一個主題   下一個主題  [無發表權] 請登錄或者註冊



vnc server
會員三級
註冊日期:
2007/8/21 22:08
所屬群組:
已註冊使用者
等級: 10
HP : 0 / 248
MP : 47 / 11299
EXP: 92
離線
請問有 linux 可以使用的vnc server嗎 ?

2018/6/10 9:30
應用擴展 工具箱
回覆: vnc server
會員一級
註冊日期:
2007/2/16 1:41
所屬群組:
已註冊使用者
等級: 2
HP : 0 / 31
MP : 4 / 1477
EXP: 25
離線
chrome遠端桌面就有支援LINUX

2018/6/11 17:47
應用擴展 工具箱
回覆: vnc server
版主
註冊日期:
2008/7/14 0:03
來自 螢幕的另一端
所屬群組:
網站管理員
已註冊使用者
討論區管理群
等級: 33
HP : 0 / 808
MP : 511 / 34681
EXP: 33
離線
x11vnc....跟vnc有關的套件很多

ssvnc,tightvnc,vnc4server....

2018/6/19 22:46
應用擴展 工具箱
回覆: vnc server
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 36
HP : 179 / 898
MP : 664 / 28634
EXP: 92
離線
[回到索引]

================================================================================

高寒 寫到:
請問有 linux 可以使用的vnc server嗎 ?



先附上之前的討論「Vnc server and Ubuntu 16.04」。

可以用關鍵字「ubuntu vnc server」查詢,應該就可以查到該討論提到的「參考連結

或是用關鍵字「ubuntu vnc server 18.04」查詢,可以找到下面參考連結


* https://help.ubuntu.com/community/VNC/Servers
* https://help.ubuntu.com/community/VNC
* https://help.ubuntu.com/community/VNC/Clients
* https://linuxconfig.org/vnc-server-on-ubuntu-18-04-bionic-beaver-linux
* https://linuxconfig.org/ubuntu-remote-desktop-18-04-bionic-beaver-linux
* https://wiki.archlinux.org/index.php/TigerVNC
* https://wiki.archlinux.org/index.php/X11vnc


夢見草 寫到:
x11vnc....跟vnc有關的套件很多

ssvnc,tightvnc,vnc4server....



或是也可以開啟「Terminal」,執行下面指令,來找尋

可以執行下面指令找尋


$ apt-cache search vnc



會看到很多套件。

================================================================================

執行下面指令,過濾


$ apt-cache search vnc | grep server



顯示


libvncclient1 - API to write one's own VNC server - client library
libvncserver-config - API to write one's own VNC server - library utility
libvncserver-dev - API to write one's own VNC server - development files
libvncserver1 - API to write one's own VNC server
libvncserver1-dbg - debugging symbols for libvncserver
vino - VNC server for GNOME
golang-github-mitchellh-go-vnc-dev - VNC client and server library for Go
linuxvnc - VNC server to allow remote access to a tty
pagekite - Make localhost servers publicly visible
python-websockify - WebSockets support for any application/server - Python 2
python3-websockify - WebSockets support for any application/server - Python 3
tigervnc-common - Virtual network computing; Common software needed by servers
tigervnc-scraping-server - Virtual network computing server performing X screen scraping
tigervnc-standalone-server - Standalone virtual network computing server
tigervnc-xorg-extension - Virtual network computing X server extension
tightvncserver - virtual network computing server software
vnc4server - Virtual network computing server software
vncsnapshot - A utility that takes JPEG snapshots from VNC servers
websockify - WebSockets support for any application/server
websockify-common - WebSockets support for any application/server - shared files
x11vnc - VNC server to allow remote access to an existing X session
xorg-server-source - Xorg X server - source files
xrdp - Remote Desktop Protocol (RDP) server
xrdp-pulseaudio-installer - Remote Desktop Protocol (RDP) server - PulseAudio module installer



================================================================================

執行下面指令,過濾


$ apt-cache search vnc | grep client



顯示


libvncclient1 - API to write one's own VNC server - client library
libvncclient1-dbg - debugging symbols for libvncclient
directvnc - VNC client using the framebuffer as display
golang-github-mitchellh-go-vnc-dev - VNC client and server library for Go
krdc - Remote Desktop Connection client
libguac-client-rdp0 - HTML5 web application for accessing remote desktops (RDP support)
libguac-client-ssh0 - HTML5 web application for accessing remote desktops (SSH support)
libguac-client-telnet0 - HTML5 web application for accessing remote desktops (Telnet support)
libguac-client-vnc0 - HTML5 web application for accessing remote desktops (VNC support)
libnb-svnclientadapter-java - High-level Java API to subversion
libnb-svnclientadapter-java-doc - High-level Java API to subversion javadoc
libnet-vnc-perl - Perl module implementing a simple VNC client
libsvnclientadapter-java - High-level Java API for Subversion (library)
libsvnclientadapter-java-doc - High-level Java API for Subversion (documentation)
novnc - HTML5 VNC client - daemon and programs
python-novnc - HTML5 VNC client - libraries
tigervnc-viewer - Virtual network computing client for X
vinagre - remote desktop client for the GNOME Desktop
xtightvncviewer - virtual network computing client software for X
xvnc4viewer - Virtual network computing client software for X



================================================================================

搭配上面提到的線索

以「vnc4server」這個「Binary Package」為例

可以執行下面指令,觀看套件相關資訊


$ apt-cache show vnc4server



顯示


Package: vnc4server
Architecture: amd64
Version: 4.1.1+xorg4.3.0-37.3ubuntu2
Priority: optional
Section: universe/x11
Source: vnc4
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Ola Lundqvist <opal@debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 5338
Provides: vnc-server, xserver
Depends: libc6 (>= 2.15), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.6), libx11-6 (>= 2:1.4.99.1), libxext6, libxtst6, zlib1g (>= 1:1.1.4), xbase-clients, x11-common | xserver-common
Recommends: xfonts-base
Suggests: vnc-java
Conflicts: vnc4-common
Filename: pool/universe/v/vnc4/vnc4server_4.1.1+xorg4.3.0-37.3ubuntu2_amd64.deb
Size: 1621664
MD5sum: 342f9fd301ffb84c1de4fbd414df1218
SHA1: fd7fd05a8f89ee916d7f80965e32196af50c3d18
SHA256: 3dc54d4abce662597751f7115ee64231ac0170164fb05e98a6746f6970f9846c
Description-en: Virtual network computing server software
 VNC stands for Virtual Network Computing. It is, in essence, a remote
 display system which allows you to view a computing `desktop' environment
 not only on the machine where it is running, but from anywhere on the
 Internet and from a wide variety of machine architectures.
 .
 This package provides a vncserver to which X clients can connect and the
 server generates a display that can be viewed with a vncviewer.
 .
 It contains an X server connector so clients can connect to your local X
 desktop directly.
 .
 Note: This server does not need a display. You need a vncviewer to see
 something. This viewer may also be on a computer running other operating
 systems.
Description-md5: e8ec41c93813cc539181a9af5600abae



================================================================================

接著執行下面指令,觀看「vnc4server」的「Source Package: vnc4」資訊


$ apt-cache showsrc vnc4server



顯示


Package: vnc4
Format: 1.0
Binary: vnc4server, xvnc4viewer
Architecture: any
Version: 4.1.1+xorg4.3.0-37.3ubuntu2
Priority: optional
Section: universe/x11
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Ola Lundqvist <opal@debian.org>
Standards-Version: 3.7.2
Build-Depends: debhelper (>= 4.0.0), perl, zlib1g-dev, xutils, libx11-dev, libxtst-dev, x11proto-core-dev, libxext-dev
Directory: pool/universe/v/vnc4
Package-List:
 vnc4server deb x11 optional arch=any
 xvnc4viewer deb net optional arch=any
Files:
 e46214e12284d84661afd2a66de9a442 1929 vnc4_4.1.1+xorg4.3.0-37.3ubuntu2.dsc
 b28c43385fe574d612ddbd0b645082f7 31536534 vnc4_4.1.1+xorg4.3.0.orig.tar.gz
 0cc91f5664615bdf895269268174e5f4 75093 vnc4_4.1.1+xorg4.3.0-37.3ubuntu2.diff.gz
Checksums-Sha1:
 d34d1929c619607332f3b5f9b40ed842db869e24 1929 vnc4_4.1.1+xorg4.3.0-37.3ubuntu2.dsc
 9f6e23aa8f7dc596f6222bc4f07f83e7df0ba35c 31536534 vnc4_4.1.1+xorg4.3.0.orig.tar.gz
 9a198b0b7ce6103b05411fd0b0663985d6a8c7e4 75093 vnc4_4.1.1+xorg4.3.0-37.3ubuntu2.diff.gz
Checksums-Sha256:
 bd324954af3a72d9c2d3a3757e90924cbe6d2a35d6eee1f4dee92d68e7151331 1929 vnc4_4.1.1+xorg4.3.0-37.3ubuntu2.dsc
 d073445a909a04bcdeac8eb8a5ad05a7101a930be436f68625001d81b5fd900e 31536534 vnc4_4.1.1+xorg4.3.0.orig.tar.gz
 6ac9cd334aaa5071622c8ff10d5af1251b20db4a363723a151dbc394603d9050 75093 vnc4_4.1.1+xorg4.3.0-37.3ubuntu2.diff.gz




執行下面指令,過濾


$ apt-cache showsrc vnc4server | grep '^Binary:'



顯示


Binary: vnc4server, xvnc4viewer



或是執行下面指令


$ apt-cache showsrc vnc4server | grep '^Binary:' -B 2



顯示


Package: vnc4
Format: 1.0
Binary: vnc4server, xvnc4viewer




可以了解到,
關於「vnc4server」和「xvnc4viewer」這兩個「Binary Package」,
是來自於「vnc4」這個「Source Package」。


剛剛上面有執行過「apt-cache show vnc4server」。

所以接下來,可以執行下面指令,觀看「xvnc4viewer」這個「Binary Package」的資訊


$ apt-cache show xvnc4viewer



顯示


Package: xvnc4viewer
Architecture: amd64
Version: 4.1.1+xorg4.3.0-37.3ubuntu2
Priority: optional
Section: universe/net
Source: vnc4
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Ola Lundqvist <opal@debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 425
Provides: vnc-viewer
Depends: libc6 (>= 2.14), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.6), libx11-6, libxext6, zlib1g (>= 1:1.1.4)
Filename: pool/universe/v/vnc4/xvnc4viewer_4.1.1+xorg4.3.0-37.3ubuntu2_amd64.deb
Size: 105614
MD5sum: aba326fcb5fc2fe9655a0f4a0b44e101
SHA1: 33f9162f8c9c6567926159f3556a83ea52f6941a
SHA256: 647b131608e4fa3b95eb506bec382bc136681c787b5c1e4f0abcc5fd0d7b80e5
Description-en: Virtual network computing client software for X
 VNC stands for Virtual Network Computing. It is, in essence, a remote
 display system which allows you to view a computing `desktop' environment
 not only on the machine where it is running, but from anywhere on the
 Internet and from a wide variety of machine architectures.
 .
 It is implemented in a client/server model. This package provides a vncclient
 for X, with this you can connect to a vncserver somewhere in the network
 and display its content in a window. There are vncservers available for other
 operating systems.
Description-md5: 6fdc207e5f3e4b0f562dcf3543322367



================================================================================

上面的模式,也可以用來探索「tightvncserver」。

執行下面指令


$ apt-cache showsrc tightvncserver | grep '^Binary:' -B 2



顯示


Package: tightvnc
Format: 3.0 (quilt)
Binary: tightvncserver, xtightvncviewer



可以了解到,
關於「tightvncserver」和「xtightvncviewer」這兩個「Binary Package」,
是來自於「tightvnc」這個「Source Package」。


執行


$apt-cache show tightvncserver



執行


$apt-cache show xtightvncviewer



或是執行下面指令,同時觀看


$ apt-cache show tightvncserver xtightvncviewer



================================================================================

執行


$ apt-cache showsrc tigervnc-standalone-server | grep '^Binary:' -B 2



顯示


Package: tigervnc
Format: 3.0 (quilt)
Binary: tigervnc-common, tigervnc-scraping-server, tigervnc-standalone-server, tigervnc-xorg-extension, tigervnc-viewer



================================================================================

更多的套件探索討論案例,紀錄在「[索引] 套件操作實務」。

附上之前的另一篇討論「#4 回覆: VNC 如何開機自動運行

================================================================================

## 套件整理

* tigervnc-standalone-server
* tigervnc-viewer
安裝指令: sudo apt install tigervnc-standalone-server tigervnc-viewer
移除指令: sudo apt purge tigervnc-standalone-server tigervnc-viewer

* vnc4server
* xvnc4viewer
安裝指令: sudo apt install vnc4server xvnc4viewer
移除指令: sudo apt purge vnc4server xvnc4viewer

* tightvncserver
* xtightvncviewer
安裝指令: sudo apt install tightvncserver xtightvncviewer
移除指令: sudo apt purge tightvncserver xtightvncviewer


下方會整理圖形界面的相關套件。

================================================================================

接下來先紀錄「指令」和「操作步驟」簡易說明

================================================================================

## 編輯 xstartup

編輯「~/.vnc/xstartup」這個檔案

執行


$ vi ~/.vnc/xstartup



填入下面的內容


#!/bin/sh

xsetroot -solid grey

#startxfce4 &
startlxqt &




加入可執行權限


$ chmod u+x ~/.vnc/xstartup



註:
我這篇測試的環境是「Ubuntu 18.04」,桌面環境使用的是「lxqt」。
關於「startlxqt」是屬於「lxqt-session」這個套件。
關於如何安裝「lxqt」,只要執行「sudo apt install lxqt」就行了,
之前有寫了一個簡單的安裝腳本,放在「GitHub」上,
一些說明,則是會放在這裡,不過還沒寫完整就是了。


================================================================================

## 設定密碼

執行


$ vncpasswd



依照提示輸入

結果會儲存在「~/.vnc/passwd」這個檔案

================================================================================

## 啟動 Server

執行下面指令,啟動 Server (可以多次執行)


$ vncserver



或是也可以指定「display number」


$ vncserver :1



或是


$ vncserver :2



================================================================================

## 啟動 Client 連到 Server

在本機執行下面指令,啟動 Client 連到 Server


$ vncviewer localhost:5901



或是執行


$ vncviewer localhost:1



或是執行


$ vncviewer localhost:2



上面「5901」是「port」,「1」和「2」是「display number」

若是在本機執行,也可以加入「-passwd ~/.vnc/passwd」,就不用輸入密碼


$ vncviewer -passwd ~/.vnc/passwd localhost:1



================================================================================

## 關閉 Server

執行下面指令,關閉 Server


$ vncserver -kill :1



或是執行


$ vncserver -kill :2



上面「:1」和「:2」是「display number」,指定要關閉那個

================================================================================

## 相關路徑

相關的檔案都放在「~/.vnc/」這個資料夾

* ~/.vnc/passwd
* ~/.vnc/xstartup

* ~/.vnc/work:1.log
* ~/.vnc/work:1.pid

* ~/.vnc/work:2.log
* ~/.vnc/work:2.pid

================================================================================

參考「ArchWiki / TigerVNC / Running vncserver to directly control the local display

執行


$ x0vncserver -display :0 -passwordfile ~/.vnc/passwd



在本機執行下面指令,畫面會無窮迴圈


$ vncviewer localhost:5900



================================================================================

若是要使用圖形界面來操作「Server」和「Client」,

以下是相關的套件整理和簡易說明。

* krfb (Server)
* krdc (Client)
安裝指令: sudo apt install krfb krdc
移除指令: sudo apt purge krfb krdc


執行


$ apt-cache search vnc | grep gnome -i



顯示


vino - VNC server for GNOME
vinagre - remote desktop client for the GNOME Desktop



* vinagre (Client)
安裝指令: sudo apt install vinagre
移除指令: sudo apt purge vinagre

若是在「Gnome Shell」的環境底下

* vino (Server)
安裝指令: sudo apt install vino
移除指令: sudo apt purge vino

裝了「vino」後,就可以在「gnome-control-center (settings)」其中一個頁簽「Sharing」,
出現一個選項「Screen Sharing」,點選,就會跳出一些新的設定視窗,在這裡做設定和啟用。

另外要讓「gnome-control-center (settings)」直接顯示頁簽「Sharing」,只要執行下面指令就行了


$ gnome-control-center sharing




在使用「krdc」或「vinagre」其中一個「Client」,來連到「vino」和「krfb」這兩個「Server」時,
要選「vnc」,然後「Port」要用「:5900」來連線,

若是使用「krdc」或「vinagre」其中一個「Client」,來連到「vncserver」,
一樣要選「vnc」,然後要「localhost:5901」或「localhost:1」或「localhost:2」,若是本機則是可以省略「localhost」。

================================================================================

以上提供參考

報告完畢



================================================================================

[回到索引]

2018/6/20 0:22
應用擴展 工具箱


 [無發表權] 請登錄或者註冊


可以查看帖子.
不可發帖.
不可回覆.
不可編輯自己的帖子.
不可刪除自己的帖子.
不可發起投票調查.
不可在投票調查中投票.
不可上傳附件.
不可不經審核直接發帖.