I have a weird problem here using gEdit. It's gEdit 3.2 in Ubuntu 11.10.

When I select some piece of text, this should be white text on orange background (Unity 11.10 default).

Suddenly it started acting different: When I select text, it is white text on actual background color (white on black, for instance).

I don't know if it's related to gEdit or Unity, but sice Ubuntu 11.10 I can change only default font and theme in "Edit -> Preferences -> Fonts & Colors". No other "tweakable" option is available. The problem occurs no matter what theme I chose.

I have no idea why this happens and how to solve this. Has anyone seen something similar?


Find the solution myself:

It was a style (theme) problem. Checked again using the default theme and this behave as expected. So I inspected carefully the other themes and found that not all those themes had this problem.

The solution was to edit the theme's code (twilight.xml) to insert the following lines:

<style name="selection" background="orange" />
<style name="selection-unfocused" foreground="white" background="gray" />

By the way, the location of the themes in gEdit 3 differ from gEdit 2. Here it is:


You can create the directory yourself if it doesn't exist. Further info on style paths here: http://live.gnome.org/GtkSourceView/StyleSchemes

  • I have the exact same problem with the WomVamp theme, but editing both the system's or my own file had no effect. – Ezequiel Muns Aug 17 '12 at 5:13
  • Actually, you must edither define <color> elements, or use hex colors in the arguments. – Ezequiel Muns Aug 17 '12 at 5:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.