配置vnc远程连接Linux和unix服务器图形界面安装Oracle

简介: 1、配置并开启vnc服务 [oracle@localhost ~]$ vncserver You will require a password to access your desktops.

1、配置并开启vnc服务

[oracle@localhost ~]$ vncserver

You will require a password to access your desktops.

Password:              ---这里要求输入vnc客户端登录的密码并重复
Verify:              

New 'localhost.localdomain:2 (oracle)' desktop is localhost.localdomain:2

Creating default startup script. /home/oracle/.vnc/xstartup
Starting applications specified in /home/oracle/.vnc/xstartup
Log file is /home/oracle/.vnc/localhost.localdomain:2.log
  ----如上告诉你vnc终端已经创建好,用的是第二个终端

2、在创建vnc服务的用户目录下会生成一个.vnc的隐藏目录
[oracle@localhost ~]$ ls -a
.              .bash_profile  Disk1     .gconfd          .gstreamer-0.10    .metacity                        README.htm  .viminfo
..             .bashrc        .eggcups  .gnome           .gtkrc-1.2-gnome2  .mozilla                         .redhat     .vnc
.bash_history  .chewing       .emacs    .gnome2          .ICEauthority      .nautilus                        .scim       .Xauthority
.bash_logout   Desktop        .gconf    .gnome2_private  .kde               p8202632_10205_Linux-x86-64.zip  .Trash      .zshrc

3、进入.vnc目录,找到xstartup可执行文件,用vi 编辑器打开
[oracle@localhost ~]$ cd .vnc/
[oracle@localhost .vnc]$ ls
localhost.localdomain:2.log  localhost.localdomain:2.pid  passwd  xstartup
[oracle@localhost .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 &
~
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
"xstartup" 12L, 333C 已写入                                                                                                              
[oracle@localhost .vnc]$ vncserver

New 'localhost.localdomain:3 (oracle)' desktop is localhost.localdomain:3

Starting applications specified in /home/oracle/.vnc/xstartup
Log file is /home/oracle/.vnc/localhost.localdomain:3.log


4、清除刚才创建的vnc虚拟终端
[oracle@localhost .vnc]$ vncserver  -kill :1

Can't find file /home/oracle/.vnc/localhost.localdomain:1.pid
You'll have to kill the Xvnc process manually

[oracle@localhost .vnc]$ vncserver  -kill :2
Killing Xvnc process ID 11889
[oracle@localhost .vnc]$ vncserver  -kill :3
Killing Xvnc process ID 11945
[oracle@localhost .vnc]$ vncserver  -kill :4

Can't find file /home/oracle/.vnc/localhost.localdomain:4.pid
You'll have to kill the Xvnc process manually

5、重新建立新的vnc虚拟终端
[oracle@localhost .vnc]$ vncserver

New 'localhost.localdomain:2 (oracle)' desktop is localhost.localdomain:2

Starting applications specified in /home/oracle/.vnc/xstartup
Log file is /home/oracle/.vnc/localhost.localdomain:2.log              --该终端号为 :2

6、在windows客户端用RealVNC软件中的Run VNC Viewer客户端连接。
7、在Run VNC Viewer  只需输入linux服务器的地址和刚才生成的终端号:2
   格式:192.168.1.56:2
8、输入刚才配置vnc服务的时候配的即可登录linux服务器图形界面。


 

 

目录
相关文章
|
2月前
|
监控 关系型数据库 Linux
|
28天前
|
存储 Shell Linux
【Shell 命令集合 网络通讯 】Linux 显示Unix-to-Unix Copy (UUCP) 系统的状态信息 uustat命令 使用指南
【Shell 命令集合 网络通讯 】Linux 显示Unix-to-Unix Copy (UUCP) 系统的状态信息 uustat命令 使用指南
26 0
|
30天前
struts+hibernate+oracle+easyui实现lazyout组件的简单案例——Dept实体类和对应的配置信息
struts+hibernate+oracle+easyui实现lazyout组件的简单案例——Dept实体类和对应的配置信息
13 1
|
2月前
|
弹性计算 运维 安全
阿里云服务器Windows和Linux操作系统区别对比
阿里云服务器Windows和Linux操作系统区别对比,性能有差异吗?有,同配置下Linux性能要优于Windows,但这与阿里云无关,仅仅是linux和windows之间的区别。另外,阿里云提供的windows和linux操作系统均为正版授权,用户不需要额外支付许可费用,如何选择?看用户自己的应用程序情况。
|
18天前
|
Ubuntu Linux 虚拟化
【Linux】ubuntu安装samba服务器
【Linux】ubuntu安装samba服务器
|
28天前
|
Shell Linux Apache
【Shell 命令集合 网络通讯 】Linux 管理Apache HTTP服务器 apachectl命令 使用教程
【Shell 命令集合 网络通讯 】Linux 管理Apache HTTP服务器 apachectl命令 使用教程
156 1
|
30天前
|
JavaScript Java 数据库连接
struts+hibernate+oracle+easyui实现lazyout组件的简单案例——Emp实体类和对应的配置信息
struts+hibernate+oracle+easyui实现lazyout组件的简单案例——Emp实体类和对应的配置信息
23 0
|
1月前
|
网络协议 Ubuntu Linux
如何在Linux环境搭建本地SVN服务器并结合cpolar实现公网访问
如何在Linux环境搭建本地SVN服务器并结合cpolar实现公网访问
|
1月前
|
Oracle Ubuntu Unix
Unix与Linux区别
Unix: Unix是一个操作系统家族的名称,最早由贝尔实验室(Bell Labs)的肖像电机公司(AT&T)开发。最早的Unix版本是在1969年创建的。 Linux: Linux是由芬兰计算机科学家Linus Torvalds在1991年创建的。它是作为一个免费、开放源代码的Unix克隆而开始的。
19 1
|
2月前
|
弹性计算 安全 Linux
阿里云ECS Linux系统漏洞修复详细教程
阿里云ECS Linux系统漏洞修复详细教程