1838383 Members
4068 Online
110125 Solutions
New Discussion

problem with Dtfile

 
jim bidebo
Regular Advisor

problem with Dtfile

Running HP-UX 10.20 -> 11.11

Got a request from a user, he uses Dtfile to manage his files, and he would like to have some filetypes associated with specific programs. For instance if he double clicks on a .cad file he would like /opt/cad/bin/cad to open that specific file.

Anyone got any ideas?
2 REPLIES 2
Shannon Petry
Honored Contributor

Re: problem with Dtfile

It's really not that hard, but quite alot to learn to make it work, if that makes much sense.

A few man pages will help to getyou going, and I'd strongly recoommend you purchase from HP a book on programming CDE.

man dtdtfile
man dttpes
man dtactionfile

You can also look in /usr/dt/appconfig/types/C for some usefull examples.

Modified local files should always be placed in /etc/dt, and not /usr/dt. This includes Icons, desktop definitions, and action files.

Once you get the knack for the way CDE works, and the language it expects you should have no difficulty in configuring any application to launch based on file extentions.

Since this is Unix, I'd recommend you look very hard at mime type for triggers as opposed to extentions. Extentions are good, and easy but using mime types will ensure that users naming files badly will not cause hours of debugging.

Another great thing is that since CDE is available on all current Unix platforms (including Linux, SCO, and Irix) your coding can be moved to any other platform simply by copying the files.

Have fun!
Sincerely,
Shannon
Microsoft. When do you want a virus today?
jim bidebo
Regular Advisor

Re: problem with Dtfile

Well, im pretty descent at the rest of unix, the graphich env with CDE isnt one of my strong sides thou. Never really had any use of knowing how to config Dtfile and such, since i mostly only using Xterm or in some cases Dtterm.

I would realy like to have some more guiding in this. so please point out which file to edit, and if possible an example of how it could look.