PDA

View Full Version : Does anyone use VNC or Remote Desktop on PC-BSD?


californiajeff
07-19-2005, 10:59 PM
I am trying to implement a VNC solution in PC-BSD but I am having some difficulty. I am curious if anyone out there is already using something?

My goal is to use VNC so I can access my PC-BSD full screen over the internet and also so I don't have to buy a KVM switch! :wink:

scottro
07-20-2005, 12:12 AM
Install ports. As root

cd
cvsup ports-supfile
cd /usr/ports/net/tightvnc
make install clean


When it's done, go back to being regular user and then you can run

vncserver

It'll ask you for a password, create one. If this box is available on the Internet, pick a strong one.

Then you'll see that it's running a session, probably on screen 1. To access the box--say its is 192.168.8.12 you have the vnc client running on the MS (or whatever box) and for server name or IP address type in
[code]
192.168.8.12:1

It should then ask you for a password and you should be in a basic twm desktop. If you want a different desktop, then look for the .vncrc file in your home directory (Note the dot before its name)

You should see a line something like twm &, which you can change to startkde & (or whatever window manager you want.)

If any of this doesn't work, let me know, I'm doing it from memory but can check tomorrow.

californiajeff
07-21-2005, 05:35 PM
Then you'll see that it's running a session, probably on screen 1. To access the box--say its is 192.168.8.12 you have the vnc client running on the MS (or whatever box) and for server name or IP address type in

192.168.8.12:1


I see what might have ben causing me a problem. I see it looks like youare making a connection on port 1. Maybe that has been my problem all along. I am using UltraVNC on XP and it connects to port 5900 by default. I wonder if that has been the problem all along?

I will try your suggestions either tonight or tomorrow and let you know how it goes.

californiajeff
07-25-2005, 05:40 PM
I still can't get it to work. I am trying to connect to the TightVNC server from UltraVNC running on an XP box. I think I am gonna try installing TightVNC on the XP box to see if I can get any different results.

pepecito
01-27-2006, 05:23 PM
Hi,
I successfully got to control my WindowsXP PC from my PCBSD computer.
Here what I'm using:
Server: Ultravnc under windows.
Client: tightvnc under PCBSD.

Now I'm trying to do the reverse... i.e. control my PCBSD computer from my WindowsXP PC, but I can only get a new Xsession where I can do nothing!
I tryed to change the Xstart file found in the .vnc folder, changing "#twm &" with "startkde &", but it doesn't work.
Here is the log:

