traceback: Expected `string' got `bool' for key /apps/gnome-terminal/profiles/Default/cursor_blink_mode

Bug #434398 reported by Mark Eichin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Terminator
Invalid
Undecided
Unassigned

Bug Description

Ubuntu Jaunty, just running terminator (0.12) gives:

Traceback (most recent call last):
  File "/usr/bin/terminator", line 156, in <module>
    options.geometry)
  File "/usr/lib/python2.6/dist-packages/terminatorlib/terminator.py", line 255, in __init__
    term = (TerminatorTerm (self, self.profile, self.command))
  File "/usr/lib/python2.6/dist-packages/terminatorlib/terminatorterm.py", line 71, in __init__
    self.reconfigure_vte ()
  File "/usr/lib/python2.6/dist-packages/terminatorlib/terminatorterm.py", line 619, in reconfigure_vte
    self._vte.set_cursor_blinks (self.conf.cursor_blink)
  File "/usr/lib/python2.6/dist-packages/terminatorlib/config.py", line 180, in __getattr__
    val = source[keyname]
  File "/usr/lib/python2.6/dist-packages/terminatorlib/config.py", line 449, in __getitem__
    tmp = self.client.get_string('%s/cursor_blink_mode' % self.profile)
glib.GError: Type mismatch: Expected `string' got `bool' for key /apps/gnome-terminal/profiles/Default/cursor_blink_mode

and it exits without doing anything.

If I grab 0.13, and patch TerminatorWindowTitle to inherit from object, I get

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/terminatorlib/terminatorterm.py", line 763, in reconfigure_vte
    self._vte.set_cursor_blinks (self.conf.cursor_blink)
  File "/usr/lib/python2.6/dist-packages/terminatorlib/config.py", line 214, in __getattr__
    val = source[keyname]
  File "/usr/lib/python2.6/dist-packages/terminatorlib/config.py", line 503, in __getitem__
    tmp = self.client.get_string('%s/cursor_blink_mode' % self.profile)
glib.GError: Type mismatch: Expected `string' got `bool' for key /apps/gnome-terminal/profiles/Default/cursor_blink_mode

but it actually puts up a window. Manual confirmation:

$ python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gconf
>>> client = gconf.client_get_default ()
>>> client.get_string('/apps/gnome-terminal/profiles/Default/cursor_blink_mode')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
glib.GError: Type mismatch: Expected `string' got `bool' for key /apps/gnome-terminal/profiles/Default/cursor_blink_mode
>>> client.get_bool('/apps/gnome-terminal/profiles/Default/cursor_blink_mode')
False

I don't actually know where the incompatibility issue is (and it looks like cursor_blink_mode is in some kind of registry, rather than an editable dotfile that I could find.) gnome-terminal itself starts up (with a blinking cursor, which is interesting given the "False" above, but don't generally actually *use* anything but Real xterm(tm)...)

Revision history for this message
Mark Eichin (eichin-gmail) wrote :
Revision history for this message
chantra (chantra) wrote :

As per my gconf-editor profile and gnome-terminal-2.{26,28}.0/src/gnome-terminal.schemas.in , the key should be a string
     <schema>
       <key>/schemas/apps/gnome-terminal/profiles/Default/cursor_blink_mode</key>
       <applyto>/apps/gnome-terminal/profiles/Default/cursor_blink_mode</applyto>
       <owner>gnome-terminal</owner>
       <type>string</type>
       <default>system</default>
       <locale name="C">
          <short>Whether to blink the cursor</short>
          <long>
            The possible values are "system" to use the global cursor blinking
            settings, or "on" or "off" to set the mode explicitly.
          </long>
       </locale>
     </schema>

Maybe a quick fix would be to edit this key with gconf-editor and set it to "system", which is the default.

Then, some reworked on the config parsing in terminatorlib/config.py :TerminatorConfValuestoreGConf.__getitem__()
would be needed to handled exceptions.

Revision history for this message
Mark Eichin (eichin-gmail) wrote :

Ah, my ~/.gconf/apps/gnome-terminal/profiles/Default/%gconf.xml says

<?xml version="1.0"?>
<gconf>
 <entry name="word_chars" mtime="1253586648" type="string">
  <stringvalue>-A-Za-z0-9,./?%&amp;#:_=+@~</stringvalue>
 </entry>
 <entry name="cursor_blink_mode" mtime="1242771338" type="bool" value="false"/>
 <entry name="default_show_menubar" mtime="1253586648" type="bool" value="false"/>
 <entry name="font" mtime="1253586648" type="string">
  <stringvalue>Droid Sans Mono 10</stringvalue>
 </entry>
 <entry name="use_system_font" mtime="1253586648" type="bool" value="false"/>
 <entry name="scroll_on_output" mtime="1253586648" type="bool" value="true"/>
 <entry name="scrollback_lines" mtime="1253586648" type="int" value="1000"/>
 <entry name="scrollbar_position" mtime="1253586648" type="string">
  <stringvalue>hidden</stringvalue>
 </entry>
 <entry name="use_theme_colors" mtime="1253586648" type="bool" value="false"/>
 <entry name="visible_name" mtime="1253586648" type="string">
  <stringvalue>Default</stringvalue>
 </entry>
 <entry name="foreground_color" mtime="1253586648" type="string">
  <stringvalue>#FFFFD7D70000</stringvalue>
 </entry>
 <entry name="alternate_screen_scroll" mtime="1253586648" type="bool" value="true"/>
 <entry name="background_color" mtime="1253586648" type="string">
  <stringvalue>#000000000000</stringvalue>
 </entry>
 <entry name="palette" mtime="1253586648" type="string">
  <stringvalue>#2E2E34343636:#CCCC00000000:#4E4E9A9A0606:#C4C4A0A00000:#34346565A4A4:#757550507B7B:#060698209A9A:#D3D3D7D7CFCF:#555557575353:#EFEF29292929:#8A8AE2E23434:#FFFFD7D70000:#72729F9FCFCF:#ADAD7F7FA8A8:#3434E2E2E2E2:#EEEEEEEEECEC</stringvalue>
 </entry>
</gconf>

That mtime value is 'Tue May 19 18:15:38 2009' so it's probably a leftover from Hardy...

Revision history for this message
chantra (chantra) wrote :

hum, I checked over on a box that have been going through quite a few version of ubuntu and the schema looks the same.
Now, blinking_mode is either system, on or off.
Also, it seem it had been introduce in gnome-terminal-2.24 and not before. So I wonder if it ever had the value true/false.

Can you remove that key using gconf-editor ? and start terminator again pls.

Revision history for this message
Mark Eichin (eichin-gmail) wrote :

Unsurprisingly, selecting "unset key" changes it to "system" and removes the line from the file, and terminator stops complaining. Probably not worth digging too much more, if it really is an unusual value - others can find this ticket and make the same change...

(odd, though, having set it to "system", it doesn't blink in terminator, but it *does* blink in a freshly started gnome-terminal. that's a bug for another day, though :-)

Revision history for this message
Chris Jones (cmsj) wrote :

Given that 0.13 does actually start I'm prepared to close this bug unless there are any objections. If we were still exploding on an incorrect gconf value then this would be a Critical bug, but if we just spit out some kind of error and still get you a working terminal, that's good enough for me!
Why the cursor isn't blinking is indeed another bug, but one that you are very much encouraged to file :)

Changed in terminator:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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