Black background on GtkSourceView widget

Bug #1019380 reported by Dr. Amr Osman on 2012-06-29
This bug affects 17 people
Affects Status Importance Assigned to Milestone
Umang Varma

Bug Description

There is a black background on sticky notes when yellow is intended. Somehow, the GtkCssProvider doesn't respect or support the transparent background set to the TextView widget.

This bug initially reported the following issues:

Using stiky notes 0.1 in ubuntu with ambiance theme there is alot of bad UI
1) no monochrome Icon
2) using icons on buttons is against gnome recent behavior and generates inconsistencies (Now tracked separately on Bug #1021028)
3) the sticky note background color is black and font color is dark
4) sticky notes should use a simple handwriting font

Umang Varma (umang) wrote :


Thank you for your comments.

1. I am planing to make a monochrome Icon soon. As this is the first release, I had not researched ways to have the icon depend on the current icon theme without touching the /usr/share/icons directory. I think this should be easy to do.

2. Thanks for bringing this point out. I did notice that icons on buttons were discouraged. However, I am not comfortable replacing them with text. I think that when a program has three buttons, there isn't much to poke at. Further, native gnome apps often use buttons themselves. Nautilus, for example, has back and forward buttons. In my opinion, for a simple application like Indicator StickyNotes, there is no benefit of switching to labels.

3. Hmm. Do the notes not look like this for you? If they don't, please attach a screenshot and the exact version of Ubuntu you are using along with which desktop environment you are using (check using echo $DESKTOP_SESSION).

4. That's an interesting point. I've thought about it. Do you have a font in mind? I am not keen on using a font that doesn't ship by default on Ubuntu and most Linux distributions. However, is there is one that is available is most repositories (or at the very least Ubuntu's repository), I would be open to considering it.


Dr. Amr Osman (dr3mro) wrote :

ubuntu 12.04 .. with unity 5.12
dr3mro@Amilo:~$ echo $DESKTOP_SESSION

screen shot :


i will search for a font for you !!

Dr. Amr Osman (dr3mro) wrote :

Oh .. wait
I have experinence in developing apps for linux
may i join your team
i can create a daily ppa
and stable ppa for indicator-stickynotes
and make contributions to the code :)

Umang Varma (umang) wrote :

Thanks for the screenshot, that is not what I expected. I'll need to look into this further.

Sure! I'm not sure if a small app like Indicator StickyNotes needs more than one PPA, but if you want to submit code, just branch my repository and send me either a patch or pull request or github. (I like git better, so I use github for code hosting). If you like bzr, feel free to make a bzr branch on Launchpad. I'm sure it should be easy to extract a patch from bzr and apply to git. If you're trying to fix a specific issue or add a new feature, file a bug for each issue and use a separate branch for each new feature/issue.

Umang Varma (umang) wrote :

I've got basic monochrome icons in the repository.

Could you send me more details about the black background you noticed. Does it happen all the time? Does it happen if you reinstall indicator-stickynotes? Does it happen only with certain settings? Could you try downloading the latest source code from and running ? Do you still see the black background?


Dr. Amr Osman (dr3mro) wrote :

yes it happens all the time
I use ubuntu 12.04 with gnome3 ppa to get some of 3.4 gnome pkgs that didn't reach the main repos but i don't think that is the cause
i use unity with latest updates and 3.5 kernel

Dr. Amr Osman (dr3mro) wrote :

and yes it still happen with the git version

Umang Varma (umang) on 2012-07-04
description: updated
Changed in indicator-stickynotes:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Umang Varma (umang)
summary: - stikcy notes UI
+ Black background on GtkSourceView widget
Umang Varma (umang) wrote :

Hmm. I've tried hard to reproduce this but haven't been able to.

Could you try again with this download?

Umang Varma (umang) wrote :

Also, if that doesn't fix it, could you run `find . -iname "*sourceview*"` in your home directory (without the `backticks`, obviously) and tell me if there is any output? (it might take a while). I feel as though some sourceview setting, probably theme, is overriding the background set in style.css.

