I have Solaris 9 and 10 systems running.  If you have the choice, look at 
Solaris 9 rather than 10.  ldd /usr/dt/sdthotkeys shows a bunch
more libraries on Solaris 10, that from the look of the names, have to do with 
optionally supporting Trusted Solaris (uses zones as isolation areas for
information of different sensitivity levels, plus a few other odds and ends in 
the interface).  Should be easier to figure out how it does what it does
without additional complications.  You may be able to use xscope to catch some 
of any X-based communication between processes - that's how
I figured out how dtstyle (I think it was) can restart dtwm; I have a command 
that will send f. commands to dtwm using that mechanism, although
you can figure out a neater way if you look at one of the CDE internal 
libraries, I suppose; libdtSvc, I think it was; that was back before source
availability, so I had to do it the hard way.  My program (dtwmcmd - send 
f.commands to dtwm) may be floating around somewhere; but my website
no longer exists, so I've attached a copy.

Oh, here's what might be a hint as to where it keeps it.  From the Solaris 9 
versions, reasons as above.

$ strings /usr/dt/bin/sdthotkey|grep dtwmrc
$HOME/.dt/$LANG/dtwmrc
$HOME/.dt/dtwmrc
/etc/dt/config/$LANG/sys.dtwmrc
/etc/dt/config/sys.dtwmrc
/usr/dt/config/$LANG/sys.dtwmrc
/usr/dt/config/sys.dtwmrc
$HOME/.dt/sdthotkey.dtwmrc
$HOME/.dt/sdthotkey.dtwmrc.tmp
$HOME/.dt/sdthotkey.dtwmrc.old

$ strings /usr/dt/bin/dtwm|grep sdthotkey.dtwmrc
/.dt/sdthotkey.dtwmrc

In other words, it probably looks at the places above (except the ones ending 
in tmp and old), and according to that input plus user input
builds or replaces (with perhaps the one ending in tmp as output pending 
completion, followed by any existing file renamed to .old suffix,
and the new file renamed without the .tmp suffix?) $HOME/.dt/sdthotkey.dtwmrc.  
And perhaps tells dtwm to do an f.restart -noconfirm when it's done that.

And of course dtwm itself was modified to read the additional optional 
$HOME/sdthotkey.dtwmrc file and merge it into its internal idea of the hotkeys
(obtained at startup or restart from the other dtwmrc files that it reads).

All of which implies it may have to be able to parse existing dtwmrc files to 
determine existing hotkey settings.

nm on /usr/dt/bin/sdthotkey definitely suggests it was written at least partly 
in C++, given the mangled names.

There is a man page (on either Solaris 9 or 10) for sdthotkey. It also mentions 
that what it sets is stored in $HOME/.dt/sdthotkey.dtwmrc,
and also contains a warning (and thus presumably either sdthotkey or dtwm 
contains enforcement) that I think means you won't be allowed
to redefine keys already defined elsewhere, although you should read it for 
yourself, because that's not exactly what it says.

All I have for now.  That may be as far as I go with it; I'm more interested in 
if recent versions still build on Solaris 11 and especially whether anyone has 
made some reasonable progress on building for macOS. Not that it wouldn't be 
nice to have the IMAP in dtmail (primitive as it is) actually work, too. :-)

Attachment: dtwmcmd.c
Description: Binary data


> On Jun 27, 2019, at 10:38, Swift Griggs <swiftgri...@gmail.com> wrote:
> 
> On Thu, 27 Jun 2019, Andrey ``Bass'' Shcheglov wrote:
>> Which files under `${HOME}/.dt` does `sdthotkey` modify?
> 
> Good question. I'll have to fire up a Solaris box and find out. As you point 
> out, it can't be rocket science to map out the hotkeys and there is likely 
> full documentation somewhere knowing CDE.
> 
>> Probably the same functionality can be implemented using some python or 
>> shell scripting, with `zenity` or `xdialog` (or even `dtksh`) as the 
>> front-end.
> 
> I've rarely actually seen a Python GUI work. I've seen a *lot* of tracebacks, 
> though. Python scripts with GUIs make PHP-GTK or Perl-GTK programs seem 
> rock-solid-stable. They only seem to work in screenshots, but hey at least 
> the code is well-indented, hehe.
> 
> Now zenity and xdialog are interesting. Those have at least as good a chance 
> at working as most shell scripts you find in the wild. However, they have no 
> MOTIF look and feel unless you do a bunch of theme jiggery pokery. The dtksh 
> idea is one I like, too. That works okay and keeps it in the family. I'm not 
> aware of any zenity-alike thing for MOTIF besides dtksh. Then again, I could 
> stop whining and just write it in C, too. It's just that I haven't done MOTIF 
> from soup to nuts in 15 years. I think I still could, given enough drive, 
> though.
> 
> I've had the same ideas, honestly. Now, if I just had the time to start. It'd 
> be a fun and useful little project. The main reason I don't use CDE more is 
> that I haven't found an easy way to customize the hotkeys. Perhaps now is 
> time to do it the hard way.
> 
> -Swift
> 
> 
> 
> _______________________________________________
> cdesktopenv-devel mailing list
> cdesktopenv-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel
> 

_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to