Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
HOW-TO: A guide to installing subgame2 in linux (debian)

 
Post new topic   Reply to topic Printable version
 View previous topic  I'm looking for a wiki page Post :: Post Firefox 2.0  View next topic  
Author Message
Doc Flabby
Server Help Squatter


Joined: Feb 26 2006
Posts: 636
Offline

PostPosted: Thu Aug 03, 2006 7:11 am   Post maybe stupid    Post subject: HOW-TO: A guide to installing subgame2 in linux (debian) Reply to topic Reply with quote

As good as ASSS is sometimes subgame has its advantages. This is how I got it running on the linux.

First you need a working wine installation of wine version 0.9.12 or later. This is in the testing package repositry in debian. to install (assuming you are running a testing version of debian you would type as root)
Code: Show/Hide
apt-get install wine

Similarly installing on other linux is there is normally a similar way such as emerge of gentoo
Code: Show/Hide
emerge wine

To check if wine is setup correctly switch to a non-root user
type
Code: Show/Hide
wine --version

It should display the version number of wine
If that happens all is good. and wine is setup.
The next stage is to create a user in which subgame will run
switch to root (or use sudo) type
Code: Show/Hide
adduser

choose a name and password for the user. Im gonna call it subgame, with password docflabbyiscool. I suggest u use a different password tongue.gif
now you need to change to the user of the newly created user so either login as subgame or type
Code: Show/Hide
su - subgame
as root
if u type
Code: Show/Hide
whoami
it should say
subgame
switch to subgames home folder and run wine to set it up
Code: Show/Hide
cd #
wine anything

alot of crap and errors will appear on the screen but thats normal wait for it to go away.
Code: Show/Hide
mkdir ~/.wine/drive_c/subgame
cd ~/.wine/drive_c/subgame 

copy all the subgame files in the subgames zip to this directory
now fire up nano or vim or whatever you edit text files with and setup server.ini for subgame. plenty of help is advailable here http://www.shanky.com/server/ and in these forums.
I would recomment changing this section of server.ini so it looks like this to prevent subgame hogging the cpu
Code: Show/Hide

[CPU]
LoopDelay=0
ProcessMaxTime=4
SleepPerIteration=1
SlowIterationWarningLevel=100
SleepTime=5

once you have done that its time to make sure the permissions are correct
everything in the subgame folder should be chmod 755
and chown subgame.
Once you have done that its time to try the server out.
Code: Show/Hide
wineconsole subgame2.exe

this should launch the subgame server. you can then try connecting to it in continuum. To stop it use ctrl+c.
To get the server to launch at start up you need to create a script to run it
Code: Show/Hide

cd #
touch startsubgame
chmod 755 startsubgame

edit the startsubgame file so it looks like this (assuming your subgame user is called subgame)
Code: Show/Hide

cd /home/subgame/.wine/drive_c/subgame
wine subgame2.exe

save that file
test it works
Code: Show/Hide

./startsubgame

it should start the subgame server
to get it running on startup we use crontab
make sure you are the subgame user (whoami)
Code: Show/Hide

crontab -e

add this line
Code: Show/Hide

@reboot /home/subgame/startsubgame >> /home/subgame/subgamelog 2>&1

this will create a log file for you of subgame. Now try rebooting the computer to see if subgame starts up

If all is good your subgame server should now be setup on linux icon_surprised.gif

DISCLAIMER: ive only tried this on a debian server using wine version 0.9.12 if this breaks your computer its not my fault tongue.gif
If you want to see it in action PSSF Kitty Girls!!! is a test zone currently running subgame2 on linux in this way.
_________________
Rediscover online gaming. Get Subspace | STF The future...prehaps


Last edited by Doc Flabby on Fri Nov 03, 2006 11:06 am, edited 2 times in total
Back to top
View users profile Send private message Add User to Ignore List
Dr Brain
Flip-flopping like a wind surfer


Age:39
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Thu Aug 03, 2006 10:33 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

I haven't tried it, but I have some cosmetic changes for your howto.

You should use "su - subgame", which has the added benefit of changing to ~.

I'm pretty sure that your cron change will only work with some cron variants.

"cd #" can be replaced by "cd"

Code: Show/Hide

mkdir ~/.wine/drive_c/subgame
cd ~/.wine/drive_c/subgame                #is this even needed?


can replace:

Code: Show/Hide
cd .wine
cd drive_c
mkdir subgame
cd subgame