27/01/06 18:58:50 Xvnc version 3.3.tight1.2.9
27/01/06 18:58:50 Copyright (C) 1999 AT&T Laboratories Cambridge.
27/01/06 18:58:50 Copyright (C) 2000-2002 Constantin Kaplinsky.
27/01/06 18:58:50 All Rights Reserved.
27/01/06 18:58:50 See http://www.uk.research.att.com/vnc for information on VNC
27/01/06 18:58:50 See http://www.tightvnc.com for TightVNC-specific information
27/01/06 18:58:50 Desktop name 'X' (:1)
27/01/06 18:58:50 Protocol version supported 3.3
27/01/06 18:58:50 Listening for VNC connections on TCP port 5901
27/01/06 18:58:50 Listening for HTTP connections on TCP port 5801
27/01/06 18:58:50 URL http://:5801
AUDIT: Fri Jan 27 18:58:51 2006: 1723 Xvnc: client 1 rejected from local host
Xlib: connection to ":1.0" refused by server
Xlib: Client is not authorized to connect to Server
xrdb: Can't open display ':1'
AUDIT: Fri Jan 27 18:58:51 2006: 1723 Xvnc: client 1 rejected from local host
Xlib: connection to ":1.0" refused by server
Xlib: Client is not authorized to connect to Server
xsetroot: unable to open display ':1'
AUDIT: Fri Jan 27 18:58:51 2006: 1723 Xvnc: client 1 rejected from local host
Xlib: connection to ":1.0" refused by server
Xlib: Client is not authorized to connect to Server
Warning: This program is an suid-root program or is being run by the root user.
The full text of the error or warning message cannot be safely formatted
in this environment. You may get a more descriptive message by running the
program as a non-root user or by removing the suid bit on the executable.
xterm Xt error: Can't open display: %s
AUDIT: Fri Jan 27 18:58:51 2006: 1723 Xvnc: client 1 rejected from local host
AUDIT: Fri Jan 27 18:58:51 2006: 1723 Xvnc: client 1 rejected from local host
Xlib: connection to ":1.0" refused by server
Xlib: Client is not authorized to connect to Server
Can't open display (null)
AUDIT: Fri Jan 27 18:58:52 2006: 1723 Xvnc: client 1 rejected from local host
Xlib: connection to ":1.0" refused by server
Xlib: Client is not authorized to connect to Server
xset: unable to open display ":1"
AUDIT: Fri Jan 27 18:58:52 2006: 1723 Xvnc: client 1 rejected from local host
Xlib: connection to ":1.0" refused by server
Xlib: Client is not authorized to connect to Server
xsetroot: unable to open display ':1'
startkde: Starting up...
AUDIT: Fri Jan 27 18:58:52 2006: 1723 Xvnc: client 1 rejected from local host
Xlib: connection to ":1.0" refused by server
Xlib: Client is not authorized to connect to Server
ksplash: cannot connect to X server :1
AUDIT: Fri Jan 27 18:58:54 2006: 1723 Xvnc: client 1 rejected from local host
Xlib: connection to ":1.0" refused by server
Xlib: Client is not authorized to connect to Server
kdeinit: Can't connect to the X Server.
kdeinit: Might not terminate at end of session.
AUDIT: Fri Jan 27 18:58:54 2006: 1723 Xvnc: client 1 rejected from local host
Xlib: connection to ":1.0" refused by server
Xlib: Client is not authorized to connect to Server
kded: cannot connect to X server :1
kded: ERROR: KUniqueApplication: Registering failed!
kded: ERROR: Communication problem with kded, it probably crashed.
AUDIT: Fri Jan 27 18:58:54 2006: 1723 Xvnc: client 1 rejected from local host
Xlib: connection to ":1.0" refused by server
Xlib: Client is not authorized to connect to Server
kcminit: cannot connect to X server :1
AUDIT: Fri Jan 27 18:58:54 2006: 1723 Xvnc: client 1 rejected from local host
Xlib: connection to ":1.0" refused by server
Xlib: Client is not authorized to connect to Server
AUDIT: Fri Jan 27 18:58:54 2006: 1723 Xvnc: client 1 rejected from local host
Xlib: connection to ":1.0" refused by server
Xlib: Client is not authorized to connect to Server
ksmserver: cannot connect to X server :1
startkde: Shutting down...
klauncher: Exiting on signal 1
startkde: Running shutdown scripts...
startkde: Done.


What I would like to do is get the current display, not a brand new one!
Any idea??? :?

gnutux
01-28-2006, 02:13 AM
what's the port to connect from a Windows PC to my tightvnc server? Port 5900? As someone said?

gnutux

pepecito
01-28-2006, 06:49 AM
I can connect using ports 1 and 5901.

jdarnold
01-28-2006, 01:17 PM
I can highly recommend the x11vnc port. It works great for controlling my PCBSD box from my Windows box. The web page is here:

http://www.karlrunge.com/x11vnc/

And the port is in /usr/ports/net/x11vnc. You just run x11vnc, and then use TightVNC to connect and it is really snappy.

Another option is to just pop an X window up on your PC. It's a little more complicated, because you have to get an X server running on your PC, but I've found that the Cygwin (http://www.cygwin.com) server works great for it too. Then you can just SSH to your box, using the special X server flags for it (-Y is the best one) and you pop X windows right up on your Windows display.

pepecito
01-29-2006, 09:18 AM
This sounds good,... I will try it ASAP...
Anyway, a PBI for those kind of stufs will be necessary for PCBSD. Don't think so? :wink:

antik
02-01-2006, 02:28 PM
This sounds good,... I will try it ASAP...
Anyway, a PBI for those kind of stufs will be necessary for PCBSD. Don't think so? :wink:

Nomachine's NX server/client is much better than dog slow vnc.

pepecito
03-08-2006, 06:42 AM
Hi,
I want to mention that I succesfully got to control my PCBSD from my WIN machine using the remote desktop control which is availalble with the PCBSD installation, and using UltraVNC as client from WIN.
Vice-versa I got to control my WIN from PCBSD using UltraVNC server and TightVNC client in PCBSD.
:P

lommes
05-31-2006, 07:28 PM
maybe u have the wrong syntax to connect.

vnc wants different syntax for port and screen!!

afaik port only one : and if you use the port two ::


or another reason maybe that a firewall is active on the windows machine.

maybe the other way :)

