How to Stop a VNC Server on Linux

How to Stop a VNC Server on Linux thumbnail
How to Stop a VNC Server on Linux

VNC Server is typically installed as a service, which means that it runs in the background rather than being visible to the user, and also starts when the computer boots up. For security reasons or troubleshooting measures, it is sometimes necessary to stop the VNC Server.

Things You'll Need

  • Root or superuser password for Linux
Show More

Instructions

    • 1

      Open a command line terminal by selecting the “Applications” menu, then click “Accessories,” then click on “Terminal” (if using the Gnome user interface) or click “KMenu,” then select “System,” and then click “Terminal (Konsole)” (if using the KDE user interface) and the command line terminal will display.

    • 2

      Type “service vncserver stop” and press the “Enter” key. If a “permission denied” or similar error appears, type “sudo vncserver stop” and press the “Enter” key. (Type in the superuser or root password if requested.)

    • 3

      Type “ps –aux | more” on the command line and press the “Enter” key, then press the “Space” bar on the keyboard to continue scrolling through the output while looking for “vncserver” in the list of running processes. If “vncserver” is not listed, then the VNC Server service has been stopped. If “vncserver” is listed, then proceed to the next step.

    • 4

      Note the number in the “vncserver” row that is located under the “PID” column in the command line output.

    • 5

      Type “kill PID”, replacing “PID” with the “vncserver” PID number found earlier in the command line output and then press the “Enter” key. If a “permission denied” or similar error appears, type “sudo kill PID”, replacing the “PID” with the “vnceserver” PID number, and press the “Enter” key. (Type in the superuser or root password if requested.)

    • 6

      Type “ps –aux | more” on the command line and press the “Enter” key, then press the “Space” bar on the keyboard to scroll through the output and verify that the “vncserver” name is no longer in the list.

Tips & Warnings

  • Be sure to place a space between each word or symbol for commands typed on the command line.

Related Searches:

References

  • Photo Credit Creatas Images/Creatas/Getty Images

Comments

You May Also Like

  • How to Start the VNC Server

    After a computer has been running for some time, or even after a reboot, the VNC server service may fail to start,...

  • How to Install a VNC Server in Ubuntu

    Virtual Network Computing (VNC) is a way to share the desktop of one computer (server) with a remote computer (client). The client's...

  • How to Restart a VNC Server in Linux

    Virtual Network Computing, or VNC, is where the user has remote access to a system as though the user were sitting in...

  • How to Stop VNC From Running Startup

    VNC is a remote control software for a desktop computer. Through a network, users can securely access VNC and manipulate a computer...

  • How to Start a VNC Server in Linux

    The two major desktop environments for Linux, Gnome and KDE, both come with their own VNC software bundled with the application suites....

  • How to Configure a VNC Server in Linux

    Controlling your computer remotely is just cool. Linux users have long used SSH to control their computers from afar using the command...

  • How to Run VNC in Linux

    VNC, also known as Virtual Network Computing, is an open, cross-platform protocol that allows you to access a remote computer as if...

  • How to Use VNC Server on Linux

    AT&T designed the virtual network computer, or VNC, for the purposes of administrating a machine without having to have the physical console...

Related Ads

Featured