You're also not the only one with this issue:

Dr. Amr Osman (dr3mro) wrote :

sudo find / -iname "*sourceview*"
[sudo] password for dr3mro:

Umang Varma (umang) wrote :

OK. So, I'm assuming that the new github file didn't fix it for you. I'm going to try to examine this further on a virtual machine. If you ever manage to find a clue as to why this is happening, let me know.

Umang Varma (umang) wrote :

Also, do you have the same version of GtkSourceView that I have?

$ apt-cache policy libgtksourceview-3.0-0
  Installed: 3.4.2-0ubuntu1
  Candidate: 3.4.2-0ubuntu1

Dr. Amr Osman (dr3mro) wrote :

  Installed: 3.4.2-0ubuntu1
  Candidate: 3.4.2-0ubuntu1
  Version table:
 *** 3.4.2-0ubuntu1 0
        500 precise-updates/main i386 Packages
        100 /var/lib/dpkg/status
     3.4.1-0ubuntu1 0
        500 precise/main i386 Packages

Dr. Amr Osman (dr3mro) wrote :

I have found a work around and here is the diff

< GtkTextView
> GtkSourceView
< /*background-image-source: -gtk-gradient(linear,
< left top, right bottom,
< from(#ff0), to(#0ff));*/
< background-color:transparent;
> background-image: -gtk-gradient(linear,
> left top, left bottom,
> color-stop (0.0, #ff7),
> color-stop (0.0, #fe0));
< GtkTextView:selected
> GtkSourceView:selected
< color-stop (0, #ff7),
< color-stop (0.66, #fe0));
> color-stop (0.0, #ff7),
> color-stop (0.0, #fe0));

Umang Varma (umang) wrote :

Thanks for your patch!

I applied the patch, but that didn't help. I had tried setting the gradient on the SourceView initially, but that always set it to a flat color rather than a gradient and I seem to have the same problem here.

I wonder why GtkSourceView doesn't like transparent backgrounds on some computers. I have tried very hard to reproduce this in three different virtual machines (one with regular Unity, one with a GNOME3 desktop environment, and a final with the GNOME 3.4 PPA). I've tried installing GtkSourceView themes, but even that doesn't affect the stickynotes.

On 07/07/2012 03:26 PM, Umang Varma wrote:
> I wonder why GtkSourceView doesn't like transparent backgrounds on some
> computers. I have tried very hard to reproduce this in three different
> virtual machines (one with regular Unity, one with a GNOME3 desktop
> environment, and a final with the GNOME 3.4 PPA). I've tried installing
> GtkSourceView themes, but even that doesn't affect the stickynotes.

Might be due to some hardware issues with transparency !!

Umang Varma (umang) wrote :

Hmm. Do you have hardware acceleration? I have disabled acceleration on my virtual machines and it still works fine.

Dr. Amr Osman (dr3mro) wrote :

On 07/07/2012 03:48 PM, Umang Varma wrote:
> s and it still works fine.
yes i have hardware acc intel gma 450 and unity 3d works fine
but when i modified the code to make it loss the dark background yes it
lacks the gradient but better than dark ..
i dont know but it might be a bug with gtk ?

Umang Varma (umang) wrote :

Yes, probably. If you're interested in helping me find out what causes this, could you take install Ubuntu 12.04 in VirtualBox (or similar) and install indicator-stickynotes on it. Then, step-by-step install your ppas and themes onto it and see what causes it to break. My guess is that it's probably some GNOME/GTK related package or a Gtk or GtkSourceView theme that breaks it. Don't do it if it seems like too much to do, I'll keep investigating anyway.

Thanks again for your help with this.

Umang Varma (umang) wrote :


If you have upgraded to 12.10, could you see if you are still affected?

Changed in indicator-stickynotes:
status: Confirmed → Incomplete
Patrick (patrickstar777) wrote :

I don't know about this, but this bug might have to do with GTK or something since:

I also get the black text on black ground when renaming folders or files in nautilus or nemo (the text-field that turns black when being edited, text is only readable when selected, just like on the sticky-notes).

Umang Varma (umang) wrote :

The latest version probably fixes this issue. This was possibly the same issue as lp:1246283 which was fixed earlier. Please unmark as duplicate if you are still affected.

Umang Varma (umang) wrote :

lp:1353990 seems to suggest this is not fixed. I am reopening this bug. Any ideas as to what might be causing this are welcome.

Changed in indicator-stickynotes:
status: Incomplete → Confirmed
Jose (jose75x) wrote :

I have the same black backgroud problem. Reinstall doesn't fix it.

I use Linux Lite 2.0 (Ubuntu 14.04 LTS 32bit kernel version: 3.13.0-34) and version of indicator-stickynotes 0.4.4.

But it's strange because it was working fine, but yesterday the problem appears.

I have a backup copy of my system in a live CD and there stickynotes is working fine, so I did this in both system and live CD:

dpkg --get-selections | grep -v deinstall > ubuntu-files

This creates a text file with the installed packages, later i have compared both with diffuse, and the packages are the same in both systems, so I don't know what is the problem.

Some more info:

 $ apt-cache policy libgtksourceview-3.0-1
  Installed: 3.10.2-0ubuntu1
  Candidate: 3.10.2-0ubuntu1
  Version table:
 *** 3.10.2-0ubuntu1 0
        500 trusty/main i386 Packages
        100 /var/lib/dpkg/status

Hope this problem will be resolved, it's a nice utility.


Daniel Philipp (danphil7) wrote :

This bug affects me as well. I use Ubuntu 14.10 with indicator-stickynotes 0.4.4 from your ppa. No idea what causes this since I'm running it on a relatively fresh install of Utopic. I experience the black background right after installing the package.

$ apt-cache policy libgtksourceview-3.0-1
  Installed: 3.12.3-1ubuntu1
  Candidate: 3.12.3-1ubuntu1
  Version table:
 *** 3.12.3-1ubuntu1 0
        500 utopic/main amd64 Packages
        100 /var/lib/dpkg/status

If any more info is needed I'm happy to provide more information.

Artiom (zarianec91) wrote :

I have the same bug on my fresh install of Ubuntu 14.10 and I found solution for me. Changes were made only in the style.css file. Hope this helps.

Vincent Thiele (vincentthiele) wrote :

Comment #27 fixed the bug for me. Thank you Artiom!

Umang Varma (umang) wrote :

Finally, I see this bug too. I'm looking into this. Hopefully this will be easier to debug now that I am affected too.

The fix submitted by Artiom gives the GtkSourceView a background color, which it should not have since the window doesn't have a constant background. I can't merge that into the source code, but if you ahve a black background that's the best you can do for now. hopefully, I'll have a fix soon.

ConnyLo (webmaster-333) wrote :

Comment #27 fixed the bug for me but not for all chosen background colors.
If I choose purple color the background turns white.
If I take a rich yellow it turns to a a pale sandy yellowish color.
Maybe there is a color shift.

Umang Varma (umang) wrote :

In a couple hours, there should be a version for 15.04 available in the ppa. Please let me know if you still encounter the bug in 15.04. The problem seems to have magically vanished (for me at least) after the upgrade.

Umang Varma (umang) wrote :

Marking as incomplete until I hear that this issue persists in 15.04

Changed in indicator-stickynotes:
status: Confirmed → Incomplete
Lans (lans2035) wrote :

Comment #27 fixed the bug for me, but created a new one: Selected text was not shown as a different colour. It is shown as the same background colour as the unselected text. This is clearly not very useful, but led to a (hopefully) better answer - thank you Artiom .

I fixed the selected text problem by creating a new style class and allocating that class to the txtNote, and moving Artiom's fix to the new style. Then I added more style info to handle selected txt. The full details are:

1) Do not making the change to style.css suggested by #27
2) Instead add these lines at the end of style.css (creates a new css class called txtNote. Note the . before .txtNote)
    /* Fix the black background */
    background-color: $bg_start;
    color: $text_color;
    /* Fix the select background */
    background-color: #ffffff;

3) Add the class to the txtNote object: Edit and add these 3 lines at the bottom of the txtNote object (before the </object>, see below)
              <class name="txtNote"/>
(Or you can use glade to add a style class to the txtNote object)

The txtNote object in will now look like this:
          <object class="GtkSourceView" id="txtNote">
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="has_focus">True</property>
            <property name="hexpand">True</property>
            <property name="vexpand">True</property>
            <property name="hscroll_policy">natural</property>
            <property name="vscroll_policy">natural</property>
            <property name="wrap_mode">word</property>
            <property name="left_margin">7</property>
            <property name="right_margin">7</property>
            <property name="tab_width">4</property>
            <property name="indent_on_tab">False</property>
              <class name="txtNote"/>


Umang Varma (umang) wrote :

Since I haven't been able to figure out why alpha does or does not work on computers with almost identical software (I haven't done a thorough controlled experiment), I have decided to remove the "shadow" feature.

In the next version, the background will be flat, like in many of the patches and workarounds, and a new set of flat icons will complement the flat background. I will also replace the "fold" icon with something "flatter".

Given that "flat" is trendy, I anticipate that not a lot of users will mind this loss of functionality. I think the loss of this feature is definitely worth the benefits of this old bug being fixed.

Changed in indicator-stickynotes:
status: Incomplete → In Progress
Umang Varma (umang) wrote :

Please test the latest code (it hasn't been released as a new version yet).

To get a copy, download and extract

Open the Terminal in the directory containing and run ./

Specifically, I want to know if the buttons have proper backgrounds. The text area should have the right background color now.

Changed in indicator-stickynotes:
status: In Progress → Fix Committed
Umang Varma (umang) on 2015-07-02
Changed in indicator-stickynotes:
milestone: none → 0.5.0
status: Fix Committed → Fix Released
Artem (artem825) wrote :

Hello Umang,

The issue suddenly reappeared in v_0.54..I've been using the app without any issues for several months, but today (after system update I believe) the background changed to black in all notes

Ubuntu 14.04.3 LTS is my OS

Umang Varma (umang) wrote :

Oh no. This is frustrating. I thought that by getting rid of transparency, this problem was solved for good. I will have to investigate this, but I'm busy for the next few weeks.

Meanwhile, do you know what packages were updated?

Changed in indicator-stickynotes:
milestone: 0.5.0 → none
status: Fix Released → Confirmed
Artem (artem825) wrote :

For now I settle for black background notes, cause there is no decent alternative to your app) So I hope this recurrent bug will be fixed sooner or later
update history is in attachment

Umang Varma (umang) wrote :

I have a couple more questions. I'm trying to guess what might be causing this (I really have no idea), so I'm making a shot in the dark here.

Did you upgrade the Ubuntu distribution or just some packages? If you upgraded Ubuntu, what version did you have before? It seems like you installed indicator-stickynotes recently, so it seems like you upgraded or re-installed Ubuntu, not just some packages.

Second, can you tell me what happens if you try to change the color of the notes? Does the background remain black?

ConnyLo (webmaster-333) wrote :

Some data:
Linux Mint 17.2
means Ubuntu 12.04
indicator-stickynotes 0.5.4

Second, can you tell me what happens if you try to change the color of the notes?
Does the background remain black?
-> Sadly yes

ConnyLo (webmaster-333) wrote :

Linux Mint 17.2
means Ubuntu 14.04

Zephyr (pasha-pivo) wrote :

I chose one single color that I like most and changed the background to this color. Now it works fine, but I cannot choose any other color indeed.
Waiting for the fix.

Mark Damaceno (adhans7) wrote :

I have the same issue... any fix known? I'm running ubuntuMATE 15.10

Umang Varma (umang) wrote :

Sorry, I really don't know what is causing this. I have tried to figure out, but now that it works fine on my computer, I can't try to debug. I don't even know what I would try at this point.

If anyone has a solution, I would definitely look at the patch.

Martin vom Hagen (a-martin-8) wrote :

Hello Umang,

I'm running Ubuntu 14.04.3 LTS x64 and I'm also experiencing this problem. For about 3 months everything was fine, now suddenly after a non-distribution update I ran into this strange behavior. What I already tried is purge + reinstall. What I discovered is that when I execute indicator-stickynotes on the CLI for the root user via sudo the view is as it should be. So there can be a connection to the user's config files. Would be glad, if you dig into this further.


Peter Szekeres (szekeres2009) wrote :

I discovered this fantastic app just yesterday and after a system restart today it started up black for me as well. I use Linux Mint 17.3 Cinnamon 64-bit with 4.2.0-25 kernel, with fglrx-updates as the video driver. I hope it helps, I really hope a solution will be available soon.

Umang Varma (umang) wrote :

Thank you both for your comments. Like I said before, I really have no idea how else to debug this, but I might try to make a mini app that tries to find the simplest case where it fails. If I get around to doing this, I will ask those of you who are still experiencing the bug to help test.

Martin, could you try creating a new user on your computer, log in as that user, and run indicator-stickynotes?

Peter Szekeres (szekeres2009) wrote :

Hi Umang, no need for that by simply staring the app from terminal as super user with 'sudo indicator-stickynotes' it works without the black text box (while simply starting it will end up bugged). Whatever is going on with this it must be related to a corrupted setting file in affected profiles. I remember that before I restarted the system the sticky note was active as I was typing in it before, the effect looks as if the text selection highlight effect was permanently stuck to it. Knowing what files the app is using to store configurations and settings could be helpful, so that deleting them may start the app as intended.

Umang Varma (umang) wrote :

When I had this problem, I don't remember it going away after deleting the configuration file. Indicator stickynotes only loads ~/.config/indicator-stickynotes. You can try deleting that this has to do with configuration for some other software, specifically something in gtk. Let me know if you have any ideas.

Martin vom Hagen (a-martin-8) wrote :

With another local user created the problem vanishes! Deleting the config file does not help. There must have been something in the last update cycle that destroyed the user config. First thing I could do is to look at a backup of my machine a week ago and simply make a diff in the home directory.

Umang Varma (umang) wrote :

Martin, sorry for the slow response. Yes, a diff would be fantastic. My guess is we are looking for something in gtk settings. Look through and see if you find anything. If you don't find anything and you don't have any personal information in the diff, you can send me a diff directly also.

Martin vom Hagen (a-martin-8) wrote :

Hello back again,
I manually went through the diff, but couldn't see anything relevant concerning GTK. Here is the (already stripped) 1.178.349 lines monster.

Umang Varma (umang) wrote :

Could you confirm if the md5sum I got is right?

8a4e6321c4f25c9d82dacf1bc0be6e97 diff.txt.gz

I'm getting errors loading the .gz

Martin vom Hagen (a-martin-8) wrote :

No, mine is c827b9bb7e52507332e251fa969de93f. I'll attach it again.

Martin vom Hagen (a-martin-8) wrote :

Hi Umang, did you get the time to check the diff? It's annoying to have those white on black notes. :)
As a ray of hope: As said, the problem occured after an update on my 14.04.3 workstation. I'm also running another machine with 15.10, but after installation due to some graphics driver issues I had to use an older kernel (don't have the precise one in my head). Now on this machine the stickynotes work like a charm! So could this also be related to a kernel update or GTK updates that came along?

Umang Varma (umang) wrote :

I was able to look at it briefly, but didn't find anything.

Yes, this is a very strange bug and I honestly don't feel like I have ever gotten any closer to finding the cause.

I've been busy recently, but I'll try to give that diff a better look soon. Thanks again for your help.

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

Duplicates of this bug

Other bug subscribers