run Tightvncserver at startup

How to make tightvncserver run at startup (i.e. with no user logged in, and no gui started).

I'm helping our local Public Library setup a Proxy Server.

Their tech guy is somewhat familiar with Debian, so the box is running Debian 6.0a (squeeze) - I'm more familiar with RHEL/CentOS.

We got it running without the GUI (gnome) auto running (i.e. it starts up to a login prompt). Boy do I miss 'chkconfig' and 'service'.

SSH, Squid, and the Squid Log Analyzer is all running ok at that point.

apt-get install tightvncserver got the app installed without any problems.

At first, I couldn't get tightvncserver to run without logging in a user (padmin).

I setup a tightvnc init.d script, and from the terminal, after logging in, the script correctly starts tightvncserver running as the user (padmin).

Adding that script to the services menu, and checking it to run at startup doesn't work.

First it gave a "missing user environment" error.

I added USER=padmin, and export USER to the script above the statement tightvncserver :1.

That almost works. The server starts up, starts tightvncserver without any errors, and stops at the login prompt.

The only problem is the VNC session is 'root' not 'padmin'.

So, what am I doing wrong?

So close, but logging into a remote GUI session as 'root' has trouble written all over it.

Thanks for any pointers, examples, code, etc (wild laughter is pretty much assumed).

0 Replies

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct