R4 on Linux - SUCCESS!

Suggestions + Info on development of R4 visuals

Moderators: andff, rabidhamster, Rovastar

R4 on Linux - SUCCESS!

Postby dandaman32 » Fri Jul 14, 2006 11:18 pm

Hey guys and gals,
Just wanted to let you all know that I have successfully run R4 on Linux using WINE. At 100FPS on most scenes. Don't pinch yourself, I mean it! I've used R4 since it was called R2, and I've enjoyed every minute of smooth visuals. Since the migration to Linux, however, I haven't been able to run R4 - until today. So here's how I did it:
  1. Installed openSuSE Linux 10.1 - other distros such as Fedora Core should also work
  2. Installed nVidia proprietary 3D drivers (which defeats the purpose of having an open source desktop, but...)
  3. Installed R4 1.20 (you have to blindly hit Enter several times in order for this to work, because a bug in WINE causes that annoying blue background to be in front of everything else) Offtopic - RabidHamster, please get rid of that background...it doesn't make installation any better. Trust me, I'm more experienced with NSIS - and just general user experience - than everyone else on this forum combined.
  4. Disabled Xgl 3D desktop (not enabled by default so this won't be a problem for fresh SuSE installations)
  5. Created this shellscript that launches WINE with a specific working directory:
    Code: Select all
    #!/bin/bash
    cd /home/dan/.wine/drive_c/Program\ Files/R4
    wine "C:\Program Files\R4\R4.exe"
    Obviously, you need to replace /home/dan with the path to your home directory
  6. Double-clicked the shellscript and watched the pixels fly! Use a volume control app like Kmix or the GNOME Volume Control Panel Applet to enable audio capture on the line input. ALSA does not support using PCM as a capture device just yet, so you'll need to either install Winamp or use another audio device to provide the actual music.
  7. If you're using Fedora Core 5, make sure AIGLX support is disabled and Metacity is loaded without compositing support before running R4. Metacity compositing is disabled by default, and if you don't know what AIGLX or Metacity compositing is then trust me you don't have it enabled.

That's it! I have yet to try this on Debian (I have Knoppix and Ubuntu but neither is installed right now, I would have to run 'em off the liveCDs and you know how slow that can be...)

The only things that didn't seem to work right were PBuffer support, V-sync, and vidcap. Network support works, but you'll have to open post 8888 (or whatever port you specify) in your firewall before you will be able to access R4 via network. To do this in SuSE, go to System Menu (in GNOME), click YaST2, enter your root password, go to Security and Users, click Firewall, go to Allowed Services, click Advanced, and enter the R4 webserver port - usually 8888 - in the TCP field. Click OK and then Apply, and then close YaST2. Fedora users can use the system-config-securitylevel tool.

If anyone has distro-specific notes, you're encouraged to post 'em here so that other users of your distro can enjoy R4 too ;). Happy R4ing!

-dandaman32
dandaman32
 
Posts: 10
Joined: Fri Jul 14, 2006 8:20 pm

Postby SpOOnmAn » Sat Jul 15, 2006 1:21 am

sounds interesting, can you tell us more about your hardware u run it from?
is r4 running faster than under winXP on the same system? maybe i go to install linux only for running r4 if it makes any sense...
i was looking back to see,
if you were looking back at me,
to see me looking back at you
SpOOnmAn
 
Posts: 381
Joined: Thu Feb 17, 2005 8:40 am
Location: Vienna, Austria

Postby rabidhamster » Sat Jul 15, 2006 4:52 pm

Nice. thanks for the info. The next R4 installer won't have the blue background (1v22) http://www.rabidhamster.org/R4/R4_1v22.exe

It seems there's a wine extension for DSL (a USB-key Linux distribution). I'll try and give that a go when I have a moment. Am I right in thinking that the default 'nv' x-windows driver doesn't do hardware OpenGL so I need the closed-source drivers?
rabidhamster
Site Admin
 
Posts: 1090
Joined: Fri Mar 21, 2003 12:31 pm
Location: Cambridge, England

Postby SpOOnmAn » Sun Jul 16, 2006 10:03 pm

hi gordon, can u post a list of changes in the new version?
thanx
i was looking back to see,
if you were looking back at me,
to see me looking back at you
SpOOnmAn
 
Posts: 381
Joined: Thu Feb 17, 2005 8:40 am
Location: Vienna, Austria

