[SOLVED] gnome-screenshot never quits and it messes up Xorg!

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
DaveJones
Level 1
Level 1
Posts: 46
Joined: Tue Sep 20, 2016 7:37 pm

[SOLVED] gnome-screenshot never quits and it messes up Xorg!

Post by DaveJones »

Hi all,
I recently had an issue where Cinnamon's nemo wouldn't launch any new processes. When I tried double-clicking on some file, nothing would come up. Cinnamon also couldn't start anything.So i tried running things from the command line and noticed this error:

Code: Select all

Maximum number of clients reached
It turns out that X11 ran out of resources. After looking at all the processes, I noticed a huge number of gnome-screenshot processes. So after I invoke a s screenshot tool with a keyboard shortcut, it never quits after finishing. And every time I run it, a new process is started.

If I run the ps and grep gnome-screenshot, this is what I see right now:

Code: Select all

 452769       1 david      gnome-screenshot --area
 452774       1 david      gnome-screenshot --area
 452778       1 david      gnome-screenshot --area
 452783       1 david      gnome-screenshot --area
 452788       1 david      gnome-screenshot --area
 452797       1 david      gnome-screenshot --area
 452802       1 david      gnome-screenshot --area
 502749       1 david      gnome-screenshot --area
 502754       1 david      gnome-screenshot --area
 502758       1 david      gnome-screenshot --area
 502763       1 david      gnome-screenshot --area
 502767       1 david      gnome-screenshot --area
 502773       1 david      gnome-screenshot --area
 502782       1 david      gnome-screenshot --area
 502787       1 david      gnome-screenshot --area
 791929       1 david      gnome-screenshot --area
 791937       1 david      gnome-screenshot --area
 791943       1 david      gnome-screenshot --area
 791947       1 david      gnome-screenshot --area
1220019       1 david      gnome-screenshot --area
1220223       1 david      gnome-screenshot --area
1220228       1 david      gnome-screenshot --area
1220232       1 david      gnome-screenshot --area
1220242       1 david      gnome-screenshot --area
1226579       1 david      gnome-screenshot --area
1226832       1 david      gnome-screenshot --area
1226838       1 david      gnome-screenshot --area
1226841       1 david      gnome-screenshot --area
1226846       1 david      gnome-screenshot --area
1226856       1 david      gnome-screenshot --area
1226861       1 david      gnome-screenshot --area
1629806       1 david      gnome-screenshot --area
1634849       1 david      gnome-screenshot --area
1634858       1 david      gnome-screenshot --area
1634863       1 david      gnome-screenshot --area
1634867       1 david      gnome-screenshot --area
1634872       1 david      gnome-screenshot --area
1634877       1 david      gnome-screenshot --area
1634886       1 david      gnome-screenshot --area
1634892       1 david      gnome-screenshot --area
if you don't reboot often and if you use gnome-screenshot few times a day, these instances accumulate and make Xorg not start new processes.
Is there a fix for this? Not sure where to report this issue.
I'm running the latest Cinnamon 4.6.7, nemo 4.6.5, and gnome-screenshot 3.38.0.

Thanks!
Last edited by DaveJones on Mon Nov 23, 2020 5:10 pm, edited 1 time in total.
mikeflan
Level 3
Level 3
Posts: 115
Joined: Sun Apr 26, 2020 9:28 am

Re: gnome-screenshot never quits and it messes up Xorg!

Post by mikeflan »

Hi Dave.
Put "gnome-screenshot Maximum number of clients reached" into duck-duck-go and you'll find this is a long-standing problem for some configurations. Some say to start X with the following command to fix the issue:

Code: Select all

nohup /usr/bin/X11/X -ac -noreset &
Let us know if you find a fix.

You can also use Shutter instead of gnome-screenshot if you want to.
User avatar
Flemur
Level 18
Level 18
Posts: 8850
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: gnome-screenshot never quits and it messes up Xorg!

Post by Flemur »

DaveJones wrote:
Fri Nov 20, 2020 10:43 pm
If I run the ps and grep gnome-screenshot, this is what I see right now:

Code: Select all

 452769       1 david      gnome-screenshot --area
You could replace it with mate-screenshot - I think their functionalities are nearly the same.

Edit: mate-screenshot --help shows exactly the same options as gnome-screenshot: https://linux.die.net/man/1/gnome-screenshot
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
DaveJones
Level 1
Level 1
Posts: 46
Joined: Tue Sep 20, 2016 7:37 pm

Re: gnome-screenshot never quits and it messes up Xorg!

Post by DaveJones »

mikeflan wrote:
Sat Nov 21, 2020 7:40 am
Hi Dave.
Put "gnome-screenshot Maximum number of clients reached" into duck-duck-go and you'll find this is a long-standing problem for some configurations. Some say to start X with the following command to fix the issue:

Code: Select all

nohup /usr/bin/X11/X -ac -noreset &
Let us know if you find a fix.

You can also use Shutter instead of gnome-screenshot if you want to.
Thank you so much! After doing more searching, one of the temporary fixes that people do is to raise the number of Xorg's maxclients to a higher number. I'll set mine to 512 but this won't really resolve the issue...
Flemur wrote:
Sat Nov 21, 2020 10:19 am
DaveJones wrote:
Fri Nov 20, 2020 10:43 pm
If I run the ps and grep gnome-screenshot, this is what I see right now:

Code: Select all

 452769       1 david      gnome-screenshot --area
You could replace it with mate-screenshot - I think their functionalities are nearly the same.

Edit: mate-screenshot --help shows exactly the same options as gnome-screenshot: https://linux.die.net/man/1/gnome-screenshot
Thank yo so much! I've just installed mate-screenshot but I am unsure how to tell Cinnamon to use it over the gnome-screenshot. I combed through System Settings and have looked at Keyboard section and I can only change keyboard shortcuts for screenshotting but not the program itself. Any idea how to switch?
Thanks again!
User avatar
Flemur
Level 18
Level 18
Posts: 8850
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: gnome-screenshot never quits and it messes up Xorg!

