The path field (In the given Screenshot) is given the input: ~/.subseeker/subseeker.py, but it's not working, the code isn't executing when the command runs.
I even tried- $HOME/.subseeker/subseeker.py
With no luck,
But when I give an absolute path, It works fine and dandy!
But i really need to make it independent of the username.
Is it possible?
22 Answers
This is how I fixed the issue. See the image below, I configured the tool to "Display Output", in that way you can see any error message in an easier way.
When using absolute path, you get something like this:
What you're trying is very similar to this, here you can see the error:
And when using $HOME variable but with python command at the beginning, it works perfectly.
My python script just prints "It works".
Hope it helps to solve your issue.
3It is not referenced as being possible to give a non-absolute path (expect from $PATH itself).
What you can do is add a script (placed in PATH) that will run the given file (gave as a parameter) according to the home directory of the user.
Just open a terminal and type
sudo nano /usr/bin/run-in-homethen simply write this :
#!/bin/bash
`$HOME/$1`exit the editor (Ctrl+X, then Y and then Enter) and give execution permission to this script
sudo chmod +x /usr/bin/run-in-homeNow you can set the Path : field to run-in-home and the Parameters : field to 'path/to/file param1 parm2' so that, in your case, it would be
EDIT
If you want to launch your file with another program (for example a .jar file, or if python cannot be run directly), you can change /usr/bin/run-in-home to this
#!/bin/bash
if [ $# -eq 2 ]; then `$1 $HOME/$2`
else `$HOME/$1`
fiand now the Parameters : field becomes 'program program-parameter1 program-parameter2' 'path/to/file param1 parm2', for instance 'java -jar' 'Documents/Minecraft/Minecraft.jar'.