Change working directory when using "Open with custom command" option
I was trying to open .exe
files in Lubuntu 18.04 32-bit edition and wine 3.0.1
just by double-clicking on the file. I used the "Open with custom command" open with option and issued wine %f
but it doesn't work fine with applications which requires its files to be in the same directory, as the command is emulated in another terminal with home as working directory.
I tried to use cd "$(dirname %f)" && wine %f
but it doesn't seem to work..
Is there is any way to let it work?
bash -c 'cd "$(dirname %f)" && wine %f'