How to open gnuplot from mobaxterm? - windows

I'm not sure how to open Gnuplot from MobaXterm. I've been trying many different commands but they all don't work. When I try, I get the same error.
-bash: gnuplot: command not found
I'm curious if I downloaded Gnuplot to the wrong part of the computer or if I'm not getting the command right? I'm trying to write a program in shell script that opens Gnuplot on it's own and plots data through the shell script.
Any help is appreciated!

mobaxterm is not a linux server. So you cant install packages into it normally.
you must download plugins if you can find the plugin you are looking for
check their list here
http://mobaxterm.mobatek.net/plugins.html
and it seems gnuplot is not there .
in this case your easiest solution is to download cygwin and add gnuplot on it which is possible
other option is to run small virtual machine so you can test on it
in all cases mobaxterm is not real linux enviroment so to be sure your shel do work on normal linux machines you will need to develop and test on real linux

You can install the winbuild of gnuplot and add the path to the bin directory, with gnuplot.exe in it, to mobaxterm's PATH (probably set it in .initrc or .bashrc, whichever you prefer).

MobaXterm is a standalone program which 'emulates' a Linux terminal but has no idea about your frame system (e.g. your Windows and your programs). So if you type 'gnuplot' Moba has no idea what is this. You have to
change the current directory to where is wgnuplot.exe e.g.:
cd /drives/c/Program\ Files/gnuplot-4/bin
./wgnuplot.exe
or run directly it:
/drives/c/Program\ Files/gnuplot-4/bin/wgnuplot.exe
or change your $PATH:
PATH=$PATH:/drives/c/Program\ Files/gnuplot-4/bin
wgnuplot.exe
or create a script named 'gnuplot' which runs wgnuplot.exe
#File name: 'gnuplot'
#!/bin/sh
/drives/c/Program\ Files/gnuplot-4/bin/wgnuplot.exe
and place it into some $PATH directory:
`/bin` or `/usr/bin` or `/drives/c/WINDOWS` or `/drives/c/WINDOWS/system32`
or... :)

The simplest way I found out is to use the Moba Package Manager to install the win version of gnuplot.
Open MobaXterm and type MobApt. An GUI will open up and you can type in "gnuplot" in the filter field.
Just select and install the package, MobApt will take care of any dependencies for you.

Related

Command not found in bas

I'm so sorry because I know this is a dumb question, but I've been trying to figure this out for about 2 hours and I can't figure it out. I've created a bash file that uses some other programs (tcpdump, tshark). The bash runs as it should but on every line that I use tshark, tcpdump, etc. it says "command not found".
I'm using Cygwin on my Windows 7 VM. All of the files are in the same folder and I I've tried adding the locations of the other programs to the PATH variable. I tried commands such as export PATH=$PATH:filelocation but when I do $PATH those results aren't showing. How can I get these commands to be recognized?
Thank you.
current errors
Cygwin is not a Linux distro, therefore, you don't have all the functionality like you would if you had a Linux installation.
You could try one of the following.
1) Use Virtualbox to make a VM of some Linux distro and use bash there. You could use Ubuntu server, which has no GUI.
2) Use this site to find packages that will add functionality to Cygwin.
3)Upgrade to Windows 10 and have a native (sort of) bash to use.

Unable to create vagrant file (homestead.yaml) on windows

I'm gonna to use vagrant on my windows desktop to develop Laravel project. I have followed all the steps to do that. But it has been failed to create homestead.yaml using bash init.sh command.
Below is the error :
Fakhreddin#Lenovo-PC3 /cygdrive/d/laravel-vagrant/homestead
$ bash init.sh
cp: unwritable ‘/home/Fakhreddin/.homestead/Homestead.yaml’ (mode 0500, r-x------); try anyway?
I'm using Cygwin for simulating Unix terminal in the Windows.
(Copy of the comment I wrote above)
Never used Cygwin in my life, but what I would try is to run it as Administrator and re-try.
Otherwise, you may want to consider changing console client. For example, if you install Git, you should be able to use Unix commands via standard Windows console.
I would seriously point the fault at Cygwin, or its settings. I am a member of a team in which all of us run Homestead on Windows 7, with no problems at all. The difference is, we use native Windows command line.

How to apply Magento security patches in xampp for windows