dracheflieger
05-31-2006, 09:12 PM
Nomachine's NX server/client is much better than dog slow vnc.

Make that dog-ass slow...but NoMachine's commercial and I can't afford $70...any second choices antik?

antik
05-31-2006, 09:26 PM
Nomachine's NX server/client is much better than dog slow vnc.

Make that dog-ass slow...but NoMachine's commercial and I can't afford $70...any second choices antik?

Who said it cost you money? NX server sources is in ports:

# make search name=nxserver
Port: nxserver-1.4.0
Path: /usr/ports/net/nxserver
Info: Low-bandwidth X network server
Maint: freenx@deweyonline.com
B-deps: expat-2.0.0_1 fontconfig-2.3.2_5,1 freetype2-2.1.10_3 gettext-0.14.5_2 gmake-3.80_2 imake-6.9.0 jpeg-6b_4 libdrm-2.0.1_1 libiconv-1.9.2_2 perl-5.8.8 pkgconfig-0.20_2 png-1.2.8_3 xorg-libraries-6.9.0
R-deps: expat-2.0.0_1 fontconfig-2.3.2_5,1 freetype2-2.1.10_3 jpeg-6b_4 libdrm-2.0.1_1 netcat-1.10_2 pkgconfig-0.20_2 png-1.2.8_3 xorg-libraries-6.9.0
WWW: http://www.nomachine.com/

# portinstall net/nxserver

dracheflieger
05-31-2006, 09:42 PM
Thank you antik...I should remember to always do a make search instead of a google LOL

TerryP
06-02-2006, 09:41 PM
I use RealVNC's veiwer and sever from ports without a problem when ever I need GUI on my remote box.

zontar
06-03-2006, 01:29 PM
KDE comes with krfb and krdc.

I'm using krdc right now to post this from a machine running SuSE 10.1 and xvnc, while sitting at a different machine that's running a fresh install of PC-BSD 1.1. I'm also logged in to my Win2K Server box from a different krdc session on the PC-BSD machine - the Windows machine's running the RealVNC server.

Simple as pie. Just use the IP address plus port 0 for accessing machines running RealVNC, Ultr@VNC, or krfb, and port 5901 to get into one running xvnc.

No fancy configs needed on either the client or server end of things - both worked for me right out of the box.

The new PC-BSD release is looking good and working well. Keep it up!

Zelmo
06-03-2006, 03:26 PM
I'm going to second the recommendation for KDE's implementation of Krfb and Krdc.

Also, it looks like there's some confusion about addresses and ports. The :1 or :0 following the IP address is not a port in this case. It's the X server number. Connecting to 192.168.8.2:0 will give you access to the currently running desktop, and 192.168.8.2:1 will start a new X server on the remote machine and connect you to that new desktop.

If you're trying to connect from outside your LAN, remember that you need to forward port 5900 (VNC's default port) to your computer's IP address in your router setup. Then, from the remote computer, connect with VNC using your router's external IP address.

zontar
06-03-2006, 11:54 PM
Er... yeah, right about those *cough* port numbers *cough* for xvnc access. :oops:

And I didn't intend to disparage the ports collection - as inexperienced as I am with FreeBSD, I can see how essential it is. OTOH, krdc and krfb are there, and I use the heck out of them. One nice thing about PC-BSD is that it lets me leverage the KDE stuff that I've been using with Linux for the last couple of years whilst learning the differences between Linux and FreeBSD. Actually, my preferred Linux desktop is WindowMaker but I use a lot of KDE apps with it. Actually, I think I'm in danger of veering off-topic here... ;)

californiajeff
06-10-2006, 07:12 AM
I renewing work on this project again, so I will have an update if it works.