0

This seems like it should be simple, but I can't seem to find out how to do this. I have an x11vnc server running on Ubuntu 20.04 inside a docker container, and I want to stop the x11vnc server so I can then start it as a non-root user. The x11vnc server was started with the -forever argument, and I suspect that's why killing it with kill -9 [PROCESS_ID] simply results in it restarting itself automatically.

Googling how to stop it just returns a gazillion results on how to prevent it from stopping, but I want the opposite.

Is there a simple way to stop this? I don't care about restarting it. I just want it to stop.

7
  • 2
    The kill command takes process IDs, not port numbers as parameters. You may have simply misaimed your kill command. And since kill -9 is a direct order for the OS kernel to "stop giving any more CPU time to this process and clean it up forcibly", the only way to escape it would be to have another process restart the killed one, and vice versa. Commented Jun 20, 2020 at 14:54
  • Relating unix.stackexchange.com/q/115107/117549 Commented Jun 20, 2020 at 15:03
  • @telcoM thanks for pointing that out. I was using the process id in the terminal, but when writing the question, I wrote it mistakenly as port number and have edited the question to fix that. The process does get killed and then restarts with a new PID, so I am sure I ran kill correctly and that it's the -forever flag that's causing the stopped program to immediately restart. Commented Jun 20, 2020 at 15:09
  • @JeffSchaller I did see that question, but from what I understand, in all of those answers, the end game is that x11vnc restarts. I just want to stop it so I can restart it on my own terms, like as a non-root user. Commented Jun 20, 2020 at 15:10
  • The two answers with the -stop and -clear-all don't work for me. The arguments are ignored. Commented Jun 20, 2020 at 15:13

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.