Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
the program I am trying to start from an icon is not a windows program using wine. it is a non-gui application, normally run from command line, written for linux. it is started with a shell script called "runctrl.sh" that calls an executable.
being lazy has nothing to do with this. if thats what you think it is, try running your favorite app every day, and then needing to load up a console window on top of that, cd to a directory, and start a shell script just so you can use your app. maybe then you will see why this can get quite annoying.
The entire team does not need to switch to mumble. It is quite unreasonable to ask everyone else to switch to a different chat program just for one user's compatibility issues. not to mention, they would still need to keep ventrilo installed to join another teams vent server, or a pub's vent server, or even a private friend's server. This is what the counter strike source gaming community uses (for the most part, besides occasional teamspeak servers), and there is no way my entire team will switch to different software, end of story.
yes, 'X Window' was designed to provite a GUI environment. pointing and clicking is just one of the many features of a GUI environment.
littlejoe5 -
what you described is pretty much what i have done. the problem is, my .sh shell script just wont start with an icon. typing ./runctrl.sh from a terminal works perfectly. clicking the panel, adding a non-kde application, and pointing the 'executable' line to runctrl.sh does NOT start the shell script. a terminal window just opens and closes real quick.
Everyone -
I appreciate everyone trying to be helpful, but i do not need any more suggestions to switch to different software. and I dont need anyone to tell me to quit being lazy and deal with it. Ventrilo and Wine are not the issue here. starting a simple, non-gui, command line app written for linux, using an icon is. program starts fine via terminal. program does not run starting via icon.
the program I am trying to start from an icon is not a windows program using wine. it is a non-gui application, normally run from command line, written for linux. it is started with a shell script called "runctrl.sh" that calls an executable.
being lazy has nothing to do with this. if thats what you think it is, try running your favorite app every day, and then needing to load up a console window on top of that, cd to a directory, and start a shell script just so you can use your app. maybe then you will see why this can get quite annoying.
The entire team does not need to switch to mumble. It is quite unreasonable to ask everyone else to switch to a different chat program just for one user's compatibility issues. not to mention, they would still need to keep ventrilo installed to join another teams vent server, or a pub's vent server, or even a private friend's server. This is what the counter strike source gaming community uses (for the most part, besides occasional teamspeak servers), and there is no way my entire team will switch to different software, end of story.
yes, 'X Window' was designed to provite a GUI environment. pointing and clicking is just one of the many features of a GUI environment.
Setting an icon to launch runctl.sh should work. Just use the full path to it. To make it easily be run, create a directory in your home directory like bin and then include in the PATH environment variable. Copy findwindow, ventriloctrl, and runctl.sh to that directory that you created. When the script is run from the icon, it should work.
You may want to change the runctl.sh script to the following.
Code:
#!/bin/sh
# Config, see README for instructions
EVENT_DEVICE="/dev/input/event0"
INPUT_KEY="86"
xterm -e "ventriloctrl $EVENT_DEVICE $INPUT_KEY && sleep 10"
Of course you will need to include a path in PATH or else you will have to provide the full path.
To include a path in the PATH variable and assuming the directory $HOME/bin is the desire path to add, do the following.
export PATH=$PATH:$HOME/bin
BTW, I have not tested the code above for the new runctl.sh.
You may be completely right. I have discovered that many programs that must be started from command line won start properly from the "Run Command" listed in the GUI menu. But I did notice in the paragraph below that your called the shell script with itś entire path from the terminal, but did you list the whole pathname in the 'execvutable' line while adding a non-kde application? I learning from you on this.
. littlejoe5
Quote:
Originally Posted by pepsimachine15
electro -
littlejoe5 -
what you described is pretty much what i have done. the problem is, my .sh shell script just wont start with an icon. typing ./runctrl.sh from a terminal works perfectly. clicking the panel, adding a non-kde application, and pointing the 'executable' line to runctrl.sh does NOT start the shell script. a terminal window just opens and closes real quick.
yes, i had the entire path in the executable section. i also tried with quotes, without quotes, with a /bin/sh before it, with an ampersand after it. nothing seemed to work. adding it to my $PATH and opening with xterm as electro suggested was the only thing that has worked so far. and it's still not perfect (doesnt run in the background) but thats something i can deal with, as long as everything works the way it should.
i'm still tinkering with it, trying to get it to be a background process.
well, after a lot of tinkering, i finally got it to work. heres what the problem was:
the "runctrl.sh" script was calling the executable "ventriloctrl". i'm assuming when i CD to the directory that both programs reside in within a terminal window, the path is automatically set to whatever working directory i am in. so starting runctrl.sh from that working directory, everything ran fine.
however when setting up an icon, the full path is used to run the shell script runctrl.sh, and there was no working directory set, or it must be set to some kde panel directory, because the 'ventriloctrl' executable is not found in the path, and the script terminates without starting the control program.
So, i added the full path to the control program in runctrl.sh (in the line that said "dont touch", ha.) after that, i was able to call runctrl.sh from an icon, and everything worked. I then wrote a script called start_both.sh to run both ventrilo via wine, and the control program.
heres the shell script for anyone who might run into the same problem. this will start ventrilo, and run the control program. it will also kill the control program(s) whenever you exit ventrilo. remember to enter the full path into your 'runctrl.sh' before 'ventriloctrl', or the control program will never start. and remember to change any other paths in the script below to whatever suits your system.
#start ventrilo with wine
env WINEPREFIX="/home/administrator/.wine" wine "C:\Program Files\Ventrilo\Ventrilo.exe" &
#keep checking if ventrilo.exe has started yet
while [ "$RUNNING" = "no" ]
do
if ps ax | grep -v grep | grep $SERVICE > /dev/null
then
echo "ventrilo.exe is running, wait 3 seconds and start control program."
sleep 3
/home/administrator/Desktop/Downloads/ventriloctrl-0.3/runctrl.sh &
RUNNING="yes"
else
echo "ventrilo.exe NOT running, keep checking..."
fi
done
#keep checking if ventrilo.exe is still running
while [ "$RUNNING" = "yes" ]
do
if ps ax | grep -v grep | grep $SERVICE > /dev/null
then
echo "ventrilo.exe is running, keep checking"
else
echo "ventrilo.exe NOT running, kill control program(s)..."
killall runctrl.sh
killall ventriloctrl
killall start_both.sh
fi
done
-----------------end code-------------------
thanks to electro for bringing up my $PATH, thats the reason i figured it out.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.