killall chromium-browser: no process found

8,477

Solution 1

Focus on achieving your goal, not on fixing the specific tool. If you're trying to kill Chromium's tab processes but not the main process, start by comparing their command lines, e.g. using ps -efww or pgrep -alf chromium.

You'll see that all "child" processes have a parameter like --type=zygote or --type=renderer. Since this directly describes the process' purpose, it will be more reliable than relying on minor differences in the executable name (which has nothing to do it as all Chromium subprocesses are named the same; the fact that "chromium-browser" used to work was just an artifact of Ubuntu's packaging).

Since this is part of the command line, you'll have to use pkill -f to match it:

pkill -f -- "--type=renderer"

pkill -f -- "chromium --type=renderer"

Solution 2

You can often times achieve exactly what was requested here by using the <SHIFT>-<ESC> Task Manager in Chrome/Chromium. This gives you an easy way to see which tabs are behaving badly and killing them individually with the End process button.

That's nice, but sometimes you just need to take charge of things from the Linux command-line...


Being able to kill browser processes seems to be a fundamental requirement of maintaining a stable Linux system. Unfortunately, the methods that work for this seem to be continually evolving. It's a battle of wills, I guess.

I haven't figured out what's wrong with killall, which I previously used for this.

pkill is funny. Despite being produced by tab completion, pkill chromium-browser has no effect (just quietly returns an error status). But leave off the trailing r and you're in business. pkill chromium-browse. I'm not sure it does exactly what you want, but at least it does something. I also found that running the command more than once makes a difference.

One clue is that ps -e also displays the shortened version of the name: chromium-browse


...And as noted by the OP in a comment to another answer, this command seems to work well (at the moment) for killing all tabs without killing windows.

pkill -f -- "chromium-browser --type=renderer"
Share:
8,477

Related videos on Youtube

xpt
Author by

xpt

Updated on September 18, 2022

Comments

  • xpt
    xpt over 1 year

    I had been able to do killall chromium-browser to stop all chromium browser sessions, but not anymore:

    $ killall chromium-browser
    chromium-browser: no process found
    

    That's been a while since my chromium is upgraded to newer version.

    $ apt-cache policy chromium-browser
    chromium-browser:
      Installed: 58.0.3029.110-0ubuntu0.17.04.1354
      Candidate: 58.0.3029.110-0ubuntu0.17.04.1354
    

    Is there still some tricks to kill chromium browser sessions this way?

    More details:

    I searched and found pkill chromium, but that's not what I want, because when using killall chromium-browser, all my chromium browser sessions are stopped and memory released <-- this is what I want. All the windows are still there, if I want to see the content again, I just need to refresh.

    But when I try pkill chromium today, all my chromium sessions are dead dead, no way to refresh, or resume. The only way out is to stop and kill them all. But chromium will not offer me to do restore this way. I.e., I lost everything.

  • xpt
    xpt almost 7 years
    Thanks a lot! Yes, achieving the goal! That's most important. FYI, I tried command #2 first but it didn't work, but #1 works. Then I realize that #2 should be pkill -f -- "chromium-browser --type=renderer" under Ubuntu.
  • Brent Bradburn
    Brent Bradburn over 5 years
    pkill chromium-browse has come to be my favorite command in Linux. I think I'll make it a cron job.