Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by mzlatar · Nov 03, 2013 at 01:33 PM · networkingserverlinuxbatchmodeheadless

Headless linux server

Hey, I can start server in -batchmode and Putty console just hangs there.

 Set current directory to /server_linux/sl
 Found path: /server_linux/sl/server_linux.x86
 Mono path[0] = '/server_linux/sl/server_linux_Data/Managed'
 Mono path[1] = '/server_linux/sl/server_linux_Data/Mono'
 Mono config path = '/server_linux/sl/server_linux_Data/Mono/etc'

And it's all ok.

But how can I start 3 instances of unity application?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by nastasache · Nov 14, 2013 at 05:47 PM

As normal user, cd to your game location and try this command to see if working:

$ xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:24' ./server_linux.x86 > ./server_linux.log &

To run multiple instances of Unity Editor:

  • open project once and set Edit -> Project Settings -> Player -> Per-Platform Settings - Settings for PC, Mac & Linux Standalone -> check "Run In Background"

  • close the project and copy it (full) in diferent locations

  • for each location, create a .bat files like (change paths accordingly with Unity instalation and your folders):

"C:\Program Files (x86)\Unity\Editor\Unity.exe" -projectPath "path_to_your_project_folder"

  • Execute each .bat file

Some more possible useful details related with running under Linux you may find here (it's the doc of FPShootNet project under Unity Asset Store).

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image nastasache · Nov 15, 2013 at 06:22 PM 0
Share

Hi mzlatar,

I tested on my own, starting 2 instances of my game server on remote machine using putty. Both game are kept up after I close putty.

Try this:

  • login as root with putty, then su as regular user (launch games/script as regular user)

  • be sure use & (send process to the backgroud) at the end of commands

  • use different ports for each game listenPort (on Network.InitializeServer)

  • be sure ports are open for udp.

There may be also other reasons machine related hanging your instances but I don't know exactly the way, machine and commands you use (my server is a dedicated Ubuntu server and I start with commands I said before - just like server_linux2.x86 for second second game server - the only difference from first one is a different listen port).

You may try also to use nohup command in front of command or use screen command (I did not tested with these since it's working with simple "&").

Iulian

avatar image
0

Answer by mzlatar · Nov 14, 2013 at 11:17 PM

Hey nastasache thanks for your answer.

Run in background option is checked and I figured out how to run 3 linux application. I am doing this on GoGrid's linux servers. I run putty and connect to them, run a shell skript that fire up 5 instances of server but it hangs, console output is code I pasted in first question and if I close putty that unity instances will also be closed.

What can I do to run them and to keep running even when I close putty connection?

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image wardevour · Oct 30, 2014 at 04:12 PM 0
Share

when u close putty your ending the session. try using a screen with "screen -S name" and when the servers started detach from the screen (ctrl+a d) then u can access the screen again with "screen -x name". other wise you need to make a service and thats a lot more involved. this is a good example with $$anonymous$$ecraft

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

16 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Linux game server 1 Answer

Console Application 0 Answers

Unity networking tutorial? 6 Answers

Reducing server-side application size 0 Answers

running servers for networked games 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges