Tightvnc run from the command line. Remote control of Linux from Windows. Slow work through a fast enough channel

Threat name

Executable file name:

Threat type:

Affected OS:

TightVNC

SigX.exe

Win32 (Windows XP, Windows Vista, Windows Seven, Windows 8)



TightVNC intrusion method

TightVNC copies its file (s) to your HDD... Typical file name SigX.exe... Then it creates startup key in the registry with the name TightVNC and the value SigX.exe... You can also find it in the list of processes named SigX.exe or TightVNC.

If you have further questions regarding TightVNC, please fill out and we will contact you shortly.


Download Removal Tool

Download this program and remove TightVNC and SigX.exe (download will start automatically):

* SpyHunter was developed by US-based company EnigmaSoftware and is able to remove TightVNC-related issues in automatic mode. The program was tested on Windows XP, Windows Vista, Windows 7 and Windows 8.

Functions

The program is able to protect files and settings from malicious code.

The program can fix browser problems and protect browser settings.

Removal is guaranteed - if SpyHunter fails, free support is provided.

Antivirus support 24/7 is included in the package.


Download a utility to remove TightVNC from Russian company Security Stronghold

If you are not sure which files to delete, use our program TightVNC Removal Tool.. TightVNC Removal Tool will find and completely remove TightVNC and all the problems associated with the TightVNC virus. Fast, easy, and handy, TightVNC Removal Tool protects your computer against TightVNC threat that does harm to your computer and violates your privacy. TightVNC Removal Tool scans your hard disks and registry and destroys any manifestation of TightVNC. Regular anti-virus software is powerless against malware like TightVNC. Download antimalware designed specifically to remove threats like TightVNC and SigX.exe (download of fix will start immediately):

Functions

Removes all files created by TightVNC.

Removes all registry entries created by TightVNC.

The program can fix browser problems.

Immunizes the system.

Removal is guaranteed - if the utility fails, free support is provided.

Antivirus support 24/7 through the GoToAssist system is included in the package.

Let our support team solve your problem with TightVNC and remove TightVNC right now!

Leave detailed description your problem with TightVNC in the section. Our support team will contact you and provide you with a step-by-step solution to your TightVNC problem. Please describe your problem as accurately as possible. This will help us provide you with the most effective TightVNC removal method.

How to remove TightVNC manually

This problem can be manually resolved by deleting the registry keys and files associated with TightVNC, removing it from the startup list, and de-registering all associated DLL files. In addition, the missing DLL files must be restored from the OS distribution if they were damaged. TightVNC.

In order to get rid of TightVNC, You need:

1. End the following processes and delete the corresponding files:

  • building-bcc32.txt
  • building.txt
  • changelog-java.htm
  • changelog-unix.htm
  • changelog-win32.htm
  • changelog.txt
  • compare.htm
  • cpqagent.dll
  • cpqaolan.dll
  • cpqci.dll
  • cpqdmiev.dll
  • cpqdmsc.dll
  • cpqdmun.dll
  • cpqevnt.dll
  • cpqhci.dll
  • cpqinit.dll
  • cpqisa.dll
  • cpqvid.dll
  • dmiagent.dll
  • docs.htm
  • hcidump.exe
  • java-changelog.txt
  • md5sums.txt
  • newviewer.htm
  • statements.htm
  • tightvnc-1.2.3-setup.exe
  • tightvnc-1.2.4-setup.exe
  • tightvnc-1.2.5-setup.exe
  • tightvnc-1.2.6-setup.exe
  • vncconnect.1.htm
  • vnchooks_settings.reg
  • vncpasswd.1.htm
  • vncserver.1.htm
  • vncviewer.1.htm
  • whatsnew-devel.htm
  • win32-changelog.txt
  • winst.htm
  • xvnc.1.htm
  • tightvnc.url
  • vnchooks.dll
  • vncviewer.exe
  • winvnc.exe

A warning: you only need to delete files whose checksums are in the malware list. Your system may have required files with the same names. We recommend using for a safe solution to the problem.

2. Delete the following folders:

3. Delete the following keys and / or registry key values:

A warning: If registry key values ​​are specified, you must delete only the specified values ​​and leave the keys themselves intact. We recommend using for a safe solution to the problem.

4. Reset browser settings

TightVNC can sometimes affect the settings of your browser, for example, change the search and home page... We recommend that you use the free "Reset Browsers" feature in "Tools" in the program to reset all browsers at once. Please note that before doing this you need to delete all files, folders and registry keys belonging to TightVNC. To reset browser settings manually, use these instructions:

