'How to get the window title of a process in C# on Linux/macOS?
By default, GUI windows in Windows, Linux and macOS will show the title of the window on top of them and that is what I want to read programmatically with .NET Core 6.
On Windows, this can done by getting Process.MainWindowTitle
. However, the documentation of that property states it will most often return an empty string on Unix system and so this what happens on Linux and macOS.
Is there a way to read this information on these systems? A native way to do so without dependencies would be preferred if possible.
Solution 1:[1]
The short answer is no by default functionality of .NET CORE in Unix
You can read the comment by omajid to get an idea
Get or set the console title in Linux and MacOSX with .NET Core
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Alander |