Help with running a .sh file please

SwiftDragon

New Member
Joined
Dec 9, 2020
Messages
7
Reaction score
0
Credits
62
I have been trying to launch RHRE3 (Rhythm Heaven Remix Editor) using the ./run_linux.sh command. I should probably mention a few things:

- I am a brand new user of Linux (I just installed it yesterday, so yeah)
-I am using the chromebook version, which I believe is a version of debian
-I know a chromebook is not the best option, but I mainly got it for school purposes and just got into Linux
-I am also in middle school, so please try to make an explanation as simple as possible

Anyways, after a few google searches, I have come across many issues. For one, I have heard that I need to add a "chmod +x" to the file, and while that made my system recognize the file, whenever I try to run it I get "bash: ./run_linux.sh; Permission Denied." Is there anyway for me to fix this and launch this program?

I am open to installing other programs if I have to, but they have to work on chrome os. I also have root privileges.

Thank you in advance!
 


I’m a little confused. Are you running ChromeOS? Or Debian?

ChromeOS is definitely not Debian.

What is the complete output of the command:
Bash:
ls -l ./run_linux.sh
 
I’m a little confused. Are you running ChromeOS? Or Debian?

ChromeOS is definitely not Debian.

What is the complete output of the command:
Bash:
ls -l ./run_linux.sh
Oh! sorry for being confusing. I am using the Linux(Beta) option in the settings of my chromebook. I am not sure if it is seperate or not, once again I am new. However, I believe that when it was upgrading the apt it said

Hit:1 https://deb.debian.org/debian buster InRelease

so I just assumed it was debian.

Anyways, the output is just

./run_linux.sh

so I dont know what that was supposed to do? Thank you for responding!
 
My understanding is that ChromeOS is somewhat like Debian, but not all models support running Linux apps.

Looking at run_linux.sh, I think it would be safe to recommend trying "sudo ./run_linux.sh". If that fails, it could mean you don't have Java installed.
 
My understanding is that ChromeOS is somewhat like Debian, but not all models support running Linux apps.

Looking at run_linux.sh, I think it would be safe to recommend trying "sudo ./run_linux.sh". If that fails, it could mean you don't have Java installed.
I did not have Java installed, so I went ahead and did that.

when putting sudo in front of ./run_linux.sh, I get a command not found. When I don't put it, it gives the same message of "Permission Denied." Installing Java gave me more issues, as I downloaded it for linux and put it in my linux files folder, but now I cant open it.

Thank you for your help so far, it has helped me a lot!
 
Oh! sorry for being confusing. I am using the Linux(Beta) option in the settings of my chromebook. I am not sure if it is seperate or not, once again I am new. However, I believe that when it was upgrading the apt it said

Hit:1 https://deb.debian.org/debian buster InRelease

so I just assumed it was debian.

Anyways, the output is just

./run_linux.sh

so I dont know what that was supposed to do? Thank you for responding!

If you used the ls -l command with the filename ./run_linux.sh, as specified in my previous post - it should show a lot more information about the file. Like the file's current permissions and ownership, the size of the file etc.

The reason I asked to see the output of that command is so we can see what the current permissions are for the file.
You are getting a permissions related error, but without seeing the current permissions for the file, we are unable to help you.
 
If you used the ls -l command with the filename ./run_linux.sh, as specified in my previous post - it should show a lot more information about the file. Like the file's current permissions and ownership, the size of the file etc.

The reason I asked to see the output of that command is so we can see what the current permissions are for the file.
You are getting a permissions related error, but without seeing the current permissions for the file, we are unable to help you.
Oh my gosh- I'm an idiot. I thought that those were 1, not l.

when putting that in, I get a little more, but I'm not sure how much that will help.

-rw-r--r-- 1 swiftdragon swiftdragon 114 Dec 9 13:03 ./run_linux.sh

I'm really sorry that I am still new to this, and thank you for the help.
 
Oh my gosh- I'm an idiot. I thought that those were 1, not l.