For Internet Explorer

    If you are using Windows XP, click Start, and Open... Enter the following in the box Open without quotes and click Enter: "inetcpl.cpl".

    If you are using Windows 7 or Windows Vista, click Start... Enter the following in the box Search without quotes and click Enter: "inetcpl.cpl".

    Select a tab Additionally

    Under Reset parameters Internet browser Explorer, click Reset... And press Reset again in the window that opens.

    Select the checkbox Delete personal settings to delete history, restore search and home page.

    After Internet Explorer finishes resetting, click Close in the dialog box.

A warning: Reset browser settings v Instruments

For Google chrome

    Find the folder google install Chrome at: C: \ Users \ "username" \ AppData \ Local \ Google \ Chrome \ Application \ User Data.

    In folder User Data, find the file Default and rename it to DefaultBackup.

    Start Google Chrome and a new file will be created Default.

    Google Chrome settings reset

A warning: In case it doesn't work use free option Reset browser settings v Instruments in the Stronghold AntiMalware program.

For Mozilla Firefox

    Open Firefox

    Select from the menu Help > Troubleshooting Information.

    Click the button Reset Firefox.

    After Firefox finishes, it will show a window and create a folder on your desktop. Click on To complete.

A warning: This way you will lose your passwords! We recommend using the free option Reset browser settings v Instruments in the Stronghold AntiMalware program.

Today I will talk about installing and configuring the tightvnc vnc server in ubuntu 14.04 and 16.04. First, let's talk about why I chose tightvnc. When I first installed vnc server, I first installed x11vnc, it was described as an easy-to-install and user-friendly vnc server. So it is, everything works out of the box, but here's the bad luck - this vnc server works with an existing user session, and does not create a new one. That is, it connects to the user's current desktop. This will suit many people, but I needed a vnc server that would create a new session at startup. Here the tightvnc server came to my rescue. When tightvnc starts, the server creates a new session for the user. The advantages of such a server are that you can set an arbitrary resolution of the created desktop, regardless of the restrictions imposed by the computer system. For example, if the remote computer allows you to set the maximum resolution of 1280x1024, this does not prevent you from creating a desktop with an even higher resolution using tightvnc server. Also, using tightvnc server, you can create multiple desktops. This is very convenient when you need to organize work for several users on one computer.

So, let's get down to installing tightvnc server in ubuntu 16.04 and 14.04:

Sudo apt-get install tightvncserver

Running tightvnc: in the terminal we type (run as the current user, sudo is not needed)

Vncserver

At the first start, you will need to enter the password for access to the vnc server (at least 6 characters), and optionally the password for access in the "view only" mode.

By default, the tightvnc server port is 5901. You can specify a different port like this:

Vncserver: 2

This will run the tightvnc server on port 5902.

Running tightvnc server at a given screen resolution performed with the geometry parameter, for example:

Vncserver -geometry 1280x1024

That is, if you type in the terminal:

Vncserver -geometry 1280x1024: 3

then a vnc server with a desktop resolution of 1280x1024 pixels will be launched on port 5903. There are also a bunch of parameters - color depth and much more, in this article only the basic ones are considered.

Stopping tightvnc server:

Vncserver -kill: 1

Will stop vncserver on port 5901.

Tightvnc server setup

Installing tightvnc server creates a startup script called xstartup in the /home/user/.vnc directory. The fact is that when creating a new session, the tightvnc server starts the usual xs, and xstartup is the configuration file for the x-session being created, in which you need to specify all programs that should be loaded at the start of the x-session, up to such as window manager, for example. That is why, if you do not edit the startup script and connect to the tightvnc server, then you will see just a gray screen. To fix this, let's edit the /home/user/.vnc/xstartup file. The first thing we need is to add a window manager there. I recommend the "metacity" window manager. Let's install it:

Sudo apt-get install metacity

After installation, add the line "metacity &" to the xstartup file:

#! / bin / sh xrdb $ HOME / .Xresources #xsetroot -solid gray metacity &

Next, you need to launch one application, at least a terminal. Depending on the version of the linux distribution, the commands for launching the terminal may differ. I have gnome-terminal installed. In your case, it may not be installed, but rather xterm installed for example. In general, look at the logs if nothing starts up for you. The logs are located in the same folder as xstartup.

