{"id":614,"date":"2006-11-02T22:31:58","date_gmt":"2006-11-03T06:31:58","guid":{"rendered":"http:\/\/www.wiredatom.com\/blog\/2006\/11\/02\/vnc-on-fedora-core-6\/"},"modified":"2006-11-02T22:40:12","modified_gmt":"2006-11-03T06:40:12","slug":"vnc-on-fedora-core-6","status":"publish","type":"post","link":"https:\/\/www.wiredatom.com\/blog\/2006\/11\/02\/vnc-on-fedora-core-6\/","title":{"rendered":"VNC on Fedora Core 6"},"content":{"rendered":"<p>Setting up VNC on a Linux box is always such a hassle. But I had to do it again today so that I don&#8217;t have to deal with two sets of mic and keyboards when I am testing my work in VMWare.<\/p>\n<p>Thank goodness for <a href=\"http:\/\/www.g-loaded.eu\/2005\/11\/10\/configure-vnc-server-in-fedora\/\" target=\"_blank\">this article<\/a> that I saved a bunch of time having to figure things out myself. Maybe in the [always] good old college days, I&#8217;d have done that. But now time is of utmost importance with an active child in the house and all&#8230; <\/p>\n<p>The only hiccups I got was that the above setup failed to discuss the issue with firewall and iptables. To allow outside access (even within the same home network), a port must be open to allow the traffic to flow through. There are a couple of ways to do that:<\/p>\n<p>Adding a rule through a GUI in Gnome:<\/p>\n<blockquote><p>\n1. Go to<\/p>\n<div class=\"codecolorer-container text railscasts\" style=\"overflow:auto;white-space:nowrap;width:680px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">System -&gt; Administration -&gt; Security Level and Firewall<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>2. (enter the appropriate password when prompted)<br \/>\n3. Under the<\/p>\n<div class=\"codecolorer-container text railscasts\" style=\"overflow:auto;white-space:nowrap;width:680px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">Firewall Options<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>tab, click on the white arrow at the bottom that&#8217;s labeled<\/p>\n<div class=\"codecolorer-container text railscasts\" style=\"overflow:auto;white-space:nowrap;width:680px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">Other ports<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>4. Click on<\/p>\n<div class=\"codecolorer-container text railscasts\" style=\"overflow:auto;white-space:nowrap;width:680px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">Add<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>and enter the port number you are allowing access; in my case, it was<\/p>\n<div class=\"codecolorer-container text railscasts\" style=\"overflow:auto;white-space:nowrap;width:680px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">5902<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>for display number 2. (Leave the<\/p>\n<div class=\"codecolorer-container text railscasts\" style=\"overflow:auto;white-space:nowrap;width:680px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">protocol<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>at default, which should be<\/p>\n<div class=\"codecolorer-container text railscasts\" style=\"overflow:auto;white-space:nowrap;width:680px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">tcp<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>5. Click<\/p>\n<div class=\"codecolorer-container text railscasts\" style=\"overflow:auto;white-space:nowrap;width:680px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">OK<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>all the way out, and iptables should have been restarted with the rule in place\n<\/p><\/blockquote>\n<p>A geekier way to do it is through command prompt:<\/p>\n<blockquote><p>\n1.<\/p>\n<div class=\"codecolorer-container text railscasts\" style=\"overflow:auto;white-space:nowrap;width:680px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">sudo vi \/etc\/sysconfig\/iptables<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>2. Add the following line to the rule:<\/p>\n<div class=\"codecolorer-container text railscasts\" style=\"overflow:auto;white-space:nowrap;width:680px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5902 -j ACCEPT<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>3. Restart iptables by issuing:<\/p>\n<div class=\"codecolorer-container text railscasts\" style=\"overflow:auto;white-space:nowrap;width:680px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">sudo \/etc\/rc.d\/init.d\/iptables restart<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<\/blockquote>\n<p>Another thing that many Linux novice (like myself) don&#8217;t quite grasp is the fact that Linux&#8217;s GUI is not at all tied to the operating system. You can have Gnome, KDE, Flux or Blackbox as GUI options installed on the same OS. And you can switch around as you please upon setting the preferred desktop and log\/in again. When you are viewing the remote system through VNC, you can do exactly the same thing &#8212; you can define what type of GUI you want to see as you launch your preferred VNC viewer client:<\/p>\n<blockquote><p>\nEdit<\/p>\n<div class=\"codecolorer-container text railscasts\" style=\"overflow:auto;white-space:nowrap;width:680px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">\/home\/_vnc_user_name_\/.vnc\/xstartup<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>as such:<\/p>\n<div class=\"codecolorer-container text railscasts\" style=\"overflow:auto;white-space:nowrap;width:680px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/><\/div><\/td><td><div class=\"text codecolorer\">#!\/bin\/sh<br \/>\n<br \/>\n# Uncomment the following two lines for normal desktop:<br \/>\n# unset SESSION_MANAGER<br \/>\n# exec \/etc\/X11\/xinit\/xinitrc<br \/>\n<br \/>\n[ -x \/etc\/vnc\/xstartup ] &amp;&amp; exec \/etc\/vnc\/xstartup<br \/>\n[ -r $HOME\/.Xresources ] &amp;&amp; xrdb $HOME\/.Xresources<br \/>\nxsetroot -solid grey<br \/>\nvncconfig -iconic &amp;<br \/>\nxterm -geometry 80x24+10+10 -ls -title &quot;$VNCDESKTOP Desktop&quot; &amp;<br \/>\n#xterm -geometry 80x24+10+10 -ls -title &quot;$VNCDESKTOP Desktop&quot; -e .\/menu &amp;<br \/>\n#twm &amp;<br \/>\n#fluxbox &amp;<br \/>\ngnome-session &amp; <br \/>\n#startkde &amp;<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<\/blockquote>\n<p>Noticed I commented out (#) some desktop GUI options at the bottom except Gnome. Basically you can use any one of them anytime as long as you restart the<\/p>\n<div class=\"codecolorer-container text railscasts\" style=\"overflow:auto;white-space:nowrap;width:680px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">vncserver<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>after you&#8217;ve made the changes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Setting up VNC on a Linux box is always such a hassle. But I had to do it again today so that I don&#8217;t have to deal with two sets of mic and keyboards when I am testing my work in VMWare. Thank goodness for this article that I saved a bunch of time having &hellip; <a href=\"https:\/\/www.wiredatom.com\/blog\/2006\/11\/02\/vnc-on-fedora-core-6\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;VNC on Fedora Core 6&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[10,14,4],"tags":[],"class_list":["post-614","post","type-post","status-publish","format-standard","hentry","category-geek-stuff","category-linuxunix","category-tips-tricks"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p54IqZ-9U","_links":{"self":[{"href":"https:\/\/www.wiredatom.com\/blog\/wp-json\/wp\/v2\/posts\/614","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wiredatom.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wiredatom.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wiredatom.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wiredatom.com\/blog\/wp-json\/wp\/v2\/comments?post=614"}],"version-history":[{"count":0,"href":"https:\/\/www.wiredatom.com\/blog\/wp-json\/wp\/v2\/posts\/614\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wiredatom.com\/blog\/wp-json\/wp\/v2\/media?parent=614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wiredatom.com\/blog\/wp-json\/wp\/v2\/categories?post=614"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wiredatom.com\/blog\/wp-json\/wp\/v2\/tags?post=614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}