Post by Flemur »

DaveJones wrote:
Sat Nov 21, 2020 2:48 pm

Edit: mate-screenshot --help shows exactly the same options as gnome-screenshot: https://linux.die.net/man/1/gnome-screenshot

Thank yo so much! I've just installed mate-screenshot but I am unsure how to tell Cinnamon to use it over the gnome-screenshot. I combed through System Settings and have looked at Keyboard section and I can only change keyboard shortcuts for screenshotting but not the program itself. Any idea how to switch?
It's strange that you can't change it! I don't use Cin, so maybe start a new thread to fix that.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
mikeflan
Level 3
Level 3
Posts: 115
Joined: Sun Apr 26, 2020 9:28 am

Re: gnome-screenshot never quits and it messes up Xorg!

Post by mikeflan »

I am unsure how to tell Cinnamon to use it over the gnome-screenshot.
type

Code: Select all

mate-screenshot -a
in terminal.
Press PrintScreen. Make a square.
User avatar
Flemur
Level 18
Level 18
Posts: 8850
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: gnome-screenshot never quits and it messes up Xorg!

Post by Flemur »

mikeflan wrote:
Sun Nov 22, 2020 7:16 am
type

Code: Select all

mate-screenshot -a
in terminal.
Press PrintScreen. Make a square.
He wants to run it from the "Print Screen" button.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
DaveJones
Level 1
Level 1
Posts: 46
Joined: Tue Sep 20, 2016 7:37 pm

Re: gnome-screenshot never quits and it messes up Xorg!

Post by DaveJones »

mikeflan wrote:
Sun Nov 22, 2020 7:16 am
I am unsure how to tell Cinnamon to use it over the gnome-screenshot.
type

Code: Select all

mate-screenshot -a
in terminal.
Press PrintScreen. Make a square.
Flemur wrote:
Sun Nov 22, 2020 9:01 am
mikeflan wrote:
Sun Nov 22, 2020 7:16 am
type

Code: Select all

mate-screenshot -a
in terminal.
Press PrintScreen. Make a square.
He wants to run it from the "Print Screen" button.
Yep, I'd like to bind it to PrtScreen like gnome-screenshot is currently bound to it. I don't see a way to do it however.
mikeflan
Level 3
Level 3
Posts: 115
Joined: Sun Apr 26, 2020 9:28 am

Re: gnome-screenshot never quits and it messes up Xorg!

Post by mikeflan »

Here is a wild guess.
Menu - type Keyboard - select Keyboard.
Click on "Shortcuts" at the top.
Select "System" - "Screenshots and Recording" on the left.
Click on "Take a screenshot of an area" at the top.
Click on "Shift+Print" on the bottom.
Click on "Add custom shortcut" button on bottom.
Across from Command: enter "mate-screenshot -a" or some other command.
Give it a name.
see what happens when you hit "Shift + Print"
User avatar
Flemur
Level 18
Level 18
Posts: 8850
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: gnome-screenshot never quits and it messes up Xorg!

Post by Flemur »

DaveJones wrote:
Sat Nov 21, 2020 2:48 pm
I am unsure how to tell Cinnamon to use it over the gnome-screenshot.
https://www.addictivetips.com/ubuntu-li ... -cinnamon/
"The Cinnamon desktop has a reputation of being easy to configure. Despite this, many users have trouble figuring out how to customize the keyboard shortcuts on the desktop. For this reason, we’re making this guide. In it, we’ll discuss how to customize keyboard shortcuts on Cinnamon."

Also
https://www.lifewire.com/how-to-change- ... ts-4064754
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
DaveJones
Level 1
Level 1
Posts: 46
Joined: Tue Sep 20, 2016 7:37 pm

Re: gnome-screenshot never quits and it messes up Xorg!

Post by DaveJones »

mikeflan wrote:
Sun Nov 22, 2020 9:49 pm
Here is a wild guess.
Menu - type Keyboard - select Keyboard.
Click on "Shortcuts" at the top.
Select "System" - "Screenshots and Recording" on the left.
Click on "Take a screenshot of an area" at the top.
Click on "Shift+Print" on the bottom.
Click on "Add custom shortcut" button on bottom.
Across from Command: enter "mate-screenshot -a" or some other command.
Give it a name.
see what happens when you hit "Shift + Print"
Hi, this doesn't work the way you described it. You simply cannot modify the built-in Screenshot commands. What actually happens is that Cinnamon creates a Custom Shortcut. You might as well go directly to Custom section and create a new shortcut there. You have to manually override all of the the built-in ones from "Screenshots and Recording" section.
Thank you!
Flemur wrote:
Mon Nov 23, 2020 9:54 am
DaveJones wrote:
Sat Nov 21, 2020 2:48 pm
I am unsure how to tell Cinnamon to use it over the gnome-screenshot.
https://www.addictivetips.com/ubuntu-li ... -cinnamon/
"The Cinnamon desktop has a reputation of being easy to configure. Despite this, many users have trouble figuring out how to customize the keyboard shortcuts on the desktop. For this reason, we’re making this guide. In it, we’ll discuss how to customize keyboard shortcuts on Cinnamon."

Also
https://www.lifewire.com/how-to-change- ... ts-4064754
Thanks! This works the same way... it overrides the built-in shortcuts. Cinnamon seems to be hard-wired to use gnome-screenshot, however.
Anyway, I've removed gnome-screenshot from my computer so there's no way that Cinnamon will ever use it and cause this issue again.
Post Reply

Return to “Software & Applications”