You are not logged in.

#1 2019-05-12 14:48:41

rado84
Banned
From: Sofia, Bulgaria
Registered: 2019-05-12
Posts: 135

[SOLVED] How do I set a program to run as daemon?

I was using Mint for 2 years and recently I decided to switch to Arch, following the advice of a friend. For the most part I manage either on my own or using a search engine, rarely I resort to help from others. But there's one thing for which I can't find the "how to": how to set a program to run as a daemon? In Mint the Gnome-screenshot was running as a daemon and it was only a matter of hitting the printscreen button in order to make a screenshot. But in Arch I have to start the program manually and click the interface button in order to make a screenshot. So, how do I do the same in Arch?
I tried adding gnome-screenshot to the list of autorun programs but this only shows the program window and I still have to click the button to take a screenshot. On top of that gnome-screenshot's interface is included in the screenshot and I don't want that.

Last edited by rado84 (2019-05-12 17:28:20)


Core i7-4770, GTX 1660 Ti, 32 GB RAM, Arch 6.x LTS, Cinnamon 5.2.7, GDM

Offline

#2 2019-05-12 14:57:39

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,423

Re: [SOLVED] How do I set a program to run as daemon?

A program is either designed to be ran as a daemon or it is not designed to be ran as a daemon. From what I'm seeing gnome-screenshot is not intended for that. So it's more likely that there were global hotkeys assigned to invoke it in a specific way. Which environment did you use in Mint and which are you using in Arch? If it's Cinnamon in both, go through your shortcut settings.

Offline

#3 2019-05-12 15:07:34

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,530
Website

Re: [SOLVED] How do I set a program to run as daemon?

Running a program "as a daemon" will not change it's behavior.  The program you are referring to either does or does not bind the printscreen button - it sounds like it doesn't.  Running it as a daemon will not magically give it new behavior that it doesn't already have.

So forget that terminology, it's completely the wrong thing to look for.  You want to set a keybinding to run a screenshot command - that's all.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2019-05-12 15:15:38

rado84
Banned
From: Sofia, Bulgaria
Registered: 2019-05-12
Posts: 135

Re: [SOLVED] How do I set a program to run as daemon?

V1del wrote:

If it's Cinnamon in both

Yes it is.

Trilby wrote:

You want to set a keybinding to run a screenshot command - that's all.

I've set a screenshot key long before I realized there was no gnome-screenshot installed in the system. Even after installing it, if I press PrntScrn, nothing happens - no screenshot is created.


Core i7-4770, GTX 1660 Ti, 32 GB RAM, Arch 6.x LTS, Cinnamon 5.2.7, GDM

Offline

#5 2019-05-12 15:19:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,530
Website

Re: [SOLVED] How do I set a program to run as daemon?

Then you have not set PrntScrn to be a screenshot key.  If you want help with that, we'll need information about that.  As-is, this is a clear X-Y question.  Running a program as a daemon will not help you in any way: the program will still not bind the key, and it will still display it's interface.

Last edited by Trilby (2019-05-12 15:20:07)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2019-05-12 15:26:47

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] How do I set a program to run as daemon?

I don't use Cinnamon but the ArchWiki says that simply installing the gnome-screenshot package provides the functionality you want and also that the default key is PrtSc:

https://wiki.archlinux.org/index.php/Ci … Screenshot

Are you sure the PrtSc key isn't bound to some other application?

Try this to show the screenshot key:

gsettings get org.cinnamon.desktop.keybindings screenshot

And this to show any custom keybindings:

gsettings get org.cinnamon.desktop.keybindings custom-list

EDIT: corrected commands (but might still be wrong).

Last edited by Head_on_a_Stick (2019-05-12 15:32:23)


Jin, Jîyan, Azadî

Offline

#7 2019-05-12 15:28:00

rado84
Banned
From: Sofia, Bulgaria
Registered: 2019-05-12
Posts: 135

Re: [SOLVED] How do I set a program to run as daemon?

OK, what info do you need?


Core i7-4770, GTX 1660 Ti, 32 GB RAM, Arch 6.x LTS, Cinnamon 5.2.7, GDM

Offline

#8 2019-05-12 15:31:07

rado84
Banned
From: Sofia, Bulgaria
Registered: 2019-05-12
Posts: 135

