Skip to main content

The Struggle with X11vnc Rebuilding Ubuntu Server

And then I got stuck again getting remote access to work. It’s funny out of all the great features, only the remote access is not the friendliest in Linux setup. There is no proper standard guide so far I could find on the internet for X11VNC. However, after a long spending trying out different guide that doesn’t work at all, I can now confirm only one guides actually tested working during my struggle.

Without doubt, this whole thing is funny and stupid. But as long the X11VNC able to work in startup on my headless server is all I need to access anytime. The first guide I follow is using the steps from Digital Drugs. I tested running the script below to confirm first before I proceed further.

start on login-session-start

script

/usr/bin/x11vnc -xkb -noxrecord -noxfixes -noxdamage -auth /var/run/lightdm/root/:0 -display :0 -passwd "MyPasswd" -forever -bg -o /var/log/x11vnc.log

end script

The TightVNC in my Window machine was successfully able to connect. Well, problem occurs. The password doesn’t recognize when I key in ‘MyPasswd”. So what went wrong? I have no idea to be honest. I went on looking on the previous guide by updating another code into the last script like below.

start on login-session-start

script

x11vnc -rfbauth -rfbport 5901 -auth /var/run/lightdm/root/:0 -display /etc/x11vnc.pass -forever -bg -o /var/log/x11vnc.log

end script

There are a lot changes and code remove in the script by following others. For example like the password column I replace with -passwd "MyPasswd" to sudo x11vnc -storepasswd /etc/x11vnc.pass in the script as recommended by many. Yet again, not working.

Frustrated as usual. I tried to remember to find my last bookmark and follow the steps of 'Setting up X11vnc' at Ubuntu Forum as shown below.

  1. Install x11vnc: sudo apt-get install x11vnc
  2. Set the password: vncpasswd ~/.vnc/passwd (vncpasswd is included with vnc-common, which is installed by default)
  3. Make it auto-start when the user logs in and show which port we're running on (useful if you run multiple vnc servers) the port will be put in ~/.vnc/port.txt: sudo gedit /usr/local/bin/sharex11vnc Paste in the following code:
#!/bin/sh

x11vnc -nap -bg -many -rfbauth ~/.vnc/passwd -desktop "VNC ${USER}@${HOSTNAME}"|grep -Eo "[0-9]{4}">~/.vnc/port.txt

# comment out the following if you don't want a popup telling you which port you're using.
zenity --info --text="Your VNC port is `cat ~/.vnc/port.txt`"


  1. sudo chmod 755 /usr/local/bin/sharex11vnc

  2. System->Preferences->Sessions->Startup Programs then click Add and type in sharex11vnc

Add the code and restart, it finally works. This got me into thinking, are those scripts above are all wrong in the first place? But I can ensure that the first script that I tried does indeed work, just the password doesn't work even I change the password code. I'm not good in Linux, so it's hard to argue unless someone from the experts point out the problem.

Comments

Popular posts from this blog

Brunet SMTP Server Under Global Blacklist?

Based on my finding, yes it is. I already started noticing this issue starting last year December when my users starting to complain about their email messages not reaching several existing contacts. Slowly things get even uglier between February and March, the messages would deliver into junk in Outlook automatically. The 3rd party email like Gmail services follow, sending them into SPAM folder. Even the Barracuda Spam Firewall sees as threat and start rejecting. As far I know, my company experiences the worst when the email messages almost completely go AWOL in 3rd week last month. The 4th week, the messages all stuck in the queue for unknown reason and getting relay messages. We found out the local domain name suddenly no longer working and tried using smtp.brunet.bn as temporary solution. It didn’t work either. In the end, we had to convince the management to purchase 3rd party SMTP service to get the whole thing running. It’s not like we did not investigate the physical server, M…

Guide on Registering Brunei Citizenship Examination (Update#1)

I never thought registering Brunei Citizenship examination are really fucking inconvenienced. Worst, I don't see blogger write about it either in the web search telling us how and what to bring. So to make this easy, I decided to write the guide for my future reference and hopefully able to help you fellow PR. Avoid Waste of TimeFirst of all, people may told you to register in the capital usually way faster. It's true but my question is, do you really need to be that hurry? Bahasa Brunei are not easy to learned (even most local Malay) and remembering every details of this country takes lots of effort studying. Unless you already a good confidence in speaking and writing, you may go ahead. Still, if you live in Belait or Tutong or even Temburong district. My suggestion go for the nearest and shortest route to the immigration building for registration. The reason I recommend that way are nobody knows when the law and rules will change every years in Brunei (as well announced b…

Brunei Has a Porno Celebrity?

That was really unexpected information found in Wikipedia and surprise to know we have a porno celebrity in our country. Her name is Jayna Oso, was born in Brunei and raised at Hawaii according to the Wiki. She is really quite popular in the states and not to mention hardcore porn star.“This Photo belong to Shiroi Kaze”I don’t really know if that is true after I decided to look through her profile in the official porn site. It somehow didn’t state that she was from Brunei instead they only mention about Malaysia. I think this might be a mistake or something and probably her mother was Malaysian. It just my guess and only she herself know the answer. Well, if you want to dug deeper, you might want to visit her My Space and drop her a question.