There are probably things I missed (I'm not sure that adduser is the preferred method, for example), but it's probably not that important.
_________________
Hyperspace Owner

Smong> so long as 99% deaths feel lame it will always be hyperspace to me
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Doc Flabby
Server Help Squatter


Joined: Feb 26 2006
Posts: 636
Offline

PostPosted: Fri Aug 04, 2006 7:29 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

thanks, im a bit of a linux newb tbh tongue.gif

The reason why i use cron is because i couldnt get rc scripts to work (im sure someone with the time and knowledge could) and it was a simple solution to getting subgame to run under a non-root user. I think every crontab supports @reboot. Its an undocumented feature in the linux version of the standard version of cron i think lol.
http://www.google.co.uk/search?hl=en&q=cron+@reboot&meta=

This section is required as subgame has to be installed in the wine directory tree for it to work (from my experience neways)
Code: Show/Hide

mkdir ~/.wine/drive_c/subgame
cd ~/.wine/drive_c/subgame   


(ive updated the original how-to)
Back to top
View users profile Send private message Add User to Ignore List
Dr Brain
Flip-flopping like a wind surfer


Age:39
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Fri Aug 04, 2006 8:26 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

No, I meant is the cd part really necessary? You could add a wget and an unzip command aftewards and then I'd be ok, but as it is, you just tell them to put it all in there.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
D1st0rt
Miss Directed Wannabe


Age:37
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Sat Aug 05, 2006 2:50 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Here's the rc script I use for asss if it's any help, might not be done 100% they way it should be, but it works (/home/asss/server is a link to the latest folder which is currently asss-1.4.3)

Code: Show/Hide
#!/sbin/runscript

depend() {
   need net
}

start() {
   ebegin "Starting ASSS"
   start-stop-daemon --start --background --chuid asss:asss  --pidfile /home/asss/server/asss.pid --exec /home/asss/server/scripts/run-asss
   eend $?
}

stop() {
   ebegin "Stopping ASSS"
   start-stop-daemon --stop --pidfile /home/asss/server/asss.pid
   eend $?
}

_________________

Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Doc Flabby
Server Help Squatter


Joined: Feb 26 2006
Posts: 636
Offline

PostPosted: Mon Aug 21, 2006 6:35 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

opps forgot about this topic.

That script won't work unfortunatly, i coulnt get it to work neways....its probabbly me!
Back to top
View users profile Send private message Add User to Ignore List
Dr Brain
Flip-flopping like a wind surfer


Age:39
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Mon Aug 21, 2006 10:36 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

That's a gentoo rc script, so without gentoo, it probably won't work.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Doc Flabby
Server Help Squatter


Joined: Feb 26 2006
Posts: 636
Offline

PostPosted: Mon Sep 11, 2006 7:06 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Massive bump i know

http://wiki.minegoboom.com/index.php/MERVBot_script

^^ the script here with some mods i suspect will work, will try it soon
Back to top
View users profile Send private message Add User to Ignore List
Animate Dreams
Gotta buy them all!
(Consumer whore)


Age:37
Gender:Gender:Male
Joined: May 01 2004
Posts: 821
Location: Middle Tennessee
Offline

PostPosted: Thu Nov 02, 2006 10:31 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Erm.
I get to the part where you're supposed to do
cd #
wine

And apparently wine is supposed to do something OTHER than:

Usage: wine PROGRAM [ARGUMENTS...] Run the specified program
wine --help Display this help and exit
wine --version Output version information and exit

But that's all it does. The subsequent step of making a new directory was just giving me errors:

[billerman@vps ~]$ mkdir ~/.wine/drive_c/billerman
mkdir: cannot create directory `/home/billerman/.wine/drive_c/billerman': No such file or directory


Which may be because Wine hasn't done what you expected it would do in the previous step. So, um... got any ideas?
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address MSN Messenger
Doc Flabby
Server Help Squatter


Joined: Feb 26 2006
Posts: 636
Offline

PostPosted: Fri Nov 03, 2006 11:10 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

ah you found a mistake - ive corrected it in my post

you need to type
Code: Show/Hide
wine anything
not wine

just to get wine to set its self up and create the correct folders.
Back to top
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Trash Talk All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 41 page(s) served in previous 5 minutes.

phpBB Created this page in 0.867838 seconds : 32 queries executed (90.3%): GZIP compression disabled