Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to Clients without monitor attached (headless linux) #59

Closed
Midnex opened this issue Jun 4, 2021 · 36 comments
Closed
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Midnex
Copy link

Midnex commented Jun 4, 2021

OS: Linux Mint 20.1 x64
Kernel: 5.4.0-58

Unable to connect to Linux machines with no monitor attached.
Remote Error:
No Display

@rustdesk rustdesk added the invalid This doesn't seem right label Jun 4, 2021
@Midnex
Copy link
Author

Midnex commented Jun 5, 2021

What is invalid about it? I am confused, I have tried several machines with no displays connected and get the same error. All running various versions of Linux Mint and Manjaro Linux. I have no tried with Windows.

@rustdesk
Copy link
Owner

rustdesk commented Jun 5, 2021

I understand your scenario, but in the near future, we can not create virtual display. It is not a simple job.

@Midnex
Copy link
Author

Midnex commented Jun 5, 2021

RustDesk seems to be a remote control app more then a screen sharing. Screen sharing usually lacks controlling. While I understand, other rdp/vnc solutions can already do it. And would love to see it eventually make its way into your app. It is a extremely nice app so far, extremely fast, low memory, and I love it.

@rustdesk rustdesk added enhancement New feature or request help wanted Extra attention is needed and removed invalid This doesn't seem right labels Jun 15, 2021
@gongjiaji
Copy link

google remotedesktop could do it, would you please reconsider this scenario as quite a lot of servers are running without a monitor. Thank you.

@rustdesk
Copy link
Owner

without a monitor

Of course

@rustdesk
Copy link
Owner

rustdesk commented Jun 23, 2021

As a temp solution, you can install xrdp on Linux, and rdp to Linux using RustDesk port forwarding.

@jinjinjijiao
Copy link

jinjinjijiao commented Jun 25, 2021

image
you can solve this problem through this https://service.oray.com/question/11969.html
then
image

@rustdesk
Copy link
Owner

rustdesk commented Jul 4, 2021

远程连接无显示器设备的“deepin系统”主机时出现 No display,连接显示器之后就可以进行连接远程桌面,其他的远程桌面程序在无显示器情况下可以进行远程连接。

@rustdesk
Copy link
Owner

有一个软件你必须得知道,就是DisplayAgent 在淘宝上面有卖,这个是虚拟显示器。如果你的rustdesk没有虚拟显示器功能,控制的电脑没有开显示器,就没图像,可能你已经知道。你想想办法。可以找店家交流一下

@rustdesk
Copy link
Owner

What brought me here?
I have few computers these are remotely located and do not have any monitors attached to them. I create a virtual monitor in them and access them with similar software. Though these are only 4 computers, but teamviewer sees it as commercial setup and so do other software. So I started to look for something else. And found this great product.
I am a programmer and wanted to learn Rust. Well -- so here I am ....

@starccy
Copy link
Contributor

starccy commented Nov 10, 2021

This problem also appears on Windows when the screen is locked.

@rustdesk
Copy link
Owner

rustdesk commented Mar 3, 2022

pavlobu/deskreen#86

@fufesou
Copy link
Collaborator

fufesou commented Apr 23, 2022

Xvfb is a solution. While as methoned in the wiki:
As of 2016, Xvfb was slated to be replaced by xf86-video-dummy in X.org 7.8.

Xdummy is a supported by default.
You can find the driver file in Ubuntu /usr/lib/xorg/modules/drivers/ and Centos /lib64/xorg/modules/drivers/.

The solutions of xrdp and xpra are good references.

  1. Detect if there is a physical monitor.
  2. Provide a login window, input username and password.
  3. Start a session and X Display Manager. The steps should be the same as startx.

@rustdesk
Copy link
Owner

#192 (comment)

@congzhangzh
Copy link
Contributor

#634

@congzhangzh
Copy link
Contributor

@fufesou @rustdesk please add session management, and not just screen share

@tcoombs
Copy link

tcoombs commented Jun 22, 2022

Try using a dummy HDMI connector as this should enable a display that RustDesk can connect too.

@Luluno01
Copy link

Luluno01 commented Aug 8, 2022

The virtual monitor solution seems to conflict with real monitor - installing a virtual monitor will disable the output to the real monitor (but maybe it is possible to make the real monitor a secondary display?). This will make it harder to rescue your PC when, for example, the network fails, so that you have to connect a real monitor, which won't output anything if you have a virtual monitor installed already. I guess rustdesk will need a sesman equivalent counterpart?

@atlex
Copy link

atlex commented Aug 27, 2022

As a temp solution, you can install xrdp on Linux, and rdp to Linux using RustDesk port forwarding.

Could you please describe it in details?

I have installed the XRDP on my Ubuntu server. It works perfectly.
My next steps?

@rustdesk
Copy link
Owner

For windows, a virtual display driver is recommended:

#418 (comment)

@Pushkraj19
Copy link

do you know. Anydesk can do it too.

@tan-wei
Copy link

tan-wei commented Nov 8, 2022

Seems all the OS (Windows, Linux and MacOS) will not display rightly when the screen is swich off. However, anydesk will not mind this.

So can we wait for the feature in the future? Any plan? Thanks!

@rustdesk
Copy link
Owner

rustdesk commented Mar 9, 2023

Wondering if we can borrow something from qemu or virtualbox, they both have virtual display driver. @fufesou

