LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   TightVNC and Fedora (https://www.linuxquestions.org/questions/linux-newbie-8/tightvnc-and-fedora-4175484352/)

jmenchions 11-12-2013 12:12 PM

TightVNC and Fedora
 
Hey I was wondering if anyone could solve this problem. I am connecting to a fedora box from a windows 7 box using tightvnc. The problem is that when I connect I am not prompted to log into my Linux box, therefore I am left there just looking at the fedora background without the ability to do anything. I read a thread here saying it might be the firewall, so I disabled windows firewall and then connected but still had the same issue. Any ideas on how to fix this?

Doug G 11-12-2013 06:05 PM

Is the vnc server on the Fedora computer known to be working correctly (can you connect properly from other computers)?

Ztcoracat 11-12-2013 08:46 PM

These pages might help-

http://www.linuxforums.org/forum/red...nc-viewer.html
http://docs.fedoraproject.org/en-US/...aperadded.html

http://www.linuxquestions.org/questi...xp-pro-134198/

If you are getting any error messages post them when you have time.

http://www.linuxquestions.org/questi...ghtvnc-845736/

Hope that helps-

jmenchions 11-13-2013 08:16 PM

It did work on my laptop once or twice but not anymore. I just used the

iptables -I INPUT -p tcp --dport 5900 --syn -j ACCEPT

command thinking it was an issue with the firewll on Fedora. I saved it with the

service iptables save

command. I opened ports 5900 - 5905 and still have the same issue.

Ztcoracat 11-13-2013 10:44 PM

Since you mentioned that when you do connect your not able to log into your Linux distro maybe try "vncpasswd" to create a password for your user if you haven't already.
Commands for VNC
http://www.linuxquestions.org/questi...re-6-a-558200/

I'm not on a server; sorry--

Maybe both machines need to be on the same subnet?

http://www.linuxquestions.org/questi...server-308676/

Habitual 11-14-2013 09:20 AM

This "fedora server" have a public IP, (internet or intranet)?
How was it installed on the server and when was the last time it worked?
What user are you trying to connect as? More than one? root? ???
"fedora" has like 21 versions now, which one? ;)

Code:

cat /etc/sysconfig/vncservers
output please. Sanitize it if necessary.
Since you say you get a desktop with nothing on it and can't do anything, this suggests that the firewall may not be an|the issue, however,
https://wiki.archlinux.org/index.php/Vncserver says that 5901 should be opened.
Code:

cat ~/.vnc/xstartup
output also please

What do the logs say?
Code:

