Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

603
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda