Instructions for Linux

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Guest

Instructions for Linux

#1 Post by Guest »

Hi! I wanted to try Ren'Py out, but I can't find instructions anywhere, how to get the game to run under Linux.
I downloaded the zip file, made run_game.py executable. All the shell tells me is
: No such file or directory
Which doesn't provide me any starting point of were to look.
I looked into the file "run_game.py". I have the file "/usr/bin/env", and "python" is in my path. But I admit never to have programmed in Python.

So, can anyone provide me with a link to installation instructions, or plain tell me what to do? Help would be much appreciated...

PS: Tried to run run_game.exe in wine. Gave me a Window with a custom mouse cursor. But the window staid black. :(

PS2: I am running debian unstable

Icekiss
Regular
Posts: 100
Joined: Sun Oct 10, 2004 4:04 pm
Contact:

#2 Post by Icekiss »

The Guest was me. I just registered.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#3 Post by PyTom »

The problem that you're having is with the line ending on the shebang line. You have two choices:

1) Use the -a option on unzip, to automatically convert the line endings on the files contained in the zip to the unix convention.

2) Instead of running "run_game.py", run "python run_game.py". Python doesn't care what the line ending of the file is, only the shell interpreter does.

Be sure that you have the python2.3 and python2.3-pygame packages installed, or else you won't be able to run the game. I actually developed Ren'Py on a Debian unstable box, but I convert the line endings in the source code for windows users.

I haven't tried Ren'Py on wine. There's no need for it, and I don't expect it to work.

Let me know if this is enough to get the demo working for you.

Icekiss
Regular
Posts: 100
Joined: Sun Oct 10, 2004 4:04 pm
Contact:

#4 Post by Icekiss »

EDIT2: Problem solved.

Ah, I had completely forgotten about that. Thanks, that helped. :D

I followed the first choice, and have now my unix line endings.

However, it still wasn't enough to get me running. :?
But at least the error messages get much more expressive. Yay! :wink:
Traceback (most recent call last):
File "./run_game.py", line 13, in ?
import renpy
File "/home/martin/downloads/renpy-4.2/renpy/__init__.py", line 40, in ?
import renpy.music
File "/home/martin/downloads/renpy-4.2/renpy/music.py", line 27, in ?
import pygame
ImportError: No module named pygame
A short look into the file music.py:
import pygame
Thats the first code line to be executed in this file. And I have to agree with the python interpreter: There is no file "pygame.py". *confused*

Ah well, maybe its to late and I am not thinking straight anymore...

EDIT: It really IS to late. Just reread your post. :shock:
I am installing the pygame package as I type.

EDIT2: Runs :D
Maybe including a short file "linuxinstall.txt" or something like that would make things simpler for others. Pointing out the line ending issue, and needed dependencies would be enough. Or they can come looking into the forum. :roll:

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#5 Post by PyTom »

Glad you got it working. Do you have music working yet? You'll need a working timidity setup for midi music to play under Linux.

I'll consider writing Linux install instructions for Ren'Py... It'll probably be in Ren'Py 4.3, whenever that comes out. It may be soon if it's needed to fix reported bugs, or it may not be until I add in some new features.

Icekiss
Regular
Posts: 100
Joined: Sun Oct 10, 2004 4:04 pm
Contact:

#6 Post by Icekiss »

I didn't even have timidity installed. So only sound, no music.
Quickly installed the .deb package via apt-get, restarted the game ->"error: No available audio device"

Seems like you can't start Ren'Py with an incorrectly set up timidity at all. :shock:
But I don't have the time right now to figure out how to configure it (get an example midi, find which switches I need, which environment variable to write them into,... I figure something like that will be needed. And that IS work)

PS: when I didn't have timidity installed, Ren'Py flooded my shell with "Error while trying to play music: /etc/timidity.cfg: No such file or directory" messages. It would be better to output that line only once (or maybe once per track).

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#7 Post by PyTom »

Hm... Does setting music to off in the prefences help any when you don't have Timidity installed?

IIRC, to get timidity working, you need download:

http://www.libsdl.org/projects/SDL_mix ... ty.tar.gz

And untar it to /usr/local/lib/timidity. You then have to edit the file /etc/timidity/timidity.cfg to include the lines:

Code: Select all

dir /usr/local/lib/timidity
source /usr/local/lib/timidity/timidity.cfg
I think it's probably best if I just reccomend that people ship mp3s or oggs with their games, since MIDI seems like a problem across the board.

Icekiss
Regular
Posts: 100
Joined: Sun Oct 10, 2004 4:04 pm
Contact:

#8 Post by Icekiss »

Removed timidity again with "apt-get --purge timidity", tried to start game -> same error.
Seems like either one of the dependencies I installed makes the error appear (libglib2.0-0, libglib2.0-dev, libglib2.0-data), or the game remembers that timidity was once there...

Reinstalled timidity via apt-get. Took a look at /etc/timidity/timidity.cfg
There is a line

Code: Select all

source /etc/timidity/freepats.cfg
(freepats is installed, the file is there)

There is no line starting with "dir ", but I would venture to guess the debian archive has simply put it into the standard location, where timidity is looking anyway.

Where does Ren'Py save these preferences? I would try changing that file manually, to see whether that lets Ren'Py start again.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#9 Post by PyTom »

Alas, the preferences are stored in a file that isn't editable by humans.

Icekiss
Regular
Posts: 100
Joined: Sun Oct 10, 2004 4:04 pm
Contact:

#10 Post by Icekiss »

Oh!

Well, in that case I will view it as a bug. You can't start Ren'Py because your audio doesn't work. To disable audio for Ren'Py, you have to start it first. :?
Perfect circle: The key to open the box is inside the box... :roll:

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#11 Post by PyTom »

Hm... The thing is, Ren'Py should work fine.

Are you running esd? If so, try esddsp python run_game.py and see if that works.

Icekiss
Regular
Posts: 100
Joined: Sun Oct 10, 2004 4:04 pm
Contact:

#12 Post by Icekiss »

Ok, someone used /dev/dsp. After I killed that process, Ren'Py worked again (with sound, without music). And again shell flooding that there was no "/etc/timidity.cfg"

The trace of when it didn't work:
Traceback (most recent call last):
File "./run_game.py", line 28, in ?
renpy.main.main(options.game)
File "/home/martin/downloads/renpy-4.2/renpy/main.py", line 165, in main
run()
File "/home/martin/downloads/renpy-4.2/renpy/main.py", line 122, in run
game.interface = renpy.display.core.Interface()
File "/home/martin/downloads/renpy-4.2/renpy/display/core.py", line 527, in __init__
self.display = Display()
File "/home/martin/downloads/renpy-4.2/renpy/display/core.py", line 376, in __init__
renpy.sound.init()
File "/home/martin/downloads/renpy-4.2/renpy/sound.py", line 33, in init
pygame.mixer.init(renpy.config.sound_sample_rate)
error: No available audio device
EDIT: because you asked me to, I now tried the following: I disabled music and sound effects, then occupied the sound device, and tried to start the game. Result: same error.

RedSlash
Veteran
Posts: 351
Joined: Sun Oct 31, 2004 12:48 am
Location: Canada
Contact:

#13 Post by RedSlash »

It looks like you need to copy /etc/timidity/timidity.cfg to /etc/timidity.cfg

For me, it was looking for timidity.cfg in the current directory so I had to copy my timidity.cfg to the directory I unzipped renpy to.

Post Reply

Who is online

Users browsing this forum: No registered users