LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-05-2007, 06:41 PM   #1
breadbin
Member
 
Registered: Sep 2002
Location: Dublin, Ireland
Distribution: Linux Mint 17
Posts: 110

Rep: Reputation: 24
Can someone help me with a script?


Hows it going, I am playing Quake these days and to get sound I need to emulate oss so I need to type into xterm (as ROOT)

echo "tyr-glquake 0 0 direct" >/proc/asound/card0/pcm0p/oss
echo "tyr-glquake 0 0 disable" >/proc/asound/card0/pcm0c/oss


Then logout of ROOT and cd into the quake folder as myself and type

./tyr-glquake -game hipnotic -hipnotic

to play. I tried a simple script but keep getting a bad interpreter error, file not found.

#!/bin/bash
echo "tyr-glquake 0 0 direct" >/proc/asound/card0/pcm0p/oss
echo "tyr-glquake 0 0 disable" >/proc/asound/card0/pcm0c/oss


I run this as root in the quake directory where tyr-glquake is. I am new to scripts so would guess that maybe there is a path issue, the script is chmodded to 777 btw. Is there any way to login as root, execute the two lines, logout, change into the quake directory and then execute the last line to get quake running? It would be a whole lot easier. I can get Hello World script working so some of them work. Thanks
 
Old 01-05-2007, 11:44 PM   #2
kdrlx
Member
 
Registered: Feb 2006
Distribution: Ubuntu Hardy Heron
Posts: 130

Rep: Reputation: 16
Try this -

#!/bin/bash
sudo echo "tyr-glquake 0 0 direct" >/proc/asound/card0/pcm0p/oss
sudo echo "tyr-glquake 0 0 disable" >/proc/asound/card0/pcm0c/oss

also make sure you are in the "sudoers" file, if not, run the command "visudo" as root and add your account name to run the commands without need of password.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables (with masq) troubleshooting, very simple script attached script and logs. xinu Linux - Networking 13 11-01-2007 04:19 AM
Directory listing - Calling shell script from a CGI script seran Programming 6 08-11-2005 11:08 PM
python cgi script and premature end of script headers Neruocomp Programming 1 07-28-2005 11:43 AM
send automatic input to a script called by another script in bash programming jorgecab Programming 2 04-01-2004 12:20 AM
linux 9 and java script error - premature end of script header sibil Linux - Newbie 0 01-06-2004 04:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration