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?
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)
Similar Messages
-
Would like some pointers on designing a Asynchronous (JMS )component for launching shell scripts.
Use Runtime and Process calss and make system calls.
-
Upgraded ROX filer not executing shell scripts
Hi all,
I run ICEWM+ROX filer as my lite desktop but after a recent upgrade, ROX does not execute shell scripts on mouse click. It appears that filetype detection has changed so that all scripts are shown with the shellscript icon, whereas before those without a .sh extension where shown with the kde type "cogwheel".
Any tips much appreciated.
My thanks in advance!I've found a lot of things I don't like about the latest ROX upgrade... too much caching nowadays in my opinion.
-
Automator/Applescript not running shell script properly
I can open Terminal, and this command works:
lame -h --abr 256 /Users/myhome/Desktop/Some\ Wav\ File.wav /Users/myhome/Desktop/TheMP3.mp3
But when I try to run the same command in applescript from Automator, it fails.
set sourceFile to quoted form of POSIX path of "/Users/myhome/Desktop/Some Wav File.wav"
set mp3File to quoted form of POSIX path of "/Users/myhome/Desktop/TheMP3.mp3"
set command to "lame -h --abr 256 " & sourceFile & " " & mp3File
display dialog command
do shell script command
The display dialog outputs:
lame -h --abr 256 '/Users/myhome/Desktop/Some Wav File.wav' '/Users/myhome/Desktop/TheMP3.mp3'
Which, as little as I know of applescript, is how applescript handles spaces in filesnames. Can anyone please help?You need *do shell script* attribute described in the 10.4 Changes section of http://developer.apple.com/mac/library/releasenotes/AppleScript/RN-AppleScript/R N-104/RN-10_4.html#//appleref/doc/uid/TP40000982-CH104-SW1 Additional info can be gained by posting to the AppleScript and Unix forums under OS X Technologies.
-
Hello firends,
I have one simple script to run orbd and one java program: I can not this script on RH linux.
#!/sbin/sh
case "$1" in
'start')
/bin/orbd -ORBInitialPort 2600 &
sleep 5
/bin/java NamdServer -ORBInitialPort 2600& --------This can not run.
echo "Server is up."
'stop')
echo "Usage: $0 { start | stop }"
exit 1
esac
exit 0
I cound not see the process of "java NamdServer" using ps -lef after run this script. I also tried the following option with -classpath, it did not work either.
java -classpath /disk/programs/namd_server_sparc/:. NamdServer -ORBInitialPort 2600
java -classpath . NamdServer -ORBInitialPort 2600
Thanks a lot.Hi
When you try to execute the NamdServer do you get any output as it tries to start ? or does it fail
silently?
You might need to try and find out if you can run NamdServer in a verbose mode where it tells you whats its
trying to do.
Alternately. you can use the truss command ( man truss to find out more ) on your script.
regards -
How to do multiple shell scripts in AppleScript
I got some solutions from previous posts on how to run sudo in Applescript, but there is still some minor syntax issues when I try to get to the destination directory. Usually in shell script I just type
cd directory-destination
in several lines to batch process those commands, but when I work with applescript, if I do do shell script for every "cd" command, instead of getting an overall result, I would get intermediate results individually.
I read doc and learned that there might be a way to put commands together by using the & sign?
Message was edited by: ttbackAn individual do shell script command runs in its own shell, so to perform multiple commands within that shell you need to combine them into a single statement. You can use the ampersand '&' operator to concatenate text strings, and the semicolon ';' to separate the commands, for example:set theFolder to "/Applications"
do shell script "cd " & theFolder & "; ls -l ."See the technical note do shell script in AppleScript. -
Hi everyone,
I am facing a difficulty in writing a query for a table REF_PRODUCT having some columns like OFFER, PROVIDERID.
The problem statement is
if the OFFER not in ('A','B','C') then x='D'
if x is empty then
if providerid in (some values) then x='A'
else if providerid in (some other values) then x='B'
else x='C'
where x is a variable in shell script.
I want to execute the above in shell script. how to manage this?
Please help..
Regards
Abhiuser8744860 wrote:
I am facing a difficulty . . . Etc . . .
I want to execute the above in shell script. how to manage this?
Please help..
1) What you posted is not a shell script.
2) In order for us to help you with your question, you need to post a working test case: create table and insert statements
as well as the expected result from that data. Provide also an explanation of the rules that lead to this result.
3) Also provide any code you have written.
:p -
Execute Shell Script through Demantra Workflow
Hi All ,
Can we execute shell script from Demantra Workflow ?
If yes where should we place the shell script file and wat should be the commandline command in the step .
We have the Demantra installed on a windows server and the workflow manager is on a linux server .
the batch file on the windows server can be executed through the secure shell from the linux server .
I am trying to achieve the same through thr demantra workflow
Appreciate any input on the same .
Thanks and regards
SuzyHi,
Shell script is not supported till Demantra 7.2.0.2 WF.
I have checked with Oracle team also and reply I got below for your reference:
QUESTION
*=========*
As per your details, shall we conclude like this:
*"only *.bat and *.exe files can be used in workflow. Demantra standard functionality doe*
*s not support shell script in workflow"*
ANSWER
*=======*
Hi ,
The Demantra standard functionality 7.2.0.2 does support shell script in workflow.
Thanks,
Asya
Please review the note#468071.1-Unable to Run EBS Workflows that Call EngineManager.exe in
You will find this note is referring to the Enhancement Request Bug 6644455-- ANALYTICAL ENGINE
NOT AVAILABLE ON UNIX/LINUX
But the enhancement bug exist and I hope it is fixed in Demantra 7.3.
Tks
MJ -
Please help with executing the c-shell script by using the exe class
I try to use the exec class to execute a c-shell script in my java gui program like this. But I don't get anything when clicking on the start button.
here is my code:
Runtime r = Runtime.getRuntime();
r.exec("./DDMReportEvents");
./DDMReportEvents is the name of the c-shell script.I think Runtime.exec runs DOS batch files, but not Unix shell scripts.
Try:
r.exec("csh -c ./DDMReportEvents");
to get the shell to run the shell script. -
Verifying oracle connection from shell script
Hi,
Oracle 9.2
Solaris 10
From the shell script ........How can we verify whether oracle connection is successful or not ?
Shell script will prompt the user to enter the oracle schema username, password and tns name.
So, how to verify whether oracle connection has been established or not ??
If user entered schema name & password is correct then proceed further else script will again prompt for schema user name & password.
With RegardsI would not provide the username/password at the command line because everyone could see it when listing processes with standard unix 'ps' command.
Below is an example. I'm sure you can modify it to suit your purpose.
export ORACLE_SID=orcl
oradate=`sqlplus -s <<-EOI
system/oracl
set echo off feedback off timing off pause off heading off verify off
whenever oserror exit failure
whenever sqlerror exit failure
select sysdate from dual;
exit
EOI
`
sqlerr=$?
if [ $sqlerr -ne 0 ]; then
echo "Unable to connect to Oracle"
else
if ! [ "$oradate" ]; then
echo "SQL returns so result."
else
echo $oradate
fi
fiEdited by: waldorfm on Oct 13, 2010 2:58 PM
I just noticed...
c:/tmp/check_conn.txtWhat is c: supposed to do? If you want to output the result you can use >> /$HOME/result.log -
Automator - Run Shell Script - Does not return when script launches firefox
Automator does not work the same on my MacBooks as my Mac mini! Both are latest Snow Leopard. I'm trying to automatically setup my MacBook after it decides if I'm at work, or elsewhere.
The Automator Action "Run Shell Script" (Shell: /usr/bin/perl) does NOT return control when attempting to launch Firefox:
system("/Application/Firefix.app/Contents/MacOS/firefox-bin -private news.google.com &");
Note: the ampersand should cause Firefox to start as a background process.
It only returns control after I close Firefox. I have a "Show Growl Notification" as the second action, so I know that the first action has not completed. Odd thing is that this works on my Mac mini. I also noticed that another difference: on my MacBook status is displayed in the top toolbar when the Automator application is running.
Any ideas?Thanks, it worked. I forgot about stderr and stdin.
I'm using Perl as it is part of a bigger script. I can quickly and easily figure out if I am at work where my MacBook is plugged into a network:
my $ethernet = qx(ifconfig en0) =~ m{status:.active}xms;
if ($ethernet) {
# setup stuff for work environment
} else {
# setup stuff for mobile environment
} -
Can fljs launch a shell script?
I'm stuck on trying to figure out a long process (as flash does not allow to publish from the terminal (hint, hint adobeDev people).
How can I launch a shell script after a *.fljs has published the a swf file, so it can push the swf file further down the process?As has been mentioned, you can run Applescript. You would use:
do shell script "/path/to/your/shell/script"
You could also write an Automator app, and use the "Run Shell Script" action.
NOTE: Make sure the environment running from iCal is sufficient for your needs. You might want to do a test run with the following commands to see what your environment is:
( id -a # user id
echo "$#" # number of arguments passed
echo "$@" # all the arguments passed
pwd # your current working directory
printenv # your environment variables
) >/tmp/iCal.bash.script.env.txt -
Hi,
I am trying to launch Amazon EC2 windows server 2008 R2 instance using AWS Auto Scaling feature. I have used cusmized AMI in Autoscaling Launch configuration to launch an instance.I have placed Power Shell script in AMI.
The responsibility of script is to download code from AWS S3 and deploy in IIS server while windows startup first time.
When i check status, IIS is started succesfully. But default Application pool is not started.
To resolve this issue i have written one scheduled script. It helps to start the application pool if any application pool is in stopped state.
After this Application pool is started but i am not able to communicate with IIS server through browser.
Please help any one to resolve this issue.
Thanks in advanceHi Vchreddy,
For the IIS issue, we recommend you can post in IIS forum for more effective support:
http://forums.iis.net/
Thanks for your understanding. -
Trying to close an app with a shell script which was launched by same app.
This may be simple, but is confusing me. I have an app that executes a shell script at launch. The script is designed to check for the existence of files and if not found, I want to display a message and close the application. The problem seems to be that I can't close the app with the script, since the script was called by the app and the shell is tied up. Does that make sense? I can't close the app because the script/shell is still active. Any ideas?
Just have the script output some value for the app to read and then quit. Once the app reads the value, it will wait for the script to quit (shouldn't take long, especially if the script isn't running anymore) and then, if the value is a flag to quit, quit.
-
Cd not changing directory in shell script
This shell script executes correctly, but... not correctly:
#!/bin/bash
cd /var/www/vhosts/mydomain.com/httpdocs
pwd
Output is:
/var/www/vhosts/mydomain.com/httpdocs
[root bin]#
However, when I immediately type "pwd", it returns
/usr/bin
How can pwd in the script return a path different from the path I am in?[Running a script launches a subshell|http://tldp.org/LDP/abs/html/subshells.html], and the subshell does change the default, and that default promptly evaporates when the subshell exits.
You can invoke the script as dot-space-scriptname or as +source script+ to avoid the subshell.
. ~/script
source ~/script
Or you can switch tactics and use a bash function:
function cdhttpdocs() {
cd /var/www/vhosts/mydomain.com/httpdocs
The easiest for this case is probably something akin to an alias:
alias cdhttpdocs="cd /var/www/vhosts/mydomain.com/httpdocs"
Maybe you are looking for
-
How many computers can I install Photoshop Elements on?
I have photoshop elements downloaded on my desktop. I would like to have it on my laptop as well. Is that a possibility? If so, how do I go about downloading it to my laptop? Message title was edited by: Brett N
-
Error message after taking a picture
I take a picture then device displays 'error processing photo' message. Even though the error message there doesn't seem to be any problem other than time between taking photos as I can still save and rename the photo as well as view it later. Its ju
-
Crystal Report with Classis ASP
I am new to both, ASP and Crystal Report, please keep that in mind while replying. The goal is to use classic ASP to design a webpage through which invoke crystal report, pass parameters, run CR get report and display it in the PDF format. So I downl
-
hi All I designed a form using Screen Painter. In that form i added a matrix and a CLF for a particular column the Object Type of the CLF is "4" and i Binded the Column with a User Defined Table of Master Type and also return the values into the Matr
-
Can you block the onscreen keyboard of iphone while using airplay mirroring with apple tv?
i would like to use airplay mirroring for presentations but when logining into say youtube or email i do not want my keyboard being replicated on the big screen. Is there an option just to mirror everything except the keyboard?