Kilian / f.lux-indicator-applet

This repository is unmaintained. Visit:
https://github.com/xflux-gui/xflux-gui
Other
549 stars 105 forks source link

Crashes if gnome-settings-daemon is not running #3

Open DarwinAwardWinner opened 14 years ago

DarwinAwardWinner commented 14 years ago

If gnome-settings-daemon is not running, fluxgui crashes with the following:

$ fluxgui
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/fluxgui/fluxgui.py", line 365, in <module>
    app = Fluxgui()
  File "/usr/lib/pymodules/python2.6/fluxgui/fluxgui.py", line 17, in __init__
    self.indicator = Indicator(self)
  File "/usr/lib/pymodules/python2.6/fluxgui/fluxgui.py", line 134, in __init__
    self.setup_indicator()
  File "/usr/lib/pymodules/python2.6/fluxgui/fluxgui.py", line 145, in setup_indicator
    'gtk-icon-theme-name')
ValueError: could not find setting

This can be a problem in KDE, which obviously doesn't run gnome-settings-daemon by default.

Kilian commented 14 years ago

f.lux used gconf to save settings, If you can tell me how to make it more gnome-agnostic, I'd love to know!

DarwinAwardWinner commented 14 years ago

Well, I'm pretty sure that I've been using other GNOME programs that save settings using gconf without actually running gnome-settings-daemon, and none of them crash at startup.

Kilian commented 14 years ago

I think I have a fix for this in an upcoming version (next couple of days). Would you be willing to test with that?

DarwinAwardWinner commented 14 years ago

Sure.

Kilian commented 14 years ago

Hey DarwinAwardWinner,

The new version has been available for a while now.have you been able to run it yet?

DarwinAwardWinner commented 14 years ago

I get the same problem with the following version installed:

% wajig policy fluxgui fluxgui: Installed: 1.1.7-0ubuntu1 Candidate: 1.1.7-0ubuntu1 Version table: *\ 1.1.7-0ubuntu1 0 500 http://ppa.launchpad.net/kilian/f.lux/ubuntu/ lucid/main Packages 100 /var/lib/dpkg/status

qmega commented 14 years ago

What is the status of this problem? I'd like to use this on KDE without having to use gnome-settings-daemon.

Kilian commented 14 years ago

Still unresolved. the problem lies with this line: http://github.com/Kilian/f.lux-indicator-applet/blob/master/src/fluxgui/fluxgui.py#L161 in which i check which theme is used for the icon in the gnome-toolbar. It will be resolved in version 1.1.9

fool commented 13 years ago

even with the gnome-settings-daemon running but without a desktop environment, fluxgui won't start (at least while running the window manager ratpoison)--i just get a message about 'fluxgui is already running' though it had never run successfully before (due to no gnome-settings-daemon). is 1.1.9 coming out soonish?

Kilian commented 13 years ago

It's fixed in trunk, so if you do a clone and build, it should work. 1.1.9. still has some blocking stuff.

illumilore commented 12 years ago

The git version still doesn't seem to be working for me, am I doing something wrong here? f.lux-indicator-applet$ fluxgui Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/fluxgui/fluxgui.py", line 381, in app = Fluxgui() File "/usr/lib/pymodules/python2.7/fluxgui/fluxgui.py", line 17, in init self.indicator = Indicator(self) File "/usr/lib/pymodules/python2.7/fluxgui/fluxgui.py", line 149, in init self.setup_indicator() File "/usr/lib/pymodules/python2.7/fluxgui/fluxgui.py", line 162, in setup_indicator 'gtk-icon-theme-name') ValueError: could not find setting

Kilian commented 12 years ago

what OS are you running? There are currently problems with running F.lux on oneiric.

meeDamian commented 12 years ago

Yup, same problem here:

$ fluxgui
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/fluxgui/fluxgui.py", line 381, in <module>
    app = Fluxgui()
  File "/usr/lib/pymodules/python2.7/fluxgui/fluxgui.py", line 17, in __init__
    self.indicator = Indicator(self)
  File "/usr/lib/pymodules/python2.7/fluxgui/fluxgui.py", line 149, in __init__
    self.setup_indicator()
  File "/usr/lib/pymodules/python2.7/fluxgui/fluxgui.py", line 162, in setup_indicator
    'gtk-icon-theme-name')
ValueError: could not find setting

system:

$ uname -mr
3.0.0-14-generic x86_64 Kubuntu 11.10

$ dpkg -s kdm | grep Version
Version: 4:4.7.3a-0ubuntu0.1

fluxgui:

$ dpkg -s fluxgui | grep Version
Version: 1.1.8

python:

$ dpkg -s python | grep Version
Version: 2.7.2-7ubuntu2

after every run to be able to rerun I have to do:

rm -f /tmp/fluxgui_*.pid  

# you may replace * with your username or:
rm -f /tmp/fluxgui_`whoami`.pid # this should work for current user

edit: I'm writing about 1.1.8 since it's the repo version and I couldn't find newer one :(

illumilore commented 12 years ago

redshift seems to have no gnome dependence, so it works nicely if you are on something like kde.

meeDamian commented 12 years ago

I tried redshift too, and it requires gnome geoclue, which seems even more difficult to fix than f.lux gtk-icon-theme-name problem. I was hoping someone will sit and try to fix it in finite time, but I guess I'm going to inspect it myself soon :)

illumilore commented 12 years ago

You can input the location data manually in the command prompt, thereby bypassing the need for geoclue. So run the command like: redshift -l XX:-XX -m vidmode

qmega commented 12 years ago

Better yet, keep it in the config file (default is ~/.config/redshift.conf).

[redshift]
location-provider=manual

[manual]
lat=<your latitude here>
lon=<your longitude here>
meeDamian commented 12 years ago

Thanks for all the support on redshift in f.lux repo issues :P. Anyway that solution isn't really good for me since I travel a lot and also I'm kinda used to using f.lux :). When I find some time I'll attempt to fix it, who knows, maybe it'll work :)

mkroetzsch commented 11 years ago

Any movement on this bug? I have just installed f.lux on KUbuntu from the repo as described on http://stereopsis.com/flux/linux.html, and it fails in the same way. Moreover, once it fails, it cannot be started again without manually deleting the file /tmp/fluxgui_username.pid. Is the project actually still active? Does the command-line version avoid the issue?

bmbeverst commented 11 years ago

I worked around this bug by running the gnome-setting-deamon on startup in KDE. This will probably cause problems later but it is a solution.

sricks commented 10 years ago

This bug is still present. BUT you can fix it by modifying line 162 of /usr/lib/pymodules/python2.7/fluxgui/fluxgui.py Change the theme= line to look like theme = 'ubuntu-mono-dark'. If you don't have that theme installed, no problem, it just uses a default. Lines 161,162, and 163 should look like this:

if gtk.gdk.screen_get_default():
    theme = 'ubunto-mono-dark'
    if theme == 'ubuntu-mono-dark':
gyanu1 commented 10 years ago

why the same issue have been appearing for long time. I like this application but it might be hard for all users to fix before use. I would like request to make it painless for kde system.

pd12 commented 10 years ago

thanks for the workaround @sricks =) works on Kubuntu 14.04

boussouira commented 9 years ago

4 years and still not fixed! Thank you sricks for the WA

adcox commented 9 years ago

I was having the same problem and found that the workaround from @sricks did the trick!

I'm on Linux Mint 17 Qiana (Ubuntu 14.04.1) running the KDE desktop

zbyna commented 9 years ago

Thanks for nice fix @sricks :thumbsup: