Runs independent terminals

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 334
Joined: Wed Jan 20, 2010 1:15 pm

Runs independent terminals

Post by dkaip »

Hello.
I am trying to download with youtube-dl command many channels from youtube.
Every channel puts in a different directory the channel's videos.
I need to make a small program that open independent terminals that will run after close my program.
How i can do this? Any idea?
Thank you
Jim.
User avatar
doublemax@work
Super wx Problem Solver
Super wx Problem Solver
Posts: 474
Joined: Wed Jul 29, 2020 6:06 pm
Location: NRW, Germany

Re: Runs independent terminals

Post by doublemax@work »

I'm not quite sure what you mean with "independent terminals". I think opening a console window from a gui application is tricky, at least under Windows. Can't you use "normal" windows to display the progress of each task?
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: Runs independent terminals

Post by PB »

dkaip wrote: Wed May 12, 2021 8:42 am program that open independent terminals that will run after close my program.
If by close you mean exit, than to me, the only way this can be done is to have those "independent terminals" as process(es) launched by your program.
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 334
Joined: Wed Jan 20, 2010 1:15 pm

Re: Runs independent terminals

Post by dkaip »

Yes exit mean.
But how to open independent terminals?
With call system "terminal .... or something like it?
Like with many calls system(cmd);
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: Runs independent terminals

Post by PB »

I think that on Windows, that would be wxExecute(cmd.exe + its arguments)
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 334
Joined: Wed Jan 20, 2010 1:15 pm

Re: Runs independent terminals

Post by dkaip »

I will shut a try to Linux and if happen i just upload code.
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 334
Joined: Wed Jan 20, 2010 1:15 pm

Re: Runs independent terminals

Post by dkaip »

This open a terminal only, without youtube-dl etc...

Code: Select all

wxString cmd1=wxT("gnome-terminal youtube-dl https://www.youtube.com/channel/UC1TA_XHxv6zwoK17gcoPQxw");
wxExecute(cmd1);
How to write to execute arguments?
Thank you
Jim
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 334
Joined: Wed Jan 20, 2010 1:15 pm

Re: Runs independent terminals

Post by dkaip »

I just find it.

Code: Select all

wxExecute("xterm -e sh -c 'youtube-dl https://www.youtube.com/channel/UC1TA_XHxv6zwoK17gcoPQxw'");
Thank you
Jim
Post Reply