| View previous topic :: View next topic |
| Author |
Message |
dustin Lux Admin


Joined: 15 May 2003 Posts: 7647 Location: Vancouver
|
Posted: Sun May 28, 2006 10:35 pm Post subject: Headless Server - run a Lux room from the command line |
|
|
Lux now includes a headless server option. This means you can run a host from the command line, and it will operate in the background without creating any windows or graphics. NOTE: If you're not familiar with running programs using the command line then this is NOT for you.
For now, this will only work on computers where you have previously registered Lux on.
MacOS example command (run from the directory where Lux.app is):
| Code: | | java -Djava.awt.headless=true -cp "./Lux.app/Contents/Resources/Java/LuxCore.jar:./Lux.app/Contents/Resources/Java/MRJAdapter.jar" com.sillysoft.lux.Lux -headless -network=true -public=false -map=Classic -cards=4681015 -conts=5 -time=30 -name=Your_name -desc=Your_description |
Windows/Linux example command (run from inside the installation directory):
| Code: | | java -Djava.awt.headless=true -cp "./LuxCore.jar" com.sillysoft.lux.Lux -headless -network=true -public=false -map=Classic -cards=4681015 -conts=5 -time=30 -name=Your_name -desc=Your_description |
Those commands should be all on one big line. Most of the switches should be self-explanatory. If you want a public game then switch -public=false to be -public=true. If you play around with the switches it should tell you if you do anything wrong and let you know how to do it right.
If you want to join your own headless server then you can (and you'll be promoted to the host). Enter your local IP into the 'private game address' box in the Join Game window to join a headless server running on the same computer that you are using.
The headless server will not play games with all bots, to save CPU.
The following command line options are supported:
-unranked
-placed
-scenario
-name=hostname
-map=ClassicPartDeux (remove all spaces from map names)
-agent=<bot> (can also use the values "networkplayeronly" or "networkplayeronlyfull")
-desc=description
-time=30
-conts=15
-cards=51015
-bio1 to -bio6
-shuffle2 (randomize and winner stays)
-shuffle3 (highest ranked players)
-shuffle4 (cycle out game losers)
-public=true
-port=6619
Some options are only available in Lux 6.0.
Last edited by dustin on Sun Aug 23, 2009 9:45 pm; edited 11 times in total |
|
| Back to top |
|
 |
Kef Lux Translator

Joined: 24 Feb 2004 Posts: 4469 Location: in j0r f0rumz, Tr0||in j0r t0pixzz
|
Posted: Mon May 29, 2006 12:54 am Post subject: |
|
|
| inetresting, way cool man! |
|
| Back to top |
|
 |
Kef Lux Translator

Joined: 24 Feb 2004 Posts: 4469 Location: in j0r f0rumz, Tr0||in j0r t0pixzz
|
Posted: Mon May 29, 2006 9:07 am Post subject: |
|
|
small remark: when the first player that joins is a guest-only it's stuck
so... that ain't it
because the game doesn't autorestart when I join I don't get host
rnPhase=-1>: All the countries have been assigned
Headless server is running a game with only bots. Abort the game
com.sillysoft.lux.D.A@328c7a server=true: matched against server
NetChat: << Kef is erbij gekomen (192.168.1.20) >>
com.sillysoft.lux.D.A@328c7a server=true: Kef has joined from IP 192.168.1.20
NetChat: << Er is een spel bezig, Kef is een gast tot het volgend spel start >>
PS: doubleclicking on a game in the list when still having something in the manual ip box takes you to the game in the IP box
Last edited by Kef on Mon May 29, 2006 9:12 am; edited 1 time in total |
|
| Back to top |
|
 |
dustin Lux Admin


Joined: 15 May 2003 Posts: 7647 Location: Vancouver
|
Posted: Mon May 29, 2006 1:42 pm Post subject: |
|
|
| Kef wrote: | | small remark: when the first player that joins is a guest-only it's stuck... |
Can't you switch off guest only mode and restart then? It works for me here. |
|
| Back to top |
|
 |
Vidar Luxer

Joined: 03 Nov 2005 Posts: 80 Location: Vidi, in Asgard
|
Posted: Tue May 30, 2006 10:25 am Post subject: |
|
|
| Will this new feature enable me to start a headless host at home, and then join it at work (using the same reg code)? Cause, that would kick ass. |
|
| Back to top |
|
 |
dustin Lux Admin


Joined: 15 May 2003 Posts: 7647 Location: Vancouver
|
Posted: Tue May 30, 2006 3:08 pm Post subject: |
|
|
Yes Vidar, it will.
known bugs in this beta:
- it will prevent you from joining using your name if you specified that name as the hosts's name (so choose a different host name, not your usual nick, for now)
- the shuffle option doesn't preserve the owner as host
Last edited by dustin on Fri Aug 24, 2007 4:31 pm; edited 1 time in total |
|
| Back to top |
|
 |
dustin Lux Admin


Joined: 15 May 2003 Posts: 7647 Location: Vancouver
|
Posted: Fri Aug 24, 2007 4:29 pm Post subject: |
|
|
| I updated the commands in the top post in this thread, so they'll work with the current version of Lux. |
|
| Back to top |
|
 |
Kef Lux Translator

Joined: 24 Feb 2004 Posts: 4469 Location: in j0r f0rumz, Tr0||in j0r t0pixzz
|
Posted: Fri Aug 24, 2007 4:37 pm Post subject: |
|
|
I would make this a sticky
and my host is up
bug: running the java code while Lux is down will change your name to the name you enter in the headless host, giving you an error message you're gonna erase your ranking when you want to enter a game
Last edited by Kef on Fri Aug 24, 2007 4:40 pm; edited 1 time in total |
|
| Back to top |
|
 |
Kurtz Mouth of Madness

Joined: 18 Jul 2005 Posts: 2573 Location: Where the sheep have no name...
|
Posted: Sat Aug 25, 2007 12:02 am Post subject: |
|
|
| Vidar wrote: | | Will this new feature enable me to start a headless host at home, and then join it at work (using the same reg code)? Cause, that would kick ass. |
Dustin - you also mentioned that (for now) this will only work on the computer you registered on. From what I remember, I registered on my Mac at work (that I cannot host on). Does that mean that I cannot open the headless host at home? |
|
| Back to top |
|
 |
dustin Lux Admin


Joined: 15 May 2003 Posts: 7647 Location: Vancouver
|
Posted: Sat Aug 25, 2007 5:19 am Post subject: |
|
|
| No. The requirement is just that you must run the GUI Lux and register it on the computer, before you run a headless host on that computer. |
|
| Back to top |
|
 |
Kef Lux Translator

Joined: 24 Feb 2004 Posts: 4469 Location: in j0r f0rumz, Tr0||in j0r t0pixzz
|
Posted: Sat Aug 25, 2007 6:16 am Post subject: |
|
|
He still plays games with only bots D
sucking up some CPU because I'm running 2 rooms
Last edited by Kef on Sat Aug 25, 2007 6:16 am; edited 1 time in total |
|
| Back to top |
|
 |
killercatfish Lux Addict

Joined: 07 Sep 2006 Posts: 206
|
Posted: Sat Aug 25, 2007 11:38 am Post subject: |
|
|
pretty awesome, ill mess with this in a couple days.
especially all day hosting on a laptop, may get the cpu to run a little cooler  |
|
| Back to top |
|
 |
Kef Lux Translator

Joined: 24 Feb 2004 Posts: 4469 Location: in j0r f0rumz, Tr0||in j0r t0pixzz
|
Posted: Sat Aug 25, 2007 12:12 pm Post subject: |
|
|
Java and GUI don't play well
If the bots would stop playing on their own it would be perfect! |
|
| Back to top |
|
 |
dustin Lux Admin


Joined: 15 May 2003 Posts: 7647 Location: Vancouver
|
Posted: Sat Aug 25, 2007 2:08 pm Post subject: |
|
|
You should be able to turn off bot-only games by typing /set abortbotgames as the host in the chat. Do it when you only have 1 instance of Lux running. This should work for both normal and headless servers.
I removed a bunch of useless posts from this thread. If you don't know what a headless server is, then this thread is not for you. You can use google to find out what any and all of this stuff means if you're so inclined. |
|
| Back to top |
|
 |
Kef Lux Translator

Joined: 24 Feb 2004 Posts: 4469 Location: in j0r f0rumz, Tr0||in j0r t0pixzz
|
Posted: Sat Aug 25, 2007 2:31 pm Post subject: |
|
|
| dustin wrote: | You should be able to turn off bot-only games by typing /set abortbotgames as the host in the chat. Do it when you only have 1 instance of Lux running. This should work for both normal and headless servers.
I removed a bunch of useless posts from this thread. If you don't know what a headless server is, then this thread is not for you. You can use google to find out what any and all of this stuff means if you're so inclined. | [Setting preference: abortbotgames to true]
Still going strong, the bots :\ |
|
| Back to top |
|
 |
killercatfish Lux Addict

Joined: 07 Sep 2006 Posts: 206
|
Posted: Sat Aug 25, 2007 3:39 pm Post subject: |
|
|
| the abortbotgames work fine. |
|
| Back to top |
|
 |
killercatfish Lux Addict

Joined: 07 Sep 2006 Posts: 206
|
Posted: Sat Aug 25, 2007 3:46 pm Post subject: |
|
|
| will simply closing the terminal end the game? |
|
| Back to top |
|
 |
dustin Lux Admin


Joined: 15 May 2003 Posts: 7647 Location: Vancouver
|
Posted: Sat Aug 25, 2007 4:05 pm Post subject: |
|
|
Closing the terminal should end the game, however your host would still show up in the tracker for a few minutes. Type /quit into the terminal to cleanly shutdown the server from the tracker.
Anything you type into the terminal is treated like the chat-box. You can use commands like /start, /boot, etc.
Last edited by dustin on Sat Aug 25, 2007 4:06 pm; edited 1 time in total |
|
| Back to top |
|
 |
killercatfish Lux Addict

Joined: 07 Sep 2006 Posts: 206
|
Posted: Sat Aug 25, 2007 4:07 pm Post subject: |
|
|
Pretty awesome man, im loving this. Should I be able to log into the GUI via my same computer, or when I am using the headless, can i not play in my room GUI style without restarting the room?
but for anyone interested, here is the room up.
 |
|
| Back to top |
|
 |
killercatfish Lux Addict

Joined: 07 Sep 2006 Posts: 206
|
Posted: Sat Aug 25, 2007 4:25 pm Post subject: |
|
|
I know im probably getting annoying, but i dont have the same host controls when i come into my headless room as myself-- when im guested out as myself in my room and try to restart i get the typical [Only the host can use that command]..is this suppose to happen?
Also, does the /set abortbotgames mean the bots wont play even when humans are in there? and if so is there a way for them to play once there are humans?
Thanks!! (quite excited )
 |
|
| Back to top |
|
 |
killercatfish Lux Addict

Joined: 07 Sep 2006 Posts: 206
|
Posted: Sat Aug 25, 2007 4:32 pm Post subject: |
|
|
| kef, you must enter the /set abortbotgames command to true in the command line box, if you try and do it in the gui, then it wont take, at least thats what im finding. |
|
| Back to top |
|
 |
killercatfish Lux Addict

Joined: 07 Sep 2006 Posts: 206
|
Posted: Sat Aug 25, 2007 4:45 pm Post subject: |
|
|
| do you have a link to more advanced commands? |
|
| Back to top |
|
 |
Kef Lux Translator

Joined: 24 Feb 2004 Posts: 4469 Location: in j0r f0rumz, Tr0||in j0r t0pixzz
|
Posted: Sat Aug 25, 2007 4:58 pm Post subject: |
|
|
It should take the settings of the last game you set up with the GUI (the Lux app) if you mean the stuff that ain't indicated by the flags.
Dustin, it will still overwrite my name when I start Lux.app, that's a bit of a pain
ps kcf:  |
|
| Back to top |
|
 |
killercatfish Lux Addict

Joined: 07 Sep 2006 Posts: 206
|
Posted: Sat Aug 25, 2007 5:15 pm Post subject: |
|
|
| no it wont, just change the name in the main menu, it will have put your "headless hosting name" in there, just change it-- |
|
| Back to top |
|
 |
Kef Lux Translator

Joined: 24 Feb 2004 Posts: 4469 Location: in j0r f0rumz, Tr0||in j0r t0pixzz
|
Posted: Sat Aug 25, 2007 5:27 pm Post subject: |
|
|
| killercatfish wrote: | | no it wont, just change the name in the main menu, it will have put your "headless hosting name" in there, just change it-- | that's what I meant |
|
| Back to top |
|
 |
killercatfish Lux Addict

Joined: 07 Sep 2006 Posts: 206
|
Posted: Sat Aug 25, 2007 5:57 pm Post subject: |
|
|
| Ive been hosting with the room name killercatfish Beta, for a while now. It tried to make my name killercatfish Beta when i opened the GUI, warned me i was gonna muff up my raw, i deleted beta, and ive played in the room with killercatfish and no raw reset. |
|
| Back to top |
|
 |
dustin Lux Admin


Joined: 15 May 2003 Posts: 7647 Location: Vancouver
|
Posted: Sun Aug 26, 2007 5:18 am Post subject: |
|
|
| killercatfish wrote: | when im guested out as myself in my room and try to restart i get the typical [Only the host can use that command]..is this suppose to happen?
Also, does the /set abortbotgames mean the bots wont play even when humans are in there? and if so is there a way for them to play once there are humans? |
1. Try guesting in and maybe you'll have control. This is probably a bug.
2. No, abortbotgames will just make it so no game gets played when there are only bots. |
|
| Back to top |
|
 |
killercatfish Lux Addict

Joined: 07 Sep 2006 Posts: 206
|
Posted: Mon Aug 27, 2007 9:48 pm Post subject: |
|
|
I am in a motel room, i opened their router and am hosting, 6619 is open. Same setting as I always have at home.
I can get into any room, only when i open lux i am refused from my room. This is new any idea? |
|
| Back to top |
|
 |
dustin Lux Admin


Joined: 15 May 2003 Posts: 7647 Location: Vancouver
|
Posted: Mon Aug 27, 2007 10:57 pm Post subject: |
|
|
| Are you trying to join with the same name as the server? What error message do you get? |
|
| Back to top |
|
 |
killercatfish Lux Addict

Joined: 07 Sep 2006 Posts: 206
|
Posted: Tue Aug 28, 2007 8:53 am Post subject: |
|
|
just as if i were ban:
[Checking for aliases...]
[Connecting to LuxServer at 216.228.180.197 port 6619...]
[Connection refused]
I am trying to play as Killercatfish as usual.
Very strange, room works fine obviously, and also when i start it with the GUI instead, i am able to play just fine.
Just strange, it probobly would work again when i have my own router up, just in this room for a few days and wondering if you had any ideas.
Thanks. |
|
| Back to top |
|
 |
|