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

Feat/linux virtual display (headless linux) #3902

Merged
merged 44 commits into from
Apr 3, 2023
Merged

Feat/linux virtual display (headless linux) #3902

merged 44 commits into from
Apr 3, 2023

Conversation

fufesou
Copy link
Collaborator

@fufesou fufesou commented Apr 3, 2023

  1. Linux virtual display support. Unable to connect to Clients without monitor attached (headless linux) #59
  2. May fix Unable to connect to ubuntu with dummy display. (Ver 1.2.0) #3592.
  3. Refactor dialog. refactor dialog #3764 (comment) @grummbeer
  4. Add "--cm-no-ui" for virtual display. There's some segfault bug with "--cm" with ui on headless env.

Only tested on Ubuntu for now.

Prerequirements:

# Only support gnome desktop. https://www.gnome.org
# xfce4 may be supported.

# for Ubuntu
$ sudo apt install ubuntu-desktop
$ sudo apt install xserver-xorg-video-dummy
$ sudo apt install lightdm

# for Fedora
$ sudo sudo yum groups install "GNOME"
$ sudo yum install xorg-x11-drv-dummy

# for archlinux
$ pacman -S xorg xorg-server xf86-video-dummy
$ pacman -S gnome

Steps

# install rustdesk
# get rustdesk id
$ sudo rustdesk --get-id
# set password
$ sudo rustdesk --password <password>

# connect

TODOs:

  • Do not show "Connection Error" on logout.
  • Failed to start Xorg on some PCs. parse_vt_settings: Cannot open /dev/tty0 (Permission denied).

fufesou and others added 30 commits April 3, 2023 13:16
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: qcloud <ubuntu@localhost.localdomain>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
Signed-off-by: fufesou <shuanglongchen@yeah.net>
@rustdesk rustdesk changed the title Feat/linux virtual display Feat/linux virtual display (headless linux) Apr 3, 2023
@rustdesk rustdesk changed the title Feat/linux virtual display (headless linux) Feat/linux virtual display (headless linux) Apr 3, 2023
Signed-off-by: fufesou <shuanglongchen@yeah.net>
@rustdesk rustdesk merged commit cb66c6f into rustdesk:master Apr 3, 2023
@grummbeer
Copy link
Contributor

grummbeer commented Apr 3, 2023

Wow huge!

@fufesou very nice!

1. dialog

There must be a bit more space between the sections. Don't bother, i will fix this!

desktop-dark-password-required-linux-headless-before

2. docs

Docs needs to be updated, due libpam0g-dev, build feature linux_headless?

3. notes

You split the large dialog Widget into much more smaller parts, what looks very good!

Do you think the same could be done with other very large and cluttered widgets? And also with huge files?

@congzhangzh
Copy link
Contributor

cool

@grummbeer
Copy link
Contributor

grummbeer commented Apr 3, 2023

There must be a bit more space between the sections. Don't bother, i will fix this!

nope … so nice :-) it is, but missed it because i faked the controller to make the os login visible.

@fufesou
Copy link
Collaborator Author

fufesou commented Apr 3, 2023

Docs needs to be updated, due libpam0g-dev, build feature linux_headless?

Do you mean README.md file? No need to update it.
It is not the default feature.
And linux headless is a new experimental feature. There're still some TODOs here.

Do you think the same could be done with other very large and cluttered widgets? And also with huge files?

Yes. I think it is better. But I did not intentionally split the code. It was mainly due to seeing some duplicate code.

@grummbeer
Copy link
Contributor

OK, thanks.

@ManuLinares
Copy link

How can I try this? I'm on rustdesk-nightly, running Arch with XFCE and lightdm.

This is the systemd service file:

# ~ cat /usr/lib/systemd/system/rustdesk.service

[Unit]
Description=RustDesk
Requires=network.target
After=systemd-user-sessions.service

[Service]
Type=simple
ExecStart=/usr/bin/rustdesk --service
PIDFile=/run/rustdesk.pid
KillMode=mixed
TimeoutStopSec=30
User=root
LimitNOFILE=100000

[Install]
WantedBy=multi-user.target

@joeySeal
Copy link

joeySeal commented Jul 1, 2023

"xfce4 may be supported" does this mean xfce might work or xfce might be supported in the future?

@adamency
Copy link

adamency commented Feb 1, 2024

No description provided.

@lounging-lizard
Copy link

lounging-lizard commented Feb 11, 2024

I was able to get this working for Ubuntu 22.04.03 LTS by using the following xorg config (inserted at /usr/share/X11/xorg.conf.d/xorg.conf).

I had to create the config file as it was missing, I hope this helps someone else.

This is for a 1920x1080 display via X11/xorg,

Section "Device"
  Identifier "Configured Video Device"
  Driver "dummy"
  VideoRam 16384
EndSection

Section "Monitor"
  Identifier "Configured Monitor"
  HorizSync 5.0 - 1000.0
  VertRefresh 5.0 - 1000.0
  ModeLine "1920x1080" 23.53 1920 1952 2040 2072 1080 1106 1108 1135
EndSection

Section "Screen"
  Identifier "Default Screen"
  Monitor "Configured Monitor"
  Device "Configured Video Device"
  DefaultDepth 24
  SubSection "Display"
    Depth 24
    Modes "1920x1080"
  EndSubSection
EndSection

For further details regarding Xorg configuration please see: https://wiki.archlinux.org/title/xorg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to connect to ubuntu with dummy display. (Ver 1.2.0)
8 participants