Sunflower can't connect to ubuntu remotely

Recently, many friends have installed Sunflower on ubuntu20 and ubuntu22 systems, and remote them through other computers. Due to various problems, I have been stuck on the login interface or simply cannot connect. There are two main reasons for this:

cause:

  • Sunflower is not compatible with gdm3 (gdm3, kdm, lightdm are all display managers. They provide graphical login and handle user authentication)
  • The controlled host is not connected to the display (this is fine on windows, but not on linux)

solution:

solve the first problem

1. Install lightdm, choose lightdm as the default desktop during installation

sudo apt-get install lightdm

insert image description here

(Optional) If you made a wrong choice in the previous step, it doesn't matter, use the following command to modify:

sudo dpkg-reconfigure lightdm 

Solve the second problem (choose 1 from 3)

method 1

If you have a monitor with a cable, just plug it into the host computer

Method 2

If you don't have a monitor, the console does. You can buy a monitor cheater online and plug it in to trick the host into thinking it has a monitor.

Method 3

If you don’t have a monitor and don’t want to buy a cheater, then we can install a virtual desktop
Note: After the configuration is complete, the system uses a virtual monitor by default, and there may be a risk of a black screen or failure to switch back to the original monitor. If you need to use the display again, you need to delete or rename the "xorg.conf" file.

sudo apt install xserver-xorg-video-dummy

# 添加配置文件,设置1920*1080的分辨率(如果不符合你电脑的分辨率,可修改参数自行调整)
sudo vim /usr/share/X11/xorg.conf.d/xorg.conf
# 文件里写入以下内容
Section "Monitor"
  Identifier "Monitor0"
  HorizSync 28.0-80.0
  VertRefresh 48.0-75.0
  Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync
EndSection
Section "Device"
  Identifier "Card0"
  Driver "dummy"
  VideoRam 256000
EndSection
Section "Screen"
  DefaultDepth 24
  Identifier "Screen0"
  Device "Card0"
  Monitor "Monitor0"
  SubSection "Display"
    Depth 24
    Modes "1920x1080_60.00"
  EndSubSection
EndSection

After the two problems are solved, it is the moment to witness the miracle, and it can be controlled after restarting

Reference article:

https://blog.csdn.net/qq_41575489/article/details/126146808
https://blog.csdn.net/qq_38202733/article/details/124159249

Guess you like

Origin blog.csdn.net/xin_IT_able/article/details/130039879