Add a terminal line with the following line after "metacity &":

Gnome-terminal &

In principle, this is the minimum possible configuration, since you can run any application from the terminal, but in order to fully understand the essence of xstartup, we will add there also firefox browser... All together it will turn out something like this:

#! / bin / sh xrdb $ HOME / .Xresources #xsetroot -solid gray metacity & gnome-terminal & firefox # Fix to make GNOME work export XKL_XMODMODMAP_DISABLE = 1 / etc / X11 / Xsession

After making changes to xstartup, be sure to restart tightvnc server if it was running. Now, after connecting to the tightvnc server, the following should appear on the desktop open terminal and the firefox browser. But that is not all. If you want, you can add many applications there, nautilus for example, well, in general, at your discretion. I would recommend adding a dock panel instead, for example gnome-panel, so that you don't have to go into the terminal every time to launch an application. Let's install it:

Sudo apt-get install gnome-panel

And add it to the xstartup file instead of the terminal and firefox applications:

#! / bin / sh xrdb $ HOME / .Xresources #xsetroot -solid gray metacity & gnome-panel # Fix to make GNOME work export XKL_XMODMAP_DISABLE = 1 / etc / X11 / Xsession

Now, when starting the x-session, the gnome panel will start.

That's all, the tightvnc server setup can be completed at this point. But for the hardened gnomers, I still have something, when you start the x-session, you can start the gnome session. Here is the startup script for the gnome session:

#! / bin / sh gnome-session & gnome-panel & gnome-settings-daemon & metacity export XKL_XMODMAP_DISABLE = 1 # / etc / X11 / Xsession

I want to warn you that in my gnome session there were glitches with browsers: the layout did not switch, some keys worked incorrectly. In general, see what is best for you - X's or a gnome session.

  • Tutorial

This is a guide on how to set up noVNC for remote access to computers on Windows.

Why noVNC?

- Windows has a "native" tool for remote access - Remote Desktop Connection. But it is not available in all versions of Windows - for example, it is not in the Home edition.
- There are also many VNC servers and clients for any Windows versions... But to use them, you need to install a VNC client. And there are times when it is impossible to put anything (restriction of rights), or it is undesirable, so as not to leave traces on someone else's computer.
- There is also Chrome Remote Desktop, which on the client side only needs an extension in the browser. But I had a case when the Chroma protocol was blocked by an organization (everything was blocked there), and noVNC uses regular HTTP and therefore worked.

As far as I know, noVNC is the only tool that allows you to connect to a remote computer without installing any client - only a browser is used.
There is also SPICE, but I have not found a Windows server for it.

As a result of this tutorial, we can simply open the link in the browser, enter the password and use the remote system.

A prerequisite is port forwarding, or white IP of the remote computer. You can also use VNC repeater. But that is already beyond the scope of this article.

General scheme

First, we will install a regular VNC server on port 5900.

Then we'll put noVNC and WebSockify on port 5901.

The goal is to get something like this:


Now we run the command prompt with administrator rights:


Launch WebSockify:

C: \> cd c: \ noVNC \ websockify c: \ noVNC \ websockify> websockify.exe 5901 127.0.0.1:5900 --web c: \ noVNC \ noVNC-master WARNING: no "resource" module, daemonizing support disabled WebSocket server settings: - Listen on: 5901 - Flash security policy server - Web server. Web root: c: \ noVNC \ noVNC-master - No SSL / TLS support (no cert file) - proxying from: 5901 to 127.0.0.1:5900
The first parameter above is the port on which noVNC will listen: 5901 ... This port needs to be made available to clients.

The second parameter is the IP and port where the VNC server is located: 127.0.0.1:5900

Third parameter --web instructs noVNC to serve the contents of the directory c: \ noVNC \ noVNC-master over HTTP (s). By default, noVNC only gives a VNC websocket, but this parameter allows you to have and HTTP server on the same port.

In the directory c: \ noVNC \ noVNC-master rename the file vnc.html v index.html to be served by default.

The noVNC client should now be available on port 5901:


Also try to open the noVNC page from another computer / smartphone to make sure it is accessible from the outside. If not, then check:

That your Windows Firewall does not block external connections to this port,
- that your router correctly redirects requests to this port to required computer; if necessary google "port forwarding".

We connect (Connect), enter the VNC password and see the desktop of the remote computer!

If something went wrong, then errors should show up in our console.

You can stop the noVNC server by pressing Ctrl-C in the console. The above configuration works over HTTP (and over WS).

