Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

607
Views
Multiple terminals, multiple commands, lxterminal

I am working with Python. Writing a script, I am attempting to use os.system() to open a new terminal, create new tabs and run different commands in each respective tab (which appear to run simultaneously).

I am familiar with gnome-terminal as it is what I have used in the past, however the system I am working with at the moment, a Raspberry Pi (Raspbian), uses lxterminal.

I have always used

    os.system("gnome-terminal --tab -e 'command1' --tab -e 'command2' ")

with success, but I don't know how to reproduce these results with lxterminal. So, basically I'm asking if and how lxterminal can do this.

I can create the tabs, no problem, with

    lxterminal --tabs=1,2,3

and

    lxterminal --tabs=1,2,3 --command="command1"

does create the tabs and execute the first command in the first tab... but that's as close as I can get, and obviously that doesn't do the trick of multiple commands in tabs 2 and 3.

If the lxterminal man gives any clues I'm just missing them... I thought maybe the brackets under -t, --title, and --tabs section might point to details for those, so I tried something like

    lxterminal --tabs=1[--command="command1"],2[--command="command2"]

But that only titled the tabs.... as expected.

All of my searches point me back to gnome-terminal but if there's a way to make lxterminal do this, I'd love to know.

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Try run the command like this:

lxterminal --command 'command1 & command2'

Anyway there are old bug reports regarding the issue

over 4 years ago · Santiago Trujillo Report

0

I know this is so late and I'm not an expert just sharing, but I hope anyone who has a similar problem can be helped.

to do that you need to make a new bash file example.bash then insert command you want, like;

#!/bin/bash

lxterminal --command 'cd /Apath/Bpath/Cpath/ &&  sudo example.bash/py/sh/bash'
lxterminal --command 'cd /Dpath/Epath/Fpath/ &&  sudo example.bash/py/sh/bash'
lxterminal --command 'cd /Gpath/Hpath/Ipath/ &&  sudo example.bash/py/sh/bash'

it will open 3 of the script in the new terminal ༼ つ ◕_◕ ༽つ

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!