Virtual Networking Computing (VNC) using Tightvncserver
Virtual Networking Computing (VNC)对很多方面都非常重要,那么remote的server的window可以跳出来。这次VNC server,我们说Tightvncserver。 [i=s] 本帖最後由 角色 於 2015-3-17 01:42 編輯 [/i]Installation of tightvncserver
1、 安装
如果已经安装了图形用户界面,只需要在bash中apt-get install tightvncserver。
2、运行
2.1、 普通运行
在bash中输入tightvncserver,第一次运行需要设置访问密码。
每次启动tightvncserver都会返回一个编号。
编号在这句中:New 'X' desktop is wqvm-debian:2
可见启动的编号为2。使用VNC客户端去连接时,默认用这个编号+5900得到端口号去连接。
2.2、 自动运行
写入rc.d即可。
2.3、 终止运行
tightvncserver -kill :2
注意将上一行中的2修改为你在运行tightvncserver中得到的编号,即可关闭这个VNC Server的进程
Example:
=== VNC Server ===
root@debian:~# tightvncserver
You will require a password to access your desktops.
Password:
Verify:
Would you like to enter a view-only password (y/n)? y
Password:
Verify:
xauth: file /root/.Xauthority does not exist
New 'X' desktop is debian:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/debian:1.log
root@debian:~#
=== VNC Client ===
Using TightVNC Viewer
[attach]3511[/attach]
Entering the password
[attach]3512[/attach]
It gives (没有安装什么window manager)
[attach]3513[/attach] [i=s] 本帖最後由 角色 於 2015-3-15 19:41 編輯 [/i]
=== Manual tightvncserver ===
vncserver(1) TightVNC vncserver(1)
NAME
vncserver - a wrapper to launch an X server for VNC.
SYNOPSIS
vncserver [:display] [-geometry widthxheight] [-depth depth] [-pixelformat rgbNNN|bgrNNN] [-name desktop-name] [ -httpport int ] [ -basehttpâ€
port int ] [ -alwaysshared ] [ -nevershared ] [Xvnc-options...]
vncserver [ -clean ] -kill :display
vncserver -help
DESCRIPTION
vncserver is a wrapper script for Xvnc, the free X server for VNC (Virtual Network Computing). It provides all capabilities of a standard X
server, but does not connect to a display for itself. Instead, Xvnc creates a virtual desktop you can view or control remotely using a VNC
viewer.
OPTIONS
You can add Xvnc options at the command line. They will be added to the invocation of Xvnc without changes. The options provided by the vncserver
itself are as follows:
:display
The display number to use. If omitted, the next free display number is used.
-geometry widthxheight
Set desktop width and height.
-depth depth
Set the colour depth of the visual to provide, in bits per pixel. Must be a value between 8 and 32.
-pixelformat rgbNNN|bgrNNN
Set colour format for pixels representation. The viewer can do the conversion to any other pixel format, but it is faster if the depth and
pixel format of the server is the same as the equivalent values on the viewer display.
-name string
This specifies the name of the desktop.
-clean This option can be used in conjunction with
-kill :display
Stops the session running on the specified display.
-nevershared
Never allow shared desktops.
-alwaysshared
Always allow shared desktops.
-basehttpport int
The base http port to use for the java client applet (you have to install the tightvnc-java package to make this work). The real port numâ€
ber will be port = base + display num.
-httpport int
The http port to use for the java client applet (you have to install the tightvnc-java package to make this work).
-help Prints a short usage notice to stderr.
EXAMPLES
vncserver
Invokes Xvnc on the next available display and with suitable defaults.
vncserver :1
Invokes Xvnc on display :1.
vncserver -geometry 800x600 -depth 16 :1
Invokes Xvnc on display :1 with desktop size of 800x600 pixels and color depth of 16 bits per pixel.
vncserver -kill :1
Shuts down Xvnc server on display :1.
SEE ALSO
Xvnc(1), vncviewer(1), vncpasswd(1), vncconnect(1)
AUTHORS
Original VNC was developed in AT&T Laboratories Cambridge. TightVNC additions were implemented by Constantin Kaplinsky. Many other people particiâ€
pated in development, testing and support.
Man page authors:
Marcus Brinkmann <[email]Marcus.Brinkmann@ruhr-uni-bochum.de[/email]>,
Tim Waugh <[email]twaugh@redhat.com[/email]>,
Constantin Kaplinsky <[email]const@tightvnc.com[/email]>
August 2006 vncserver(1) [i=s] 本帖最後由 角色 於 2015-3-17 01:48 編輯 [/i]
之前的Windows根本很多功能都可以,但是我们可以安装其他package,如twm
aptitude install twm
copy /usr/lib/X11/twm/system.twmrc ~/.twmrc
It gives
[attach]3514[/attach]
Contents of .twmrc
menu "main"
{
"Main Menu" f.title
"Debian" f.menu "/Debian"
"" f.nop
"Show Icon Manager" f.showiconmgr
"Hide Icon Manager" f.hideiconmgr
"" f.nop
"Exit" f.menu "Quit-Verify"
}
menu "Quit-Verify"
{
"Really quit twm?" f.title
"No, restart twm" f.restart
"Yes, really quit" f.quit
}
menu "windowops"
{
"Window Ops" f.title
"" f.nop
"Iconify" f.iconify
"Resize" f.resize
"Move" f.move
"Raise" f.raise
"Lower" f.lower
"" f.nop
"Focus" f.focus
"Unfocus" f.unfocus
"" f.nop
"Delete" f.delete
"Destroy" f.destroy
}
# Automatically generated file. Do not edit (see /usr/share/doc/menu/html/index. html)
menu "/Debian/Applications/Editors"
{
"Nano" f.exec "x-terminal-emulator -T \"Nano\" -e sh -c \"/bin/nano\" &"
}
menu "/Debian/Applications/Network/Communication"
{
"Mutt" f.exec "x-terminal-emulator -T \"Mutt\" -e sh -c \"/usr/bin/mutt\" &"
"Telnet" f.exec "x-terminal-emulator -T \"Telnet\" -e sh -c \"/usr/bin/te lnet\" &"
}
menu "/Debian/Applications/Network/Web Browsing"
{
"w3m" f.exec "x-terminal-emulator -T \"w3m\" -e sh -c \"/usr/bin/w3m /usr /share/doc/w3m/MANUAL.html\" &"
}
menu "/Debian/Applications/Network"
{
"Communication" f.menu "/Debian/Applications/Network/Communication"
"Web Browsing" f.menu "/Debian/Applications/Network/Web Browsing"
}
menu "/Debian/Applications/Programming"
{
"Python (v2.6)" f.exec "x-terminal-emulator -T \"Python (v2.6)\" -e sh -c \"/usr/bin/python2.6\" &"
"Python (v2.7)" f.exec "x-terminal-emulator -T \"Python (v2.7)\" -e sh -c \"/usr/bin/python2.7\" &"
}
menu "/Debian/Applications/Science/Mathematics"
{
"Bc" f.exec "x-terminal-emulator -T \"Bc\" -e sh -c \"/usr/bin/bc\" &"
"Dc" f.exec "x-terminal-emulator -T \"Dc\" -e sh -c \"/usr/bin/dc\" &"
}
menu "/Debian/Applications/Science"
{
"Mathematics" f.menu "/Debian/Applications/Science/Mathematics"
}
menu "/Debian/Applications/Shells"
{
"Bash" f.exec "x-terminal-emulator -T \"Bash\" -e sh -c \"/bin/bash --log in\" &"
"Dash" f.exec "x-terminal-emulator -T \"Dash\" -e sh -c \"/bin/dash -i\" &"
"Sh" f.exec "x-terminal-emulator -T \"Sh\" -e sh -c \"/bin/sh --login\" & "
}
menu "/Debian/Applications/System/Administration"
{
"Debian Task selector" f.exec "x-terminal-emulator -T \"Debian Task selec tor\" -e sh -c \"su-to-root -c tasksel\" &"
"Editres" f.exec "editres &"
"Reportbug" f.exec "x-terminal-emulator -T \"Reportbug\" -e sh -c \"/usr/ bin/reportbug --exit-prompt\" &"
"Reportbug (GTK+)" f.exec "/usr/bin/reportbug --exit-prompt --ui gtk2 &"
"Xfontsel" f.exec "xfontsel &"
"Xkill" f.exec "xkill &"
"Xrefresh" f.exec "xrefresh &"
}
menu "/Debian/Applications/System/Hardware"
{
"Xvidtune" f.exec "xvidtune &"
}
menu "/Debian/Applications/System/Monitoring"
{
"Pstree" f.exec "x-terminal-emulator -T \"Pstree\" -e sh -c \"/usr/bin/ps tree.x11\" &"
"Top" f.exec "x-terminal-emulator -T \"Top\" -e sh -c \"/usr/bin/top\" &"
"Xev" f.exec "x-terminal-emulator -e xev &"
}
menu "/Debian/Applications/System/Package Management"
{
"Aptitude Package Manager (text)" f.exec "x-terminal-emulator -T \"Aptitu de Package Manager (text)\" -e sh -c \"/usr/bin/aptitude-curses\" &"
}
menu "/Debian/Applications/System"
{
"Administration" f.menu "/Debian/Applications/System/Administration"
"Hardware" f.menu "/Debian/Applications/System/Hardware"
"Monitoring" f.menu "/Debian/Applications/System/Monitoring"
"Package Management" f.menu "/Debian/Applications/System/Package Management"
}
menu "/Debian/Applications/Terminal Emulators"
{
"XTerm" f.exec "xterm &"
"XTerm (Unicode)" f.exec "uxterm &"
}
menu "/Debian/Applications"
{
"Editors" f.menu "/Debian/Applications/Editors"
"Network" f.menu "/Debian/Applications/Network"
"Programming" f.menu "/Debian/Applications/Programming"
"Science" f.menu "/Debian/Applications/Science"
"Shells" f.menu "/Debian/Applications/Shells"
"System" f.menu "/Debian/Applications/System"
"Terminal Emulators" f.menu "/Debian/Applications/Terminal Emulators"
}
menu "/Debian/Help"
{
"Info" f.exec "x-terminal-emulator -T \"Info\" -e sh -c \"info\" &"
}
menu "/Debian/Screen/Locking"
{
"Lock Screen (XScreenSaver)" f.exec "/usr/bin/xscreensaver-command -lock & "
}
menu "/Debian/Screen/Saving"
{
"Activate ScreenSaver (Next)" f.exec "/usr/bin/xscreensaver-command -next &"
"Activate ScreenSaver (Previous)" f.exec "/usr/bin/xscreensaver-command -p rev &"
"Activate ScreenSaver (Random)" f.exec "/usr/bin/xscreensaver-command -act ivate &"
"Demo Screen Hacks" f.exec "/usr/bin/xscreensaver-command -demo &"
"Disable XScreenSaver" f.exec "/usr/bin/xscreensaver-command -exit &"
"Enable XScreenSaver" f.exec "/usr/bin/xscreensaver &"
"Reinitialize XScreenSaver" f.exec "/usr/bin/xscreensaver-command -restart &"
"ScreenSaver Preferences" f.exec "/usr/bin/xscreensaver-command -prefs &"
}
menu "/Debian/Screen"
{
"Locking" f.menu "/Debian/Screen/Locking"
"Saving" f.menu "/Debian/Screen/Saving"
}
menu "/Debian/Window Managers"
{
"Twm" f.startwm "twm"
}
menu "/Debian"
{
"Applications" f.menu "/Debian/Applications"
"Help" f.menu "/Debian/Help"
"Screen" f.menu "/Debian/Screen"
"Window Managers" f.menu "/Debian/Window Managers"
} 备用帖子。 备用帖子。 备用帖子。 备用帖子。 备用帖子。 备用帖子。 备用帖子。 备用帖子。 备用帖子。 备用帖子。 备用帖子。 备用帖子。 [b]回復 [url=http://www.telecom-cafe.com/forum/redirect.php?goto=findpost&pid=40836&ptid=6589]2#[/url] [i]角色[/i] [/b]
VNC需要用較多既bandwidth, 建議可行的話用RDP. 我會選擇xrdp, 用其他port, 安全和比較少資源。 [b]回復 [url=http://www.telecom-cafe.com/forum/redirect.php?goto=findpost&pid=40853&ptid=6589]18#[/url] [i]ckleea[/i] [/b]
me too.
頁:
[1]