getting the server to run in linux, have a few questions, yes i know linux is not supported

Discussion in 'Multiplayer Meeting Room' started by Aaronstar, Feb 15, 2018.

  1. Aaronstar

    Aaronstar Ensign

    Joined:
    Jun 9, 2017
    Messages:
    21
    Likes Received:
    5
    so, im trying to get the server to run in a linux docker using mono (see my latest build https://hub.docker.com/r/aaronstar/mono/builds/buf8cwxwmb53dfqjmjpryte/). I have it generally set up, my only problem is that when running the non gui version, (mono EmpyrionLauncher.exe -startDedi) i get an error about it not being able to display something...
    Unhandled Exception:
    System.TypeInitializationException: The type initializer for 'System.Windows.Forms.XplatUI' threw an exception. ---> System.ArgumentNullException: Could not open display (X-Server required. Check your DISPLAY environment variable)
    Parameter name: Display
    at System.Windows.Forms.XplatUIX11.SetDisplay (System.IntPtr display_handle) [0x00408] in <8254e6010dae4d09ac0767af6dcc75af>:0
    at System.Windows.Forms.XplatUIX11..ctor () [0x00077] in <8254e6010dae4d09ac0767af6dcc75af>:0
    at System.Windows.Forms.XplatUIX11.GetInstance () [0x00019] in <8254e6010dae4d09ac0767af6dcc75af>:0
    at System.Windows.Forms.XplatUI..cctor () [0x00066] in <8254e6010dae4d09ac0767af6dcc75af>:0
    --- End of inner exception stack trace ---
    at System.Windows.Forms.Application.EnableVisualStyles () [0x00006] in <8254e6010dae4d09ac0767af6dcc75af>:0
    at EmpyrionLauncher.Program.Main () [0x00000] in <d3dc0aac6d5a407b863c192ccb3f9a6d>:0
    [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'System.Windows.Forms.XplatUI' threw an exception. ---> System.ArgumentNullException: Could not open display (X-Server required. Check your DISPLAY environment variable)
    Parameter name: Display
    at System.Windows.Forms.XplatUIX11.SetDisplay (System.IntPtr display_handle) [0x00408] in <8254e6010dae4d09ac0767af6dcc75af>:0
    at System.Windows.Forms.XplatUIX11..ctor () [0x00077] in <8254e6010dae4d09ac0767af6dcc75af>:0
    at System.Windows.Forms.XplatUIX11.GetInstance () [0x00019] in <8254e6010dae4d09ac0767af6dcc75af>:0
    at System.Windows.Forms.XplatUI..cctor () [0x00066] in <8254e6010dae4d09ac0767af6dcc75af>:0
    --- End of inner exception stack trace ---
    at System.Windows.Forms.Application.EnableVisualStyles () [0x00006] in <8254e6010dae4d09ac0767af6dcc75af>:0
    at EmpyrionLauncher.Program.Main () [0x00000] in <d3dc0aac6d5a407b863c192ccb3f9a6d>:0
    so either the no gui version just hides the gui, or i typed the startup command wrong...
    I would appreciate any help
     
    #1
  2. geostar1024

    geostar1024 Rear Admiral

    Joined:
    Jan 24, 2016
    Messages:
    1,483
    Likes Received:
    2,459
    Could you just run the gui version instead?
     
    #2
  3. Aaronstar

    Aaronstar Ensign

    Joined:
    Jun 9, 2017
    Messages:
    21
    Likes Received:
    5
    1. in order for the server to be compatible with the web panel I'm using it has to be a console type output
    2. the gui is not very useful, you can only make announcements and shutdown, you cant issue any other commands
    3. this is a Linux server os, so there is no way to make a gui, that is why we are getting the error. it is trying to generate a gui, even though it is not supposed to
     
    #3
  4. geostar1024

    geostar1024 Rear Admiral

    Joined:
    Jan 24, 2016
    Messages:
    1,483
    Likes Received:
    2,459
    Understood. Can you make it run without a GUI under windows?
     
    #4
  5. Aaronstar

    Aaronstar Ensign

    Joined:
    Jun 9, 2017
    Messages:
    21
    Likes Received:
    5
    yes, as i said, i am using the command to start the server without a gui, however, for some reason it is still complaining about not being able to make a gui. so either i typed the startup command wrong (not likely) or when you run the guiless version it still makes a gui, and just does not show it
     
    #5
  6. Aaronstar

    Aaronstar Ensign

    Joined:
    Jun 9, 2017
    Messages:
    21
    Likes Received:
    5
    also im trying to run in linux, not windows
     
    #6
  7. geostar1024

    geostar1024 Rear Admiral

    Joined:
    Jan 24, 2016
    Messages:
    1,483
    Likes Received:
    2,459
    It sounds like your suspicion that the gui is being created and then hidden is correct. In that case, you might see if the virtual x display you get from xvfb or similar is enough to get it to run.
     
    #7
  8. Aaronstar

    Aaronstar Ensign

    Joined:
    Jun 9, 2017
    Messages:
    21
    Likes Received:
    5
  9. Aaronstar

    Aaronstar Ensign

    Joined:
    Jun 9, 2017
    Messages:
    21
    Likes Received:
    5
    strange... i installed xvfb, then ran it before starting the gameserver, but i got command not found...
     
    #9
  10. stimdealer0001

    stimdealer0001 Captain

    Joined:
    Sep 14, 2015
    Messages:
    159
    Likes Received:
    149
    I tried using WINE and PlayOnLinux to get a dedicated server to run, with no GUI...never succeeded. Please let me know when you do, and what you had to go through! :D
     
    #10
  11. Sudotai

    Sudotai Ensign

    Joined:
    Apr 13, 2018
    Messages:
    2
    Likes Received:
    0
    Hi !

    (Hope my answer isnt too late. Perhaps you managed to make it run now..? )

    I got a Bi Xeon with 16 cores at home and I also wanted to try install empyrion server on a virtualized linux VM over proxmox.

    I searched a bit at your error, and perhaps it needs a full X11 implementation on the machine. Perhaps xvfb isn't enough ?

    In this stack overflow reply:

    https://stackoverflow.com/a/31331381

    It says :
    "Mono's Windows Forms implementation requires X11 to be present on Linux. As this is a headless instance like you described, it just fails to meet the requirements and leads to the exceptions."

    Then the OP states he installed a full Gnome UI and then it worked.

    Perhaps this the solution ? Did you tried it too ?
     
    #11
  12. Sudotai

    Sudotai Ensign

    Joined:
    Apr 13, 2018
    Messages:
    2
    Likes Received:
    0
    #12
  13. Slipstream

    Slipstream Captain

    Joined:
    Sep 22, 2016
    Messages:
    429
    Likes Received:
    964
    My guess is that you're going to have to load up X11 into your Docker container, because it's trying to access it, and failing. I would also report this as a bug. I'll try and run 'true headless' on my Windows box, and see if the GUI pops up.

    Thanks for bashing on this!
     
    #13
  14. Kamiy

    Kamiy Ensign

    Joined:
    Nov 7, 2015
    Messages:
    1
    Likes Received:
    0
    Any update on this container ? I would really interested in testing something like that on my home server too :)
     
    #14

Share This Page