defaultnamehere / zzzzz

Roleplay as the NSA by making creepy graphs of your friends
MIT License
1.3k stars 131 forks source link

How to run the scripts in background without having to keep terminal open #54

Closed srijansaxena11 closed 5 years ago

srijansaxena11 commented 5 years ago

I tried: python /home/openhabian/zzzzz/fetcher.py & But it didn't work. Even python /home/openhabian/zzzzz/fetcher.py says SECRETS.txt: no such file or directory I have to manually navigate to zzzzz folder using cd command and then run python fetcher.py in order to make it run Same goes for other scripts. How to run them in background?

pielco11 commented 5 years ago

Because fetcher.py tries to open a file that should exist in the same directory where you are running the script. Running python /home/openhabian/zzzzz/fetcher.py will open try to open /SECRETS.txt

srijansaxena11 commented 5 years ago

So manually navigating to zzzzz and then running sudo python fetcher.py & should allow it to run in background even after the terminal is closed. Right?

pielco11 commented 5 years ago

There is no need to run with sudo. If you close the terminal, the script stops

srijansaxena11 commented 5 years ago

nvm i found i can use it with nohup as: nohup python fetcher.py &