Redshift and geoclue2 [WORKAROUND]

Questions about applications and software
Forum rules
Before you post please read how to get help
Summerof69
Level 3
Level 3
Posts: 176
Joined: Sun Oct 25, 2015 11:52 am
Location: Mainland,Denmark

Re: Redshift and geoclue2 [WORKAROUND]

Post by Summerof69 »

Celmer wrote:
Sun May 05, 2019 5:49 am
Summerof69 check this guide: https://itsfoss.com/install-redshift-linux-mint/.
I've just checked synaptic package manager, and I do have the full geoclue-2 package installed, and I've compared the installed files with the screenshot you've provided, and the only one missing is the /etc/xdg/autostart/geoclue-demo-agent.desktop.
For millions of years mankind lived much like the animals
Then something happened which unleashed the power of our imagination
We learned to talk
All we need to do is make sure we keep talking
Stephen Hawkin's voice on Keep Talking by Pink Floyd
User avatar
kelebek333
Level 4
Level 4
Posts: 270
Joined: Sat Jun 25, 2011 11:57 am
Location: Türkiye
Contact:

Re: Redshift and geoclue2 [WORKAROUND]

Post by kelebek333 »

I was able to solve the problem as follows.

First, run following comand for creating systemd user unit file.

Code: Select all

mkdir -p ~/.config/systemd/user/ ; xed ~/.config/systemd/user/geoclue-agent.service
Then paste the following lines into the text editor and save file.

Code: Select all

[Unit]
Description=redshift needs to get a (geo)clue

[Service]
ExecStart=/usr/lib/geoclue-2.0/demos/where-am-i

[Install]
WantedBy=default.target
And run following command to start file.

Code: Select all

systemctl --user enable --now geoclue-agent.service
Now you can restart Redshift-gtk.
User avatar
deanr72
Level 3
Level 3
Posts: 163
Joined: Sat Mar 24, 2018 2:00 pm
Location: Poland

Re: Redshift and geoclue2 [WORKAROUND]

Post by deanr72 »

kelebek333 wrote:
Mon May 06, 2019 4:49 pm
I was able to solve the problem as follows.

First, run following comand for creating systemd user unit file.

Code: Select all

mkdir -p ~/.config/systemd/user/ ; xed ~/.config/systemd/user/geoclue-agent.service
Then paste the following lines into the text editor and save file.

Code: Select all

[Unit]
Description=redshift needs to get a (geo)clue

[Service]
ExecStart=/usr/lib/geoclue-2.0/demos/where-am-i

[Install]
WantedBy=default.target
And run following command to start file.

Code: Select all

systemctl --user enable --now geoclue-agent.service
Now you can restart Redshift-gtk.
Thanks @kelebek333. Finding and/or creating and/or editing config files still seems to be beyond my skills at the moment. Your post seems to have done everything for me and for that I am very appreciative. For now at least Redshift is up and working again.

Thank you again 8)
User avatar
deanr72
Level 3
Level 3
Posts: 163
Joined: Sat Mar 24, 2018 2:00 pm
Location: Poland

Re: Redshift and geoclue2 [WORKAROUND]

Post by deanr72 »

Well, it's stopped working again. Either I get the geoclue error notification on start-up or I get no notification but location is set to 0.0.0.

For the moment I can manually start it using this command in the terminal: redshift -O 5500

I'll try the other workaround when I find time I suppose but this is very frustrating and very surprising considering the popularity of this app. A simple Google search show this to be a very persistent and common problem too.
User avatar
slipstick
Level 6
Level 6
Posts: 1000
Joined: Sun Oct 21, 2012 9:56 pm
Location: Somewhere on the /LL0 scale

Re: Redshift and geoclue2 [WORKAROUND]

Post by slipstick »

I use Redshift in a manual mode - 3 levels of brightness/shift with a KB shortcut for each one. I like the flexibility to change the setting not only on time of day, but also depending on whether it is sunny or cloudy or raining. If 3 levels are not enough, of course you can set more. Details in this post:
viewtopic.php?f=49&t=290451#p1610369
In theory, theory and practice are the same. In practice, they ain't.
User avatar
deanr72
Level 3
Level 3
Posts: 163
Joined: Sat Mar 24, 2018 2:00 pm
Location: Poland

Re: Redshift and geoclue2 [WORKAROUND]

Post by deanr72 »

slipstick wrote:
Thu May 09, 2019 1:30 pm
I use Redshift in a manual mode - 3 levels of brightness/shift with a KB shortcut for each one. I like the flexibility to change the setting not only on time of day, but also depending on whether it is sunny or cloudy or raining. If 3 levels are not enough, of course you can set more. Details in this post:
viewtopic.php?f=49&t=290451#p1610369
Thanks for this. I was wondering about what numbers would be appropriate for what time of day / weather etc.

I've got f.lux working on Cinnamon but when I try it on my XFCE install via command line (https://itsfoss.com/night-shift-flux-ubuntu-linux/ ) I get this terminal message:

E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/

Does that mean both redshift and f.lux are now both largely defunct as applications?
User avatar
slipstick
Level 6
Level 6
Posts: 1000
Joined: Sun Oct 21, 2012 9:56 pm
Location: Somewhere on the /LL0 scale

Re: Redshift and geoclue2 [WORKAROUND]

Post by slipstick »

deanr72 wrote:
Thu May 09, 2019 2:57 pm
slipstick wrote:
Thu May 09, 2019 1:30 pm
I use Redshift in a manual mode - 3 levels of brightness/shift with a KB shortcut for each one. I like the flexibility to change the setting not only on time of day, but also depending on whether it is sunny or cloudy or raining. If 3 levels are not enough, of course you can set more. Details in this post:
viewtopic.php?f=49&t=290451#p1610369
Thanks for this. I was wondering about what numbers would be appropriate for what time of day / weather etc.
It depends on your monitor and the lighting in your room - these should get you close, but you may need to experiment to get the best level for your situation, or you may decide to add more levels.
deanr72 wrote:
Thu May 09, 2019 2:57 pm
I've got f.lux working on Cinnamon but when I try it on my XFCE install via command line (https://itsfoss.com/night-shift-flux-ubuntu-linux/ ) I get this terminal message:

E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/

Does that mean both redshift and f.lux are now both largely defunct as applications?
I've never used f.lux. I've never used redshift any other way than manual mode, where it works well. Defunct? - I don't know.
In theory, theory and practice are the same. In practice, they ain't.
User avatar
kelebek333
Level 4
Level 4
Posts: 270
Joined: Sat Jun 25, 2011 11:57 am
Location: Türkiye
Contact:

Re: Redshift and geoclue2 [WORKAROUND]

Post by kelebek333 »

deanr72 wrote:
Thu May 09, 2019 1:17 pm
Well, it's stopped working again. Either I get the geoclue error notification on start-up or I get no notification but location is set to 0.0.0.
You can try to edit geoclue.service as follow.

Open geoclue.service file with following command.

Code: Select all

sudo systemctl edit --full geoclue.service
Find following line,

Code: Select all

ExecStart=/usr/lib/geoclue-2.0/geoclue -t 5
and cahange it as follow.

Code: Select all

ExecStart=/usr/lib/geoclue-2.0/geoclue -t 100
You can save geoclue.service file with 'CTRL+O' and quit with 'CTRL+X'.

Finally You can restrart geoclue.service ot restart your PC.

Code: Select all

sudo systemctl restart geoclue.service
Post Reply

Return to “Software & Applications”