You are not logged in.

#1 2017-04-09 10:31:20

Poncho_grande
Member
Registered: 2017-04-09
Posts: 5

Openbox fails to launch some shell scripts, behaves outright weirdly

Hi.

I was setting up some launchers for my games so I wouldn't have to cd to the game directory and run the script there every time I wanted to play. With this, I experienced some ... odd behaviour. Let me explain.

Three games, for example. Total War: Warhammer, Divinity: Original Sin and Cities Skylines. The first two are launched via shell scripts, and CS is launched via an executable. On the command line all three work without any issues. Launching them through obmenu, however, yields interesting results.

Total War: Warhammer runs fine.
Divinity: Original Sin does not execute. No errors, literally nothing happens.
Cities Skylines does execute, but crashes on the loading screen. Yep, just freezes. While running the executable from the terminal works fine.

This is what the Obmenu entries look like:
KScQNFC.png

This is the Divinity launch script:
https://pastebin.com/f6Vm39WC
This is the Total War: Warhammer launch script
https://pastebin.com/1DJBds4S

I also stumbled upon this thread, where the OP had similar issues but never found a solution
https://bbs.archlinux.org/viewtopic.php?id=125176

Any ideas?

Thank you!

Offline

#2 2017-04-09 10:39:42

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,529
Website

Re: Openbox fails to launch some shell scripts, behaves outright weirdly

It looks like the Divinity script assumes the current working directory is it's own directory.  Contrast this to warhammer which first determines it's own directory.

Just add `cd /hdd/Games/Divinity/game/` to the start of the Divinity script

For CS, when you say you run it from the command line, how do you do that?  Do you actually need to cd to it's directory before running it?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#3 2017-04-09 10:48:07

Poncho_grande
Member
Registered: 2017-04-09
Posts: 5

Re: Openbox fails to launch some shell scripts, behaves outright weirdly

Trilby wrote:

Just add `cd /hdd/Games/Divinity/game/` to the start of the Divinity script

This worked, thanks!

Yes, I do need to cd to the directory. In there, ./Cities.x64 runs it fine. Or I can just use my file manager and double click on the executable.

Offline

#4 2017-04-09 10:58:19

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,529
Website

Re: Openbox fails to launch some shell scripts, behaves outright weirdly

So then make a script (or .desktop file) that cd's to the directory and launches the game.  Use your script in the menu.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#5 2017-04-09 11:10:31

Poncho_grande
Member
Registered: 2017-04-09
Posts: 5

Re: Openbox fails to launch some shell scripts, behaves outright weirdly

Yep, I did that. Works excellently, thanks again!

Offline

Board footer

Powered by FluxBB