Author Topic: Headless Operation on Linux  (Read 447 times)

July 29, 2018, 07:59:38 pm
Read 447 times

MrBeard92834

  • *
  • Information
  • Newbie
  • Posts: 1
  • I prefer to think of it as "machinecraft"
    • View Profile
Headless Operation on Linux
« on: July 29, 2018, 07:59:38 pm »
Greetings,

I'm attempting to use TorchBot as a way to make my various player dependent farms stay in production while I'm not playing; without having to leave my client logged in all the time.

I've pulled a working version of TorchBot 1.0.1 from a forum thread link, and when I run it on my laptop I am able to successfully click "Connect" and join my server, the entity exists and all appears to work correctly.

I then copied the JAR file to my CentOS 7 server, installed Xvfd via yum, started a 'screen' session then started Xvfd with "Xvfb :1 -screen 0 800x600x16" and disconnected from screen.  In the terminal to use TorchBot I set DISPLAY=1.0

Then, when running "java -jar TorchBot.jar" I receive the output of the text window normally seen in the GUI (excellent!), however it then says "click the connect button to connect to the server defined in config". Unfortunately, that's not possible in this headless configuration because I can't "click" anything.

Is there a command I can type in to "connect"? I tried simply "!connect" and it didn't seem to do anything. In fact, nothing I type in to that window seems to do anything at all; so I do also suspect that input may not be passed in to the UI.

November 05, 2018, 08:20:49 pm
Reply #1

woder

  • *****
  • Information
  • Newbie
  • Administrator
  • Posts: 20
    • View Profile
Re: Headless Operation on Linux
« Reply #1 on: November 05, 2018, 08:20:49 pm »
Hi,

In fact, as you've noticed, the actual operation of the bot is GUI only. The output that is shown in the console is actually the debug output and nothing is listening on the console input.

I can look into implementing this, depending how much work it is.