I have written a program which displays its information in the gnome-terminal program. The program runs ok when it is run from the ide (geany). Apparently geany is loading the terminal. The compiled version runs also, but it doesn't open the terminal so I cannot input data. I know that it is running as it call an external program to run (CoolTerm) and it runs, but does not have the timing information that I would put into the program. Is there a screen command of some sort that tells it to load the default terminal program as its display screen?
Thanks for any help,
John
Using the linux terminal in a compiled fb program
-
- Posts: 42
- Joined: Jun 21, 2016 13:06
Re: Using the linux terminal in a compiled fb program
Make a script that runs it in a terminal emulator of your choosing. For example
gnome-terminal -e /path/to/bin
. Or create a .desktop shortcut and check the option "start in terminal."
gnome-terminal -e /path/to/bin
. Or create a .desktop shortcut and check the option "start in terminal."
-
- Posts: 42
- Joined: Jun 21, 2016 13:06
Re: Using the linux terminal in a compiled fb program
Thank you for your reply. You know sometimes I just miss the boat. I knew about this one,
. Or create a .desktop shortcut and check the option "start in terminal."
but just didn't see it. Thank you for your reply...
. Or create a .desktop shortcut and check the option "start in terminal."
but just didn't see it. Thank you for your reply...
-
- Posts: 42
- Joined: Jun 21, 2016 13:06
Re: Using the linux terminal in a compiled fb program
Interestingly I found that telling it to start from a terminal did not work correctly. It started correctly but the terminal closed
when I run an external program (and the external program was not executed) (comand is just a string variable and not command which is a protected word)
comand=str(minutes_to_run)+"m ./CoolTerm"
print comand
result=exec ("timeout",comand)
This set of commands allows Coolterm to run for a specified time, and then return to the program.
I did find that if I start the program from a script:
cd /home/jduchek/CoolTermLinux-64bit/
gnome-terminal --command=./Coolterm_control
where Coolterm_control is the compiled Freebasic program, the terminal remains open and the program runs properly, and that solved the problem.
I am still not certain why the top one crashes the terminal.
John
when I run an external program (and the external program was not executed) (comand is just a string variable and not command which is a protected word)
comand=str(minutes_to_run)+"m ./CoolTerm"
print comand
result=exec ("timeout",comand)
This set of commands allows Coolterm to run for a specified time, and then return to the program.
I did find that if I start the program from a script:
cd /home/jduchek/CoolTermLinux-64bit/
gnome-terminal --command=./Coolterm_control
where Coolterm_control is the compiled Freebasic program, the terminal remains open and the program runs properly, and that solved the problem.
I am still not certain why the top one crashes the terminal.
John