Skip to main content

All Questions

0 votes
0 answers
51 views

How to run a process in the background using a bash script? [duplicate]

When I run the command in the terminal: sudo badvpn-tun2socks --tundev tun0 --netif-ipaddr 10.0.0.2 --netif-netmask 255.255.255.0 --socks-server-addr 127.0.0.1:8080 I get a terminal with packet data ...
moninah's user avatar
  • 15
3 votes
2 answers
808 views

How to propagate an error code outside a terminal?

From inside a bash script I try to retrieve the error code of a program launched in a new terminal window. It can be reduced to this: #!/bin/bash urxvt -e bash -c "exit 4" echo $? output: 0 I would ...
philou's user avatar
  • 237
-1 votes
2 answers
684 views

how to get Ip add of ssh user who is currently running a specific process?

An ssh server has a process that is started by a user who is logged in through ssh. I need to find a way to get the IP address of this user who executed a specific program "chrome for example" through ...
Sudo Gsxr's user avatar
5 votes
3 answers
4k views

Get the terminal emulator name inside the shell script

I have used pstree to find the name of the parent emulator of running shell script using something similar to the following: pstree -s $PPID | awk -F '---' '{print $6}' This works in my current ...
Vombat's user avatar
  • 13.2k