Hi,
From Windows (10), when I invoke wxExecute from a (Codeblocks) wxFrame app,
specifying a shell program (in this case Cygwin Bash), the framework opens a
shell window and executes the script within it. In (Debian/Raspian) Linux, however,
the framework processes the shell program within the window that invoked the
app. This probably has to do with the "local environment" behavior.
Is there a way I can get wxExecute to open a shell window in the Linux environment,
in the same way that Windows(10) does it? In particular, I would probably define
the SH (as below for the __linux__ case) to invoke something else that invokes /bin/sh
in turn?
Thanks for all help in advance.
=== For instance, this is the code I have...
#ifdef __linux__
#define SH "/bin/sh -c \'"
#else // Windows
#define SH "c:\\cygwin64\\bin\\sh -c \'"
#endif
...
string some_command = "/path_to_script";
string cmd = SH + some_command + "\'";
wxExecute(cmd);
wxExecute invoking window in Windows, not so in Linux
Re: wxExecute invoking window in Windows, not so in Linux
I think one option might be xterm (or Terminal). Any better or more fitting
method, more parallel to the Windows case?
Thanks.
method, more parallel to the Windows case?
Thanks.
Re: wxExecute invoking window in Windows, not so in Linux
Looks like
#define SH "/usr/bin/lxterm -geometry 100x30 -e /bin/sh -c \'"
works fine.
Thanks.
#define SH "/usr/bin/lxterm -geometry 100x30 -e /bin/sh -c \'"
works fine.
Thanks.