Postby SpOOnmAn » Sun Jul 16, 2006 10:09 pm

uups, found it in docs/history.txt ;-)

looks like u were more working on r4 than posting in the forum the last time... ;-)
i was looking back to see,
if you were looking back at me,
to see me looking back at you
SpOOnmAn
 
Posts: 381
Joined: Thu Feb 17, 2005 8:40 am
Location: Vienna, Austria

Postby rabidhamster » Mon Jul 17, 2006 8:27 am

I don't have it here i'm afraid, and can't remember what I added, short of Video stuff, some UI tweaks, and an experimental flash player.
rabidhamster
Site Admin
 
Posts: 1090
Joined: Fri Mar 21, 2003 12:31 pm
Location: Cambridge, England

Postby dandaman32 » Thu Sep 07, 2006 10:16 pm

I'm running R4 on an Athlon XP 2500+ box, with 1GB of RAM and an nVidia GeForce FX 5200 video card. Forgot to mention that, yes you do need to have the closed-source nVidia drivers in order to get openGL working in Linux if you have an nV card.

The visuals are indeed faster than I ever got them on Windows XP...ironically...though I think the Windows drivers somehow capped the framerate while the Linux drivers don't.
I triple-boot openSUSE, Fedora Core 5, and XP Home and I have run R4 on both openSUSE and XP Home but not Fedora because I haven't had the time to set it up.

TODO: Get SimCity 4 working :P.

-dandaman32
dandaman32
 
Posts: 10
Joined: Fri Jul 14, 2006 8:20 pm

Ubuntu 6.06 dapper

Postby monkey » Thu Sep 21, 2006 1:15 pm

Got R4 working on Ubuntu Dapper :)
dandaman32 thanks for the instructions

this is with an nVidia card for ATI try but with the ATI drivers
I'd avoid any XGL/Compiz suff as that will cause problems

here's how

have nVidia drivers installed
https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia

install wine see
https://help.ubuntu.com/community/Wine

downloaded R4 1v22 (see rabidhamster's post above) to home directory

open new terminal windownavigate to home directory where R4 install file is located
Code: Select all
wine R4_1v22.exe


follow the install instructions

create a shell script as dandaman32 suggests
make sure you can run the script - give yourself execute permissions via properties or good old chmod

double click the script to launch R4

took me a little time to get the sound detected
in R4 go to the sound settings so you can see if it's being detected
get some sound playing through Totem, Rhythmbox,XMMS etc

double click the volume control
choose the ALSA mixer
File>Change device

go to the capture tab

and make sure that Capture slider is enabled

should all be working now 8)

all in all this took me about 10mins to get working.
I'm now very happy having given up the evil world of windows and become a GNU/Linux devotee. R4 was the one thing that I did miss and doesn't seem to have any real alternatives. having it running under Linux is the perfect solution (short of releasing it under GPL). I'd never used wine before as it always seemed too much of a faf and there wasn't really anything I wanted to run that was for windows only (not much of a gamer me) but it was a piece of cake to get this going

All I need to do now is get it outputting on a secondary monitor and find my old TIE fighter scene

R4 is cool keep up the good work
monkey
 
Posts: 1
Joined: Thu Sep 21, 2006 12:12 pm

Postby dandaman32 » Fri Oct 13, 2006 4:08 pm

monkey wrote:All I need to do now is get it outputting on a secondary monitor and find my old TIE fighter scene

