Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have Diablo 2 installed on one of my drives which I would like to run in Ubuntu, but I don't want to have to go through Terminal, every time, to start it up. I was trying to create a shell script that would just open it for me when I wanted to play it.

This is what I came up with:

#! /bin/bash

wine /media/84964ADD964ACF7C/"Program Files (x86)"/Diablo\ II/Diablo\ II.exe -w

When I run it I get a /bin/bash^M: bad interpreter: No such file or directory error. What am I doing wrong?

  • I have changed the permissions to be 755 and
  • I run it through the command line but it will not run

Oh, I forgot to put in my answer, that when I run the command above in the command line it works just fine, but when I run my script it doesn't work

Problem solved
Apparently when I had accidentally opened up the script in notepad it added some
extra carriage returns, hence the `^M` error. Deleted all the files associated with
the script and redid it in `geany` and it is working just fine now.
share|improve this question
    
Your path seems wrong. BTW. you can use " so you don't have to escape spaces. –  Symin Aug 25 '13 at 16:32
1  
If you could edit your question and add your last comment to your question, it will help people to help you. –  SimplySimon Aug 25 '13 at 16:36

2 Answers 2

I would like to suggest that you check that you have made the file executable

Right click on the script file and select properties. Next click on the permissions tab.

enter image description here

share|improve this answer
    
I already have done that. That was one of the first things that I had done when creating the file. –  k3vy w3vy Aug 25 '13 at 16:45
    
OK, worth a try –  SimplySimon Aug 25 '13 at 16:46

Do you have wine if so Do this

First you Do Ctrl+Alt+T

Then do enter image description here

When you see this that's good

enter image description here

Then you must press Graphics

enter image description here

Now the last thing you need to do is press Virtual Desktop

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.