关于vncserver的一些问题

在fedora16上,用vncviewer连接vncserver的时候,发现老是出现:

unable connect to socket: No route to host (113)
和fedora14不一样,vnc的默认端口5901并没有加入到信任端口里面,在其它端口里面添加用户自定义端口5901,tcp类型即可,或使用下列命令:($id是最后reject的ID号)
iptables -L -n --line-numbers
echo "Input iptables line numbers: "
read id
iptables -D INPUT $id
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 5901 -j ACCEPT
iptables -A INPUT -j REJECT --reject-with icmp-host-prohibited
iptables-save
在fedora16中,vncserver抛弃了配置文件/etc/sysconfig/vncservers的管理方式,而使用syscmd来直接管理,不过这里感觉复杂一些,首先,安装好tigervnc-server后,需要将配置文件拷贝一份:
cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
并修改其(/etc/systemd/system/vncserver@:1.service)内容:
User=cnangel
ExecStart=/usr/bin/vncserver :1 -geometry 1280x1024
然后,加载配置并放入启动选项,
sudo systemctl --system daemon-reload
最后,启动vncserver
systemctl enable vncserver@:1.service
systemctl start vncserver@:1.service
如果启动不了,可以尝试直接启动vncserver,然后再使用syscmd来启动。

Monthly Archives

Pages

Powered by Movable Type 7.7.2

About this Entry

This page contains a single entry by Cnangel published on November 21, 2011 2:11 PM.

fedora16中解决gnome-shell占用100%的问题 was the previous entry in this blog.

暂时空间关闭了 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.