Adding SSL with Self-Signed Certificate

Adding SSL is optional. You can create a self-signed certificate like this:

Openssl req -new -x509 -days 365 -nodes -out self.pem -keyout self.pem
For Windows, openssl can be taken.

As a result, we get the self.pem file, which must be pointed to when starting noVNC:

C: \ noVNC \ websockify> websockify.exe 5901 127.0.0.1:5900 --web c: \ noVNC \ noVNC-master --cert = c: \ noVNC \ self.pem
Now we have HTTPS and WSS (WebSocket Secure) working. For WSS, you need to specify Encrypt in the Settings. Interestingly, noVNC uses the same port for HTTP and HTTPS - it can distinguish between requests and respond correctly.

Since the certificate is self-signed, the browser will need to accept this certificate.

Let "s Encrypt

I have no instructions on how to configure the system so that Let's Encrypt automatically generate a certificate specifically for our system. This would require noVNC to be running on port 80, which is certainly possible, but can be inconvenient, and find a way to integrate certbot so that these files are published in the correct directory. I think it is possible, but I didn’t. If you finish, share in the comments.

In my case, I already have a home server with NGINX and DDNS name, which is configured to automatically receive a certificate from Lets Encrypt.

You can run something similar for yourself. there are instructions on how to set up Let's Encrypt for Linux and Windows.

Therefore for noVNC I just use the existing ones pem-files generated for nginx.

Let "s Encrypt create the following files:

Cert.pem: Your domain "s certificate chain.pem: The Let" s Encrypt chain certificate fullchain.pem: cert.pem and chain.pem combined privkey.pem: Your certificate "s private key
On Ubuntu, you can find them along the following path: / etc / letsencrypt / live / your_domain_name

Need to copy (merge) fullchain.pem and privkey.pem into one file, for example let's call it encrypt.pem, and we will use this file for noVNC.

Of course, this will only work if nginx server and noVNC- on one domain. The ports can be different.

And we must not forget that certificates are valid only for a few months, and then the updated files must be copied.

Add noVNC as a Windows service

Download the zip archive, and unpack the files from there so that they are in the same folder as the file websockify.exe, that is, in our case, in c: \ noVNC \ websockify.

At startup, the service will use the parameters from the file noVNCConfig.ini... Here's an example of my config:

5901 127.0.0.1:5900 --web C: \ noVNC \ noVNC-master --cert = c: \ noVNC \ encrypt.pem
Create a new service in the console running with administrator privileges:

Sc create "noVNC Websocket Server" binPath = "c: \ noVNC \ websockify \ noVNC Websocket Service.exe" DisplayName = "noVNC Websocket Server"
If you need to delete the service, then like this:

Sc delete "noVNC Websocket Server"
Open services (Control Panel → Administrative Tools → Services) and launch noVNC Websocket Server. Also here you can configure so that the service starts every time with Windows:

Known issues

Keyboard layout

I found that the Russian keyboard layout works in a rather unusual way:
If the client has selected Russian, then on remote computer no keystrokes are transmitted at all. remote desktop Add labels

VNC (stands for Virtual Network Computing) is a system that allows you to use a keyboard and mouse to interact with a graphical user interface on a remote server. This system allows you to manage files, software and settings on a remote server for users who feel uncomfortable when working with tools command line.

In this article, we will describe the process of installing VNC on a server running Ubuntu 16.04, and also learn how to create a secure connection to this server using an SSH tunnel. As a VNC server, we will use TightVNC - a fast and lightweight package for remote access. Thanks to this product, our VNC connection will work reliably even on slow Internet connections.

Before installation

To follow the instructions in this article, you will need:

    A droplet with Ubuntu 16.04 configured according to the steps in, including creating a non-root user with sudo privileges.

    A local computer with a VNC client supporting SSH tunnel connections. If you are using Windows, you can use TightVNC, RealVNC, or UltraVNC. Mas OS X users can use the built-in Screen Sharing utility, or use a cross-platform application such as RealVNC. Linux users have a wide selection: vinagre, krdc, RealVNC, TightVNC, etc.

Step 1 - Installing the Desktop Environment and VNC Server

By default, droplets with Ubuntu 16.04 do not have a graphical desktop environment and installed server VNC, so we'll start by installing them. We will install the packages latest version Xfce desktop environments and the TightVNC package from the Ubuntu repositories.

