When I'm using XFoil (for Mac, XQuartz installed) and I'm trying to plot something, the above message comes out. Another thing, I've used the instructions of the following link to install Gnuplot and I'm worried I did some damage... it's all ok with this?
http://macappstore.org/gnuplot/
Please try to use
export DISPLAY=:0.0
within the shell, so GNUplot knows that it should use the standard display (i. e. your XQuartz environment)
On a MAC, install Xquartz and ensure it is running after your attempt to start your X application.
pgrep -fl Xquartz will show all the processes and their arguments that match Xquartz.
If you don't have pgrep, run /bin/ps -o 'pid,command' -e | grep Xquartz instead.
Look for the entry for the executable itself with the display set; something like this:
1182 /opt/X11/bin/Xquartz :0 -nolisten tcp -iglx -auth ...
The first number is the process id, or PID. If you wait 20-30 seconds and re-run the command, ensure the number is the same.
If the PID has changed, then you have the problem I ran into, where Xquartz is exiting with an error and the system is restarting it again, whenever I tried running xterm.
To check logs for an error, start the Console app found in /Applications/Utilities. In the search box, type Xquartz and press return, and you should see only the Xquartz entries.
The error log I saw was:
tput: No value for $TERM and no -T specified
-: line 0: exec: uid=501(...): not found
After some investigation, I figured out that all I needed to do was set TERM prior to running the X server, and this can only be done in a .x11run file created in your home directory.
Create ~/.x11run with the following content:
#!/bin/bash
export TERM=xterm-256color
# include other vars the X11 server may need
/Applications/Utilities/XQuartz.app/Contents/MacOS/X11.bin "${#}"
Then, make it executable: chmod +x ~/.x11run.
Next, log out (Apple icon top left, click Log Out), and then log back in, and try your app, in my case, xterm, and after several seconds, it finally appeared.
You have to install an xserver first. On a MAC you would use XQuartz. You need to download and install XQuartz and from within XQuartz (right click on the logo after start) start a terminal. In this terminal navigate to the location where xfoil is installed and run it. The DISPLAY variable (as shown in another answer) is automatically preset in this terminal. So no need to do this if you run as described here.
For the installation of xfoil (macOS Catalina) I had to compile the code. I followed these instructions which worked like a charm.
I am using Terminal App on Mac OS X (10.11) and I found that every command output (except for clear) prepend the command I inputted at the beginning of the result. As shown in the following screenshot:
Hyper has the same issue, but its working on iTerm2.
And I am using zsh (zsh 5.0.8 (x86_64-apple-darwin15.0)) with oh-my-zsh, actually, it works fine in bash.
It feels impossible to get it to run on any custom terminal. I know that octave-cli.app is there but it always opens in the standard terminal. Any ways to execute octave scripts like a compiler (or) run it interactively like an interpreter from Iterm?
Using Mac OSX 10.9+
Edit:
I know how to export path variables. But having searched the web can't find a way to do it. Is it even possible? I even tried it using homebrew to no avail.
You can see the content of octave-cli.app, it's a script. Mine goes like this
open -a Terminal.app /usr/local/octave/3.8.0/bin/octave | logger 2>&1
It specify the terminal application used to open octave. This is the reason of your problem, as I think.
The solution is linking octave-cli in system path, better locates at "/usr/local/bin". like
ln -s /usr/local/octave/3.8.0/bin/octave-cli /usr/local/bin/octave-cli
Finally, octave can be accessed via any terminal(like iTerm) or shell(bash, zsh) by just type "octave-cli" command, which will be searched in system path and found to executed directly.
Generally I like the -F option - it quickly shows you what is a directory, what is executable etc. But it seems to be permanently on under Mac OS X (using the default ls command under 10.6.8 - I haven't installed GNU or anything). This prevents the output being filtered to another command that expects file names without the appended characters.
How do I change this behaviour?
thanks
Whenever I start up Terminal on my Macbook Air, I get this message:
-bash: ≈: command not found
How do I fix this error? I'm running Mavericks version 10.9.4 if that helps at all.
EDIT: Fixed this error by using the bash -x method, found out it was a random '≈' character left in ~/.profile that needed to be deleted. Thanks for the answers :)
To debug you can try this:
bash -x -l
(the -l might not be needed).
I definitely agree with Barmar, there is something in your bash startup scripts.
There is not a great way to do this, but here is the protocol to remedy it.
Confirm it is your bash profile by first killing the process with a control + C if it is hung. Then do a source ~/.bash_profile and see if you get that same error.
Backup your bash profile cp ~/.bash_profile bashprofile.txt
Then comment out part of your bash profile. With text wrangler you can do a command + slash.
Save, then do a source ~/.bash_profile and see if the error still prints.
Repeat with different areas of the script until you have isolated the infected region.