lxde / lxterminal

VTE terminal emulator written in GTK
GNU General Public License v2.0
161 stars 57 forks source link

How to execute code in tabs #48

Open falent opened 6 years ago

falent commented 6 years ago

Hi,

Im trying to open in bash some tabs

lxterminal \
--tabs =1 --comand = "sleep 20s", 2 --command "sleep 10;" 

but it dosent't work :( Is it possible in lxterminal to open and execute some tabs?

In gnome terminal I can do something like that:

gnome-terminal \
--tab -e "bash -ic \" echo 'First tab' "; exec bash\"" \
--tab -e "bash -ic \"echo 'Second tab' "; exec bash\"" 
ZjYwMj commented 4 years ago

As far as I can tell with lxterminal 0.3.2: From the command line you can open many tabs. But you only got one command to execute, no matter how many tabs there are: lxterminal --tabs=1,2,3,4,5 --command='sleep 2'

Updating my comment, at Jun 14, 2021: What happens with my example, now with lxterminal 0.4.0, is that the tabs gets opened, and the command is run. But as soon as the command terminates, that tab is closed. However, as before, one only get one command to execute. In the 1st, leftmost, tab that will be opened. All other tabs can't have commands to execute. So, with long running commands, the tab stays opened. As long as the command does not exit. As far as I can tell, in order to have the tab stay opened even after the command exit, one should examine the underlying library. vte3, in this case. Perhaps there is no simple fix.

FinboySlick commented 4 years ago

I think this would be a reasonable feature request. Perhaps coupled with this one: https://github.com/lxde/lxterminal/issues/86