Operating System - HP-UX
1829185 Members
3412 Online
109986 Solutions
New Discussion

How do configure CDE to automatically start apps at login?

 
SOLVED
Go to solution
Ivan Delany
Occasional Advisor

How do configure CDE to automatically start apps at login?

I waht certain applications to start automatically when I login to CDE. How do I do this? I cannot find the file, or commands to pipe, say a terminal session, to my screen at login.
19 REPLIES 19
Paul Sperry
Honored Contributor

Re: How do configure CDE to automatically start apps at login?

Simply put the in your .profile (ksh) or
.login (csh)
Juergen Tappe
Valued Contributor

Re: How do configure CDE to automatically start apps at login?

Its the .dtprofile in user home directory.

Dont forget to start Processes in the Background (& at end of line), otherwise .dtprofile will wait till these are finished.

Just tried to put a "xclock &" into my .dtprofile, it worked fine.

If you have any non X processes you wanna start you should do that with i.e.
"dtterm -e "yourpoc" &
Working together
Jeroen Peereboom
Honored Contributor

Re: How do configure CDE to automatically start apps at login?

L.S.

you may also use a HOME session in CDE.
You can customize CDE behavior when logging in/out. Options include 'resume session'' and 'return to home session'. There is a configuration panel for this. If using a HOME session, you must start all the programs you want to have started when you login and press the 'save Home session' button. Logout and login and see what programs are automatically started. Config files are saved somewhere in ~/.dt/sessions/Home (or something similar).

JP
Mike Stroyan
Honored Contributor
Solution

Re: How do configure CDE to automatically start apps at login?

The home session is the most standard mechanism for starting for those applications that use the necessary protocol to be restarted by a session manager.

For applications that don't provide restart information, you can put them in an executable script in ~/.dt/sessions/sessionetc . That will be run by dtsession at login. That is documented in the "CDE Advanced User's and System Administrator's Guide" at
http://www.docs.hp.com./cgi-bin/onlinedocs.py?mpn=B1171-90102&service=hpux&path=../B1171-90102/00/00/20

The ~/.dtprofile script is really intended to be used to set environment variables that will inherited by dtsession and all the programs it runs.
Ivan Delany
Occasional Advisor

Re: How do configure CDE to automatically start apps at login?

Thanks for the input people!

I don't want to put anything in .profile of .dtprofile as this will not start the program with my dt session settings. Also I can't find the settings app/file to change my home settings.

The sessionetc option looks like what I'mn looking for, but I created the file (with my commands in it) and it is having no effect! Any thoughts?
Jeroen Peereboom
Honored Contributor

Re: How do configure CDE to automatically start apps at login?

L.S.

check the errorlog files in your .dt directory...

JP
Ivan Delany
Occasional Advisor

Re: How do configure CDE to automatically start apps at login?

Thanks for that (duhhh, not at my sharpest).

I see the problem, I need my displany to be defined when starting X apps. How do I incorporate that in an automated script?
Fabio Ettore
Honored Contributor

Re: How do configure CDE to automatically start apps at login?

Hi,

check this thread:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=564560

There I suggested few lines to insert in .profile of an user to do that automatically.

HTH.

Best regards,
Ettore
WISH? IMPROVEMENT!
Fabio Ettore
Honored Contributor

Re: How do configure CDE to automatically start apps at login?

If you don't want anything in .profile then I hope other ITRC people could help you better.

Best regards,
Ettore
WISH? IMPROVEMENT!
Ivan Delany
Occasional Advisor

Re: How do configure CDE to automatically start apps at login?

Unfortunatly I'm running my session from an Exceed server and hence cannont gain the display properties from the 'who' command.

Any thoughts before I give up?
Alex Glennie
Honored Contributor

Re: How do configure CDE to automatically start apps at login?

post your sessionetc file perhaps ....

it has no effect : as in it doesn't start your applications ?
Ivan Delany
Occasional Advisor

Re: How do configure CDE to automatically start apps at login?

That's correct, it doesn't start any apps. Currently I just have a dtterm commend in there.
Fabio Ettore
Honored Contributor

Re: How do configure CDE to automatically start apps at login?

Ivan,sorry but I don't understand.

TTY=`who am i | awk '{print $2}'`
DISPLAY=`who -u | grep $TTY| awk '{print $8}'`
export DISPLAY

Connect in telnet (no graphic connection) and insert in .profile exactly three lines above.
Then reconnect to HP-UX box by graphic (Exceed or ReflectionX) and see if problem is solved.

Best regards,
Ettore
WISH? IMPROVEMENT!
Ivan Delany
Occasional Advisor

Re: How do configure CDE to automatically start apps at login?

Eltore, because I'm connecting from an Exceed server, this method just returns 0.0.0.0:5.0 (in my case) and hence will not work :0(

Ivan Delany
Occasional Advisor

Re: How do configure CDE to automatically start apps at login?

My ~/.dt/sessions/sessionsetc :

TTY=`who am i|awk '{print $2}'`
DISPLAY=`who -u|grep $TTY|awk '{print $8}'`

dtterm
Mike Stroyan
Honored Contributor

Re: How do configure CDE to automatically start apps at login?

You don't need to set the DISPLAY variable for the sessionetc file. The file will be run with the DISPLAY already correctly set.

You probably need to use "chmod +x ~/.dt/sessions/sessionetc". In my first posting I wrote "an executable script". I should have been more clear that the file must have execute permission set.
RAC_1
Honored Contributor

Re: How do configure CDE to automatically start apps at login?

Login to cde. Start all applications you want.

Then gpto style manager. run startup. there you get option as set home session. Click that. Also choose return to home session option.

That is all.

Next time you login, all applications will be started.

Anil
There is no substitute to HARDWORK
Ivan Delany
Occasional Advisor

Re: How do configure CDE to automatically start apps at login?

My sessionsetc file just won't run. Althoug permissions are set correctly etc, it does nothing.

Any ideas?
Ivan Delany
Occasional Advisor

Re: How do configure CDE to automatically start apps at login?

Dohhhh!!!!

sessionetc NOT sessionsetc.

Thank you all for your input.