How to stop a VNC server on linux

Written by dave wilson
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to stop a VNC server on linux
(Creatas Images/Creatas/Getty Images)

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.

Skill level:
Easy

Other People Are Reading

Things you need

  • Root or superuser password for Linux

Show MoreHide

Instructions

  1. 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. 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. 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. 4

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

  5. 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. 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 and warnings

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

Don't Miss

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.