Can't launch app through bash script
Can't launch app through bash script
I'm trying to launch an app through a bash script. It launches fine through the terminal, but not through a script. The commands are the exact same. The error when launching via the script is something about no NTLM support. I can't quite see the debug print because it closes too soon. I'm on Wine 7.2-devel. So far, everything else is fine.
Re: Can't launch app through bash script
Also, I can cd to the directory of the executable and the script, and run the script through the terminal and it launches. I noticed when I do that that the same debug output appears, then it goes to the prompt, then it continues and launches.
Re: Can't launch app through bash script
Maybe we can help you if you post the bash script.
Re: Can't launch app through bash script
Here's the script. Simple and to the point.
Like I said, it looks like the system goes to the terminal prompt and the script ends. If I launch the app via the terminal directly, or the script via the terminal, it spans multiple command prompts. Odd, I think, but I'm a Linux noob.
I can launch the same app fine through Lutris, so this problem isn't a big deal. I'd just like to understand what the problem is for the future.
Code: Select all
#!/usr/bin/bash
PATH="/home/mark/.local/share/lutris/runners/wine/wine-tkg-git-7.2.r316/bin"
cd "/home/mark/Oblivion/drive_c/The Elder Scrolls IV/Oblivion"
WINEPREFIX=$HOME/Oblivion $PATH/wine obse_loader.exe -editor -notimeout
I can launch the same app fine through Lutris, so this problem isn't a big deal. I'd just like to understand what the problem is for the future.
Re: Can't launch app through bash script
The PATH variabele is already used by your operating system.
Use lower case for your own variables. Then you'll always be safe.
Use lower case for your own variables. Then you'll always be safe.
Re: Can't launch app through bash script
Thanks for the tip. I'll remember that (I hope) going forward. However, it didn't fix my issue.
Re: Can't launch app through bash script
Are you still using Linux Mint 20.2? Then you may also change the shebang to:
Code: Select all
#!/bin/bash
Re: Can't launch app through bash script
I'm on Linux Mint MATE 20.3. /bin is a symbolic link that points to /usr/bin. I don't think that link is native to the OS anyway? I'm not going to try it. Won't make a difference. My script is good, not that I don't appreciate your help. It's something with Wine. For some reason, launching the script ends the terminal functions. If I call it directly from the terminal, it spans multiple input prompts. Calling it from a script, it ends at the first input prompt. It's a Wine thing, not my script. Old versions of Wine didn't do that. It could be my custom Wine version. I'm launching my app via a wine-tkg-git version with custom patches. Having said that, the old versions with custom patches were fine. I may take this inquiry to the GitHub page of wine-tkg-git. Thanks for your help.
Re: Can't launch app through bash script
You could test this by installing wine(-staging) and modify your script.It could be my custom Wine version. I'm launching my app via a wine-tkg-git version with custom patches. Having said that, the old versions with custom patches were fine.
Another solution may be not to use a bash script, but to create a .desktop file.
Something like
Code: Select all
[Desktop Entry]
Name=Oblivion
Type=Application
Exec=env WINEPREFIX="/home/mark/Oblivion/" /home/mark/.local/share/lutris/runners/wine/wine-tkg-git-7.2.r316/bin/wine start /home/mark/Oblivion/drive_c/The Elder Scrolls IV/Oblivion/obse_loader.exe -editor -notimeout
Re: Can't launch app through bash script
I have Wine from Wine-HQ installed because Lutris needs it. I'll test launching via plain Wine. I actually thought of that, just never went through with it (yet).
I don't really want a menu entry. If I can launch a .desktop file from any folder, I'd try that. Can you? Or do .desktop files have to be in either ~/.local/share/applications or /usr/share/applications?
In the end, it runs fine via Lutris. So, I'm still in business.
I don't really want a menu entry. If I can launch a .desktop file from any folder, I'd try that. Can you? Or do .desktop files have to be in either ~/.local/share/applications or /usr/share/applications?
In the end, it runs fine via Lutris. So, I'm still in business.