[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3755
  • Last Modified:

About VNC service

I download the vnc for windows and i can get into the terminal of my linux computer from windows...

How do i get to see the whole Gnome screen?  

right now, i go on vnc viewer... type in the ip:1 and it sends me to the terminal....
i wanted to use the linux machine as i use other windows machine thru remote desktop...

Please let me know how to accomplish that
0
jibranilyas
Asked:
jibranilyas
  • 6
  • 3
  • 3
2 Solutions
 
friekedCommented:
The link below has exactly what you're looking for.
http://www.justlinux.com/nhf/Networks/Using_VNC_with_Linux.html
0
 
ash4stuffCommented:
you need a file called xstartup under the .vnc folder of the user that starts the vnc server that reads:

gnome-session

restart the vnc server and then it should work...




0
 
ash4stuffCommented:
if that doesnt work, post the .log under the .vnc folder
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
ash4stuffCommented:
oh and make sure there is a vnc server running on the linux machine...
post what you get with: ps aux | grep vnc
0
 
jibranilyasAuthor Commented:
first i was seeing the terminal only... after modifying the file xstartup, i can only see a black screen with X as the cursor.

I deleted all the text from the xstartup file and replaced it with the following lines

!/bin/sh
[ -r $HOME/.Xresources ]
&& xrdb $HOME/.Xresources
xsetroot -solid grey
exec gnome-session &

Saved the file and restarted the vnc using

vncserver -depth 16 -geometry 800x600



0
 
jibranilyasAuthor Commented:
here is the log

Xvnc version 4.0b4 - built Apr 14 2004 12:42:18
Underlying X server release 40300000, The XFree86 Project, Inc


Fri Sep 10 11:19:02 2004
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on port 5901
 vncext:      Listening for HTTP connections on port 5801
 vncext:      created VNC server for screen 0
error opening security policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy
Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from list!
/root/.vnc/xstartup: line 1: !/bin/sh: No such file or directory
/root/.vnc/xstartup: line 3: syntax error near unexpected token `&&'
/root/.vnc/xstartup: line 3: `&& xrdb $HOME/.Xresources'

Fri Sep 10 11:19:17 2004
 Connections: accepted: 10.0.1.245::2910
 SConnection: Client needs protocol version 3.7
 SConnection: Client requests security type VncAuth(2)

Fri Sep 10 11:19:21 2004
 Client:      Server default pixel format depth 16 (16bpp) little-endian rgb565
 Client:      Client pixel format depth 8 (8bpp) rgb max 3,3,3 shift 4,2,0
************
eng of log file
0
 
jibranilyasAuthor Commented:
[root@nagiosmachine root]# ps aux | grep vnc
root      3941  0.3  3.0 41044 16020 ?       S    11:07   0:08 gedit file:///root/.vnc/nagiosmachine%3A1.log
root      4213  0.0  0.8  8404 4484 pts/7    S    11:19   0:00 Xvnc :1 -desktop nagiosmachine:1 (root) -httpd /usr/share/vnc/classes -auth /root/.Xauthority -geometry 800x600 -depth 16 -rfbwait 30000 -rfbauth /root/.vnc/passwd -rfbport 5901 -pn
root      4364  0.0  0.1  4220  580 pts/7    R    11:46   0:00 grep vnc
[root@nagiosmachine root]#
0
 
friekedCommented:
The first line in the xstartup file should be:
#!/bin/sh
You left out the '#'
0
 
friekedCommented:
If /bin/sh still can't be found try #!/bin/bash
or the location of whatever shell it is you are using.
0
 
jibranilyasAuthor Commented:
i put the # sign back

saved the file and restarted VNC

still the same problem... black screen.... with X cursor

how can i find out the location of shell that i m using
0
 
jibranilyasAuthor Commented:
http://www.justlinux.com/nhf/Networks/Using_VNC_with_Linux.html

i took out the # sign out per instruction set  " http://www.justlinux.com/nhf/Networks/Using_VNC_with_Linux.html "

Now you need to edit the ~/.VNC/xstartup (you can use any text editor to do this). In this file uncomment (remove the # signs) from these lines:

#!/bin/sh
[ -r $HOME/.Xresources ]
&& xrdb $HOME/.Xresources
xsetroot -solid grey
exec gnome-session &

0
 
jibranilyasAuthor Commented:
Thanks for the help guys... its working now

had to add the following two lines

unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 6
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now