Skip to content
Tcl Source Code History Of Ticket 3f7eca5475a5ead1
Login

History Of Ticket 3f7eca5475a5ead1

Artifacts Associated With Ticket 3f7eca5475a5ead1

  1. Ticket change [975381b973] (rid 203318) by var211 on 2022-08-25 21:12:38:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      Hello. I'm using several Tkinter apps under Arch Linux with i3 window manager.  All Tk applications use black background color by default which defined in X11 .Xresourses file.
      Is there any other way to override this behaviour except monkey patching every python app or changing system colors?
      Can I configure Tcl/Tk systemwide somehow, for all Tkinter applications?
      
    5. foundin initialized to: "8.6"
    6. is_private initialized to: "0"
    7. login: "var211"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "a0be1cc8dd085801e519bc22e6590834ee574402"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "var211"
    14. subsystem initialized to: "69. Other"
    15. title initialized to: "Tcl/Tk, Tkinter and X11 system colors"
    16. type initialized to: "Support"
  2. Ticket change [ed38d6ceaf] (rid 256764) by serhiy.storchaka on 2026-09-20 10:59:11:

    1. icomment:
      Tk loads the X resources (the RESOURCE_MANAGER property set by xrdb, or ~/.Xdefaults if it is not set) into its option database, so a wildcard entry such as <tt>*background: black</tt> applies to every Tk widget, as it does to every other X application which honours resources. It is not specific to Tkinter.
      
      The usual fix is to restrict such entries in .Xresources to the applications they are meant for, e.g. <tt>URxvt*background</tt> or <tt>XTerm*background</tt>, instead of <tt>*background</tt>.
      
      If you cannot change them, a more specific pattern for the Tk application class wins over the wildcard. Tkinter applications have the class <tt>Tk</tt> by default (the <tt>className</tt> argument of <tt>tkinter.Tk</tt>), so this in .Xresources restores the defaults for all of them:
      <verbatim>
      Tk*background: #d9d9d9
      Tk*foreground: black
      Tk*Entry.background: white
      Tk*Text.background: white
      Tk*Listbox.background: white
      </verbatim>
      (a wish script has the class <tt>Wish</tt>, other scripts the capitalized script name). There is no separate system-wide Tk configuration file; on X11 the resource database is that mechanism.
      
    2. login: "serhiy.storchaka"
    3. mimetype: "text/x-fossil-wiki"
    4. status changed to: "Closed"
  3. Ticket change [5841ceb17c] (rid 259880) by serhiy.storchaka on 2026-10-22 17:19:24:

    1. closedate changed to: "2461303.957769977"
    2. closer changed to: "serhiy.storchaka"
    3. login: "serhiy.storchaka"