View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

Starting ds9 from loginuser.cl

H.J. van Heerden wrote on Aug 21, 2006

Hi All

It may sound a stupid Q, but how would you call DS9 from the loginuser.cl. I would like to skip the step where I have to start DS9, and run it in the bg, before every IRAF session. I am not that familiar with coding in c-shell.

Thanx

Pat

Mike Fitzpatrick wrote on Aug 21, 2006

Add the line

!ds9 &


someplace before the final 'keep'. This will spawn it in the bg for you.

-Mike

H.J. van Heerden wrote on Aug 21, 2006

Hi all

Just want to Q this. You can start DS9 from the loginuser.cl. Now how can you exit DS9 automatically when you "logout" of IRAF. :idea:

Usually when I logout, I have to close DS9 afterwards' or beforehand. (Clicking on the little cross.) :D

Just for fun

Thanx
Pat

Mike Fitzpatrick wrote on Aug 21, 2006

Pat,

Assuming you installed the XPA tools when you got DS9 (if not, you can get them from the DS9 page), you can create a logout.cl file in the same dir as your login.cl that contains

!xpaset -p ds9 quit


-Mike

H.J. van Heerden wrote on Aug 21, 2006

Hi Mike

COOL!!!! :wink:

Thanx
Pat

rohit wrote on Aug 21, 2006

This seems a great idea. But how do I create loginuser.cl file? Is it different from login.cl or an extension of it? I created a loginuser.cl file separate from login.cl file. This was done by copying the script from one of the tutorials on iraf.net. But after saving the file next to login.cl, IRAF would not work. Please help.

Mike Fitzpatrick wrote on Aug 21, 2006

A loginuser.cl file can be created with any text editor. The only requirements are that it be in the same directory as the login.cl, have valid CL commands, and that the last command in the file be 'keep'. If IRAF isn't starting there may be a syntax error in the file. To open DS9 from this file you can use

!ds9 &


if the 'ds9' command is in your path and installed in some place like /usr/local/bin. Or

!open -a ds9 &


should do it if DS9 is in the Applications folder on a mac.

The reason you'd use a loginuser.cl is because a MKIRAF overwrites the login.cl, this is one way to preserve e.g. your settings for printers, frame buffer sizes, etc.

-Mike

Last post on Aug 21, 2006