Printing GUI does not open

Bug #210738 reported by sipickles
36
This bug affects 3 people
Affects Status Importance Assigned to Milestone
system-config-printer (Ubuntu)
Invalid
Medium
Ubuntu Printing Team

Bug Description

Selecting SYSTEM>ADMINISTRATION>PRINTING does not work. Taskbar shows 'Starting Printing' momentarily but no window appears.

After installing GNOME CUPS Manager, I now have two 'Printing' options in SYS>ADMIN. First is original (tip is 'Configure Printers'), second is newly installed on (tip is 'Configure your Printers').

Newly installed version works well. Why is this different to shipped version?

simon@simon-linux:~$ lsb_release -rd
Description: Ubuntu hardy (development branch)
Release: 8.04

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Please run 'system-config-printer' in a terminal window and post the messages which appear in the terminal.

Changed in system-config-printer:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
sipickles (sipickles) wrote :

simon@simon-linux:~$ system-config-printer
Traceback (most recent call last):
  File "/usr/share/system-config-printer/system-config-printer.py", line 29, in <module>
    import gtk.glade
ImportError: No module named gtk.glade

Revision history for this message
sipickles (sipickles) wrote :

Installing glade-3 has not helped. Same error message.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

On your system the package python-glade2 is either not installed or files of it are broken. The system-config-printer-gnome package requires python-glade2 to be installed explicitly, so installing system-config-printer-gnome should automatically install python-glade2.

So try at first to do a general fix of your installation:

sudo apt-get install -f

If this does not help, try reinstalling system-config-printer-gnome

sudo apt-get install --reinstall system-config-printer-gnome

and see wether this pulls in python-glade2.

If this does not happen and system-config-printer still does not work for you, try reinstalling python-glade2:

sudo apt-get install --reinstall python-glade2

Tell whether this fixes your problem.

Revision history for this message
sipickles (sipickles) wrote :

simon@simon-linux:~$ sudo apt-get install -f
[sudo] password for simon:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  xloadimage libjpeg-progs
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 20 not upgraded.

simon@simon-linux:~$ sudo apt-get install --reinstall system-config-printer-gnome
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 20 not upgraded.
Need to get 0B/104kB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 109321 files and directories currently installed.)
Preparing to replace system-config-printer-gnome 0.7.81+svn1976-0ubuntu4 (using .../system-config-printer-gnome_0.7.81+svn1976-0ubuntu4_all.deb) ...
Unpacking replacement system-config-printer-gnome ...
Setting up system-config-printer-gnome (0.7.81+svn1976-0ubuntu4) ...

simon@simon-linux:~$ sudo apt-get install --reinstall python-glade2
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 20 not upgraded.
Need to get 42.7kB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
Get: 1 http://gb.archive.ubuntu.com hardy/main python-glade2 2.12.1-0ubuntu1 [42.7kB]
Fetched 42.7kB in 0s (172kB/s)
(Reading database ... 109321 files and directories currently installed.)
Preparing to replace python-glade2 2.12.1-0ubuntu1 (using .../python-glade2_2.12.1-0ubuntu1_i386.deb) ...
Unpacking replacement python-glade2 ...
Setting up python-glade2 (2.12.1-0ubuntu1) ...

simon@simon-linux:~$ system-config-printer
Traceback (most recent call last):
  File "/usr/share/system-config-printer/system-config-printer.py", line 29, in <module>
    import gtk.glade
ImportError: No module named gtk.glade
simon@simon-linux:~$

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Any Python or desktop expert can help here?

Revision history for this message
Scott Kitterman (kitterman) wrote :

gtk.glade is provided by python-glade2 and the import works on a command line on my Hardy system if it is installed.

system-config-printer-gnome already depends on python-glade2 and you've got it installed....

Please try the following in a terminal and paste the results in the bug:

First you'll start a python interpreter:

$ python

You should see something very much like:

Python 2.5.2 (r252:60911, Mar 12 2008, 13:36:25)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

The rest of these commands need to be typed at the >>> prompt:

import gtk.glade
import sys
print sys.path

You type control-d to exit python.

Please let us know what that produces.

Revision history for this message
xinchen (xinchen97) wrote :

>>> import gtk.glade
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named gtk.glade
>>> import sys
>>> print sys.path
['', '/usr/local/lib/python25.zip', '/usr/local/lib/python2.5', '/usr/local/lib/python2.5/plat-linux2', '/usr/local/lib/python2.5/lib-tk', '/usr/local/lib/python2.5/lib-dynload', '/usr/local/lib/python2.5/site-packages']

 I do it just you told me . display like this.

Revision history for this message
Jimneybob (james-flint) wrote :

Hi,

I've got exactly the same problem. New installation of Hardy.
No GUI after System>Administration>Printing

Will be interested if there is a fix.

J

Revision history for this message
sipickles (sipickles) wrote :

I found the solution to this on my system.

I had installed a non-ubuntu distribution of python (stackless python). This became the default python installation used by the system, but was located in /usr/local/bin/python not /usr/bin/python, so the path to all the other modules was wrong.

To fix, I renamed the stackless python version from /usr/local/bin/python to /usr/local/bin/spython. I now have 2 python installations and the system picks up the default installation. Perfect.

Revision history for this message
raghaven-kumar (raghaven-kumar) wrote :

I too have the same problem in hardy.

gui does not open but when in terminal it gives the gtk.glade error.

All glade and gtk packages seems to be installed.

And i dont seem to find a stackless python on the system.

Any suggestions?

