Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.profile strange behaviour

Status
Not open for further replies.

markuscj

MIS
Feb 15, 2006
35
GB
I need a user to run a script that opens a menu when they log in, so added it to their .profile - /home/user/script, but the menu just hangs for ages and when it does come up it doesn't work properly.

If /home/user/script is not added to the users .profile, the user can run the script normally with no problem.

After further investigation it turns out anything that is added to anybodies .profile on this particular box get's run twice! For instance, just adding 'date' to the .profile will show date/time twice when you log in.

Is this an environment problem? I can't see anything obvious. Ideas anybody?
 
Is there anything in /etc/profile to cause this?

I want to be good, is that not enough?
 
Thanks guys, it's been solved now.

It was in fact an entry in /etc/environment but was missed on the first look. There was an entry in there:

ENV=$HOME/.profile

so .profile for all users was effectively being executed twice.

Thanks anyway :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top