1

I'm trying to set the Activity (not sure of the proper term, see screenshot) name for a Tkinter app. I'm not a Linux expert, novice, or really even beginner, but the system about dialog lists my test machine as Fedora 30. Window Manager is Gnome.

Code can't get much simpler:

import tkinter as tk

master=tk.Tk()
master.title("My lil' Application")
master.mainloop()

This is most likely either a very simple or impossible thing to accomplish. I've not been able to come up with the magical search terms that result in an answer yet. This seems like something that someone else must have run into though which means the answer has to be out there.

Thank you for your time.

Screenshot of Situation

Solution from stovfl:

import tkinter as tk

master=tk.Tk(className="My lil' Application")
master.title("My lil' Application")
master.mainloop()
stovfl
  • 14,998
  • 7
  • 24
  • 51
Siloria
  • 11
  • 3
  • Don't have a Linux box handy to test this, but `master.iconname("whatever")` might work. – jasonharper Dec 02 '19 at 18:57
  • master.iconname("whatever") does not seem to fix it. – Siloria Dec 02 '19 at 19:52
  • @Siloria: Try this approach [`master=tk.Tk(className="My lil' Application")`](https://askubuntu.com/a/929546). `"Tk"` is the default `className` used by `tkinter.Tk`. – stovfl Dec 02 '19 at 21:29
  • 1
    That was it! If you add it as an answer I'll do whatever I do to mark it as the solution. I was guessing it would be something like that. – Siloria Dec 02 '19 at 22:02
  • @Siloria It depend on the used Window Manager, please [edit] your question and tell which Window Manager you are using. – stovfl Dec 03 '19 at 08:55
  • @Siloria Event this will work for you, i feel it is wrong. Try `master.tk.call(('tk', 'appname', "My lil' Application"))`. – stovfl Dec 03 '19 at 11:02
  • @stovfl Updated my question with the Window Manager. Your second suggested change does not fix the problem. – Siloria Dec 03 '19 at 14:21
  • ***"second suggested change does not fix the problem."***: OK, seems you have to go with `className=`. – stovfl Dec 03 '19 at 14:27

0 Answers0