redshift icon indicating copy to clipboard operation
redshift copied to clipboard

multiple redshift-gtk and redshift processes can run at once

Open deutrino opened this issue 9 years ago • 7 comments

Linux Mint Xfce 17.1, 32-bit, on a Core 2 Duo iMac.

Running redshift on startup and then executing it from the menu results in two copies of redshift-gtk and redshift running for the same user. Sometimes they will "fight" and cause the screen to flicker. redshift and gtk-redshift 1.9.1.1-trusty.

Probably there should be a sanity check for this if not a limit of 1 process per user.

deutrino avatar May 19 '15 02:05 deutrino

We can't do this just yet since some users need to run multiple Redshift instances in order to control multiple displays/screens. When Redshift can do this from one instance we should consider a check like this.

jonls avatar May 19 '15 02:05 jonls

Would it be possible to implement a check that >1 redshift process is not controlling the same physical display? I respectfully believe this is a bug rather than an enhancement, although it may require new code to do the check and refuse to start (or similar resolution).

deutrino avatar May 26 '15 19:05 deutrino

Is this senario common? Why would you open a new instance of redshift-gtk if there is already one running, which you can readily see in the status icon tray?

It must also be considered that the instances may be running with different settings, and one may be disabled.

maandree avatar May 31 '15 21:05 maandree

I've explained the rationale behind this a little more in this Debian bug report: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=860841

basically, while it's nice that it's possible to run redshift "headless" (and could be the default, shipped with properly crafted systemd files), it's still very useful to have a GUI for users to know what's going on: they can then examine the configuration and status, and also turn the thing on and off.

thank you for your consideration...

anarcat avatar Apr 21 '17 17:04 anarcat

@deutrino @anarcat You can toggle it (open if closed, close if open) by assigning a keyboard shortcut to sh -c "pgrep redshift && pkill -TERM redshift || redshift-gtk"

anauta avatar Mar 03 '18 18:03 anauta

Is this s[c]enario common?

People run into running multiple instances of Redshift accidentally, and don't realize it, then get confused:

At least a warning would help.

Also, when I run redshift-gtk as a casual Mint user, it controls all displays. So running it again with the same parameters should definitely warn, if not exit outright.

dandv avatar Jan 29 '21 10:01 dandv

@dandv Agreed. Just spent an hour debugging my script to autostart redshift and then found out the program doesn't actually have a safety check. I then checked the man page to see if there was a switch to stop executing if an existing redshift instance is found, but nothing.

fearedbliss avatar Jun 09 '22 01:06 fearedbliss