Issue while running MATLAB on remote server

51 次查看(过去 30 天)
MATLAB is selecting SOFTWARE OPENGL rendering.
No protocol specified
< M A T L A B (R) >
Copyright 1984-2023 The MathWorks, Inc.
R2023a (XYZ) 64-bit (glnxa64)
February 22, 2023
Warning: X does not support locale en_CA.UTF-8
To get started, type doc.
For product information, visit www.mathworks.com.
this thing appear when I run my matlab file.
I check echo $DISPLAY value which is :0.0
please help me, how can I run MATLAB on server.

回答(1 个)

Shubham
Shubham 2023-7-25
Hi Urvashi,
To run MATLAB on a server, you need to ensure that you have a graphical environment set up and that you have X11 forwarding enabled. Here are the steps you can follow:
1. Install X11 on your server: Ensure that X11 is installed on your server. You can install it using the package manager of your server's operating system. For example, on Ubuntu, you can use the following command:
sudo apt-get install xorg
2. Enable X11 forwarding: When you connect to your server, make sure you enable X11 forwarding. This allows the graphical output from MATLAB to be displayed on your local machine. You can use the `-X` or `-Y` flag when connecting to the server via SSH. For example:
ssh -X user@server_ip
3. Set the `DISPLAY` variable: Once you are connected to the server, set the `DISPLAY` variable to point to your local machine. In your case, since the value of `DISPLAY` is `:0.0`, you can set it using the following command:
export DISPLAY=:0.0
4. Launch MATLAB: Now you can launch MATLAB on the server by running the `matlab` command. MATLAB will use the X11 forwarding to display the graphical interface on your local machine.
If you encounter any issues or error messages during this process, please provide more details about the error message.

类别

Help CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by