@viniciusnevescosta
Copy link

Try using a dummy HDMI connector as this should enable a display that RustDesk can connect too.

So if I connect an HDMI cable from my machine (Windows 11) to my other computer (Fedora 37 - Gnome, Xorg), would this error be resolved?

@viniciusnevescosta
Copy link

Wondering if we can borrow something from qemu or virtualbox, they both have virtual display driver. @fufesou

Can you help me pls? If I connect a hdmi cable directly from a computer with windows to a desktop with fedora, this issue will be fixed?

@rustdesk
Copy link
Owner

frankly, do not know

@viniciusnevescosta
Copy link

frankly, do not know

Alright I'll be testing and share the results here

@rustdesk
Copy link
Owner

#3592 xserver-xorg-video-dummy may be a good solution.

@JfiungoM
Copy link

I was with the same problem. I used VGA dummy plug. It works for me.
https://www.geeks3d.com/20091230/vga-hack-how-to-make-a-vga-dummy-plug/

@nekuneko
Copy link

nekuneko commented Mar 19, 2023

I'm an headless-linux-workstation xrdp user, so I want to remote control the workstation by VNC/XRDP/AnyDesk/RustDesk/SSH and so many protocols I can in order to keep access to it in case of failure. This my temporal and ugly "hack" for RustDesk server without monitor attached:

  1. Connect to the remote machine and login through XRDP (Remmina/Microsoft RDP).
  2. Open a terminal and write: sudo killall rustdesk && sudo service rustdesk restart
  3. At this point RustDesk has been opened within the xrdp session which previously created a virtual display (I think following /etc/X11/xrdp/xorg.conf file).
  4. Open RustDesk on your local machine and login with your remote ID and pre-configurated password.
  5. Now you are logged in on the remote machine through RustDesk and no Display connected.
  6. Close XRDP session, RustDesk session with the xrdp virtual monitor will keep on.

I already tried the solution of making a custom /etc/X11/xorg.conf file but I loosed the HDMI hot-plug with it.
With this "hack" solution HDMI hot-plug is maintained. I will update if I can improve this solution.

I hope RustDesk developers could implement a solution similar to xrdp actually does for creating a virtual environment, I think this feature is crucial to be implemented for headless machines in order to switch from AnyDesk.

@rustdesk rustdesk closed this as completed Apr 3, 2023
@rustdesk rustdesk changed the title Unable to connect to Clients without monitor attached Unable to connect to Clients without monitor attached (Linux) Apr 3, 2023
@rustdesk rustdesk changed the title Unable to connect to Clients without monitor attached (Linux) Unable to connect to Clients without monitor attached (headless linux) Apr 3, 2023
@congzhangzh
Copy link
Contributor

congzhangzh commented Apr 3, 2023

If you have an intel integrated graphics, you can turn on the virtual display, and desktop acceleration is available.

如果你有intel集显,可以开虚拟显示,而且桌面加速可用。

https://github.com/medlab/daily-scripts-4-us/blob/main/enable_headless_intel_igpu_4_nomachine.sh

@rustdesk
Copy link
Owner

rustdesk commented Apr 3, 2023

@congzhangzh
Copy link
Contributor

congzhangzh commented Apr 3, 2023

https://github.com/medlab/daily-scripts-4-us/blob/main/enable_headless_intel_igpu_4_nomachine.sh

Cool

I think fake hdmi is still simple and efficient, and it can be done for less than 20 yuan. It takes a lot of effort to get virtual output, and all the linux knowledge at the bottom of the box is used.

我觉得还是fake hdmi简单高效,不到20块搞定,弄虚拟输出老费劲了,掏箱底的linux知识都用上了。

https://item.m.jd.com/product/100016651011.html

To test graphics card acceleration, you can use this https://webglsamples.org/aquarium/aquarium.html

测试显卡加速的话,可以用这个 https://webglsamples.org/aquarium/aquarium.html

@madroots
Copy link

Solution for raspberry pi as of September 2023:

edit file /boot/config.txt like this:

Uncomment -> hdmi_force_hotplug=1
Uncomment and change group -> hdmi_group=2
Uncomment and change mode -> hdmi_mode=82
Comment -> #dtoverlay=vc4-kms-v3d

save and reboot your pi. Rust desk should connect now.
Credit goes to @viniwludwig, found this on some youtube video in comments.

@L1yp
Copy link

L1yp commented Mar 16, 2024

如果你有intel集显,可以开虚拟显示,而且桌面加速可用。

你好,我的i5 4590电脑遇到了这个问题,请问Intel怎么打开虚拟显示呢,如果实在不行就买个fake HDMI了

@Kareltje1980
Copy link

Kareltje1980 commented May 7, 2024

Solution for raspberry pi as of September 2023:

edit file /boot/config.txt like this:

Uncomment -> hdmi_force_hotplug=1 Uncomment and change group -> hdmi_group=2 Uncomment and change mode -> hdmi_mode=82 Comment -> #dtoverlay=vc4-kms-v3d

save and reboot your pi. Rust desk should connect now. Credit goes to @viniwludwig, found this on some youtube video in comments.

For the RPI5 this doesnt work anymore, you need to add vc4.force_hotplug=1 to the end of the only one line in /boot/firmware/cmdline.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Development

No branches or pull requests