Vino& VNC server auto start after Ubuntu boot up
来源:互联网 发布:同望预算软件 编辑:程序博客网 时间:2024/05/17 06:51
remote login problem
there are two kinds of remote desktop connection server on Ubuntu:Vino and VNC.(in fact other Linux based systems like Fedora also supported).
while a most common problem encountered is that after the remote side rebooted, the VNC become not available.
that's caused by the service would only be started after system session started. before that no service is alive at all.
some people workaround by disable all password verify while that's not safe for security concern.
solution thought
in fact the key point is to make the target server run after system is started, whenever an normal user session started.
Vino
for the default service Ubnutu provided, here is one way found:
1. Edit /etc/gdm/Init/Default – this gets run when gdm starts (at Login Screen)vi /etc/gdm/Init/Default2. Add the following line right before exit 0 at the end of the file – Vino server runs when gdm starts up/usr/lib/vino/vino-server &Vino server starts up when gdm starts up; however, when username and password is typed in, gdm kill this vino-server meaning VNC connection will be terminated. To prevent this,3. Edit /etc/gdm/gdm.conf with your favorite text editorvi /etc/gdm/gdm.conf4. Find a commented option KillInitClients=true. Uncomment it and change it to false and save it. – this prevents vino-server from being killed right after loginKillInitClients=falsesome advise that above "KillInitClients" flag is better to set as default value and add one root preference by "sudo vino-preferences" to avoid stuck problem as there is user switch during UI starting(initialized by root and switch to normal user after login).
VNC
its name is vnc4server while previous named as vino-server.
1.first install the server:sudo apt-get install vnc4server
2.then close original vino service:just open remote desktop sharing and uncheck the first checkbox "Sharing"-->"Alloow other users to view your desktop"
3.config an login passwrod by typing:vncpasswordno "sudo" is needed
4.start vnc service:vncserver -geometry 1920×1280 -alwaysshared :1-geometry indicates the screen definations, here is 1920*1280, the "*" is "x" but not the operator multiple-alwaysshared allows more than one user to login to one desktop:1 is just the id you named for this remote desktop, you can use <ip>:1 to connect to this desktopafter the service started, an ".vnc" folder would be generated under current user directory:/home/<bob>/.vnc/modify xstartup file under this folder:mark the line "twm &" with "#",and add gnome-session &save and exit.5. try to connect to the VNC server by VNCViewer or others
reference
http://blog.sina.com.cn/s/blog_86d540e401016hhv.html
- Vino& VNC server auto start after Ubuntu boot up
- Start a VNC Server on Ubuntu on Boot
- Ubuntu下包含2种远程桌面的方式:VINO-Server以及VNC Server
- Ubuntu下包含2种远程桌面的方式:VINO-Server以及VNC Server
- ssh远程打开ubuntu的vino-server
- Clean Up Ubuntu Grub Boot Menu After Upgrades
- HOWTO: Enable and control the gnome VNC vino-server from an SSH connection
- raspberry robot auto start server
- [Android] Start your activity after boot completed
- VNC Server in Virtual Mode does not start correctly on Ubuntu 12.04
- Set up the VNC Server in Fedora
- Auto install opencv after installing Ubuntu
- Auto install opencv after installing Ubuntu
- Start application automatically during controller boot-up
- Automatically start VNC server on startup
- Ubuntu /boot paritiion clean up
- Windows CE: Programmatically Setting Up an Application to Auto Start
- Ubuntu下安装VNC server & 【VNC】修改VNC分辨率大小
- 顺丰BSP接口PHP开发注意事项
- 将一个媒体文件切割成多个碎片
- MySQL树形查询
- CPU简介
- [Database] 数据库事务隔离级别 2
- Vino& VNC server auto start after Ubuntu boot up
- 环形队列
- AJAX嵌套获取数据的IDEA
- ProtocolBuffer for Objective-C 运行环境配置及使用
- 解决PHP里大量数据循环时内存耗尽的方法
- 顺序队列
- Log4j 2使用教程
- 乘法表
- JPEG-LS压缩算法研究