Install the Xfce and TightVNC packages on your server.

  • sudo apt install xfce4 xfce4-goodies tightvncserver

To complete the initial configuration of the VNC server after installing it, use the vncserver command to set a strong password.

  • vncserver

You will be prompted to enter and confirm a password, as well as provide a password for viewing. Users using the browsing password will not be able to do anything with the keyboard and mouse on the VNC machine. This can be useful to showcase something on your VNC server to other people, it doesn't have to be.

Executing vncserver completes VNC installations by creating default configuration files as well as generating information to connect to our server. After installing these packages, we can start configuring our server.

Step 2 - Configuring the VNC Server

First, let's specify the commands that the VNC server should execute at startup. These commands are specified in the xstartup configuration file in the .vnc subdirectory of your home directory. The startup script was created during the vncserver command in the previous step, now we will change some commands to work with Xfce.

When VNC first starts up, it launches a default server instance on port 5901. This port is called the display port, and in VNC it is denoted: 1. VNC can run many instances on other ports, for example: 2,: 3, and so on. When working with VNC servers, remember that display port numbered: X runs on port 5900 + X.

Since we are going to make changes to the VNC server configuration, we first need to stop the server instance running on port 5901.

  • vncserver -kill: 1

The output should look similar up to the process ID:

Killing Xtightvnc process ID 17648

Before making changes to the new xstartup file, let's do backup source file.

  • mv ~ / .vnc / xstartup ~ / .vnc / xstartup.bak

Now let's create a new xstartup file using nano or another text editor.

  • nano ~ / .vnc / xstartup

Paste these commands into a file to run them automatically when the VNC server starts or restarts, then save and close the file.

#! / bin / bash xrdb $ HOME / .Xresources startxfce4 &

The first command of the xrdb file $ HOME / .Xresources tells the framework graphical interface VNC user that you need to use a custom .Xresources file. The .Xresources file stores certain user desktop preferences, such as terminal colors, cursor theme, font rendering. The second command tells the server to start Xfce, which allows you to comfortably manage your server.

In order for the VNC server to use these settings, let's make the file executable.

  • sudo chmod + x ~ / .vnc / xstartup

Now let's restart the VNC server.

  • vncserver

The server should restart and output something similar to the console:

New "X" desktop is your_server_name.com:1 Starting applications specified in /home/sammy/.vnc/xstartup Log file is /home/sammy/.vnc/liniverse.com:1.log

Step 3 - Testing the VNC Desktop

Now let's check the connection with your VNC server.

First, let's create an SSH connection on your local machine to establish a secure connection to VNC. You can do this using the terminal on Linux or OS X following command... Remember to replace username and server_ip_address with your sudo username and the IP address of your server.

  • ssh -L 5901: 127.0.0.1: 5901 -N -f -l username server_ip_address

If you are using a graphical SSH client like PuTTY, set server_ip_address as the IP address of the connection, and also set localhost: 5901 as the forwarding port in your client's SSH connection settings.

After successful connection, you will see the default Xfce desktop. It should look similar to this:

You can access files in your home directory with file manager or from the command line:

Step 4 - Creating the VNC Service File

First, let's create a unit file / etc / systemd / system / [email protected] with the help of your text editor:

Copy and paste the following content into it. Make sure you change the field value User and the username in the field PIDFILE to your values.

/ etc / systemd / system / [email protected]

Description = Start TightVNC server at startup After = syslog.target network.target Type = forking User = sammy PAMName = login PIDFile = / home / sammy /.vnc/%H:%i.pid ExecStartPre = - / usr / bin / vncserver -kill:% i> / dev / null 2> & 1 ExecStart = / usr / bin / vncserver -depth 24 -geometry 1280x800:% i ExecStop = / usr / bin / vncserver -kill:% i WantedBy = multi-user.target

  • sudo systemctl daemon-reload

We activate the unit file.

Stop the current VNC server instance, if it is running.

  • vncserver -kill: 1

Make sure that the service is running with this command:

If the launch went well, the output should look something like this:

Name Conclusion

[email protected]- TightVNC server on Ubuntu 16.04 Loaded: loaded (/ etc / systemd / system / [email protected]; enabled; vendor preset: enabled) Active: active (running) since Mon 2016-04-25 03:21:34 EDT; 6s ago Process: 2924 ExecStop = / usr / bin / vncserver -kill:% i (code = exited, status = 0 / SUCCESS) ... systemd: Starting TightVNC server on Ubuntu 16.04 ... systemd: pam_unix (login: session ): session opened for user finid by (uid = 0) systemd: pam_unix (login: session): session opened for user finid by (uid = 0) systemd: Started TightVNC server on Ubuntu 16.04.

