Sorry if something is wrong im new to using forums, but i need help. i need to make a .sh file that runs from cd (and/or USB) on double click. I tried to make that with launcher file (.desktop) but i dont know how to get path for "Exec=" because it will be different on different computers maybe somebody knows how to get the path or maybe there is different way to do this?
All the .sh file needs to be is executable by Linux by 'chmod +x [filename]' or in the file properties in your file browser. Chances are, the file system will need to be ext4 as well (ntfs doesn't work - I've never tried with fat32). You don't need a launcher file (.desktop) for what you're doing, unless you want to include it in an applications menu.
In order to get a variable directory, you're going to need to do some warlock magic. The second answer is probably the one you'll want.
Give it a shebang and an executable bit :)
Thanks it works:)