when putting that in, I get a little more, but I'm not sure how much that will help.

-rw-r--r-- 1 swiftdragon swiftdragon 114 Dec 9 13:03 ./run_linux.sh

I'm really sorry that I am still new to this, and thank you for the help.


OK, that's brilliant. I can see the problem.
You haven't made the script executable.
Give the script executable permissions by running the command:
Bash:
chmod +x ./run_linux.sh
The above will make the permissions string -rwxr-xr-x

Then try running it again!
 
OK, that's brilliant. I can see the problem.
You haven't made the script executable.
Give the script executable permissions by running the command:
Bash:
chmod +x ./run_linux.sh
The above will make the permissions string -rwxr-xr-x

Then try running it again!
Wow- thank you so much! Now it is not giving me the permission issue!

...However, now it is saying there is no such file. I put the file in my "linux files" folder, but it has been in there while the permission thing was happening.

Here is the error message:

bash: ./run_linux.sh: /bin/bash^M: bad interpreter: No such file or directory

I know I have been saying this a lot, but thank you.
 
Wow- thank you so much! Now it is not giving me the permission issue!

...However, now it is saying there is no such file. I put the file in my "linux files" folder, but it has been in there while the permission thing was happening.

Here is the error message:

bash: ./run_linux.sh: /bin/bash^M: bad interpreter: No such file or directory

I know I have been saying this a lot, but thank you.

From looking at what you posted the ^M indicates to me that the file has Windows CRLF line endings in it instead of Unix ones. So the next thing to do would be to run dos2unix on the file.
e.g.
Bash:
dos2unix ./run_linux.sh
That will convert the Windows style line-endings in the file to Unix line endings.
After running dos2unix, try running the script again!
 
From looking at what you posted the ^M indicates to me that the file has Windows CRLF line endings in it instead of Unix ones. So the next thing to do would be to run dos2unix on the file.
e.g.
Bash:
dos2unix ./run_linux.sh
That will convert the Windows style line-endings in the file to Unix line endings.
After running dos2unix, try running the script again!
Alright, after trying that I just get a "command not found." is it just incompatible with my machine?
 
Alright, after trying that I just get a "command not found." is it just incompatible with my machine?

No, that just means that dos2unix isn't installed.

Because you're running Debian, you can install it using:
Code:
sudo apt install -y dos2unix
That will prompt you to enter your password and will install dos2unix.

Once you have dos2unix installed, try my suggestion from my previous post again and you should be good to go!
 
No, that just means that dos2unix isn't installed.

Because you're running Debian, you can install it using:
Code:
sudo apt install -y dos2unix
That will prompt you to enter your password and will install dos2unix.

Once you have dos2unix installed, try my suggestion from my previous post again and you should be good to go!
Ok, now it actually tried to open!

sadly, another error:

./run_linux.sh: line 4: java: command not found
./run_linux.sh: line 6: read: `Press any key to continue...': not a valid identifier

hopefully this is the last part...
 
Ok, now it actually tried to open!

sadly, another error:

./run_linux.sh: line 4: java: command not found
./run_linux.sh: line 6: read: `Press any key to continue...': not a valid identifier

hopefully this is the last part...
That error kinda speaks for itself.
It means that you don’t have Java installed.
You’ll need to read through the documentation for the application to find out what version of java it requires. And then download and install it.

The Debian repos will probably have a couple of different versions of the OpenJDK.
The openjdk project is a free/libre/open source implementation of java.

Hopefully, one of those will be compatible with your application.

Otherwise, search for Oracle java for Linux and the required version number to get the details for the official Oracle java download page.

Unfortunately, I’m not near my pc right now. And I don’t have time to look it up for you either.

I’ll post again later when I’m at my pc!
 
First you need to install OpenJDK, personally I would use Version 11
Code:
sudo apt-get install openjdk-11
Once java is installed now run
Code:
sudo bash ./run_linux.sh
in the folder where you downloaded the app
 
Last edited by a moderator:

Staff online

Members online


Top