Changed in system-config-printer:
assignee: nobody → ubuntu-printing
status: Incomplete → Confirmed
Revision history for this message
xinchen (xinchen97) wrote :

 sipickles is right. renamed the stackless python version from /usr/local/bin/python to /usr/local/bin/spython verything is ok. thanks

Revision history for this message
Amorphous (amorphous) wrote :

I seem to have the same problem, it's stopping hp-setup from starting and printers can't be found by the system.

I'm afraid I don't understand about the stacklesspython thing, but do know that this is a fairly new install & theres been no manual installs on it & no new python(s) except through aptitude (as dependancies).

There is nothing at all in my /usr/local/bin dir at all (is this normal?), so I'm taking it I have no stackless python.

Revision history for this message
Jonathan Hartley (tartley) wrote :

I had the same problem, it was caused because I had installed python2.6. Removing the 'python' executable from /usr/local/bin (leaving only the identical python2.6 executable) fixed it, since 'python' now refers to the default ubuntu /usr/bin/python2.5.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

This is not a bug of Ubuntu. Th problem is triggered by an additional Python version installed in a non-standard location. These additional Python versions do not find the Python modules of the Ubuntu installation and so make most Python applications which are packaged for Ubuntu not work, like system-config-printer or hp-setup.

Changed in system-config-printer:
status: Confirmed → Invalid
Revision history for this message
Marsh (marshcast-googlemail) wrote : Re: [Bug 210738] Re: Printing GUI does not open

Sorry, Till - not been about for a bit - not sure if I can aggree - I
dont recall anything being installed on this machine that is not from
repo's. Does that not make them all part of Ubuntu & therefor an ubuntu
bug?

On Tue, 2008-10-28 at 22:44 +0000, Till Kamppeter wrote:
> This is not a bug of Ubuntu. Th problem is triggered by an additional
> Python version installed in a non-standard location. These additional
> Python versions do not find the Python modules of the Ubuntu
> installation and so make most Python applications which are packaged for
> Ubuntu not work, like system-config-printer or hp-setup.
>
>
> ** Changed in: system-config-printer (Ubuntu)
> Status: Confirmed => Invalid
>

Revision history for this message
Dakai Zhu (dkz-mdanderson) wrote :

Someone from my institution built a RedHat Enterprise Linux 5 and passed it onto me. /usr/bin/python existed as v2.4.3. This DOES work with system-config-printer!

On the other hand, I also install python-2.6 elsewhere. This is odne so that I can throw more up-to-date modules into it, not worrying about the original installation that came with OS. But python (v2.6) will up first in my search path, and it would fail system-config-printer with that nasty lack of gtk.glade message.

Solution (at least in RedHat Enterprise 5):
1. cd /usr/share/system-config-printer
2. cp -rp system-config-printer.py system-config-printer.py-20080116 (or whatever date the original file carried)
3. vi system-config-printer.py
(change the first line from
#!/bin/env python
to
#!/usr/bin/python
system-config-printer would work. Hope this helps...

Revision history for this message
yoyoq (yoyoq) wrote :

worked for me thanks.

reading system-config-printer comments looks like it is the same as redhat code

Revision history for this message
Håkan Sandström (hakan-sandstrom) wrote :

Dakai Zhu's tip worked for me. Ubuntu 9.04.

Revision history for this message
DBooth (david-dbooth) wrote :

Dakai Zhu's suggestion above worked for me also, on Ubuntu 9.10. Apparently I have an extra version of python at /usr/local/bin, in addition to the Ubuntu standard version at /usr/bin. I don't know why the /usr/local/bin version is there.

   --------

I was seeing similar symptoms, but not identical. From the desktop menu trying to launch via System->Administration->Printing, an icon appears for a few seconds in the task bar, and then disappears. The printer manager window never comes up. Here was my configuration before I made the change recommended by Dakai Zhu:

$ cat /etc/issue
Ubuntu 9.10 \n \l
$ which system-config-printer
/usr/bin/system-config-printer
$ system-config-printer
Traceback (most recent call last):
  File "/usr/share/system-config-printer/system-config-printer.py", line 30, in <module>
    from timedops import *
  File "/usr/share/system-config-printer/timedops.py", line 20, in <module>
    import gobject
ImportError: No module named gobject
$ which python
/usr/local/bin/python
$ python --version
Python 2.5.2
$ /usr/bin/python --version
Python 2.6.4
$ head -1 /usr/share/system-config-printer/system-config-printer.py
#!/usr/bin/env python

Revision history for this message
khink (kees-fmf) wrote :

I got this error because i hand-complied a Python 2.4, which installed a symlink 'python' in /usr/local/bin/.

Dakai Zhu's suggestion above worked for me also.

I'll install hand-compiled stuff in the /opt/ directory next time.

Revision history for this message
DBooth (david-dbooth) wrote :

I just observed this same problem after upgrading to Ubuntu 10.04.1 LTS, and Dakai Zhu's suggestion above again fixed it, EXCEPT that I also needed to re-start the CUPS daemon afterward:
  $ sudo service cups start

Restarting the CUPS daemon was suggested at
https://bugs.launchpad.net/ubuntu/+source/system-config-printer/+bug/568831

Revision history for this message
Gurvinder Dadyala (gurvinder) wrote :

Dakai Zhu (dkz-mdanderson) solution worked for me. I have Ubuntu 10.04 LTS - the Lucid Lynx. Thanx for ur efforts and everyone else. I was not able to find a solution for this issue from a long time.

Regards
Gurvinder

Revision history for this message
vivin.liu (kasalyn) wrote :

Dakai Zhu (dkz-mdanderson) solution also workes for me. I have Ubuntu 10.04 LTS - the Lucid Lynx. Thanks for your contribution for this issue.

Regards,
  Vivin

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.