Server Help

Bot Questions - Running Merv in Linux Console

AgentSteel - Tue Mar 01, 2005 8:28 pm
Post subject: Running Merv in Linux Console
I am trying to run merv in linux on a box that I have only ssh console access, running it under wine/cedega.

I'm sure this would be a non-issue if I was in X11 and running it under wine/cedega... but alas, all I have is ssh access and its impossible to open a window as merv wants to do.

Has anyone been able to get this to work? Is there any way to tell merv to do pure console output and not try to open its little window? Or maybe even do no output at all? This is a popular core and I'm surprised there is little to no info about running it on non-wintel boxes.

I appreciate any help or insights I can get.
Cyan~Fire - Tue Mar 01, 2005 9:36 pm
Post subject:
I have absolutely no experience with wine, so I'm sorry if the following is completely misguided.

There's no code in MERV that has anything to do with windows other than the stuff to change the Window Title. Try commenting out that function (and all references to it, of course), and seeing if it'll work.
Maverick - Wed Mar 02, 2005 3:44 am
Post subject:
I doubt you can run the normal mervbot distribution on a linux box unless you recompile it on the same linux box as Cyan~Fire said.
Night_Fox - Wed Mar 02, 2005 5:20 am
Post subject:
Thats not possible, but I think there is a converter some where I think, but no to sure about it.
Cyan~Fire - Wed Mar 02, 2005 3:32 pm
Post subject:
Wiiiiiiiiiiiiiiiiiiiiiinnnnnnnnnnnnneeeeeeeeee.
AgentSteel - Thu Mar 03, 2005 4:40 am
Post subject:
Thanks for the replies. I was hoping for an easy fix, or maybe someone with a windows compiled version that could do this. Catid maintains that merv runs under wine. Thats probably true if you are sitting at the box in X11 or whatever window manager you are running. But pure ssh console seems to be a no-dicer. icon_sad.gif

Any last ditch suggestions?
Anonymous - Fri Mar 04, 2005 4:39 pm
Post subject:
use wineconsole for running merv in a shell. i've yet to have any problems with it other then wineconsole's obscenest need for stdin to point to a real tty. using an & tryin to fork it to the background or piping it to null will make it complain and die. You can try using screens but if you’re running the bot as an automatic server process that’s no good way. I wrote a little perl script to do just this thou. you lucked out tongue.gif

Code: Show/Hide
#!/usr/bin/perl -w

use strict;
use warnings;

my $pid;

if ($pid = fork)
{
  #parent
}
else
{
die "CANNOT FORK!!\n" unless defined $pid;
open(STDIN, "/dev/tty1");  # get it a real tty for input
open(STDOUT, "/dev/null"); # suppress output
open(STDERR, "/dev/null"); # suppress output
{
  system("wineconsole /home/MERVBot/MERVBot.exe");
};
exit(1);
}


I had this script being watched by another script for if the bot died. you can just code in a loop if you want. also you can pipe the output to a file if you want to keep a log. but i'd run the bot with terminal mode off for speed anyways. also, you better hope no one uses tty1(or whatever tty you set it as). it'll cause the bot to close. you can always use one of the stty's if setup biggrin.gif

-Niadh
Anonymous - Sat Mar 05, 2005 2:59 pm
Post subject:
Zim, you rock man! I'd buy you a beer and a large steak if you lived near me. Thanks again!
AgentSteel - Sat Mar 05, 2005 3:00 pm
Post subject:
Oops, that was me. ^
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group