LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-12-2016, 08:18 AM   #1
Johnny_Metal
Member
 
Registered: Feb 2016
Posts: 72

Rep: Reputation: 1
Cannot Autostart Redshift


Hello everyone,

I have recently installed Redshift, a tool for the adjustment of the colour temperature of your screen. I did so from the source code, with the help of someone here already.

The steps i have taken are written below:

Quote:
Build from repository
---------------------

``` shell
$ ./bootstrap
$ ./configure
```

The bootstrap script will use autotools to set up the build environment
and create the `configure` script.

Use `./configure --help` for options. Use `--prefix` to make an install in
your home directory. This is necessary to test python scripts. The systemd
user unit directory should be set to avoid writing to the system location.

Systemd will look for the unit files in `~/.config/systemd/user` so this
directory can be used as a target if the unit files will be used. Otherwise
the location can be set to `no` to disable the systemd files.

Example:

``` shell
$ ./configure --prefix=$HOME/redshift/root \
--with-systemduserunitdir=$HOME/.config/systemd/user
```

Now, build the files:

``` shell
$ make
```

The main redshift program can be run at this point. To install to the
prefix directory run:

``` shell
$ make install
```

You can now run the python script. Example:

``` shell
$ $HOME/redshift/root/bin/redshift-gtk
I did precisely as was recommended here.

I slightly altered and made use of .config file which i moved over to my ~/.config folder. The program seems to run just fine. Below are the contents of my file:

Quote:
; Global settings for redshift
[redshift]
; Set the day and night screen temperatures
temp-day=6500
temp-night=4200

; Enable/Disable a smooth transition between day and night
; 0 will cause a direct change from day to night screen temperature.
; 1 will gradually increase or decrease the screen temperature.
transition=1

; Set the screen brightness. Default is 1.0.
;brightness=0.9
; It is also possible to use different settings for day and night
; since version 1.8.
brightness-day=1
brightness-night=0.5
; Set the screen gamma (for all colors, or each color channel
; individually)
;gamma=0.8
;gamma=0.8:0.7:0.8
; This can also be set individually for day and night since
; version 1.10.
;gamma-day=0.8:0.7:0.8
;gamma-night=0.6

; Set the location-provider: 'geoclue', 'geoclue2', 'manual'
; type 'redshift -l list' to see possible values.
; The location provider settings are in a different section.
location-provider=manual

; Set the adjustment-method: 'randr', 'vidmode'
; type 'redshift -m list' to see all possible values.
; 'randr' is the preferred method, 'vidmode' is an older API.
; but works in some cases when 'randr' does not.
; The adjustment method settings are in a different section.
adjustment-method=randr

; Configuration of the location-provider:
; type 'redshift -l PROVIDER:help' to see the settings.
; ex: 'redshift -l manual:help'
; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
; are negative numbers.
[manual]
lat=38.7052468
lon=-9.3768143

; Configuration of the adjustment-method
; type 'redshift -m METHOD:help' to see the settings.
; ex: 'redshift -m randr:help'
; In this example, randr is configured to adjust screen 1.
; Note that the numbering starts from 0, so this is actually the
; second screen. If this option is not specified, Redshift will try
; to adjust _all_ screens.
[randr]
screen=0
Now the thing is that i cannot seem to get it to autostart. I want it start running when i boot my machine and i don't want it to stop until i shut it down or ask for it specifically. I made use of a .desktop file, which i copied over to ~/.config/autostart. The contents of the file are as follows:

Quote:
[Desktop Entry]
Version=1.0
Exec=redshift-gtk -l 38.7052468:-9.3768143
Terminal=false
Comment=Color temperature adjustment tool
StartupNotify=truecd
Categories=Utility;
Icon=redshift
Hidden=false
X-GNOME-Autostart-enabled=true
GenericName=Color temperature adjustment
Name=Redshift
Type=Application
I don't really know what the issue is or what i can do to fix it. Any help would be very welcome.
 
Old 02-12-2016, 09:28 AM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Why not use the package in the Ubuntu repo?
 
Old 02-12-2016, 09:40 AM   #3
Johnny_Metal
Member
 
Registered: Feb 2016
Posts: 72

Original Poster
Rep: Reputation: 1
I already did. It doesn't solve the problem though.
 
Old 02-12-2016, 09:53 AM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
You're installing stuff faster than we can reply. Who can debug that?
Sorry, can't help further.
 
Old 02-12-2016, 10:33 AM   #5
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,148
Blog Entries: 21

Rep: Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483
I can't tell you how to auto start in a Ubuntu Gnome/Desktop Environment.

Edit: Or is this LXDE Lubuntu?

Just a thread I participated in.

Last edited by rokytnji; 02-12-2016 at 10:35 AM.
 
Old 02-12-2016, 10:57 AM   #6
Johnny_Metal
Member
 
Registered: Feb 2016
Posts: 72

Original Poster
Rep: Reputation: 1
This is LXDE Ubuntu.

Thanks for the thread. Unfortunately for me, the problems discussed there i have already solved.

If i have not been clear about something in my original post please do tell me. I hope i have made myself clear regarding the steps i have taken and what i wish to achieve.

EDIT: By the way, if it is possible to specify this information for #!++, which uses OpenBox window manager and is based on Debian 8, i would also be appreciated.

Last edited by Johnny_Metal; 02-12-2016 at 11:06 AM. Reason: Incomplete information
 
Old 02-12-2016, 11:25 AM   #7
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,148
Blog Entries: 21

Rep: Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483
Quote:
Unfortunately for me, the problems discussed there i have already solved.If i have not been clear about something in my original post please do tell me. I hope i have made myself clear regarding the steps i have taken and what i wish to achieve.
Ok. Because you said

Quote:
Now the thing is that i cannot seem to get it to autostart.
And we covered that in Window Managers and Mate Desktop Environment I thought. No biggy though.
I am not sure what else to tell you.

Maybe some other member can look at my thread and advise you on LXDE and OpenBox.
 
Old 02-13-2016, 03:43 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
UNDO everything you did, then show us the source code you are trying to install from (most likely a link to a github repository?) and we will guide you from there.

quite a lot of stuff just looks fishy in your original post.
 
Old 02-13-2016, 04:16 AM   #9
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,156

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
Try using a full path to redshift in the exec line in thw desktopfile.
 
1 members found this post helpful.
Old 02-13-2016, 09:13 AM   #10
Johnny_Metal
Member
 
Registered: Feb 2016
Posts: 72

Original Poster
Rep: Reputation: 1
Indeed, all that was left was to write the full path to the executable in the .desktop file. It now autostarts.

Even though the problem is solved, i would ask one more thing. By running redshift-gtk, an small icon is supposed to show up in the icon tray. An icon does show up, and i can use it normally, but it's just a rectangle withing a square, not the actual Redshift icon. Anyone know how that can be fixed?

For those of you who may be interested, here are the links to the website and source code:

http://jonls.dk/redshift/

https://github.com/jonls/redshift/releases


Thank you all very much for the help!
 
Old 02-13-2016, 09:27 AM   #11
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,148
Blog Entries: 21

Rep: Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483
Quote:
Icon=redshift
try using

Code:
locate redshift
or whatever your distro uses to search for files like icons and try changing that line to the full path of the redshift icon which is a redbulb icon on my icewm/fluxbox taskbar.

Code:
icon=<full path to icon goes here>

Last edited by rokytnji; 02-13-2016 at 09:29 AM.
 
Old 02-13-2016, 10:43 AM   #12
Johnny_Metal
Member
 
Registered: Feb 2016
Posts: 72

Original Poster
Rep: Reputation: 1
Did as suggested. Only the icon of the .desktop file changed to the red bulb, not the icon of the icon tray, even after restart.

EDIT: There are three sets of three icons, in the directory ~/path_to_redshift_version/data/icons:

/hicolor: - redshift.svg
- redshift-status-off.svg
- redshift-status-on.svg

/ubuntu-mono-dark: - redshift-status-off.svg
- redshift-status-on.svg

/ubuntu-mono-light: - redshift-status-off.svg
- redshift-status-on.svg

Last edited by Johnny_Metal; 02-13-2016 at 10:52 AM.
 
Old 02-13-2016, 10:55 AM   #13
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,148
Blog Entries: 21

Rep: Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483
LXDE has some kind of way of editing the panel. I know it has to be done by hand. It has been a long time since I ran LXDE.

http://lxlinux.com/

http://wiki.lxde.org/en/Main_Page

Quote:
You may have to log out or restart LXPanel for changes to take effect.
is all I can think of.
 
Old 02-13-2016, 11:01 AM   #14
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,148
Blog Entries: 21

Rep: Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483
The way you installed redhsift instead of using your package manager is probably mostly why you have icon issues.

Edit: Might help. or not.

http://jonls.dk/redshift/

Last edited by rokytnji; 02-13-2016 at 11:06 AM.
 
Old 02-13-2016, 12:02 PM   #15
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,156

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
You probably need to install redshift to /usr ie
Code:
...
./configure --prefix=/usr
...
You should then be able to remove the full paths in the .desktop files as everything will be in the correct place.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing redshift muciņo LinuxQuestions.org Member Intro 6 12-25-2015 07:23 AM
[SOLVED] Can't see the Redshift icon in top bar in GNOME running on Arch gregorian Linux - Desktop 1 04-11-2015 07:53 PM
Help with RedShift Nabeel Ubuntu 1 05-25-2010 09:40 AM
KDE 4 Autostart Program Bash Script to Write Autostart Bash Scripts for You! jdmcdaniel3 SUSE / openSUSE 1 05-03-2010 06:17 AM
tomboy autostart in xfce, though not on autostart list zlya Linux - Desktop 2 11-10-2009 10:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration