Problem installing VNC

bt107
Posts: 88
Joined: Fri Aug 06, 2010 8:40 pm

Problem installing VNC

Postby bt107 » Sun Nov 21, 2010 7:13 pm

I've just re-installed Fedora and Amahi to a new disk in my server. Everything seemed to go fine until I tried to get VNC installed. I followed the steps in the wiki but when I got here:
service vncserver start

it failed saying No displays were defined. So I followed the next step as root:

* Edit /etc/sysconfig/vncservers and change lines as follows (username is your linux user for the VNC session):

VNCSERVERS="2:username"
VNCSERVERARGS[2]="-geometry 1024x768 -nolisten tcp -localhost"

But when I tried to start the vncserver as username it asked for a password which I gave it then it failed saying it couldn't open /home/username/.vnc/passwd for writing.

So I tried the # passwd command as username but it did nothing.

Interestingly, vncserver will run under root and I can access it from vncviewer as root but not as my username. This is curious because the first time I installed Amahi, VNC installed without a hitch. Can anyone shed some light here?

Thanks!

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Problem installing VNC

Postby bigfoot65 » Sun Nov 21, 2010 8:13 pm

Fedora has changed to tigervnc which works differently. I tried option 2 in the wiki and it works fine for me. I get a login screen with users, then I log in as if I was on the HDA.

Try that and see if it helps. Make sure you remove the stuff you did for option one though as it might conflict.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

bt107
Posts: 88
Joined: Fri Aug 06, 2010 8:40 pm

Re: Problem installing VNC

Postby bt107 » Tue Nov 23, 2010 5:34 am

Thanks but Method 2 didn't work either.

I finally got it working though. Turns out that root was the owner of /home/username/.vnc/ so VNC couldn't write its setup files when run as username . I changed ownership and was able to get it installed OK using Method 1 from the wiki. Funny thing though, I still couldn't connect. I went back and retraced each step from the wiki and from here but all I got was a blank screen in VNC viewer.

Finally after going through the install again and with a clean reboot, out of frustration I logged on as username (using Putty) and typed "vncserver" at the command prompt. It started a session and I could get to the proper desktop through VNC viewer.

Now according to the wiki I shouldn't have had to do that last step. If I understood it correctly after booting the server I should have been able to access username's desktop without doing anything else, right? But I couldn't get it to work that way for some still unknown (to me) reason.

Anyway, it seems to be working now. It was too late to check it out fully last night but it seemed OK. Thanks again for your input!

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Problem installing VNC

Postby bigfoot65 » Tue Nov 23, 2010 6:17 am

The wiki was updated late yesterday afternoon/evening. Not sure if you tried it after that, but seems the instructions were off a bit.

Funny thing is they worked for me. Oh well, they should be ok now...at least for option 1.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

User avatar
rgmhtt
Posts: 421
Joined: Sun Jan 11, 2009 9:26 am

Re: Problem installing VNC

Postby rgmhtt » Tue Nov 23, 2010 6:22 am

Thanks but Method 2 didn't work either.
I rewrote Method 1, not 2.
I finally got it working though. Turns out that root was the owner of /home/username/.vnc/ so VNC couldn't write its setup files when run as username . I changed ownership and was able to get it installed OK using Method 1 from the wiki.
You run vncpasswd from the owner (from root login, 'su username'). This creates ~/.vnc and ~/.vnc/passwd
Funny thing though, I still couldn't connect. I went back and retraced each step from the wiki and from here but all I got was a blank screen in VNC viewer.
Did you restart vncserver after defining the users in the VNCSERVER= line? After FIRST creating the passwd file? This then creates the other files in ~/.vnc directory. Then you edit the xstart file to exec gnome-session. THEN you restart vncserver. It takes a bit to get it configured properly. Actually I have NOT tried to alter the steps with TigerVNC. I learned these steps with the original VNC and have just followed the recipe ever since.
Finally after going through the install again and with a clean reboot,
Should have just taken a 'service vncserver restart'.
out of frustration I logged on as username (using Putty) and typed "vncserver" at the command prompt. It started a session and I could get to the proper desktop through VNC viewer.

Now according to the wiki I shouldn't have had to do that last step. If I understood it correctly after booting the server I should have been able to access username's desktop without doing anything else, right? But I couldn't get it to work that way for some still unknown (to me) reason.
I never have had to do that, and I have done this on dozens of builds.
Anyway, it seems to be working now. It was too late to check it out fully last night but it seemed OK. Thanks again for your input!
Keep plugging away. If I were a programmer, I would have scripted this a LONG time ago...

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Problem installing VNC

Postby bigfoot65 » Tue Nov 23, 2010 6:29 am

We could script it pretty easily. I might try that soon.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

bt107
Posts: 88
Joined: Fri Aug 06, 2010 8:40 pm

Re: Problem installing VNC

Postby bt107 » Tue Nov 23, 2010 12:53 pm

I think I followed the updated wiki but I did so many things something may have gotten out of order. This was my second Amahi install on the same box. I added an additional drive to remove / from the Greyhole pool (http://forums.amahi.org/viewtopic.php?f=16&t=1679). During the first install (several months ago) I had no problems installing VNC but this time it wasn't so easy. I don't know why. The wiki steps seemed clear but I just couldn't get it to work.

Anyway, it's working now. Thanks to all you guys who work to develop, package and document Amahi and its apps. I've been using it as a home server, media streamer (ps3mediaserver), and backup for several months now and it's worked pretty well flawlessly.

Thanks again for your help!

Who is online

Users browsing this forum: No registered users and 6 guests