That must not be so difficult to do, I installed Magento CE 1.9 on xampp for windows. it works well.
I need to apply security patches that come only as .sh files, no other format is available.
I have the file, how can I apply it gives that I don't find a way to execute the .sh files under this environment?
thanks all
1) My windows has sh.exe available and can run .sh files - just type it into the command line, git bash works fine too.
UPDATE: my sh.exe was likely installed along with git. It is relatively easy to install though.
2) On windows machines you may need to edit the PATCH-... file. Find the CURRENT_DIR=``$PWD_BIN``/ line. Since you will be running it from the magento root directory anyway this can be left blank. Go ahead and remove everything after the equals sign. It should now read CURRENT_DIR=. See here for an explanation.
3)Now just move the file into your magento root directory and run it.
Try the Below Link Using Git-bash in Windows :
Magento Patch File Installation in Windows
Cygwin will help you to run the sh file.
cygwin
How to use Cygwin
Better you use git bash instead. Just go at the Magento Root and run {sh Patch_file.sh}.

Cannot run "vagrant up" in PhpStorm 6 in command line

I am trying to launch my Vagrant directly from Phpstorm 6 but I am not able to find the command (Windows).
Screenshot : http://i.stack.imgur.com/d8aUA.png
Is there anything I could do to make it works ?
Thanks!
Have you created an alias for vagrant in "Settings | Command Line Tool Support" ?
Command Line Support Tool does not know what vagrant is, so it tries to execute whole command as is. The problem is -- proper name of app should be vagrant.bat (or vagrant.cmd -- do not remember) -- IDE does not add .bat/.exe/etc automatically like DOS/Windows does.
So either use vagrant.bat up command instead .. or (which is better) create an alias.
P.S.
PhpStorm v7 will search for .bat/.cmd/.exe/etc in your PATH if exact command cannot be found. Still -- making an alias is the best/safest way to go here in Command Line Tools.
An excerpt from: https://www.jetbrains.com/phpstorm/webhelp/vagrant.html
Make sure that the parent folders of the following executable files
are added to the system PATH variable:
vagrant.bat or vagrant from your Vagrant installation. This should be done automatically by the Vagrant installer.
If you've installed Vagrant the standard way then just restart the command prompt itself or phpStorm so it reloads the PATH. Else just find that bat file and run it manually to see if it works or better add the path to the system PATH var.

MacPorts Installation -- Shell Commands/Postflight Script

I had run the MacPorts installer (2.0.3) for my OS X Leopard (10.5.8) which finished "successfully". Unfortunately the port command was not available so I looked in the MacPorts Guide which says that the installer should have run a so-called "postflight" script that sets the necessary environment variables. I tried to run the postflight script manually (which I downloaded from here), but the execution fails with the following output:
Detected the bash shell.
Your shell already has the right PATH environment variable for use with
MacPorts!
Your shell already has the right MANPATH environment variable for use with
MacPorts!
Your shell already has the right DISPLAY environment variable for use with
MacPorts!
Adding [default] tag to sources.conf if needed...
couldn't read file "/Contents/Resources/upgrade_sources_conf_default.tcl": no
such file or directory
Updating port image format...
couldn't read file "/Contents/Resources/images_to_archives.tcl": no such file or
directory
Synchronizing the MacPorts installation with the project's rsync server...
-bash: __PREFIX__/bin/port: No such file or directory
An attempt to synchronize your recent MacPorts installation with the project's
rsync server failed!
Please run 'sudo port -d selfupdate' manually to find out the cause of the
error.
You have succesfully installed the MacPorts system, launch a terminal and try it
out!
Read the port(1) manual page and http://guide.macports.org for help,
http://www.macports.org/contact.php if you need to get in touch with The
MacPorts Project.
Any ideas?
First invoke the port command directly:
$ /opt/local/bin/port help
If that comes back with something reasonable (like the help text) then it's just that your $PATH isn't being used by your current shell. Try logging off and back on again to resolve that in the short term (this will test that your .bashrc file is correctly configured) or you could just modify the PATH environment variable directly (which doesn't test .bashrc):
$ export PATH=$PATH:/opt/local/bin
You downloaded the postflight script but it alone cannot access the accessory scripts in Contents/ because those are located into the install package.
Those missing Tcl scripts are for upgrading from an older install, the log says PATH was already correctly configured but the macports bin directory could have the wrong position in PATH variables, for instance being at the end of PATH.
If you are doing a fresh install you can just only need PATH and MANPATH -you want man pages provided by macports before system's ones- as per [1]
[1] http://guide.macports.org/#installing.shell.postflight

Resources