xavierpuigf / virtualhome

API to run VirtualHome, a Multi-Agent Household Simulator
http://virtual-home.org
MIT License
487 stars 66 forks source link

error: XDG_RUNTIME_DIR not set in the environment. #105

Open Tomshine123 opened 1 year ago

Tomshine123 commented 1 year ago

Hi, I am trying to follow instructions and running the following code:

from simulation.unity_simulator import comm_unity comm = comm_unity.UnityCommunication(file_name="./simulation/unity_simulator/linux_exec.v2.3.0.x86_64", port="8082", x_display="1")

After the program launched the unity window appeared but kept in black with nothing, and in the terminal it got stuck in

Getting connection...

and there was an error saying

error: XDG_RUNTIME_DIR not set in the environment.

Did anyone meet the same issue like this?

vdorbala commented 1 year ago

I had the exact same issue. I reverted back to the older version here and it worked.

CasperFang commented 7 months ago

Hi, did u guys find another way to avoid this error? @Tomshine123 @vdorbala

allenanie commented 5 months ago

Actually, vdorbala's solution worked -- downloading from an older version (through the link vdorbala provided) is the way -- I tried on Ubuntu 20 LTS and it works.

The link says "last_release" and downloads linux_exec.v2.2.4.x86_64 instead of linux_exec.v2.3.0.x86_64.

jackkolb commented 3 months ago

For me (Ubuntu 20.04, v2.3.0) this happens when opening the simulator from Python comm = comm_unity.UnityCommunication(file_name=YOUR_FILE_NAME, port=port)

Opening the simulator from a separate terminal ($ ./linux_exec.v2.3.0.x86_64 -screen-fullscreen 0 -screen-quality 4) and then connecting with comm = UnityCommunication() instead works fine.

albertcity commented 2 months ago

./linux_exec.v2.3.0.x86_64 -screen-fullscreen 0 -screen-quality 4 @jackkolb This will result in Segmentation fault (core dumped) for me unfortunately. I am using a ubuntu server without monitor. Are you same the same case too? Tks for any reply!