Conclusion

You now have a VNC server installed and configured on your Ubuntu 16.04 server. You can manage your files, software and settings with a simple and familiar graphical user interface.

Check if tightvncserver is installed

on the host to which we will connect remotely:

Dpkg -l | grep vnc

the package is installed, we will see:

Ii tightvncserver 1.3.9-6.4 amd64 virtual network computing server software

Install Tightvncserver

if not, install it:

Sudo apt-get install tightvncserver

Launch tightvncserver

(search for additional launch keys on the Internet):

Tightvncserver: 1 -geometry 1024x768 -dpi 96 -nolisten tcp

where
: 1 - display number that will be available on port 5901
-geometry 1024x768 - display resolution
-dpi 96 - Dots per inch
you will be prompted for a password (with confirmation, you must enter twice) and a request to enter a password for the "view only" mode, immediately after that you can connect to the display. For example, from under Windows by launching the Tightvnc Viewer program, and entering

Ipaddress: 5901

where ipaddress is the IP address of the host to which we are connecting
5901 - the port on which display 1 is available, you can enter ipaddress in TightVNC Viewer for Windows: 1

List running displays

ps aux | grep vnc

Stop the display

# 1 team

Tightvncserver -kill: 1

Set a permanent password to access the display

Since the display is always started on behalf of some user, set a password for the user NameUser, on behalf of which we will launch the display at startup (see below)

log in as the user on whose behalf we will launch the display by entering the command and password (it is interesting that su stands for switch user, and not as super user as many believe)

Su NameUser

we will enter a command to set a password, it will be necessary to enter it twice and indicate whether a password is required for the "read-only" mode

Tightvncpasswd

the password is written to the file

/home/NameUser/.vnc/passwd

deleting this file resets the password

Configuring the display display at startup

Let's make a backup of the display settings file

Sudo cp /home/NameUser/.vnc/xstartup /home/NameUser/.vnc/xstartup.default

replace the contents of the display file xstartup with

#! / bin / sh def export XKL_XMODMAP_DISABLE = 1 unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS gnome-panel & gnome-settings-daemon & metacity & nautilus & gnome-terminal &

You can start another window manager (of course, it must be installed, in this example Launches Gnome), as well as a lot more interesting things ...

Add tightvncserver to startup

create an autorun script for this, go to the folder

Cd /etc/init.d/

Or create a script file named vncserver

Touch vncserver

by pasting the following text into the file

File contents

#! / bin / sh -e
### BEGIN INIT INFO
# Provides: vncserver
# Required-Start: networking
# Default-Start: 3 4 5
# Default-Stop: 0 6
### END INIT INFO

PATH = "$ PATH: / usr / X11R6 / bin /"

# The Username: Group that will run VNC
export USER = "NameUser"
# $ (RUNAS)

# The display that VNC will use
DISPLAY = "1"

# Color depth (between 8 and 32)
DEPTH = "16"

# The Desktop geometry to use.
# GEOMETRY = " x "
# GEOMETRY = "800x600"
GEOMETRY = "1024x768"
# GEOMETRY = "1280x1024"

# The name that the VNC Desktop will have.
NAME = "my-vnc-server"

OPTIONS = "- name $ (NAME) -depth $ (DEPTH) -geometry $ (GEOMETRY): $ (DISPLAY)"

... / lib / lsb / init-functions

case "$ 1" in
start)
log_action_begin_msg "Starting vncserver for user" $ (USER) "on localhost: $ (DISPLAY)"
su $ (USER) -c "/ usr / bin / vncserver $ (OPTIONS)"
;;

stop)
log_action_begin_msg "Stoping vncserver for user" $ (USER) "on localhost: $ (DISPLAY)"
su $ (USER) -c "/ usr / bin / vncserver -kill: $ (DISPLAY)"
;;

restart)
$ 0 stop
$ 0 start
;;
esac

Or copy it from the site with the command

Wget http: // site / vncserver

Let's put the rights to it

to add to startup, run the command

Update-rc.d vncserver defaults

to start without rebooting and generally start and stop tightvncserver with the parameters specified in the script, use the commands accordingly

/etc/init.d/vncserver start /etc/init.d/vncserver stop


Top