Trying to install GMAT - linux

I'm relatively new to the world of Linux on a Chromebook, so I probably won't know what you talking about unless you make it really clear.
For those who don't know, GMAT is a NASA software tool to model orbits, spacecraft, and celestial bodies. I am 99% there, but I get stuck on a screen that says to "enter a script file, q to quit, or an option". I would really like to create a launcher so I can open GMAT, but all the places I go just make it more confusing. Any thoughts?enter image description here

Related

How to show images in python3

I'm a beginner and I'm having problems of showing images in python3. I would like to know what are some codes that could show images in python 3,f or a mac user. Thanx!
Do you have some more context? Where are you trying to display the image?
Your best bet is probably to open another program and give it the path to the image you want to display. To open the file ~/screenshot.png, for example, you could run
from subprocess import run
run(["open", "~/screenshot.png"])
This is pretty delicate however. It requires the user to have open installed on their computer, and for that executable to do what you expect it to do. Depending on what your usecase is, it might make more sense for you to use a graphical library to draw the image.

'modifying' an exe by working with bas using visbasic or q basic

all!
I'm trying to run programs to control stepper motors. The PC and software and stepper motor controller I have already in place are pretty old and I'm new to almost everything I'm doing here-learning as I go sort of thing. I've 'coded' a bit in Matlab, so I have a very basic level of coding logic, but basically no knowledge of any common syntax. So, I know some about the steppers and the stepper controller, but not much else!
I have a program called "Hoop.exe" that I'm trying to modify to slow down the speed of one of the steppers (I just need to change a 300 to a 200!) when I run the program. There is also an associated (assuming) hoop.bas and a hoop.txt file on the floppy disc. From looking at the txt file, it looks like basic code from examples of basic I've seen. I'm working with visual basic 2.0 and qbasic 1.1 on Windows 98.
So, I tried opening the hoop.bas file first with qbasic and with vb. With qb, I get a 'bad file mode' message. With vb, I get 'invalid file format' and it seems it wants me to open a mak file but I have no 'hoop.mak'. I did this thinking that I could open the bas file with vb or qb, and then edit it, and then save it as an exe, and then run that.
I found a pdf that showed how to incorporate a qb file into the command button of vb, and I tried that. But, I got an "Expected: end of statement" error in the first line! when I tried to save it as an exe.
So, all I really want to do is change my hoop.exe. I would assume that since qb and vb are both on the PC, one of them wrote the bas (maybe not!), so I'm wondering why neither of them can read it.
I've never used vb or qb, but if I have to get into the nitty gritty, it seems like I'd rather use qbasic, since I've never used a graphical interface to code before. But, is either one of those necessary in order to do what I want to do? (I'm going to need to write some programs to control these steppers when all is said and done, but I figured that I should take it one step at a time.)
I tried some form of copying and pasting into qb, but I couldn't immediately figure out how to do that. (Probably because I have no idea how to use qb.)
So, what would be the most efficient way to modify my hoop program?
If the answer is that I just need to learn basic with qb, that's fine, but I'd like to get some sort of indication from people who know what they're talking about before I put that much effort in.
I would really appreciate any pointers because I'm apparently completely clueless on my own!
8/10/2013:
Just in case it's helpful, here are some lines from the Hoop.txt I opened:
10 CLS : CLEAR 1000: P = 512
20 LOCATE , , 1
100 A% = INKEY$: PRINT A$;
105 IF A$ = "*" THEN GOTO 700
110 GOSUB 510: GOSUB 610: GOTO 100
500 REM
510 IF A$ = "" THEN RETURN
etc. This is the beginning of the interface code that allows me to talk to the motor controller
QuickBASIC and Visual Basic are very different, despite their common name of "BASIC" and despite the fact they were both made by Microsoft. First you need to determine if the .BAS file is QuickBASIC or Visual Basic. A simple quick way (though not the most accurate) is to open the file up in Notepad or some other text editor. If keywords such as "OPEN" or "LEN" or "MID" or "CLOSE" are in uppercase, then its more likely a QuickBASIC file. If the keywords look more like "Open" or "Close" or "Len" or "Mid", then its more likely a Visual Basic file.
Now keep in mind that there are other versions of BASIC that have been developed, such as Turbo BASIC (Borland's version) or GW-BASIC or BasicA or PowerBASIC and even Color Basic.
Now if you can't figure it out this way, the next thing I'd suggest is downloading a hex editor, such as XVI32 (though there are many other free ones out there). Look through the file (especially towards the end of the file) and there are usually signs that indicate what kind of compiler was used. You might see the words "Microsoft Basic Compiler" or "Borland Turbo Compiler". Usually towards the end of the file, there are string "stubs" put in by the compiler or linker that you can use to determine the compiler.
If all that fails and you are desperate and that "300" number is hard coded in the program and you need to change it, then there is another way to do this. First back up your original exe file. Then Use XVI32 or some other hex editor and search for the string "2c01" (300 is 012c hex and you need to reverse the 01 and 2c since Intel machines are little-endian). Once you find an instance of 2c01, change it to "c800" (200 is 00c8. Little Endian version would be c800). Save the file, then rerun it. This is a gruesome trial and error way to fix this. If it was changed from 300 to 200, then everything is good! If not, restore from your backup and try again!
Have you considered getting an Arduino or some other low cost and friendly electronics development platform? I think it would be the way to go for you to control stepper motors...
take a look:
http://arduino.cc/en/Tutorial/StepperUnipolar
If you google around you'll find tons of you tube videos showing off some arduino controlled stuff.
Modifying your current .exe seems to me a too long and hard path to follow instead of making your own and proper source code for achieving what you want, as you would need to disassemble the executable file and literally "know what you're doing" with all that assembly language to find where to patch the binary with the right value.
Anyway, if you post a picture or a schematic of your old hardware I could try to help you a little more, but I guess that would be better suited to this other stack exchange site:
http://electronics.stackexchange.com

DDE/IPC in linux gui?

There used to be Dynamic Data Exchange API (type of IPC) in windows which allowed sending notifications with params to running process and they would grab focus and conduct the operation. Is there anything similar in xwindows/gnome?
Like for example, when I get my phpunit errors, it comes with file path and line number. Was wondering if using any bash script or perl etc, I could grab the output and make the line below clickable
protected/tests/controllers/CmsControllerTest.php:17
so it quickly focus on my eclipse, open the file and moves cursor to the right line number.
phpunit and eclipse is just for examples. enough said.
The usual way to address this, would be to make the functionality an eclipse plugin.
There are lots of examples on how to write such plugins.
Moreover, you can probably lean on/reuse rather feature complete existing views (Problems view, Tasks view etc.) so making it look beautiful and matching eclipse should be a breeze.
Alternatively, there is a rich API that you could use to implement your own IPC channel to talk with your test runner outside Eclipse. An example of that is eclimd, the Vim-eclipse integration thing. Specifically, look at it's behaviour in 'Headed Eclipse' mode.

Node command line interface change

I'm making a command interface for a node server, but I have reached a point that I want it to look better.
I want to have the console so you enter a command at the bottom of the terminal screen, you hit enter, and it adds the reply to the actual command line.
If you have ever run a minecraft bukkit server from the command line, you should know what I'm talking about.
Here's a picture of what I'm talking about if you still don't understand. Imagine this was in terminal, and ignore the scroll bars: http://cl.ly/1K0h1V0r0H3f3U3t3L22
Is there anyway to set the console to look like this without having to make your own program for it or having the screen reprint all the other info to fake that look?
I have not done this, but I believe something similar is possible with very little effort by using Node.js REPL. You can override the eval parameter to provide your own command processing.
It would not have the exact look you are wanting, but it will be an interactive prompt that you can utilize (more similar to a Windows command shell or a Linux shell).
If you want the exact look from your screenshot, I don't believe that there is any Node.js module that will help you. There are some that allow you to use colors in the console, and some basic highlighting (e.g. bold), but nothing that gives you complete control over the console screen.

Tutorial/Guide to create a classic, small Linux application in a package (Debian)

I've made a small script in my machine, and an alias in .bashrc that calls it. It's a bash script with 3 lines, but it can grow.
Now, some people in my team found it useful, and want to use it.
Instead of saying "copy this alias, do this, do that, install that lib" I was thinking about creating a simple package to be a little more professional. Fact is, I've never done something like this before. And the problem to me is not creating a package, is trying to decide what usually do you put in a package.
Suppose I want to take my script, and create myapplication. I want to create a .deb file that my team would install and:
Have a /usr/bin/myapplication or /usr/sbin/myapplication (what's the difference between them?), so they would just call myapplication at their terminal and it would work;
Have a man page; (Where are usually located man pages in a debian system?);
Have a possibility to read a .myapplicationrc in home folder with some configurations;
Have an entry for shortcuts in a gnome installation (is it possible to have an universal shortcut "format" that's is available to KDE and Gnome as well?);
Install dependencies.
I'm new to all that stuff. I usually code simple scripts and create an alias in my bashrc. I've never done a package before. Which guides do you know of that can help me accomplish what I thinking of above?
Here is a place to start, though I welcome a more succinct answer.
I couldn't find a complete guide. I think the best thing to do is download a package that does exactly what I'm thinking of and do some reading, like taskwarrior.

Resources