png terminal not working gnuplot in OS X 10.8.4 - macos

I have started using gnuplot in my macbook pro. I am using OS X 10.8.4. Whenever I set terminal to png using
set term png
it gave an error as follow:
unknown or ambiguous terminal type; type just 'set terminal' for a list
Does somebody know it?

Related

How do I set the PS1 (prompt) macOS Monterey 12.6.2

How do I set the PS1 (prompt) in terminal on my macbook pro using Monterey 12.6.2.
I am trying to have the prompt in terminal to display my current directory. In terminal and on the command line, I used PS1=\W and variations of that, but it is not working as it did in other version of the macOS.
I would like to see my prompt displaying my current working directory when I am using terminal.

Run octave-cli in vscode terminal

I am a Windows user, I want to use octave in the terminal of vscode.
I have put octave to the environment variable, but when I type octave in the terminal, it pop out the gui version.
I have tried to type octave --no-gui, it pop out the octave-cli window (Please refer to the image attached).
Here are the questions:
How can I use octave-cli in the terminal of vscode?
Can I disable octave use gui when I type octave or I can only type octave --no-gui to use cli version?
In addition to the octave.vbs file that most people use to start octave, there is also an octave.bat file located under %OCTAVE-HOME%/mingw64/bin.
I'm not familiar with vscode, but if I open a Windows command prompt, navigate to c:\Octave\octave-6.4.0-w64\mingw64, and type octave.bat (no options used), it opens octave in the existing window.
Run Octave in VSCode Jupyter Notebook
You can change line octave-cli.exe % to octave-gui.exe --no-gui % in file octave.bat:
Rem Start Octave (this detaches and immediately returns).
if %GUI_MODE%==1 (
start octave-gui.exe --gui %*
) else (
octave-gui.exe --no-gui %*
Rem octave-cli.exe %*
)
Instead of starting octave-cli.exe you are starting GUI octave-gui.exe --no-gui without graphical use interface.
Check available graphics toolkits in octave:
octave> available_graphics_toolkits()
Answer should be
ans = {
[1,1] = fltk
[1,2] = gnuplot
[1,3] = qt
}
Check which graphics toolkit is used
graphics_toolkit()
ans = qt
Answer should be qt.
Benefit of the change is that now you can use best inline graphics in Jupyter Notebooks and also in VSCode Jupyter Notebooks.
John

How to set up a PATH on mac OS X in terminal

I have an .jar file that communicates with a web service. I have to set up the path on terminal (Mac OS X Yosemite) so it could communicate to it, I do know how to set it up on windows OS by just going to the "Environment Variables". But on OS X is more complicated, please help me.
variables name is: WS_3619_TICTACTOE
path is http://localhost:8080/07.WSTicTacToe/webapi/tictactoeresource/
Im using tomcat as my web server.
In order to do it in the permanent way you have edit or create your .bashrc or .bash_profile profile file.
Open Terminal in your home directory (~), then type nano .bash_profile.
Then insert the following export PATH=/07.WSTicTacToe/webapi/tictactoeresource:$PATH
Save the file. Close - open the Terminal.
In the command prompt ensure that path include by typing echo $PATH

display: unable to open X server

I am running ImageMagick on my Mac which runs on Yosemite. I have just downloaded ImageMagick and I am trying to open the logo display by running this on the command line:
display logo.gif
after executing the above command, I am getting the following error:
display: unable to open X server `:0.0' # error/display.c/DisplayImageCommand/426.
I've implemented all the steps to install ImageMagick, including executing the following command:
export DISPLAY=:0.0
and I am still not getting the display to show up. When I echo $DISPLAY, my console shows 0.0.
How can I fix this error? Any help is appreciated.
Do not attempt to export the $DISPLAY environment variable, as this will be set when X11 (XQuartz) is launched. On OS X, this is usually a unique unix path. Something like:
echo $DISPLAY
#=> /private/tmp/com.apple.launchd.CWOgR6ULcX/org.macosforge.xquartz:0
The best way to start X sever (IMHO) is to use Spotlight
⌘ + space
Search for "X11" followed by ↩
Open new terminal window & run your display command

Copy and paste in vim via keyboard between different mac terminals?

Can anyone help me with this:
I'm trying to figure out how to copy and paste text between 2 different instances of vim on different terminals (using iterm2 or mac terminal). I can do it using the mouse if I do ":set mouse=a" but I'd like to be able to do it using the keyboard.
I've googled around and it says you can use the "* or "+ registers to copy/paste to/from the system clipboard, but when I type * or + in vim, the mac makes one of those sounds it makes when you can't do something. I've also done ":set clipboard=unnamed" but that hasn't worked either.
I'm using Mac OSX 10.7 (Lion) and iTerm2 or Mac terminal.
Thanks for the help
Could you add the output of :version?
I can yank with yy or y in one Vim instance running in Terminal.app window A and put with p or P in another Vim instance running in Terminal.app window B with this line in my ~/.vimrc:
set clipboard+=unnamed
without using specific clipboard registers (* or +).
And why do you have two Vim instances running in different terminals? SSH/local? If one is in an SSH session yanking/putting won't work because the two machines (local/remote) don't share the same clipboard(s).
EDIT
I suspected that Vim wasn't compiled with the right flag(s). Apparently that's the case.
Since you are using Mac OS X's default Vim my opinion is that you shouldn't need to re-compile it or even compile anything as it often leads to more problem's than it's worth.
Instead, download the latest MacVim build and use the (CLI) Vim executable within MacVim's bundle: it has all the same functionalities as MacVim (within the constraints of the CLI, of course).
Add this line to your ~/.bashrc or ~/.profile or wherever you are used to put aliases and custom bash functions:
alias vim='/path/to/MacVim.app/Contents/MacOS/Vim'
If you want to copy an entire file into your target file.
Open your target file in vim.
Put your cursor where you want it and type the following:
:r /path_to_file/file.ext
This will copy an entire file to where your cursor is...

Resources