Open ThomasTheGerman opened 6 years ago
turns out leaving that line out entirely works for me too, but I guess it might be necessary on some systems, and depend on how you run the whole thing
I would like to find out what went wrong before trying to apply a remedy. Can you tell me how you launched PLSDR? What errors were observed? I ask because the absolute path should be already provided by most click-based launch methods in Linux.
On Ubuntu, this script:
#!/usr/bin/env bash
echo `pwd` > temp.txt
When clicked, creates the result file "temp.txt" in the click-launched script's directory, and it contains the full path to the script. My point is that current Linux practice is to change directories to that of the executable before launching a clicked executable.
I'm more than ready to apply a remedy, but I want to know what disease I'm curing. Thanks!
EDIT: I went ahead and added this change. I decided it was harmless even though I haven't sorted out what went wrong.
I usually launch python scripts from the command line.
os.path.dirname(sys.argv[0]) returns emptystring, which throws a file or directory not found error when passed to os.chdir(), since the alias for change nothing is '.', not emptystring. Converting the emptystring to an absolute path prevents this error.
Had to change this for the program to launch for me (on an up-to-date arch system). I don't know if this is the best way, there seem to be at least 20 different options to do this.