Welcome, Guest. Please login or register.
October 03, 2024, 02:52:40 pm

Pages: [1]
  Print  
Author Topic: Some instructions for installing on Linux  (Read 62315 times)
flan_suse
citizen robot
**
Posts: 11


« on: December 25, 2010, 04:58:25 am »

UPDATE: I created an installer script to simplify the process. See my post below. I recommend it over the manual method, which is prone to making mistakes.

Here is the post: http://forum.amanita-design.net/index.php?topic=1259.msg8213#msg8213









I made a post on another message board about running Machinarium under Linux.

I hope this helps some other Linux users, and if you see any mistakes, please share the corrections!

Here is a link to that forum post: http://forums.linuxoutlaws.com/viewtopic.php?f=2&t=3314#p55020

It looks better in my original post on the other message board due to formatting.

Here is a copy + paste of what part of the message looks like:

Quote from: flan_suse
========== Machinarium ==========

This game is entirely point and click Flash-based, but it's a work of art in of itself. Here is what I did to get it to work. You need to first extract the .tar.gz archive.

Code:
tar xfvz Machinarium_full_en.tar.gz



Rename the directory, and then with root privileges, copy the entire contents into /opt/machinarium/. With rsync, the backslashes (or missing backslashes) make a big difference! I left out the backslash in the source directory on purpose. Why rsync instead of cp? Because if anyone's looking over your shoulder, they'll think you've got tech creds. "Wow, rsync? That sounds complicated!"

Code:
mv Machinarium machinarium
sudo rsync -rt --progress machinarium /opt/



You can safely remove the original directory after rsync finishes.

Next you'll need to correct the file permissions.