Re: [SOLVED] How do I set a program to run as daemon?

Trilby wrote:

Then you have not set PrntScrn to be a screenshot key.  If you want help with that, we'll need information about that.  As-is, this is a clear X-Y question.  Running a program as a daemon will not help you in any way: the program will still not bind the key, and it will still display it's interface.

OK, what info do you need?

Head_on_a_Stick wrote:

I don't use Cinnamon but the ArchWiki says that simply installing the gnome-screenshot package provides the functionality you want and also that the default key is PrtSc:

https://wiki.archlinux.org/index.php/Ci … Screenshot

Are you sure the PrtSc key isn't bound to some other application?

This will show the screenshot key:

gsettings get org.gnome.settings-daemon.plugins.media-keys screenshot

This will show any custom keybindings:

gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings
[rado@anarchy]: ~>$ gsettings get org.gnome.settings-daemon.plugins.media-keys screenshot
No such schema “org.gnome.settings-daemon.plugins.media-keys”
[rado@anarchy]: ~>$ gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings
No such schema “org.gnome.settings-daemon.plugins.media-keys”
[rado@anarchy]: ~>$ 

I can't say if it's bound to another app but I doubt it is. No other app uses this key for anything. I mean, it wasn't used by any other app in Mint and since I know Cinnamon better than the other DEs, I'm quite sure no other apps use PrnScrn key.

Last edited by rado84 (2019-05-12 15:32:15)


Core i7-4770, GTX 1660 Ti, 32 GB RAM, Arch 6.x LTS, Cinnamon 5.2.7, GDM

Offline

#9 2019-05-12 15:33:09

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] How do I set a program to run as daemon?

^ Sorry, I was using the wrong schemas, check my edit or use dconf-editor to browse the settings.


Jin, Jîyan, Azadî

Offline

#10 2019-05-12 17:07:21

rado84
Banned
From: Sofia, Bulgaria
Registered: 2019-05-12
Posts: 135

Re: [SOLVED] How do I set a program to run as daemon?

Head_on_a_Stick wrote:

^ Sorry, I was using the wrong schemas, check my edit or use dconf-editor to browse the settings.

[rado@anarchy]: ~>$ gsettings get org.cinnamon.desktop.keybindings screenshot
No such key “screenshot”
[rado@anarchy]: ~>$ gsettings get org.cinnamon.desktop.keybindings custom-list
['custom0']
[rado@anarchy]: ~>$ 

No such key, it says. Which is weird bc when I open "Settings" --> "Keyboard" --> "Hotkeys", PrntScrn is set for "Screenshot". I set it myself before I downloaded gnome-screenshot.

Edit: I just did a logout (not reboot) in order to see if some other settings will work and suddenly gnome-screenshot started making screenshots. Can it be really? A reboot changes nothing whereas logging out makes things work? That doesn't make any sense to me.

Last edited by rado84 (2019-05-12 17:13:06)


Core i7-4770, GTX 1660 Ti, 32 GB RAM, Arch 6.x LTS, Cinnamon 5.2.7, GDM

Offline

#11 2019-05-12 17:10:48

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] How do I set a program to run as daemon?

rado84 wrote:

No such key, it says.

Well I don't use Cinnamon so I'm shooting in the dark here.

Have you tried dconf-editor? Navigate to org.cinnamon.desktop.keybindings and see what options there are.


Jin, Jîyan, Azadî

Offline

#12 2019-05-12 17:16:03

rado84
Banned
From: Sofia, Bulgaria
Registered: 2019-05-12
Posts: 135

Re: [SOLVED] How do I set a program to run as daemon?

I know of dconf-editor, it's one of the first things I install in any distro. There's no "keybindings" option. Anyway, it seems logging out somehow fixed the problem - see my previous post edited. Still, thanks everyone for answering. smile


Core i7-4770, GTX 1660 Ti, 32 GB RAM, Arch 6.x LTS, Cinnamon 5.2.7, GDM

Offline

#13 2019-05-12 17:27:58

loqs
Member
Registered: 2014-03-06
Posts: 19,101

Re: [SOLVED] How do I set a program to run as daemon?

For completeness

gsettings get org.cinnamon.desktop.keybindings.media-keys screenshot
['Print']

Offline

Board footer

Powered by FluxBB