My Yosemite Terminal App say "Meia:/ username$"?
I don't know what Meia stands for.
Normally I would expect something else. Can I change it?
That is the name given to your computer!
Change it here, no need for terminal command.
System Preferences > Sharing
Change your Computer Name here.
I ran this command and it changed to MYHOSTNAME.
sudo scutil --set HostName MYHOSTNAME.local
Related
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 have used vim to make small scripts in python and typesetting things in LaTeX. So it is very useful to run applications from vim by typing :!python or :!pdflatex etcetera. But after upgrading to el capitan, this seems not to work anymore, get message like /bin/bash: pdflatex: command not found. But the funny thing is that it is possible to run the applications directly from terminal. Anyone that know how to set the correct that for vim as well?
$PATH variable not properly set in gvim/MacVim when it is opened from the finder
first check :!echo $SHELL and see if SHELL is set to bash or not
then try to set your path in your ~/.bash_profile?
export PATH=<dir_contains_pdflatex>:$PATH
I noticed that I have some weird prefix in my bash terminal - unknown-MACADDRESS. I think in all unix terminals it is suppose to be host name and login. I've tried go to sharing and change my host name in there, but unknown- stays in terminal.
Not sure where problem is, do you know how to change it?
Thanks a lot for any help!
Use the hostname command
$ sudo hostname dan
For me this: scutil --set HostName yourname changed the name and it works even after a restart.
I spent some time today installing Ruby, Rails and other web development stuff through homebrew and rvm. But somewhere i must have put the wrong command in the terminal since my terminal on OS X Lion (same with both standard terminal and iTerm2) now looks weird.
How do I get rid of that red tilde and black arrow and get it back how it looks as default?
As I am a beginner at terminal commands I would appreciate your help.
it seems like PS1 has been changed.
what you can do now is to change it back, or simply delete it to return to default.
in terminal, do the following:
cd ~
grep "export PS1" .*
then you will see some outputs, it might be in .profile or .bashrc, (just ignore the history one)
you can use whatever to open the file. or just open .filename in terminal, delete the line with export PS1, save, relogin. the problem shall be resolved.
I can't seem to change the default bash editor in OSX Lion terminal.
I've tried setting:
export EDITOR='<editor symlink with parameter>'
in both ~/.bashrc & ~/.bash_profile . The symlink is subl, and the parameter is -w.
from the prompt it is:
subl -w
I have restarted terminal after each but every time I enter:
edit test-file.md
it opens TextWrangler (not the editor I've set). I've tried opening the symlink from the command line with no problem. I realize that I should probably just get used to typing the symlink, but the anal side of me wants to know why I can't set the default editor.
Any help with this trivial problem would be appreciated, thanks in advance!
I'm not even sure what edit command is. i don't have in on my Mac OS X Lion. Whatever it is, sounds like it ignores the EDITOR env variable and uses your MacOS X application settings.
What you want can be accomplished with the alias shell command though:
alias edit=/path/to/vim