grep -i vnc /var/log/* -R
Let us know.

jmenchions 11-15-2013 02:12 PM

[root@localhost ~]# cat /etc/sysconfig/vncservers
# THIS FILE HAS BEEN REPLACED BY /lib/systemd/system/vncserver@.service

[root@localhost ~]# cat /lib/systemd/system/vncserver@.service
# The vncserver service unit file
#
# Quick HowTo:
# 1. Copy this file to /etc/systemd/system/vncserver@:<display>.service
# 2. Edit <USER> and vncserver parameters appropriately
# ("runuser -l <USER> -c /usr/bin/vncserver %i -arg1 -arg2")
# 3. Run `systemctl daemon-reload`
# 4. Run `systemctl enable vncserver@:<display>.service`
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, you should
# limit connections to the local host and then tunnel from
# the machine you want to view VNC on (host A) to the machine
# whose VNC output you want to view (host B)
#
# [user@hostA ~]$ ssh -v -C -L 590N:localhost:590M hostB
#
# this will open a connection on port 590N of your hostA to hostB's port 590M
# (in fact, it ssh-connects to hostB and then connects to localhost (on hostB).
# See the ssh man page for details on port forwarding)
#
# You can then point a VNC client on hostA at vncdisplay N of localhost and with
# the help of ssh, you end up seeing what hostB makes available on port 590M
#
# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.
#
# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel. See the "-via" option in the
# `man vncviewer' manual page.


[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target

[Service]
Type=forking
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/sbin/runuser -l <USER> -c "/usr/bin/vncserver %i"
PIDFile=/home/<USER>/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'

[Install]
WantedBy=multi-user.target
[root@localhost ~]#

-------------------------------------------------------------------------------------------------------------------------------------

[root@localhost ~]# cat ~/.vnc/xstartup
cat: /root/.vnc/xstartup: No such file or directory
[root@localhost ~]#

--------------------------------------------------------------------------------------------------------------------------------------[root@localhost ~]# grep -i vnc /var/log/* -R
Binary file /var/log/journal/7725dfc225d14958a625ddaaaea5962b/system@0004eac0dcb73069-6826cd7ab2433ceb.journal~ matches
Binary file /var/log/journal/7725dfc225d14958a625ddaaaea5962b/system.journal matches
Binary file /var/log/journal/7725dfc225d14958a625ddaaaea5962b/system@0004eabed12ab411-a4342e1d04baf7fe.journal~ matches
/var/log/messages:Nov 13 22:48:23 localhost yum[1294]: Installed: tigervnc-icons-1.3.0-7.fc19.noarch
/var/log/messages:Nov 13 22:48:26 localhost yum[1294]: Installed: tigervnc-1.3.0-7.fc19.x86_64
/var/log/messages-20131110:Nov 8 23:56:05 localhost yum[2092]: Installed: tigervnc-server-1.3.0-7.fc19.x86_64
/var/log/messages-20131110:Nov 9 00:04:18 localhost yum[2366]: Installed: libvncserver-0.9.9-7.fc19.x86_64
/var/log/messages-20131110:Nov 9 00:04:24 localhost yum[2366]: Installed: x11vnc-0.9.13-8.fc19.x86_64
/var/log/prelink/prelink.log:/usr/lib64/libgvnc-1.0.so.0.0.1 0000003329600000-0000003329825208
/var/log/prelink/prelink.log:/usr/lib64/libvncserver.so.0.0.0 0000003326a00000-0000003326c563e8
/var/log/prelink/prelink.log:/usr/lib64/libvncclient.so.0.0.0 0000003326e00000-000000332701c670
/var/log/prelink/prelink.log:/usr/lib64/libgtk-vnc-2.0.so.0.0.2 0000003331600000-000000333180f6e8
/var/log/yum.log:Nov 08 23:56:05 Installed: tigervnc-server-1.3.0-7.fc19.x86_64
/var/log/yum.log:Nov 09 00:04:18 Installed: libvncserver-0.9.9-7.fc19.x86_64
/var/log/yum.log:Nov 09 00:04:24 Installed: x11vnc-0.9.13-8.fc19.x86_64
/var/log/yum.log:Nov 13 22:48:23 Installed: tigervnc-icons-1.3.0-7.fc19.noarch
/var/log/yum.log:Nov 13 22:48:26 Installed: tigervnc-1.3.0-7.fc19.x86_64
[root@localhost ~]#

John VV 11-15-2013 09:55 PM

you are trying to run it on fedora 19 as root !
that will not work out well


run tigervnc as your normal non root user
SE and pam will not like a gui run as root

the .vnc folder should be in your NON ROOT user home folder
/home/YourUserName/.vnc

Ztcoracat 11-16-2013 06:30 PM

Quote:

you are trying to run it on fedora 19 as root !
Is this the output John VV what brought you to that conclusion?

Code:

cat: /root/.vnc/xstartup: No such file or directory
[root@localhost ~]#


jmenchions 11-18-2013 09:45 PM

I'm stuck logging in as Root on VNC. The username box is empty and I can not click on it. It accepts the root password and no other. How do I change the username that I log in with?

Ztcoracat 11-18-2013 10:50 PM

Quote:

Originally Posted by jmenchions (Post 5066982)
I'm stuck logging in as Root on VNC. The username box is empty and I can not click on it. It accepts the root password and no other. How do I change the username that I log in with?

Try here:

http://www.ehow.com/how_5118043_chan...-password.html
http://www.ehow.com/how_7374102_chan...-password.html

Linux Man Page:
http://linux.die.net/man/1/vncpasswd

wmakowski 11-29-2013 08:32 PM

I have read several reports on the web and experienced for myself that tigervnc-server does not work with Gnome 3 unless you are in fallback mode. I'm on Fedora 18 and able to get tigervnc-server to work, but only if the user executing the vncserver command has Gnome 3 in fallback mode. If Gnome 3 is not in fallback mode you get exactly what you described in your initial post. Another option is to use vino-server instead to connect to Gnome 3 in standard experience mode, but you must have a running Gnome session that the client can connect to.

To explain the root only login issue you need to understand a little more about how vnc works. vnc is not like a regular login. When you connect you don't specify a user to connect to, you specify a display. If the display you are connecting to is running as root, root will be your user. So you need to start either vncserver or vino on fedora with the user you want to connect to with the vnc client. The password that you use to connect is set using vncpasswd in the case of tigervnc and with the Desktop Sharing application in the case of vino.

Let me know if you want specifics to setup either vncserver [tigervnc-server] or vino-server [vino].

See also Bug 896648 - vncserver fails to load gnome 3 session

wmakowski 11-29-2013 09:17 PM

Update: Did some further reading, the bug report has some possible work arounds, but not everyone has been successful. Will try myself soon, but am done for the day.

Ztcoracat 11-30-2013 12:03 PM

wmakowski :)

Thank you for jumping in and explaining.
You mentioned:

Quote:

but only if the user executing the vncserver command has Gnome 3 in fallback mode.
How would I or OP make fallback mode happen?

wmakowski 11-30-2013 11:08 PM

There are a couple ways. One is to login normally as the user, go to System Settings -> Details -> Graphics and then there is a switch to turn forced fallback mode on or off. You'll want to turn it on. After that you need to logout for it to take effect. If the vncserver was running it will need to be stopped and started as well so it picks up the new forced fallback mode. It works, but it means that this user will run in fallback mode however they login.

Another workaround is explained inside Bug 896648 Comment 5. They place a few extra commands inside /home/user/.vnc/xstartup to make the vncserver start Gnome in fallback.


All times are GMT -5. The time now is 09:03 PM.