Xstartup file is empty

Discussion and Technical Support for general software applications and utilities including OS related issues.
mpompey
Member
Member
Posts: 16
Joined: February 7th, 2012, 5:37 pm

Xstartup file is empty

Post by mpompey »

I'm following the instructions on installing VNC on my ubuntu linux server. I've been able to install vnc4server and create a desktop session. I'm at the part of the instructions where I need to edit (vim .vnc/xstartup). However, when vim opens the file the file appears empty. I see a bunch of blue tildes and at the bottom of the screen I see ".vnc/xstartup" 0L, 0C {Zero lines, Zero Columns I guess)

I'm not sure how to regenerate the correct startup file.

--Complete linux noob, spoiled by Windows
User avatar
Ian
Moderator
Posts: 752
Joined: January 1st, 2011, 7:00 am

Re: Xstartup file is empty

Post by Ian »

Hi there and welcome to the forums. :thumbup:

Make sure you're in your home folder when you issue the vim .vnc/xstartup command. You will be in it by default when you first launch a Putty session. However, it's possible you've moved elsewhere since then. To get back to your home folder issue the following command:

Code: Select all

cd /home/YourNameGoesHere


Obviously substitute your own username with YourNameGoesHere above. THEN issue the vim .vnc/xstartup command.

Any better?

Ian.
mpompey
Member
Member
Posts: 16
Joined: February 7th, 2012, 5:37 pm

Re: Xstartup file is empty

Post by mpompey »

I'll try it now. Thanks for the reply.
mpompey
Member
Member
Posts: 16
Joined: February 7th, 2012, 5:37 pm

Re: Xstartup file is empty

Post by mpompey »

I confirmed that I was in the home folder. I used the terminal commands you provided and got the same result.
User avatar
Ian
Moderator
Posts: 752
Joined: January 1st, 2011, 7:00 am

Re: Xstartup file is empty

Post by Ian »

If you issue the following command when in your home folder do you see the .vnc folder?

Code: Select all

ls -al


If so, please cd into it:

Code: Select all

cd .vnc


and then issue another ls -al and send me the output.

Thanks.

Ian.
mpompey
Member
Member
Posts: 16
Joined: February 7th, 2012, 5:37 pm

Re: Xstartup file is empty

Post by mpompey »

Yes, I did see the .vnc folder.

I'm not sure how to copy the text from the command line output of my vm of my ubuntu server install into Windows where I'm responding so I'll type the output:

drwxr-xr-x 2 mpompey mpompey 4096 2012-02-13 14:00 .
drwxr-sr-s 8 mpompey mpompey 4096 2012-02-13 14:00 ..
-rw--------- 1 mpompey mpompey 0 2012-02-13 11:41 passwd
-rw-r--r-- 1 mpompey mpompey 1117 2012-02-13 11:51 ubuntu:1.log
-rwxr-xr-x 1 mpompey mpompey 0 2012-02-13 14:00 xstartup (xstartup is displayed in green font)
User avatar
Ian
Moderator
Posts: 752
Joined: January 1st, 2011, 7:00 am

Re: Xstartup file is empty

Post by Ian »

Hi there,

To take a screen dump of a window, make sure the window is active and hold down the Alt key and hit the PrintScreen [PrtScn] button. This copies the window into your clipboard. Then paste it into something like Paint using Ctrl-V.

Back to your issue. When you've issued the vncserver -geometry 1280x1024 -depth 24 command what comes back? Do you see output similar to the screenshot in my guide?

If so, issue the following command and send me the output:

Code: Select all

ps -ef |grep vnc


Hopefully you see something along the following lines?:

Xvnc4 :1 -desktop MediaServer:1 (htkh) -auth /home/htkh/.Xauthority -geometry 1280x1024 -depth 24 -rfbwait 30000 -rfbauth /home/htkh/.vnc/passwd -rfbport 5901 -pn -fp /usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/Speedo/,/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/X11R6/lib/X11/fonts/100dpi/,/usr/share/fonts/X11/misc/,/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/75dpi/,/usr/share/fonts/X11/100dpi/ -co /etc/X11/rgb
htkh 16492 16102 0 19:04 pts/0 00:00:00 grep --color=auto vnc


Thanks.
mpompey
Member
Member
Posts: 16
Joined: February 7th, 2012, 5:37 pm

Re: Xstartup file is empty

Post by mpompey »

When I issue the -geometry command I get the following back:

geometry screenshot.jpg
geometry screenshot.jpg (57.29 KiB) Viewed 2742 times



When I run the grep command I get the following:

geometry screenshot.jpg
geometry screenshot.jpg (57.29 KiB) Viewed 2742 times
Attachments
grep screenshot.jpg
grep screenshot.jpg (109.48 KiB) Viewed 2742 times
User avatar
Ian
Moderator
Posts: 752
Joined: January 1st, 2011, 7:00 am

Re: Xstartup file is empty

Post by Ian »

Hi,

Thanks for that. It all looks fine :?

Perhaps try deleting the xstartup file and issuing the vncserver -geometry 1280x1024 -depth 24 command again? So:

Code: Select all

sudo rm .vnc/xstartup


Ian.
mpompey
Member
Member
Posts: 16
Joined: February 7th, 2012, 5:37 pm

Re: Xstartup file is empty

Post by mpompey »

That did it! I did that and got the following:
Post Reply