Subject: Re: Bug#92: ZeroDivisionError: float division by zero error on startup

From: Orion Poplawski <[email-masked]>
Date: Tue, 18 Dec 2012 15:22:20 -0700

On 12/18/2012 01:57 PM, Mike Gabriel wrote:
>
> It seems very likely that your pyhoca-gui instance does not find the image
> folder shipped with it.
>
> Can you check that?

Ah, it seems setup.py doesn't do everything it needs to.  The attached patch I 
think does what is needed for the most part.  Doesn't handle the debian links 
file though.

Other notes:
- Categories in pyhoca-gui.desktop needs a trailing semicolon.
- There is /usr/bin/env python at the top of pyhoca/wxgui/messages.py, but I 
imagine that file isn't meant to be executed directly.

Finally, I seem to be able to connect to the server properly, but no window 
ever appears, and no errors.

Seems to be stuck in this loop:

pyhoca-gui[15357] (x2goguardian-pylib) DEBUG: Entering X2Go Guardian client 
management loop...
pyhoca-gui[15357] (x2gocontrolsession-pylib) INFO: executing command on X2Go 
server ,,Vulcan'': sh -c "export HOSTNAME && x2golistsessions"
pyhoca-gui[15357] (x2gocontrolsession-pylib) INFO: executing command on X2Go 
server ,,Vulcan'': sh -c "export HOSTNAME && x2golistmounts 
orion-51-1355520763_stDXFCE_dp24"

[orion@vulcan ~]$ sh -c "export HOSTNAME && x2golistmounts 
orion-51-1355520763_stDXFCE_dp24"
orion orion

[orion@vulcan ~]$

-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA, Boulder Office                  FAX: 303-415-9702
3380 Mitchell Lane                       [email-masked]
Boulder, CO 80301                   http://www.nwra.com
diff -up pyhoca-gui-0.2.1.1/debian/pyhoca-gui.install pyhoca-gui-0.2.1.1/debian/pyhoca-gui
diff -up pyhoca-gui-0.2.1.1/setup.py.install pyhoca-gui-0.2.1.1/setup.py
--- pyhoca-gui-0.2.1.1/setup.py.install	2012-12-18 15:02:38.406371984 -0700
+++ pyhoca-gui-0.2.1.1/setup.py	2012-12-18 15:10:04.304695211 -0700
@@ -171,6 +171,40 @@ elif platform.system() == 'Linux':
             "clean": clean_i18n.clean_i18n,
         }
     )
+    data_files.extend([('/usr/share/applications', glob('desktop/*')),
+                       ('/usr/share/man/man1', glob('man/man1/*.1')),
+                       ('/usr/share/pixmaps', glob('pixmaps/*.svg')),
+                       ('/usr/share/pyhoca/img', glob('img/*.png')),
+                       ('/usr/share/icons/PyHoca/16x16', glob('icons/PyHoca/16x16/applications-*.png')),
+                       ('/usr/share/icons/PyHoca/16x16', glob('icons/PyHoca/16x16/pyhoca*.png')),
+                       ('/usr/share/icons/PyHoca/16x16', glob('icons/PyHoca/16x16/x2go*.png')),
+                       ('/usr/share/icons/PyHoca/16x16', glob('icons/PyHoca/16x16/question.png')),
+                       ('/usr/share/icons/PyHoca/22x22', glob('icons/PyHoca/22x22/applications-*.png')),
+                       ('/usr/share/icons/PyHoca/22x22', glob('icons/PyHoca/22x22/pyhoca*.png')),
+                       ('/usr/share/icons/PyHoca/22x22', glob('icons/PyHoca/22x22/x2go*.png')),
+                       ('/usr/share/icons/PyHoca/22x22', glob('icons/PyHoca/22x22/question.png')),
+                       ('/usr/share/icons/PyHoca/32x32', glob('icons/PyHoca/32x32/pyhoca*.png')),
+                       ('/usr/share/icons/PyHoca/32x32', glob('icons/PyHoca/32x32/x2go*.png')),
+                       ('/usr/share/icons/PyHoca/32x32', glob('icons/PyHoca/32x32/question.png')),
+                       ('/usr/share/icons/PyHoca/32x32', glob('icons/PyHoca/32x32/broom-cleanup.png')),
+                       ('/usr/share/icons/PyHoca/48x48', glob('icons/PyHoca/48x48/pyhoca*.png')),
+                       ('/usr/share/icons/PyHoca/48x48', glob('icons/PyHoca/48x48/x2go*.png')),
+                       ('/usr/share/icons/PyHoca/48x48', glob('icons/PyHoca/48x48/question.png')),
+                       ('/usr/share/icons/PyHoca/64x64', glob('icons/PyHoca/64x64/pyhoca*.png')),
+                       ('/usr/share/icons/PyHoca/64x64', glob('icons/PyHoca/64x64/x2go*.png')),
+                       ('/usr/share/icons/PyHoca/64x64', glob('icons/PyHoca/64x64/question.png')),
+                       ('/usr/share/icons/PyHoca/128x128', glob('icons/PyHoca/128x128/pyhoca*.png')),
+                       ('/usr/share/icons/PyHoca/128x128', glob('icons/PyHoca/128x128/x2go*.png')),
+                       ('/usr/share/icons/PyHoca/128x128', glob('icons/PyHoca/128x128/question.png')),
+                       ('/usr/share/icons/PyHoca/scalable', glob('icons/PyHoca/scalable/pyhoca*.svg')),
+                       ('/usr/share/icons/PyHoca/scalable', glob('icons/PyHoca/scalable/x2go*.svg')),
+                       ('/usr/share/icons/PyHoca/scalable', glob('icons/PyHoca/scalable/question.svg')),
+                       ('/usr/share/icons/PyHoca/scalable', glob('icons/PyHoca/scalable/broom-cleanup.svg')),
+                       # these 64x64 icons are missing in gnome-colors-common
+                       ('/usr/share/icons/PyHoca/64x64', glob('icons/PyHoca/64x64/dialog-apply.png')),
+                       ('/usr/share/icons/PyHoca/64x64', glob('icons/PyHoca/64x64/dialog-error.png')),
+                       ('/usr/share/icons/PyHoca/64x64', glob('icons/PyHoca/64x64/dialog-question.png')),
+                       ('/usr/share/icons/PyHoca/64x64', glob('icons/PyHoca/64x64/dialog-warning.png'))])
 
 setup(
     name = PROGRAM_NAME,