LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-21-2008, 05:56 PM   #1
Jayla
Member
 
Registered: Nov 2005
Location: Suffolk, UK
Distribution: kubuntu 9.04
Posts: 188

Rep: Reputation: 30
VNCServer - auto allow incoming connections?


Hi

I've installed VNCServer on one ubuntu machine and want to remote in using another ubuntu machine

I only have 1 monitor, so everytime I want to remote in I have to reconnect the monitor to the server, accept the connection, then reconnect it back to the viewer/client

I've done some googling, but havent been able to find a "simple" answer as to how can I default it to always allow incoming connections, or at least from "safe" addresses?

Please advise me,

Regards
 
Old 03-21-2008, 06:46 PM   #2
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 211Reputation: 211Reputation: 211
When you setup the vnc access you should have been asked to supply a password. Using something like remote desktop connection or a similar app you only need to supply the username and password and screen number then hey presto you get the desktop for that machine.
 
Old 03-21-2008, 07:09 PM   #3
Jayla
Member
 
Registered: Nov 2005
Location: Suffolk, UK
Distribution: kubuntu 9.04
Posts: 188

Original Poster
Rep: Reputation: 30
Hi Nexus

I'm not sure I'm following...

I don't think it matters what the client is doing, as I need to "be on" the server itself so to speak to allow the incoming connection, it seems as if there must be a setting on the server to auto-allow connections, am I on the right path here?

Regards
 
Old 03-21-2008, 07:38 PM   #4
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 211Reputation: 211Reputation: 211
Just skip the parts you don't need or you could delete your current /home/username/.vnc folder on the server machine and start again with the instructions below.

On the server machine, you should have started the vncserver with something like:

vncserver -geometry 800x600 (or whatever resolution you prefer).

There will be a session number displayed and a .vnc directory will have been created in your home directory (/home/username/.vnc).

If you go into that directory you should see a script called xstartup. You should have then opened that file with a text editor and replaced this section where it says twm & with your desired window manager.

startkde & to use the kde window manager.

exec gnome-session & to use the gnome window manager.

startxfce4 & to use the xfce4 window manager.

After saving the edited xstartup file you should then kill the vncserver with vncserver -kill:x (x = the session or screen number), then restart the vncserver so that the newly edited xstartup file can be read.

From there it is simply a matter of using the client to connect to the server by using the hostname or ip address:x enter the password assigned on the vncserver and that should be it.

Last edited by {BBI}Nexus{BBI}; 03-21-2008 at 07:39 PM.
 
Old 03-21-2008, 07:55 PM   #5
Jayla
Member
 
Registered: Nov 2005
Location: Suffolk, UK
Distribution: kubuntu 9.04
Posts: 188

Original Poster
Rep: Reputation: 30
Hi Nexus,

This is what I have so far..

Quote:
jimmy@california:~/.vnc$ pwd
/home/jimmy/.vnc
jimmy@california:~/.vnc$ ls -a
. .. california:1.log california:1.pid passwd
jimmy@california:~/.vnc$ cat california\:1.pid
5526
jimmy@california:~/.vnc$
 
Old 03-21-2008, 08:14 PM   #6
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 211Reputation: 211Reputation: 211
You don't appear to have an xstartup file. I have the following 4 files in my .vnc directory: xxxxx:1.log xxxxx:1.pid passwd & xstartup. I find ls -ls a better view
 
Old 03-22-2008, 09:31 AM   #7
Jayla
Member
 
Registered: Nov 2005
Location: Suffolk, UK
Distribution: kubuntu 9.04
Posts: 188

Original Poster
Rep: Reputation: 30
Hi Nexus

Is there any chance you can paste the contents of your startup file, so I can try to create my own?

Thanks
 
Old 03-22-2008, 11:45 AM   #8
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 211Reputation: 211Reputation: 211
Remove (or rename) your current .vnc folder, then follow the instructions in thread #4, that should have you up and running in no time

Just in case you have problems I'll post my xstartup for you to refer to (or copy and adapt).

Quote:
#!/bin/sh

# Mandrake Linux VNC session startup script
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
startkde &
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
incoming connections with iptables willyweedle Linux - Networking 2 08-05-2007 02:33 PM
VNCServer not accpeting connections ALInux Linux - Networking 3 07-25-2006 12:04 AM
cannot Allowing Incoming X Connections with xhost + libin88 Linux - Enterprise 1 11-09-2005 03:25 PM
Listening for incoming connections vital_101 Mandriva 9 09-20-2005 08:26 PM
Sendmail and incoming connections mike_smith Linux - Networking 3 01-19-2004 06:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration