Hello,
greetings from a newbie.
I'm running BionicPup64.
I have a few netmapping scripts that need to run in the shell.
So I'd like to have the terminal popping up and running the commands (a few need also an input from the user) when I launch the script clicking its icon.
Is it possible?
In Ubuntu I had a partial solution with the xxxxx.desktop files
Thnx in advance.
How to make a scipt automatically run in terminal? (Solved)
- UncleScrooge
- Posts: 104
- Joined: Tue 07 Apr 2020, 06:07
- Location: Norway
Re: How to make a scipt automatically run in terminal?
UncleScrooge
It is not totally clear want you intent to do. But I will assume you what a script to execute at boot.
*BionicPup64 is made from Ubuntu. So you will almost have same access to Ubuntu's way.
*Puppy uses /root/Startup as the preferred folder for your boot script. There are a few other places but Startup is your best choice. Do
You will find your current boot scripts that can serve for you to use as example.
"xxxxx.desktop"
Same thing in Puppy. Most of .desktop are located at /usr/share/applications
enrique
It is not totally clear want you intent to do. But I will assume you what a script to execute at boot.
*BionicPup64 is made from Ubuntu. So you will almost have same access to Ubuntu's way.
*Puppy uses /root/Startup as the preferred folder for your boot script. There are a few other places but Startup is your best choice. Do
Code: Select all
ls /root/Startup
"xxxxx.desktop"
Same thing in Puppy. Most of .desktop are located at /usr/share/applications
enrique
Re: How to make a scipt automatically run in terminal?
For scripts with no target ($1):UncleScrooge wrote:Hello,
greetings from a newbie.
I'm running BionicPup64.
I have a few netmapping scripts that need to run in the shell.
So I'd like to have the terminal popping up and running the commands (a few need also an input from the user) when I launch the script clicking its icon.
Is it possible?
In Ubuntu I had a partial solution with the xxxxx.desktop files
Thnx in advance.
Code: Select all
#!/bin/sh
#open in terminal
tty -s; if [ $? -ne 0 ]; then xterm -hold -e "'$0'"; exit; fi
yourscript
Code: Select all
#!/bin/sh
#open in terminal
tty -s; if [ $? -ne 0 ]; then xterm -hold -e "'$0' '$1'"; exit; fi
yourscript
xxxxx.desktop files work the same as in Ubuntu and are located in Puppy Linux here ->
in the xxx.desktop file it is possible to declare that the script or program will open up running in a terminal
Code: Select all
/usr/share/applications
- UncleScrooge
- Posts: 104
- Joined: Tue 07 Apr 2020, 06:07
- Location: Norway
How to make a scipt automatically run in terminal?
Thnx rockedge and jrb.
spot on.
spot on.