Re: Tk and xdefaults on windows (prompted by Re: Tk's lack of "chrome")
Slaven Rezic <[email protected]>
| Newsgroups | gmane.comp.lang.perl.tk |
|---|---|
| Message-ID | <[email protected]> |
Nick Ing-Simmons <[email protected]> writes: > Hans Jeuken <[email protected]> writes: > >> I well thought out set of xresources can help X11 > >> for sure. Windows might be a little more tricky > >> as core tk (as currently ported) aims to use "native look". > >> > > > >A couple of years ago i had a W98 machine and i was > >sharing my linux home folder on that machines through > >samba. When launching a perl/Tk script from that > >shared drive on the W98 it used the settings in > >the .Xdefaults file in my homedirectory on my linux > >machine. I do not remember if all settings were correct, > >but at least background colours matched. > > I know how basics work as I have used them myself. > You are correct that for some meaning of "home directory" > (which isn't really a Win32 concept) I once found this API call: my $server = get_domain_server(); if (defined $server) { my($userinfo) = {}; Win32API::Net::UserGetInfo($server, Win32::LoginName(), 2, $userinfo); if ($userinfo) { return $userinfo->{homeDir}; # this is the "home" directory } } Which probably only works in a networked windows environment. Otherwise there are some environment variables which possibly denote a "home" directory: HOMEDRIVE+HOMEPATH, USERPROFILE, HOMESHARE, HOME... Regards, Slaven -- Slaven Rezic - slaven <at> rezic <dot> de Tk-AppMaster: a perl/Tk module launcher designed for handhelds http://tk-appmaster.sf.net -++**==--++**==--++**==--++**==--++**==--++**==--++**== This message was posted through the Stanford campus mailing list server. If you wish to unsubscribe from this mailing list, send the message body of "unsubscribe ptk" to [email protected]