If you have an NVidia card, here's you can get the output to go to the second monitor:
  1. Log out of your desktop
  2. Press Ctrl-Alt-F1 to switch to console mode
  3. Log on as root
  4. Now you have to stop your X server. This is different for every distribution:
    1. SUSE Linux: type "/etc/init.d/xdm stop"
    2. Fedora Core: type "init 3"
    3. Ubuntu and most other distributions that use GNOME: type "gdm-stop"
    4. Damn Small Linux and KNOPPIX LiveCD: type /etc/init.d/xsession stop
    5. If all else fails, try "init 3", or if even that fails (like on Damn Small Linux) try "killall -9 X Xorg Xgl" and that will almost certainly do the trick ;-)
  5. Copy /etc/X11/xorg.conf to another directory. Do not skip this step, if the changes below bork up your graphics system, you will need this file to restore the old configuration.
  6. Open up /etc/X11/xorg.conf in your favorite editor
  7. Look for the "Device" section that has the text 'Driver "nvidia"' in it
  8. Add this code to that section:
    Code: Select all
    Option "TwinView"
    Option "SecondMonitorVertRefresh" "60-120"
    Option "SecondMonitorHorizSync" "28-96"
    Option "MetaModes" "1600x1200,1600x1200; 1280x1024,1280x1024; 1280x960,1280x960; 1152x864,1152x864; 1024x768,1024x768; 800x600,800x600; 640x480,640x480; NULL,1600x1200; NULL,1280x1024; NULL,1280x960; NULL,1152x864; NULL,1024x768; NULL,800x600; NULL,640x480;"
    Yes, the MetaModes option is all one line. You can add additional resolutions as needed.
  9. Save and close
  10. Start your X server again, usually by typing "init 5", "/etc/init.d/xdm start", etc. If you can't get it to start then reboot, that should get you back into the graphical environment. If your X server fails to start, then restore the backup you made a few steps back and try again, or check your syntax and make sure you have nVidia's proprietary driver installed.
  11. Start R4 using the shellscript or whatever, it should appear on the second monitor.
dandaman32
 
Posts: 10
Joined: Fri Jul 14, 2006 8:20 pm

Postby Matty360 » Fri May 25, 2007 10:07 pm

I got this working in Ubuntustudio a while ago, but have not yet managed to find a way of routing the sound to it (I have also yet to find a fully functional driver for my sound card).
Image
Image
Image
Matty360
 
Posts: 2
Joined: Fri May 25, 2007 9:35 pm
Location: Skipton, Yorkshire

Postby dandaman32 » Mon Aug 27, 2007 9:19 pm

Ancient thread I know, but what the heck. :-)

Matty, I just had the same problem. You need to set only the OSS driver to be used in winecfg, then open up the GNOME mixer, change driver to OSS (File menu), then go to record tab and turn on record control for PCM. Funny how things in Linux work the same exact way as in Windows. :P

Edit: dude, what kinda video card do you have that lets you run R4 and Compiz/Beryl at the same time? :lol: my (wimpy, pathetic little) Geforce FX5200 couldn't dream of doing that.

--Dan
dandaman32
 
Posts: 10
Joined: Fri Jul 14, 2006 8:20 pm

Postby SpOOnmAn » Tue Aug 28, 2007 9:02 am

hehe, now i´m really thinking of trying linux, atm i dont have any experience with it but we will see, i have a 20gig free partition on my raid...
i was looking back to see,
if you were looking back at me,
to see me looking back at you
SpOOnmAn
 
Posts: 381
Joined: Thu Feb 17, 2005 8:40 am
Location: Vienna, Austria

Re: R4 on Linux - SUCCESS!

Postby Ausmosis » Sun Mar 07, 2010 8:01 am

I know this thread is old but for what its worth I have R4 working in Ubuntu Karmic Koala with wine 1.1.39 and there were/are no issues what-so-ever. You can see it running here and you will notice I have compiz running as well:

http://users.on.net/~falcidi/screenshot ... hot-R4.png

NB: The frame rates are sensational.

I hope this post will help others in the Linux community try R4 as we are constantly hearing people wanting better visualisations other than libvisual and ProjectM. With R4 as an addition what more could you want? :)
Ausmosis
 
Posts: 3
Joined: Sun Mar 07, 2010 7:52 am

Re: R4 on Linux - SUCCESS!

Postby 2mp » Thu Apr 22, 2010 6:06 pm

Hi,

I am having trouble starting r4 1.23 on ubuntu 9.10 with wine. do you know of any other way to run r4 in linux?
2mp
 
Posts: 3
Joined: Thu Apr 22, 2010 5:58 pm

Re: R4 on Linux - SUCCESS!

Postby rabidhamster » Thu Apr 22, 2010 6:16 pm

Hi,
Do you get any error messages?
Most likely R4 won't run becasuse you don't have the correct drivers for your Video Card. If you've got an Nvidia card you'll have to install the 'Restricted Drivers'.

Do 'glxgears' or other OpenGL apps work under your Ubuntu install?
rabidhamster
Site Admin
 
Posts: 1090
Joined: Fri Mar 21, 2003 12:31 pm
Location: Cambridge, England

Next

Return to R4

Who is online

Users browsing this forum: No registered users and 1 guest

cron