Answer the question
In order to leave comments, you need to log in
Is it possible to make a script that will run program.py in a terminal?
It is required to write a script that would run client/main.py through the terminal.
On Windows, I implemented this via a bat file:
@echo off
python client/main.py
# !/bin/bash
python3 client/main.py
# !/bin/bash
konsole -e python3 client/main.py
Answer the question
In order to leave comments, you need to log in
if you have a desktop installed, then there should be default applications through xdg
for the terminal - this is x-terminal-emulator
https://askubuntu.com/questions/46627/how-can-i-ma...
if not, then you can just hardcode all terminals and iterate
#!/bin/bash
for i in konsole urxvt gnome-terminal xterm sc
do
FULL_PATH=`which $i 2>/dev/null`
if
then
echo 'первый попавшийся терминал:' $FULL_PATH
break
fi
done
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question