DISPLAY environment problem

russell23

Registered
Hi friends,

I am new to this forum. After some googling, found this, site and felt like, real geek's are here. I have a problem in my DISPLAY environment (if I am not wrong).

I have customized my command prompt in terminal. My $PS1 goes like this,

export PS1="${BLACKR}\u${BLACK}@$(bat) ${MAGENTA}\W:${BLACK}, in my .bashrc. I have properly defined the colour variables. The $(bat) is a custom script, that calculates the present battery charge and prompts it at my command prompt. So, upon each RETURN hit, the script runs and updates the battery charge. This is was very fine, until yesterday.

I installed, mplayer via macport and ran a video file using quartz as video output,

> mplayer -vo quatz <videofilename>

After that, my custom script was not being executed upon hitting RETURN and the script runs only once, when the terminal starts (It reads the .bashrc, in my home). After that my $PS1 variable was not being exported, on each hit.

I am noticing a new DISPLAY variable as a environment variable. (To be honest, I am not sure, whether this was set previously and I didn't notice it before).It is as follows,

DISPLAY=/tmp/launch-novce8/:0

I am not sure, what does it mean. And, while writing this post, I am noticing there is another safari icon active in my dock, apart from the one, which I have set. I never seen anything like this before. I believe, there is something wrong with the DISPLAY environmental variable, which is overriding my $PS1 values and the same is the reason for two safari icons in my dock.

Could anyone suggest me, what is wrong and what should I do to make my $PS1 work?

I have searched /private/etc/bashrc profile csh.login zprofile and the system wide settings in /etc/bashrc profile csh.login zprofile and in my .bash_profile. But, there is no trace of DISPLAY variable set in those places.

I believe something has changed, when I ran the video file with quartz as video output. How could I revert back to the default video output and get $PS1 exported everytime, I hit RETURN.

Thanks a ton in advance.
 
Hi folks and geeks,

I have found out what was wrong and it is not the DISPLAY variable causing the problem, but there was a slash missing in my $PS1 variable setting. Now my correct variable setting is as below,

export PS1="${BLUE}\u${BLACK}@\$(bat) ${MAGENTA}\W:${BLACK}"

Now, it works like a charm!!


Thank you for those who scratched their head.
 
Back
Top