Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Operating System
Display environment variable and custom script
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="russell23" data-source="post: 871475" data-attributes="member: 103837"><p>Hi folks,</p><p></p><p> I have a custom script, that shows the current battery charge in my command prompt. It was quit fine till, last shutdown. But when I rebooted my machine, the battery charge was not updating on each prompt, rather, it was showing the same charge, when the terminal has been started. I found that, the script was not executing, as it was executed upon each "RETURN" hit.</p><p></p><p> I found a new variable in my environment, after I type env ( I think it is new, because, I don't remember it was shown before) and since, I am exporting PS1 (in which my custom script lies) from the .bashrc.</p><p></p><p>The only thing, I have done was installed mplayer via macport and viewed a video file using xquartz as the video output. I suspect this might have changed my settings. And now my DISPLAY variable is as follows,</p><p></p><p>DISPLAY=/tmp/launch-LjmwIR/:0</p><p></p><p>I don't have any idea, where is is being set (I have checked my .bashrc and .bash_profile files, but no trace of it).</p><p></p><p>Could anyone shed some light on it, where this variable might have been set and how to unset it?</p><p></p><p>Please correct me, if my guess is wrong and there is something else is the reason behind it?</p><p></p><p>Thanks a ton in advance.</p></blockquote><p></p>
[QUOTE="russell23, post: 871475, member: 103837"] Hi folks, I have a custom script, that shows the current battery charge in my command prompt. It was quit fine till, last shutdown. But when I rebooted my machine, the battery charge was not updating on each prompt, rather, it was showing the same charge, when the terminal has been started. I found that, the script was not executing, as it was executed upon each "RETURN" hit. I found a new variable in my environment, after I type env ( I think it is new, because, I don't remember it was shown before) and since, I am exporting PS1 (in which my custom script lies) from the .bashrc. The only thing, I have done was installed mplayer via macport and viewed a video file using xquartz as the video output. I suspect this might have changed my settings. And now my DISPLAY variable is as follows, DISPLAY=/tmp/launch-LjmwIR/:0 I don't have any idea, where is is being set (I have checked my .bashrc and .bash_profile files, but no trace of it). Could anyone shed some light on it, where this variable might have been set and how to unset it? Please correct me, if my guess is wrong and there is something else is the reason behind it? Thanks a ton in advance. [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
macOS - Operating System
Display environment variable and custom script
Top