Nanny not working in Oneiric and Precise

Bug #877318 reported by web4you
144
This bug affects 32 people
Affects Status Importance Assigned to Milestone
Nanny
Confirmed
Undecided
Unassigned
nanny (Baltix)
In Progress
Medium
Mantas Kriaučiūnas
nanny (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

If i want to start nann-admin-console in oneiric i get the followong error:

(nanny-admin-console:1896): Gtk-WARNING **: Im Modulpfad »pixmap« konnte keine Themen-Engine gefunden werden,

(nanny-admin-console:1896): Gtk-WARNING **: Im Modulpfad »pixmap« konnte keine Themen-Engine gefunden werden,

(nanny-admin-console:1896): Gtk-WARNING **: Im Modulpfad »pixmap« konnte keine Themen-Engine gefunden werden,

(nanny-admin-console:1896): Gtk-WARNING **: Im Modulpfad »pixmap« konnte keine Themen-Engine gefunden werden,
/usr/lib/python2.7/dist-packages/nanny/client/common/Utils.py:33: GtkWarning: GtkSpinButton: setting an adjustment with non-zero page size is deprecated
  object.xml.add_from_file (main_ui_filename)
/usr/lib/python2.7/dist-packages/nanny/client/common/Utils.py:54: FutureWarning: This search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to './/object'
  for obj in xml.findall ('//object'):

I also compiled the latest version 2.31.1 and get nearly the same error.

Tags: patch
Changed in nanny:
assignee: nobody → web4you (info-web4you-gmbh)
assignee: web4you (info-web4you-gmbh) → nobody
Revision history for this message
Alex Moldovan (alexmoldovan) wrote :

I can confirm, tested with today's updates. From the console I get the same error, if I start it from the dash, after typing the password nothing happens.

Changed in nanny:
status: New → Confirmed
Revision history for this message
foxy123 (foxy) wrote :

Given that timekpr's development stopped and although it works with Oneiric but with a lot of limitations (requires GDM instead of LightDM, does not provide notifications etc) Nanny is the only parent control tool available for users. So it would be nice to have it fixed though as I understand it is something to do with Gnome's transition to gtk3 and gsettings and probably not that easy to fix.

Revision history for this message
fabrice gonton (fabrice-gonton) wrote :

Hello,

I run into the same problem 2 weeks ago. I tried to figure out where the problem was located, although
my knowledge of Python is extremely limited (and I even do not talk about Gtk). I have tracked the
problem in this file:

/usr/share/pyshared/nanny/client/gnome/admin/AdminConsole.py

The call to gtk.IconThem.load_icon() fails for a reason. If you catch this and set the pixbuf to None, then
the application starts. I have no clue if Nanny works well without that (it was my first attempt to use it)

foxy123: as it seems you have some experience with Nanny, can you tell me if it runs properly with the
following temporary and ugly patch so I do not have to wait for the full fix to start using it?

Save the lines below (excluded the "cut here" lines) in /tmp/AdminConsole.patch
Go to /usr/share/pyshared/nanny/client/gnome/admin/
Type: sudo patch < /tmp/AdminConsole.patch
Test Nanny (if you want to remove the patch: sudo patch -R < /tmp/AdminConsole.patch)

--8<---------------cut here---------------start------------->8---
--- AdminConsole.py 2011-11-09 23:36:57.174159670 +0100
+++ AdminConsole.py.patched 2011-11-10 11:38:25.254055587 +0100
@@ -30,6 +30,7 @@
     import win32api
     import win32con

+import glib
 import gtk
 import pango
 import gobject
@@ -204,7 +205,10 @@
             else:
                 if os.name == "posix" :
                     icon_theme = gtk.IconTheme ()
- pixbuf = icon_theme.load_icon ('nobody', 50, gtk.ICON_LOOKUP_USE_BUILTIN)
+ try:
+ pixbuf = icon_theme.load_icon ('nobody', 50, gtk.ICON_LOOKUP_USE_BUILTIN)
+ except glib.GError:
+ pixbuf = None
                 elif os.name == "nt" :
                     pixbuf = None
--8<---------------cut here---------------end--------------->8---

Revision history for this message
fabrice gonton (fabrice-gonton) wrote :

I have found out why the load_icon() was not working. With the default search path for the icons and the request for 'nobody', we ask to load the /usr/share/pixmaps/nobody.png file

This file does not exist on lubuntu 11.10 oneiric: it comes with the gdm package and this is not installed by default.
IMHO, this dependency should not be enforced, as it seems to be the only file needed by Nanny from gdm.

Revision history for this message
Stefan Schiebeler (stefan-schiebeler-i) wrote :

Nanny 2.31.1-0ubuntu4@ Mint ver. 12:

When I start nanny-admin-console I'm asked for a password - nothing happens:

/usr/lib/python2.7/dist-packages/nanny/client/common/Utils.py:33: GtkWarning: GtkSpinButton: setting an adjustment with non-zero page size is deprecated
  object.xml.add_from_file (main_ui_filename)
/usr/lib/python2.7/dist-packages/nanny/client/common/Utils.py:54: FutureWarning: This search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to './/object'
  for obj in xml.findall ('//object'):
uid: 501, name: jarjar, user_name: jarjar binks

Revision history for this message
Pavstyuk (pavstyuk) wrote :

And so what? Any ideas to fix this bug? I have the same in oneiric. :(

Revision history for this message
Märt Põder (boamaod) wrote :

I was able to run Nanny on Oneiric doing two things:

1) Put into /etc/xdg/autostart/xhost.desktop

[Desktop Entry]
Type=Application
Exec=xhost +
NoDisplay=true
X-GNOME-Autostart-enabled=true
Name=Allow connecting X for everybody
Comment=

2) Add the patch bound to this comment.

