Home > python > Multiple terminals, multiple commands, lxterminal

Multiple terminals, multiple commands, lxterminal

January 9Hits:2
Advertisement

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.

Related Articles

  • Multiple terminals, multiple commands, lxterminalJanuary 9

    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

  • Utility to send a command to multiple terminals?September 15

    A while ago when I did a lot more system admining, there was a little utility that would send a command to multiple terminals that I had open. So essentially I could ssh into three different servers, then type tail -f /var/log/some_error.log into the

  • How to execute a command in multiple Terminals by executing a command in only one?

    How to execute a command in multiple Terminals by executing a command in only one? December 1

    This question already has an answer here: Is there an SSH client which duplicates commands to multiple terminals? 2 answers I am going to have multiple machines that I am going to connect to via SSH so I am going to have multiple Terminal windows up,

  • On a linux server how do you use multiple terminals over a single ssh connection?May 1

    I often find myself opening several ssh connections in order to view several log files at a time with tail -f. This isn't a problem when I'm at home because I use public key encryption for password-less login. However, I will often use computer at my

  • How to create multiple "terminals" for a linux workstation?November 3

    I wanted to figure out how to have multiple terminals (monitor, keyboard, and mouse) use a single centralized system. I guess at this point I can get computers for around $150, and use them as dumb terminals, but I would really like to centralize abo

  • How do I open multiple terminals?

    How do I open multiple terminals?May 15

    I just downloaded Ubuntu 11.04 and as far as I can remember, there was the option of opening multiple terminals in tabs in Ubuntu. I cannot discover this feature in 11.04. Also, as a general query, suppose I open emacs from the terminal, then I would

  • Multiple Terminals displayed as a grid in one window

    Multiple Terminals displayed as a grid in one windowNovember 16

    Is there a way to have one window display more than one terminal at once? (Not in the typical tabbed configuration, more like a grid of arbitrary number of terminal screens) Ideally I'd like to have a 3 column by 2 row window with 6 terminal instance

  • Is it safe to run multiple brew install commands at the same time?May 25

    Is it safe to run multiple brew install commands at the same time? --------------Solutions------------- In general, yes. There should be no problem doing that. Homebrew will just download the files needed to brew the formula, then run the configurati

  • How to run multiple terminals on remote ubuntu server through ultravnc?July 29

    I am trying to simultaneously run multiple instances of my application from terminal on remote ubuntu server. Single terminal is required for running a single instance of application. I am accessing remote server through putty and ultravnc viewer. Ev

  • Open multiple terminals in a for loop in bashSeptember 19

    Recently i changed to lxde on Ubuntu. And after switching it changed my x-terminal-emulator to lxterm. My script was doing the following: Go through a for loop and open a new terminal window and then run a script in that terminal. It would open multi

  • Bash: command substitution with multiple unset/export commandsJanuary 28

    I am trying to unset some variables and export others using command substitution. This works: $(echo " export TEST_A=1 export TEST_B=2 ") And this too: $(echo " unset TEST_A unset TEST_B ") However, this fails with Bash 4.3.30(1)-relea

  • How to work with a master database and multiple terminals

    How to work with a master database and multiple terminalsSeptember 18

    We have a main database in postgres used to assemble updates using flyway and modified from a single terminal. Now we want to know what the best way to work with multiple terminals making changes to the same database structure. For this we can think

  • C++ Multithreading program example using multiple terminals in the same computerJanuary 22

    I am new to multithreaded programming. I am trying to run a program using two terminals in one laptop. Wherein, in these two terminals it should be registered as user1 and user2 and before the 2 programs start running, one of them should wait for the

  • Multiple monitors, multiple workspaces?January 15

    I connected my laptop to my LCD. Using the laptop display hotkey I can switch between different modes - only laptop monitor on, only LCD monitor on, both on and display the same view, both on and the desktop is stretched (divided). But, I'm looking f

  • Tikz: Lining up input and output nodes in multiple input multiple output diagram

    Tikz: Lining up input and output nodes in multiple input multiple output diagramFebruary 17

    I am attempting to draw a multiple input multiple output style diagram, using code that uses the following structure: \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture} \t

  • Should I use: One event multiple subscribers or multiple events multiple subscribersMay 9

    I am writing a data acquisition application. I wondering whether I should use one event multiple subscribers or multiple events multiple subscribers. I am worried about performance. Also could I improve performance by offloading the subscribers to a

  • Is there an SSH client which duplicates commands to multiple terminals?

    Is there an SSH client which duplicates commands to multiple terminals?April 23

    I'd like to control several ssh connections from one terminal. For example, I would type ifconfig in the main terminal and all the other ssh connections would run ifconfig. That's what offered PuttyCM on Windows . This may be a very simple question b

  • Bash history handling with multiple terminalsNovember 18

    I use mainly Terminator, and it's usually opened with 3 split terminal windows. I also use Gnome terminal for various reasons. I'm wondering how is bash history handled in this case as I sometimes miss previously issued commands when I run history Fo

  • Can I login to multiple terminals with the same user safely on Linux?April 20

    By terminals I mean the ones you can switch to using Ctrl+Alt+F1-F6. I know I'm able to login multiple times but does this have any side-effects? --------------Solutions------------- *NIX is by design a multi-user system, so there is not going to be

  • How to change extension of multiple files from command line?April 19

    I have many files with .abc extension and want to change them to .edefg How to do this from command line ? EDIT: I have a root folder with many sub-folders, so the solution should work -r recursively. --------------Solutions------------- A portable w

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.788 s.