日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux下搭建vnc服务器,linux下搭建Vncserver

發布時間:2024/10/8 linux 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux下搭建vnc服务器,linux下搭建Vncserver 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1、啟動vncserver

Vncserver start

[root@zhou .vnc]# vncserver

start

You will require a password to access

your desktops.

Password:

Verify:

usage: vncserver

[:] [-nohttpd] [-name

] [-depth

]

[-geometry

x]

[-pixelformat rgbNNN|bgrNNN]

...

vncserver -kill

第一次啟動vncserver 系統會提示你輸入密碼;若不是第一次登入vncserver 可以通過把/root/.vnc/passwd 刪除。再次運行vncserver start。

2、通過VNC Viewer

登入系統(命令行界面)

[root@zhou .vnc]# vncserver

:1

New 'zhou.com:1 (root)' desktop is

zhou.com:1

Starting applications specified in

/root/.vnc/xstartup

Log file is

/root/.vnc/zhou.com:1.log

3、通過VNC Viewer

登入系統(圖形化界面)

修改/root/.vnc/xstartup

[root@zhou .vnc]# vi xstartup

(紅色部分為修改內容)

#!/bin/sh

# Uncomment the following two lines

for normal desktop:

# unset

SESSION_MANAGER

# exec

/etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ]

&& exec

/etc/vnc/xstartup

[ -r $HOME/.Xresources ]

&& xrdb

$HOME/.Xresources

xsetroot -solid grey

vncconfig -iconic

&

#xterm -geometry

80x24+10+10 -ls -title "$VNCDESKTOP Desktop"

&

#twm

&

gnome-session

&

~

[root@zhou .vnc]# vncserver -kill

:1

Killing Xvnc process ID

17929

[root@zhou .vnc]# ls

-l

總計 40

-rw------- 1 root root

8 08-15 10:14 passwd

-rwxr-xr-x 1 root root 352

08-15 10:24 xstartup

-rw-r--r-- 1 root root 1301 08-15 10:26

zhou.com:1.log

-rw-r--r-- 1 root root 27113 08-15

08:21 zhou.com:2.log

[root@zhou .vnc]# vncserver

:1

New 'zhou.com:1 (root)' desktop is

zhou.com:1

Starting applications specified in

/root/.vnc/xstartup

Log file is

/root/.vnc/zhou.com:1.log

4、關閉vncserver

[root@zhou ~]# vncserver

:1

New 'zhou.com:1 (root)' desktop is

zhou.com:1

Starting applications specified in

/root/.vnc/xstartup

Log file is

/root/.vnc/zhou.com:1.log

[root@zhou ~]# ps aux | grep

vnc

root

10897

1.1

0.6

11556 7268

pts/1

S

04:13

0:00 Xvnc :1 -desktop zhou.com:1 (root) -httpd

/usr/share/vnc/classes -auth /root/.Xauthority -geometry 1024x768

-depth 16 -rfbwait 30000 -rfbauth /root/.vnc/passwd -rfbport 5901

-pn

root

10901

0.1

0.1

4276 1308

pts/1

S

04:13

0:00 vncconfig -iconic

root

11009

0.0

0.0

3924 664

pts/1

R+

04:13

0:00 grep vnc

[root@zhou ~]# vncserver -kill

:1

Killing Xvnc process ID

10897

[root@zhou ~]# ps aux | grep

vnc

root

11025

0.0

0.0

3924 688

pts/1

R+

04:14

0:00 grep vnc

[root@zhou ~]#

##############################################################

服務器典型配置

[root@ytxt ~]# cat ~/.vnc/xstartup

#!/bin/sh

# Uncomment the following two lines for normal

desktop:

# unset SESSION_MANAGER

# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] &&

exec /etc/vnc/xstartup

[ -r $HOME/.Xresources ] && xrdb

$HOME/.Xresources

xsetroot -solid grey

vncconfig -iconic &

#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop"

&

#twm &

gnome-session &

總結

以上是生活随笔為你收集整理的linux下搭建vnc服务器,linux下搭建Vncserver的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。