[Gtk-sharp-list] System.Windows.Forms.SystemInformation equivalent
Christopher David Howie
me at chrishowie.com
Tue Sep 7 11:35:49 EDT 2010
On 09/07/2010 09:54 AM, Natalia Portillo wrote:
> BootMode could reflect runlevel.
Useless, since different distros use different runlevels to mean
Stored in /etc/hostname
> DebugOS if kernel is compiled debug
I'm not sure why you would need to know this and I'm not honestly even
aware if there is a userland flag to indicate this. Maybe you could
parse it from the "uname -a" output?
> MonitorCount depends on X11 not toolkit
> MouseButtons, MousePresent, MouseWheelPresent depending on xinput if
> I'm not wrong
You can probably inspect Gdk.Display.Default.CorePointer to determine
> Network is just a bool, is there any network at all?
This depends on what you mean by "is there any network". You will have
to clarify this point. Do you mean "user can reach the Internet," or
"user has access to something except localhost," or "the kernel supports
> PowerStatus on ACPI
You'll have to be more specific about what kind of information you want.
> PrimaryMonitorSize on X11
> ScreenOrientation on X11
I assume you mean rotation and not simply portrait/landscape (which you
could infer from the resolution of the default screen). I'm not aware
of any GDK mechanism you could use to obtain this. You would have to
query the XRandR subsystem directly.
> TerminalServerSession this may have no meaning on Unix but
> UserInteractive does (remote X11 session, x11vnc server or user thru
> Apple Remote Desktop?)
Determining if the user is remote is problematic. Services like
vino/x11vnc can operate alongside a local user, so there is no way you
can make the determination in those cases if the user is remote or local
-- there could very well be both a local and a remote user.
The only way you could say for certain is if someone were using a server
like Xvnc, which has no local display at all. And there's probably not
a foolproof way to determine if the current server is Xvnc anyway.
> UserDomainName this should be more about Samba joined to a domain, or
> OpenDirectory on OS X.
If you want to know the Samba domain, you will have to query Samba. The
*nix meaning of domain is very different from what Windows calls a
"domain" (a term it has hijacked to mean something very different from
what the rest of the world calls a domain).
> VirtualScreen when X11 has a virtual screen (real res 800x600, virtual desktop 1024x768)
The display size will be the size of the actual display as far as X is
concerned. This means that it will encompass the resolutions of all of
the screens attached (so if you have two 800x600 monitors arranged
horizontally, this would be 1600x600).
If there is one screen and that screen's resolution is smaller than the
display's resolution, then that would qualify as a virtual screen by
If you correspond with me on a regular basis, please read this document:
PGP fingerprint: 2B7A B280 8B12 21CC 260A DF65 6FCE 505A CF83 38F5
This document should be read only by those persons to whom it is
addressed. If you have received this message it was obviously addressed
to you and therefore you can read it.
Additionally, by sending an email to ANY of my addresses or to ANY
mailing lists to which I am subscribed, whether intentionally or
accidentally, you are agreeing that I am "the intended recipient," and
that I may do whatever I wish with the contents of any message received
from you, unless a pre-existing agreement prohibits me from so doing.
This overrides any disclaimer or statement of confidentiality that may
be included on your message.
More information about the Gtk-sharp-list