Revision history for this message
Märt Põder (boamaod) wrote :
Revision history for this message
DracNoc (drac-noc) wrote :

Install gdm via terminal

On second blue screen, stick with lightdm (unless you want to change to gdm), Nanny will now work as normal.

Revision history for this message
Märt Põder (boamaod) wrote :

DracNoc: What exactly are you fixing with that?

Revision history for this message
Märt Põder (boamaod) wrote :

Fabrice: Instead you can do...

                if os.name == "posix" :
                    icon_theme = gtk.icon_theme_get_default()
                    pixbuf = icon_theme.load_icon ('stock_person', 50, gtk.ICON_LOOKUP_USE_BUILTIN)
                elif os.name == "nt" :
                    pixbuf = None

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nanny (Ubuntu):
status: New → Confirmed
Revision history for this message
José Lou Chang (obake) wrote :

This is also a issue in Ubuntu Precise.

summary: - Nanny not working in Oneiric
+ Nanny not working in Oneiric and Precise
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Help Oneiric to find the right proccess to stop" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Flames_in_Paradise (ellisistfroh-deactivatedaccount) wrote :

Bug #950395 is possibly a dupe of this one

Revision history for this message
Peter Wagner (o-petris) wrote :

Hello,

tried the patch in Precise, without any effect on behaviour. What I did (the first time in life I work with a patch):
* added a file xhost.desktop as adviced in #7
* copied patchfile to /home/me/Stažené/nanny-find-process-fix.patch
* moved (cd) to /usr/share/pyshared/nanny/daemon/ (the only location I found the file on my system)
* run successfully ("patching file ...") sudo patch < /home/wagner/Stažené/nanny-find-process-fix.patch

-> error looks the same as before, without patch.

Revision history for this message
Tim Dionne (ww3ib0sg9wt9-1ba-8aw3u04umos2) wrote :

The problem is the icon it is looking for in AdminConsole.py. It is looking for 'nobody' on line 207:

207 pixbuf = icon_theme.load_icon ('nobody', 50, gtk.ICON_LOOKUP_USE_BUILTIN)

I figured this out by adding some additional exception handling in nanny-admin-console, which yielded this:

Error: Icon 'nobody' not present in theme

I used strace to discover which theme it was looking in, which yielded this (only because I added a line to print the Exception out in nanny-admin-console):

2443 stat64("/usr/share/icons/hicolor/index.theme", {st_mode=S_IFREG|0644, st_size=24671, ...}) = 0
2443 write(1, "Error: Icon 'nobody' not prese"..., 44) = 44

I checked index.theme and found a nanny icon in 16x16/apps. So, I simply substituted 'nanny' in place of 'nobody' in AdminConsole.py like so:

207 pixbuf = icon_theme.load_icon ('nanny', 50, gtk.ICON_LOOKUP_USE_BUILTIN)

And now the admin console starts for me. I also fixed up some of the warnings, but I don't think that had anything to do with the console starting.

Good luck.

Revision history for this message
Märt Põder (boamaod) wrote :

