Xfce Forum

Sub domains
 

You are not logged in.

#1 2016-05-12 14:48:27

Clio
Member
Registered: 2011-01-25
Posts: 97

Thunar's root warning

Hello

is it possible to disable the root warning or change the background-color for this in version 1.6.10?
I don't need a warning, I know that, if I works as root in thunar.
I've search in the sourcecode xxx/thunar-window.c and I found the code for check the root warning, but not the hex-code for the color.
In the old version 1.4.2 is it possible to change it, but not in 1.6.10. Is the yellow code in another file? I have search all files, but I can't find it, sorry.

I've try to comment out the code for the warning complete in thunar-window.c too, but then is it impossible to automount a removable media with thunar-volman.
It is very mysterious.

My system is Debian Sid with Xfce 4.12 and Thunar 1.6.10.

Thanks in advance for a helpful hint and regards

Offline

#2 2016-05-12 20:26:07

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,998

Re: Thunar's root warning

This one was a tough one.

What you are seeing is the GtkInfoBar widget. The properties and colours are set at the Gtk level.

According to the documentation, you should be able to use symbolic colour codes for the various message types to change the colour. Unfortunately, I was not able to get this to work.

Here is what did finally work:
~/.gtkrc-thunar-root

style "my-infobar" {

  xthickness	= 4
  ythickness	= 4

  engine "pixmap" {

    image {
      function = BOX
      state = NORMAL
      file = "red.png"
      border = { 4, 4, 4, 4 }
      stretch = TRUE
    }

    image {
      function = BOX
      state = PRELIGHT
      file = "red.png"
      border = { 4, 4, 4, 4 }
      stretch = TRUE
    }

    image {
      function = BOX
      state = ACTIVE
      file = "red.png"
      border = { 4, 4, 4, 4 }
      stretch = TRUE
    }

    image {
      function = BOX
      state = INSENSITIVE
      file = "red.png"
      border = { 4, 4, 4, 4 }
      stretch = TRUE
    }
  }
}
widget_class "*<GtkInfoBar>*" style "my-infobar"

...note: you need a red.png file in your home directory thats basically a 50x20 square of the colour red (or any other colour that you want as a background).

Then, call thunar root like this:

gksudo env GTK2_RC_FILES=~/.gtkrc-thunar-root thunar

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2016-05-13 18:33:27

Clio
Member
Registered: 2011-01-25
Posts: 97

Re: Thunar's root warning

Hello ToZ,

thank you for your quick replay.
Unfortunately, this does not work. However, no error appears, but the background is still yellow.
I can't find an error in your code, the file is in ~/home, the png is 50x20, everything is given like by you.
I dont't understand it, but I continue to search.

Offline

Board footer

Powered by FluxBB