Your program works wonderfully in Ubuntu 12.04 and unfortunately it won't work in 14.04. I also built a deb package from source and it seemed to build fine but I get the same issue when I install that package built on 14.04.
In the middle of the process I do get dbus-session.c:119:9: warning: ‘g_type_init’ is deprecated (declared at /usr/include/glib-2.0/gobject/gtype.h:667) [-Wdeprecated-declarations]
g_type_init ();).
The indicator shows up in the tray but doesn't do anything so I launched this from terminal and I get:
ubuntu@ubuntu-MacBookAir:~$ lightum-indicator
lightum v2.3.1 running in auto mode forked into background
ubuntu@ubuntu-MacBookAir:~$
\ (lightum:17404): WARNING **: GetCurrentSession failed: Unable to lookup session information for process '17404'
\ (lightum:17404): WARNING **: Could not get dbus session proxy
So then I did this just to see if I was issued further information I could give you:
ubuntu@ubuntu-MacBookAir:~$ dbus-launch lightum
Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SettingsDaemon was not provided by any .service files
Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.kde.Solid.PowerManagement was not provided by any .service files
Can't manage screen backlight on this system.
Please disable backlight with config option 'workmode='1' or command line switch '-w 1'.
If you believe this is an error, open a bug report: https://github.com/poliva/lightum/issues
Build output:
ubuntu@ubuntu-MacBookAir:~/Downloads/poliva-lightum-3866c70$ dpkg-buildpackage -B
dpkg-buildpackage: source package lightum
dpkg-buildpackage: source version 2.3.1-ubuntu1
dpkg-buildpackage: source distribution precise
dpkg-buildpackage: source changed by Pau Oliva Fora (pof) pau@eslack.org
dpkg-buildpackage: host architecture amd64
dpkg-source --before-build poliva-lightum-3866c70
fakeroot debian/rules clean
dh clean
dh_testdir
dh_auto_clean
make[1]: Entering directory /home/ubuntu/Downloads/poliva-lightum-3866c70' rm -f lightum *.o make[1]: Leaving directory/home/ubuntu/Downloads/poliva-lightum-3866c70'
dh_clean
debian/rules build-arch
dh build-arch
dh_testdir -a
dh_auto_configure -a
dh_auto_build -a
make[1]: Entering directory /home/ubuntu/Downloads/poliva-lightum-3866c70' ccpkg-config --cflags dbus-1 --cflags dbus-glib-1-Wall -Wextra -Wwrite-strings -g -O2 -c -o functions.o functions.c ccpkg-config --cflags dbus-1 --cflags dbus-glib-1-Wall -Wextra -Wwrite-strings -g -O2 -c -o dbus.o dbus.c ccpkg-config --cflags dbus-1 --cflags dbus-glib-1-Wall -Wextra -Wwrite-strings -g -O2 -c -o dbus-session.o dbus-session.c dbus-session.c: In function ‘get_dbus_connection’: dbus-session.c:119:9: warning: ‘g_type_init’ is deprecated (declared at /usr/include/glib-2.0/gobject/gtype.h:667) [-Wdeprecated-declarations] g_type_init (); ^ ccpkg-config --cflags dbus-1 --cflags dbus-glib-1-Wall -Wextra -Wwrite-strings -g -O2 -c -o configfile.o configfile.c ccpkg-config --cflags dbus-1 --cflags dbus-glib-1-Wall -Wextra -Wwrite-strings -g -O2 -c -o lightum.o lightum.c ccpkg-config --cflags dbus-1 --cflags dbus-glib-1-Wall -Wextra -Wwrite-strings -g -O2 -c -o xbacklight.o xbacklight.c ccpkg-config --cflags dbus-1 --cflags dbus-glib-1-Wall -Wextra -Wwrite-strings -g -O2 functions.o dbus.o dbus-session.o configfile.o lightum.o xbacklight.opkg-config --libs dbus-1 --libs dbus-glib-1-g -O2 -lX11 -lXext -lXss -lm -o lightum make[1]: Leaving directory/home/ubuntu/Downloads/poliva-lightum-3866c70'
dh_auto_test -a
fakeroot debian/rules binary-arch
dh binary-arch
dh_testroot -a
dh_prep -a
dh_auto_install -a
make[1]: Entering directory /home/ubuntu/Downloads/poliva-lightum-3866c70' ccpkg-config --cflags dbus-1 --cflags dbus-glib-1-Wall -Wextra -Wwrite-strings -g -O2 functions.o dbus.o dbus-session.o configfile.o lightum.o xbacklight.opkg-config --libs dbus-1 --libs dbus-glib-1-g -O2 -lX11 -lXext -lXss -lm -o lightum mkdir -p /home/ubuntu/Downloads/poliva-lightum-3866c70/debian/lightum/usr/bin /usr/bin/install -c lightum /home/ubuntu/Downloads/poliva-lightum-3866c70/debian/lightum/usr/bin/lightum mkdir -p /home/ubuntu/Downloads/poliva-lightum-3866c70/debian/lightum/etc/xdg/autostart/ /usr/bin/install -c -m 644 lightum.desktop /home/ubuntu/Downloads/poliva-lightum-3866c70/debian/lightum/etc/xdg/autostart/ mkdir -p /home/ubuntu/Downloads/poliva-lightum-3866c70/debian/lightum/usr/share/doc/lightum/ /usr/bin/install -c -m 644 ./README /home/ubuntu/Downloads/poliva-lightum-3866c70/debian/lightum/usr/share/doc/lightum/ /usr/bin/install -c -m 644 ./LICENSE /home/ubuntu/Downloads/poliva-lightum-3866c70/debian/lightum/usr/share/doc/lightum/ mkdir -p /home/ubuntu/Downloads/poliva-lightum-3866c70/debian/lightum/usr/share/man/man1/ /usr/bin/install -c -m 644 ./lightum.1 /home/ubuntu/Downloads/poliva-lightum-3866c70/debian/lightum/usr/share/man/man1/ make[1]: Leaving directory/home/ubuntu/Downloads/poliva-lightum-3866c70'
dh_installdocs -a
dh_installchangelogs -a
dh_installman -a
dh_pysupport -a
dh_pysupport: This program is deprecated, you should use dh_python2 instead. Migration guide: http://deb.li/dhs2p
dh_perl -a
dh_link -a
dh_compress -a
dh_fixperms -a
dh_strip -a
dh_makeshlibs -a
dh_shlibdeps -a
dh_installdeb -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
dpkg-deb: building package lightum' in../lightum_2.3.1-ubuntu1_amd64.deb'.
dpkg-genchanges -B >../lightum_2.3.1-ubuntu1_amd64.changes
dpkg-genchanges: arch-specific upload - not including arch-independent packages
dpkg-genchanges: binary-only upload - not including any source code
dpkg-source --after-build poliva-lightum-3866c70
dpkg-buildpackage: binary only upload (no source included)
Please take a look at my branch as I've made changes for it to work with systemd while replacing dbus-glib with GDbus: https://github.com/esoleyman/lightum
Your program works wonderfully in Ubuntu 12.04 and unfortunately it won't work in 14.04. I also built a deb package from source and it seemed to build fine but I get the same issue when I install that package built on 14.04.
In the middle of the process I do get dbus-session.c:119:9: warning: ‘g_type_init’ is deprecated (declared at /usr/include/glib-2.0/gobject/gtype.h:667) [-Wdeprecated-declarations] g_type_init ();).
The indicator shows up in the tray but doesn't do anything so I launched this from terminal and I get: ubuntu@ubuntu-MacBookAir:~$ lightum-indicator lightum v2.3.1 running in auto mode forked into background ubuntu@ubuntu-MacBookAir:~$ \ (lightum:17404): WARNING **: GetCurrentSession failed: Unable to lookup session information for process '17404'
(lightum:17404): GLib-CRITICAL **: g_variant_is_object_path: assertion 'string != NULL' failed
\ (lightum:17404): CRITICAL **: dbus_g_proxy_new_for_name: assertion 'g_variant_is_object_path (path)' failed
\ (lightum:17404): WARNING **: Could not get dbus session proxy
So then I did this just to see if I was issued further information I could give you: ubuntu@ubuntu-MacBookAir:~$ dbus-launch lightum Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SettingsDaemon was not provided by any .service files Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.kde.Solid.PowerManagement was not provided by any .service files Can't manage screen backlight on this system. Please disable backlight with config option 'workmode='1' or command line switch '-w 1'. If you believe this is an error, open a bug report: https://github.com/poliva/lightum/issues
Build output: ubuntu@ubuntu-MacBookAir:~/Downloads/poliva-lightum-3866c70$ dpkg-buildpackage -B dpkg-buildpackage: source package lightum dpkg-buildpackage: source version 2.3.1-ubuntu1 dpkg-buildpackage: source distribution precise dpkg-buildpackage: source changed by Pau Oliva Fora (pof) pau@eslack.org dpkg-buildpackage: host architecture amd64 dpkg-source --before-build poliva-lightum-3866c70 fakeroot debian/rules clean dh clean dh_testdir dh_auto_clean make[1]: Entering directory
/home/ubuntu/Downloads/poliva-lightum-3866c70' rm -f lightum *.o make[1]: Leaving directory
/home/ubuntu/Downloads/poliva-lightum-3866c70' dh_clean debian/rules build-arch dh build-arch dh_testdir -a dh_auto_configure -a dh_auto_build -a make[1]: Entering directory/home/ubuntu/Downloads/poliva-lightum-3866c70' cc
pkg-config --cflags dbus-1 --cflags dbus-glib-1-Wall -Wextra -Wwrite-strings -g -O2 -c -o functions.o functions.c cc
pkg-config --cflags dbus-1 --cflags dbus-glib-1-Wall -Wextra -Wwrite-strings -g -O2 -c -o dbus.o dbus.c cc
pkg-config --cflags dbus-1 --cflags dbus-glib-1-Wall -Wextra -Wwrite-strings -g -O2 -c -o dbus-session.o dbus-session.c dbus-session.c: In function ‘get_dbus_connection’: dbus-session.c:119:9: warning: ‘g_type_init’ is deprecated (declared at /usr/include/glib-2.0/gobject/gtype.h:667) [-Wdeprecated-declarations] g_type_init (); ^ cc
pkg-config --cflags dbus-1 --cflags dbus-glib-1-Wall -Wextra -Wwrite-strings -g -O2 -c -o configfile.o configfile.c cc
pkg-config --cflags dbus-1 --cflags dbus-glib-1-Wall -Wextra -Wwrite-strings -g -O2 -c -o lightum.o lightum.c cc
pkg-config --cflags dbus-1 --cflags dbus-glib-1-Wall -Wextra -Wwrite-strings -g -O2 -c -o xbacklight.o xbacklight.c cc
pkg-config --cflags dbus-1 --cflags dbus-glib-1-Wall -Wextra -Wwrite-strings -g -O2 functions.o dbus.o dbus-session.o configfile.o lightum.o xbacklight.o
pkg-config --libs dbus-1 --libs dbus-glib-1-g -O2 -lX11 -lXext -lXss -lm -o lightum make[1]: Leaving directory
/home/ubuntu/Downloads/poliva-lightum-3866c70' dh_auto_test -a fakeroot debian/rules binary-arch dh binary-arch dh_testroot -a dh_prep -a dh_auto_install -a make[1]: Entering directory/home/ubuntu/Downloads/poliva-lightum-3866c70' cc
pkg-config --cflags dbus-1 --cflags dbus-glib-1-Wall -Wextra -Wwrite-strings -g -O2 functions.o dbus.o dbus-session.o configfile.o lightum.o xbacklight.o
pkg-config --libs dbus-1 --libs dbus-glib-1-g -O2 -lX11 -lXext -lXss -lm -o lightum mkdir -p /home/ubuntu/Downloads/poliva-lightum-3866c70/debian/lightum/usr/bin /usr/bin/install -c lightum /home/ubuntu/Downloads/poliva-lightum-3866c70/debian/lightum/usr/bin/lightum mkdir -p /home/ubuntu/Downloads/poliva-lightum-3866c70/debian/lightum/etc/xdg/autostart/ /usr/bin/install -c -m 644 lightum.desktop /home/ubuntu/Downloads/poliva-lightum-3866c70/debian/lightum/etc/xdg/autostart/ mkdir -p /home/ubuntu/Downloads/poliva-lightum-3866c70/debian/lightum/usr/share/doc/lightum/ /usr/bin/install -c -m 644 ./README /home/ubuntu/Downloads/poliva-lightum-3866c70/debian/lightum/usr/share/doc/lightum/ /usr/bin/install -c -m 644 ./LICENSE /home/ubuntu/Downloads/poliva-lightum-3866c70/debian/lightum/usr/share/doc/lightum/ mkdir -p /home/ubuntu/Downloads/poliva-lightum-3866c70/debian/lightum/usr/share/man/man1/ /usr/bin/install -c -m 644 ./lightum.1 /home/ubuntu/Downloads/poliva-lightum-3866c70/debian/lightum/usr/share/man/man1/ make[1]: Leaving directory
/home/ubuntu/Downloads/poliva-lightum-3866c70' dh_installdocs -a dh_installchangelogs -a dh_installman -a dh_pysupport -a dh_pysupport: This program is deprecated, you should use dh_python2 instead. Migration guide: http://deb.li/dhs2p dh_perl -a dh_link -a dh_compress -a dh_fixperms -a dh_strip -a dh_makeshlibs -a dh_shlibdeps -a dh_installdeb -a dh_gencontrol -a dh_md5sums -a dh_builddeb -a dpkg-deb: building packagelightum' in
../lightum_2.3.1-ubuntu1_amd64.deb'. dpkg-genchanges -B >../lightum_2.3.1-ubuntu1_amd64.changes dpkg-genchanges: arch-specific upload - not including arch-independent packages dpkg-genchanges: binary-only upload - not including any source code dpkg-source --after-build poliva-lightum-3866c70 dpkg-buildpackage: binary only upload (no source included)