I have created PPA for my version of Nanny which has these things fixed and some extra features implemented (still has some bugs, but generally it works). If you are interested, check out:

https://launchpad.net/~boamaod/+archive/nanny-test

Revision history for this message
giuliano69 (giuliano-lotta) wrote :

I can confirm that the modification at msg 11, DOES fix the problem.

What is strange anyway, is that I met the first time this problem on a PC with 11.10 that was upgraded from 10.04.
In another PC, that had 11.10 installed from scratch, the problem dindn't appear.

May it be ALSO related of which files are installed during systems instals or systems upgrade ????

@tabbernuk
May you explain which changes have you made ?

Revision history for this message
Flames_in_Paradise (ellisistfroh-deactivatedaccount) wrote :
Revision history for this message
Hugo Nascimento (hadnas) wrote :

Hi. Is there any progress in releasing a fully functional package of Nanny in the main repository?

Revision history for this message
Märt Põder (boamaod) wrote :

Probably no. I also had problems with Nanny in Ubuntu Precise, where it seemed to cause problems turing off the computer (probably connected with usage of the twisted protocol framework). I haven't had time to look into it closely though.

https://github.com/openshine/nanny has seen no activity too.

Revision history for this message
Edmund Laugasson (ed-lau) wrote :
Download full text (3.3 KiB)

I cannot configure Nanny :( I cannot change nothing - I tried to set computer usage hours and other restrictions but cannot mark hours graphically as expected.

I use Ubuntu 12.04 LTS 64-bit with all updates to current date (10th February 2013).

Steps to reproduce:
1. sudo add-apt-repository ppa:boamaod/nanny-test
2. sudo apt-get install nanny
3. sudo nanny-admin-console
......
Reconnecting to new nanny server instance
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nanny/client/gnome/admin/AdminConsole.py", line 531, in __on_unlock_button_clicked
    self.__on_users_treeview_selection_changed(None)
  File "/usr/lib/python2.7/dist-packages/nanny/client/gnome/admin/AdminConsole.py", line 413, in __on_users_treeview_selection_changed
    self.__load_config ()
  File "/usr/lib/python2.7/dist-packages/nanny/client/gnome/admin/AdminConsole.py", line 273, in __load_config
    self.session_use_chores_indicator, self.session_max_contracted_chores = self.dbus_client.get_chore_settings (self.__selected_user_id)
  File "/usr/lib/python2.7/dist-packages/nanny/client/common/DBusClient.py", line 210, in get_chore_settings
    return self.nanny_admin.GetChoreSettings (user_id)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python2.7/dist-packages/nanny/daemon/NannyDBus.py", line 243, in GetChoreSettings
    return self.quarterback.get_chore_settings(str(uid))
  File "/usr/lib/python2.7/dist-packages/nanny/daemon/QuarterBack.py", line 472, in get_chore_settings
    return self.chore_settings[uid]
TypeError: list indices must be integers, not str

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nanny/client/gnome/admin/AdminConsole.py", line 413, in __on_users_treeview_selection_changed
    self.__load_config ()
  File "/usr/lib/python2.7/dist-packages/nanny/client/gnome/admin/AdminConsole.py", line 273, in __load_config
    self.session_use_chores_indicator, self.session_max_contracted_chores = self.dbus_client.get_chore_settings (self.__selected_user_id)
  File "/usr/lib/python2.7/dist-packages/nanny/client/common/DBusClient.py", line 210, in get_chore_settings
    return self.nanny_admin.GetChoreSettings (user_id)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python2.7/dist-packages/nanny/daemon/NannyDBus.py", line 243, in GetChoreSettings
    return self.quarterback.get_...

Read more...

Revision history for this message
816_8055 (816-8055) wrote :

@Edmund Laugasson:
This issue can be solved by removing the "old" nanny-settings :

rm -r /var/lib/nanny

Changed in nanny (Baltix):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Mantas Kriaučiūnas (mantas)
Revision history for this message
Mantas Kriaučiūnas (mantas) wrote :

Updated nanny package from ppa:boamaod/nanny-test repository (version 2.31.2~boamaod12~precise , see https://launchpad.net/~boamaod/+archive/nanny-test ) works in Ubuntu 12.04 - I've tested time restrictions and noticed only one small problem:
user can login and work 5 minutes even if time is over.
Märt Põder (boamaod), could you make this configurable? I think 5 minutes is too much, but 2 or 3 minutes is enough in such case ;)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.