Code:
sudo chmod 755 /opt/machinarium/Machinarium
sudo chmod 644 /opt/machinarium/{00,01,10,11}/*



Now you need to create a .desktop menu shortcut that specifies /opt/machinarium as the working directory. If you don't do this, you will only see a black screen when you run the game, unless you cd into /opt/machinarium/ first. It's more convenient to create a menu shortcut that does this for you anyways. Make a file called machinarium.desktop and save it in $HOME/.local/share/applications/ if you want it accessible by the current user only. If you want it to be globally visible, save it as root under /usr/share/applications/. Here is what my machinarium.desktop file contains. Notice the Path= line.

Code:
[Desktop Entry]
Name=Machinarium
GenericName=Flash-based story game
Comment=Flash-based story game
Path=/opt/machinarium
Exec=/opt/machinarium/machinarium_launcher.sh
Icon=/opt/machinarium/machinarium_icon.png
NoDisplay=false
StartupNotify=true
Terminal=false
Type=Application
Categories=Game;LogicGame;



To add a nice touch, download an icon and save it, as root, under /opt/machinarium/machinarium_icon.png. The above .desktop shortcut already points to this file as the "Icon", so it should show up in your menu. Here is the icon that I used: http://darkhavans.deviantart.com/art/Machinarium-Dock-Icon-141463511

Code:
sudo cp Machinarium_Dock_Icon_by_Darkhavans.png /opt/machinarium/machinarium_icon.png



You must create a simple launcher to get around the "black screen" issue. This launcher is already referenced in the above .desktop file in the Exec= line. Under /opt/machinarium/, make a new file called machinarium_launcher.sh and add these contents within.

Code:
#!/bin/bash

### Simple launcher for Machinarium.
### Fixes issue with black screen, mouse clicks, and working directory.

# Change the working directory to match the executable's directory
cd /opt/machinarium/

# Now launch the Machinarium executable, with a fix for some mouse issues
GDK_NATIVE_WINDOWS=true /opt/machinarium/Machinarium

exit 0



Now make this launcher executable.

Code:
sudo chmod +x /opt/machinarium/machinarium_launcher.sh



Try running the game from the menu now.

The game developers recommend that you disable Flash hardware accleration for better performance. I find this to be true, strange as it may sound. You can test this out for yourself. Right-click the screen, go to Settings, then uncheck hardware acceleration. When you launch the game, it will say "Press ESC to exit full screen." This is not the game displaying the message; it's Adobe Flash. You see the same message when you full screen a YouTube video. ESC does not exit full screen. After clicking on the title, you need to bring your mouse cursor towards the bottom of the screen to access the options and controls. Try to disable full screen mode as soon as you can! We know how Flash and Linux aren't best of friends, and this games run much better in windowed mode. You can also try lowering the quality under the View options after you enter windowed mode.

If you use BleachBit, make sure to add this folder to your whitelist, or else you'll lose your saved games and preferences. If you prefer, you can also just exclude Flash cookies from being deleted, since this is how the game stores user settings and saves.

Code:
/home/username/.macromedia/Flash_Player/#SharedObjects/XXXXXXXX/#localWithNet/opt/machinarium/Machinarium/

Enjoy!
« Last Edit: June 12, 2017, 06:41:55 pm by Alex » Logged
flan_suse
citizen robot
**
Posts: 11


« Reply #1 on: January 19, 2011, 04:43:13 am »

Just updated the post again.

I realized that the spaces in the code sections can mess up the menu launcher. The bash script shouldn't have preceeding spaces if you want the menu shortcut to work.

I fixed this now, and so copying/pasting the code sections should work with no problems now.
Logged
juppes
little robot
*
Posts: 6


« Reply #2 on: August 05, 2011, 01:47:01 pm »

hello,

hope you read this by any chance...
First of all thanks a lot for posting this here. I closely followed everything in your instructions, but unfortunately I cannot launch Machinarium on my machine. It is visible in the menu with the nice icon, but the same thing happens as if I would cd to /opt/machinarium and launch Machinarium from there. I just briefly get some screens, among which Adobe Flash Player, but the launching process stops.

thank you for trying to help me. I am running Kubuntu 10.04 64bit on my machine.
Logged
nicolas
Global Moderator
space invader
*****
Gender: Male
Posts: 107


pains-aux-raisins-based life-form.


WWW
« Reply #3 on: August 05, 2011, 04:55:00 pm »

I am running Kubuntu 10.04 64bit on my machine.

Hi,
On a 64-bit Ubuntu, you have to install the ia32-libs package to play. Just type the following in a terminal then try to launch the game again, it should work. Wink
Code:
sudo apt-get install ia32-libs
Logged
juppes
little robot
*
Posts: 6


« Reply #4 on: August 08, 2011, 06:13:45 pm »

hi,

thank you for replying so quickly. I tried to install ia32-libs, but my system says that it is already installed and that there is no newer version of it.
Does that mean I cannotrun Mchinarium on my computer, then?
Logged
logatfer
little rusty robot

Posts: 1


« Reply #5 on: August 16, 2011, 05:23:01 pm »

Hi there!

First of all, thanks for posting instructions in Linux!

Here's my trouble:

Well, I just landed in the linux world after being absolutely tired of windows... because of my "newbieness" i'm not used to the names u're using here... Undecided so please do not laugh too loud when reading this..! Tongue

I downloaded the Linux version on a Ubuntu 11.4, and extracted the folder in the desktop. when double-clicking the executable on the folder named "machinarium", a black screen named "adobe flash player 10" flashes and disappears almost inmediately... I read somewhere in the linux forum that double clicking the executable in the folder it's enough, but seems that's not..!

Then I tried to follow the instructions posted in this thread, but looks like chinese for me... Cry

I don't know really what's going on, and if it's due to a lack of any program or simply (think so) my lack of the proper knowledge about linux...!

I think I have all the requirements to play the game, so...

Adobe flash player 10 (last version)
32 bits system
Ubuntu 11.4

I would really appreciate any help, because it's been a week I purchased the game and I can't wait anymore..!!

Many Thanks!
Logged
flan_suse
citizen robot
**
Posts: 11


« Reply #6 on: August 16, 2011, 07:39:55 pm »

Then I tried to follow the instructions posted in this thread, but looks like chinese for me... Cry

Hi. This is the OP again.

Depending on the situation, using Linux as a desktop operating system may require the user to do manual, tedious things. If the above instructions seem too complex or confusing, I created a simple installer/uninstaller script that you can try. It only requires you to type a single command in the terminal.

Make sure that the installer script (machinarium_installer.sh) is located in the same folder as the Machinarium_full_en.tar.gz archive file. You can extract my attached .zip file with:
Code:
unzip machinarium_installer.zip

Then just run this single command:
Code:
sudo sh machinarium_installer.sh

You should now see an item in your menu that you can click on, like any other application.

CHECK THE CODE BEFORE RUNNING IT, OR ASK SOMEONE TO CHECK IT FOR YOU. NEVER TRUST ANYTHING POSTED ON THE WEB!

It takes about half a minute to complete, maybe less. It should take care of everything for you. I also included an uninstaller script to remove the game. To be safe, backup your saves before uninstalling.
Code:
sudo sh machinarium_uninstaller.sh

If you want to start clean, run the uninstaller script first before running the installer script. All it does is delete the folder /opt/machinarium, and the delete the file /usr/share/application/machinarium.desktop

Make sure the following do not exist before installing. It's no required, but I recommend it:
/opt/machinarium/
/usr/share/applications/machinarium.desktop
~/.local/share/applications/machinarium.desktop <--- most important

* machinarium_installer.zip (1.49 KB - downloaded 1530 times.)
« Last Edit: August 19, 2011, 03:16:18 pm by flan_suse » Logged
flan_suse
citizen robot
**
Posts: 11


« Reply #7 on: August 16, 2011, 07:41:34 pm »

hello,

hope you read this by any chance...
First of all thanks a lot for posting this here. I closely followed everything in your instructions, but unfortunately I cannot launch Machinarium on my machine. It is visible in the menu with the nice icon, but the same thing happens as if I would cd to /opt/machinarium and launch Machinarium from there. I just briefly get some screens, among which Adobe Flash Player, but the launching process stops.

thank you for trying to help me. I am running Kubuntu 10.04 64bit on my machine.

Any error messages? What happens if you do the following:
Code:
cd /opt/machinarium
./machinarium_launcher.sh
Logged
juppes
little robot
*
Posts: 6


« Reply #8 on: August 18, 2011, 01:03:20 pm »

hi,

thank you for proposing another solution:

when I do what you proposed, I get the following error messages in my Terminal:

Code:
(Machinarium:2233): Gtk-WARNING **: /usr/lib/gtk-2.0/2.10.0/engines/libqtcurve.so: falsche ELF-Klasse: ELFCLASS64
./machinarium_launcher.sh: Zeile 11:  2233 Speicherzugriffsfehler  GDK_NATIVE_WINDOWS=true $workingdir/Machinarium
hajo@hajo-stromsparer:/opt/machinarium$

It is partly in German and complains about a wrong ELF-class in line 11 and a Memory Access Error. Does that ring a bell?

Anyway: Flash Player starts up in the beginning, but seems to give up for some reason
Logged
flan_suse
citizen robot
**
Posts: 11


« Reply #9 on: August 18, 2011, 02:03:32 pm »

It is partly in German and complains about a wrong ELF-class in line 11 and a Memory Access Error. Does that ring a bell?

Anyway: Flash Player starts up in the beginning, but seems to give up for some reason

I just tried running it on my 64bit openSUSE with KDE and it plays fine. Can you try this method instead:
Code:
cd /opt/machinarium/
/opt/machinarium/Machinarium

This launches the game without GDK_NATIVE_WINDOWS=true

If it still doesn't work, it sounds like a 64bit issue. Maybe you can try forcing a re-installation of ia32-libs?
Logged
juppes
little robot
*
Posts: 6


« Reply #10 on: August 18, 2011, 04:02:08 pm »

hi,

I tried your suggestions, but alas with no success at all. Things do not change a bit. So now I see two options, or maybe three:
I could remove all the files and then go through the whole process again. Maybe I overlooked something.
Option 2: I just accept the fact, that if at all, you need a 32bit system under Linux to be able to run Machinarium.
Option 3: use my Mac instead. I have the game on it, and it is running fine. I am on a move away from Mac to Linux actually for various reasons, trying to take with me some nice things from there if possible, but thus my old Mac will not be completely useless...
Logged
flan_suse
citizen robot
**
Posts: 11


« Reply #11 on: August 19, 2011, 12:21:38 am »

Option 2: I just accept the fact, that if at all, you need a 32bit system under Linux to be able to run Machinarium.

As I mentioned above, it works for me under 64bit Linux, so I don't think it's the only factor that is stopping the game from running. Another user also posted success with running the game under 64bit. Try again from scratch, with only the .tar.gz file?

See if the above attachment (machinarium_installer.sh) works, by running it in the same directory as Machinarium_full_en.tar.gz.
Logged
juppes
little robot
*
Posts: 6


« Reply #12 on: August 19, 2011, 12:08:05 pm »

Yes, I will restart from scratch and give it another try. If other people managed to get Machinarium to run on a 64bit system, I should probably be able to do so, too. Unfortunately my error messages do not clearly point in one direction (at least it seems to me to be like that) except that it may vaguely be a 64bit issue, the only reasonable method is to start over again.

I will tell you what happened when I have gone through the process.

So long...
Logged
flan_suse
citizen robot
**
Posts: 11


« Reply #13 on: August 19, 2011, 03:17:29 pm »

I updated the installer script slighty, to fix ownership. Just wanted to give a heads up. My attachment is updated in my earlier post.
Logged
juppes
little robot
*
Posts: 6


« Reply #14 on: December 25, 2011, 04:21:23 pm »

hello,

after all these months and after a switch to Linux Mint I tried your instructions again. And now, yipeeh, Machinarium is running on my 64bit machine. Thank you so much for this wonderful Howto. When you read everything carefully, you cannot go wrong.
And everything seems too work: saving games is not a problem, I can always come back to where I was.

Have a nice Christmas - this here was a great present to me!
Logged
Pages: [1]
  Print  
 
Jump to: