You are not logged in.

#1 2011-08-24 06:33:54

Squiddles
Member
Registered: 2011-05-31
Posts: 73

Openbox not launching shell scripts

So I have some shell scripts, more specifically scripts that launch some games [AtomZombieSmasher, VVVVVV, the humble indie bundles basically]. They just don't launch. They work via terminal launch, but they don't work when I add to them to the Openbox menu. I've even tried adding "xterm -e /path/to/game/AtomZombieSmasher" and an xterm window just flashes on screen. VVVVVV just flashes on screen regardless of the changes I make.

I'm not sure what the cause of this is, and googling hasn't helped much either. So, any ideas?

Offline

#2 2011-08-24 09:31:15

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Openbox not launching shell scripts

are those scripts executable? Does your user have execute permissions on those scripts.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2011-08-24 12:03:39

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Openbox not launching shell scripts

Try https://bbs.archlinux.org/viewtopic.php … 77#p795377

chmod +x  /path/to/script

<execute>
    /path/to/script
</execute>

w/o 'xterm -e'.

Last edited by karol (2011-08-24 12:08:50)

Offline

#4 2011-08-24 17:01:44

Squiddles
Member
Registered: 2011-05-31
Posts: 73

Re: Openbox not launching shell scripts

Yes, everyone can execute these scripts

I had the scripts added to the menu without 'xterm -e' at first and that didn't work.

Offline

#5 2011-08-24 17:02:54

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Openbox not launching shell scripts

Squiddles wrote:

that didn't work.

doesn't help. Does it throw errors? If so, what ?

can you show us the scripts?
and also the ls in the directory containing them?


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#6 2011-08-24 20:51:24

Squiddles
Member
Registered: 2011-05-31
Posts: 73

Re: Openbox not launching shell scripts

It doesn't do anything, I don't even see my CPU usage rise when I click on the menu item. It just launches right away when I launch the "AtomZombieSmasher" file via terminal with './AtomZombieSmasher'

Here's the script for Atom Zombie Smasher:

#!/bin/bash

# enter the game directory.
cd ./data

# execute the game.
./atomzombiesmasher "$@"

AtomZombieSmasher directory:

-rwxr-xr-x 1 squid users    99 Aug 23 23:45 AtomZombieSmasher
drwxr-xr-x 3 squid users  4096 Aug 23 23:45 data
-rw-r--r-- 1 squid users     0 Aug 24 16:54 directory
-rwxr-xr-x 1 squid users 29169 Aug 23 23:45 readme.htm


Other games like VVVVVV and World of Goo do the same. World of Goo even changes my resolution and then quits. VVVVVV just flashes in a window on screen and promptly quits.

VVVVVV:

#!/bin/sh

# Change to game directory
CANONPATH=`readlink -f "$0"`
cd "`dirname "$CANONPATH"`"

# Check resource folders exist
if [ ! -e data ]
then
      echo "You are missing games resources `pwd`"
      echo "Your installation is incomplete!"
      echo 1
fi

MACHINE=`uname -m`
if [ "$MACHINE" = x86_64 ]
then
      LIBS=./LIB64
      BIN=./VVVVVV_64
else
      LIBS=./LIB32
      BIN=./VVVVVV_32
fi

# Run the game:
export LD_LIBRARY_PATH=$LIBS:"$LD_LIBRARY_PATH"
$BIN $@

VVVVVV Directory:

drwxr-xr-x 6 squid users    4096 Aug 23 23:45 data
-rw-r--r-- 1 squid users       0 Aug 24 16:52 directory
drwxr-xr-x 2 squid users    4096 Aug 23 23:45 LIB32
drwxr-xr-x 2 squid users    4096 Aug 23 23:45 LIB64
-rwxr-xr-x 1 squid users     445 Aug 23 23:45 VVVVVV
-rwxr-xr-x 1 squid users 4499732 Aug 23 23:45 VVVVVV_32
-rwxr-xr-x 1 squid users 4370080 Aug 23 23:45 VVVVVV_64

NOTE: I've been editing the menu with Obmenu, I find it easier to use that than to go in and manually edit the menu.xml
I can also ls -lR the directories if you'd like

Last edited by Squiddles (2011-08-24 20:56:08)

Offline

#7 2011-08-25 22:16:31

Squiddles
Member
Registered: 2011-05-31
Posts: 73

Re: Openbox not launching shell scripts

bump?

Offline

#8 2011-08-29 02:42:44

Squiddles
Member
Registered: 2011-05-31
Posts: 73

Re: Openbox not launching shell scripts

eh?

Offline

Board footer

Powered by FluxBB