Specify Xvnc session instead of Xorg for xrdp connection?

Maybe upstream is a better place to post, but i love you all, so i’m trying here. I’ve already done what’s in AUR wiki and some posts here:

Connecting to my computer via VPN / xrdp doesn’t work, i’m getting some connection issues thrown. When i switch from Xorg session to Xvnc, the desktop loads (YAY!). I’m wondering if there is a way i can avoid having to wait for the connection to fail before specifying Xvnc? I’m remoting from a 2014 Macbook Pro on Big Sur 11.6.8. Nothing in the mac rdp client seems to be labeled in a way that makes me think it will specify that.

journalctl -fu xrdp

Aug 16 14:01:43 dragonfruit xrdp[1450208]: [INFO ] connecting to sesman on 127.0.0.1:3350
Aug 16 14:01:43 dragonfruit xrdp[1450208]: [INFO ] xrdp_wm_log_msg: sesman connect ok
Aug 16 14:01:43 dragonfruit xrdp[1450208]: [INFO ] sesman connect ok
Aug 16 14:01:43 dragonfruit xrdp[1450208]: [INFO ] sending login info to session manager. Please wait...
Aug 16 14:01:43 dragonfruit xrdp[1450208]: [INFO ] xrdp_wm_log_msg: login successful for user meredith on display 10
Aug 16 14:01:43 dragonfruit xrdp[1450208]: [INFO ] login successful for user meredith on display 10
Aug 16 14:01:43 dragonfruit xrdp[1450208]: [INFO ] loaded module 'libxup.so' ok, interface size 10296, version 4
Aug 16 14:01:43 dragonfruit xrdp[1450208]: [INFO ] started connecting
Aug 16 14:01:43 dragonfruit xrdp[1450208]: [INFO ] lib_mod_connect: connecting via UNIX socket
Aug 16 14:04:54 dragonfruit xrdp[1446754]: [INFO ] connection problem, giving up
Aug 16 14:04:54 dragonfruit xrdp[1446754]: [INFO ] some problem
Aug 16 14:04:54 dragonfruit xrdp[1446754]: [ERROR] xrdp_wm_log_msg: Error connecting to user session
Aug 16 14:04:54 dragonfruit xrdp[1446754]: [INFO ] Error connecting to user session
Aug 16 14:04:54 dragonfruit xrdp[1446754]: [ERROR] xrdp_sec_recv: xrdp_mcs_recv failed
Aug 16 14:04:54 dragonfruit xrdp[1446754]: [ERROR] xrdp_rdp_recv: xrdp_sec_recv failed
Aug 16 14:04:54 dragonfruit xrdp[1446754]: [ERROR] libxrdp_process_data: xrdp_rdp_recv failed
Aug 16 14:04:54 dragonfruit xrdp[1446754]: [ERROR] xrdp_process_data_in: xrdp_process_loop failed
Aug 16 14:04:54 dragonfruit xrdp[1446754]: [ERROR] SSL_shutdown: I/O error
Aug 16 14:05:14 dragonfruit xrdp[1450208]: [INFO ] connection problem, giving up
Aug 16 14:05:14 dragonfruit xrdp[1450208]: [INFO ] some problem
Aug 16 14:05:14 dragonfruit xrdp[1450208]: [ERROR] xrdp_wm_log_msg: Error connecting to user session
Aug 16 14:05:14 dragonfruit xrdp[1450208]: [INFO ] Error connecting to user session

Waiting for this connection to fail, then switching the session to Xvnc loads graphics settings.

garuda-inxi

System:
  Kernel: 5.18.16-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.1.1
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen root=UUID=f6cccf9c-8580-435e-8f33-927e3e31bb2d
    rw rootflags=subvol=@ quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
    resume=UUID=2e9cba84-8fd3-4884-995e-6ac1c54716ad loglevel=3 ibt=off
  Console: pty pts/1 DM: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Desktop System: Gigabyte product: X570 AORUS ELITE v: -CF serial: <superuser required>
  Mobo: Gigabyte model: X570 AORUS ELITE v: x.x serial: <superuser required> UEFI: American
    Megatrends LLC. v: F34 date: 06/10/2021
CPU:
  Info: model: AMD Ryzen 9 3950X bits: 64 type: MT MCP arch: Zen 2 gen: 3 built: 2020-22
    process: TSMC n7 (7nm) family: 0x17 (23) model-id: 0x71 (113) stepping: 0 microcode: 0x8701021
  Topology: cpus: 1x cores: 16 tpc: 2 threads: 32 smt: enabled cache: L1: 1024 KiB desc: d-16x32
    KiB; i-16x32 KiB L2: 8 MiB desc: 16x512 KiB L3: 64 MiB desc: 4x16 MiB
  Speed (MHz): avg: 3633 high: 4580 min/max: 2200/4761 boost: enabled scaling:
    driver: acpi-cpufreq governor: performance cores: 1: 4580 2: 3587 3: 3587 4: 3594 5: 3598
    6: 3590 7: 3586 8: 3578 9: 3672 10: 3907 11: 3593 12: 3589 13: 3592 14: 3592 15: 3590
    16: 3592 17: 3592 18: 3594 19: 3594 20: 3593 21: 3592 22: 3584 23: 3589 24: 3592 25: 3591
    26: 3591 27: 3591 28: 3589 29: 3590 30: 3593 31: 3592 32: 3588 bogomips: 223580
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed mitigation: untrained return thunk; SMT enabled with STIBP protection
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, STIBP: always-on, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA TU104 [GeForce RTX 2070 SUPER] vendor: Micro-Star MSI driver: nvidia
    v: 515.65.01 alternate: nouveau,nvidia_drm non-free: 515.xx+ status: current (as of 2022-07)
    arch: Turing code: TUxxx process: TSMC 12nm built: 2018-22 pcie: gen: 1 speed: 2.5 GT/s
    lanes: 16 link-max: gen: 3 speed: 8 GT/s bus-ID: 0a:00.0 chip-ID: 10de:1e84 class-ID: 0300
  Device-2: Logitech C922 Pro Stream Webcam type: USB driver: snd-usb-audio,uvcvideo
    bus-ID: 1-3.4.3:7 chip-ID: 046d:085c class-ID: 0102 serial: <filter>
  Device-3: Focusrite-Novation Scarlett 2i2 Camera type: USB driver: snd-usb-audio
    bus-ID: 7-2:2 chip-ID: 1235:8210 class-ID: 0102 serial: <filter>
  Display: server: X.org v: 1.21.1.4 with: Xwayland v: 22.1.3 compositor: kwin_x11 driver: X:
    loaded: nvidia unloaded: modesetting alternate: fbdev,nouveau,nv,vesa gpu: nvidia tty: 128x32
  Message: GL data unavailable in console. Try -G --display
Audio:
  Device-1: YUAN High-Tech Development vendor: Corsair Memory driver: N/A bus-ID: 1-3.4.3:7 pcie:
    gen: 1 chip-ID: 046d:085c speed: 2.5 GT/s class-ID: 0102 serial: <filter> lanes: 1
    bus-ID: 06:00.0 chip-ID: 12ab:0380 class-ID: 0480
  Device-2: NVIDIA TU104 HD Audio vendor: Micro-Star MSI driver: snd_hda_intel v: kernel pcie:
    gen: 1 speed: 2.5 GT/s lanes: 16 link-max: gen: 3 speed: 8 GT/s bus-ID: 0a:00.1
    chip-ID: 10de:10f8 class-ID: 0403
  Device-3: AMD Starship/Matisse HD Audio vendor: Gigabyte driver: snd_hda_intel v: kernel
    pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 0c:00.4 chip-ID: 1022:1487 class-ID: 0403
  Device-4: Logitech C922 Pro Stream Webcam type: USB driver: snd-usb-audio,uvcvideo
  Device-5: Texas Instruments ATH-G1WL type: USB driver: hid-generic,snd-usb-audio,usbhid
    bus-ID: 1-3.4.4:8 chip-ID: 0451:16ba class-ID: 0300 serial: <filter>
  Device-6: Focusrite-Novation Scarlett 2i2 Camera type: USB driver: snd-usb-audio
    bus-ID: 7-2:2 chip-ID: 1235:8210 class-ID: 0102 serial: <filter>
  Sound Server-1: ALSA v: k5.18.16-zen1-1-zen running: yes
  Sound Server-2: PulseAudio v: 16.1 running: no
  Sound Server-3: PipeWire v: 0.3.56 running: no
Network:
  Device-1: Intel I211 Gigabit Network vendor: Gigabyte driver: igb v: kernel pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 port: f000 bus-ID: 05:00.0 chip-ID: 8086:1539 class-ID: 0200
  IF: enp5s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:
  Local Storage: total: 4.57 TiB used: 840.05 GiB (18.0%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:2 vendor: SanDisk model: ADATA SX6000PNP size: 953.87 GiB
    block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: V9002s85 temp: 34.9 C scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:0 vendor: Western Digital model: WDS100T1XHE-00AFY0
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s lanes: 4 type: SSD
    serial: <filter> rev: 614600WD temp: 36.9 C scheme: GPT
  ID-3: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 860 EVO 1TB size: 931.51 GiB
    block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 4B6Q
    scheme: GPT
  ID-4: /dev/sdb maj-min: 8:16 vendor: Western Digital model: WD20EARX-00ZUDB0 size: 1.82 TiB
    block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400
    serial: <filter> rev: 0A80 scheme: GPT
Partition:
  ID-1: / raw-size: 896.73 GiB size: 896.73 GiB (100.00%) used: 363.38 GiB (40.5%) fs: btrfs
    dev: /dev/sda2 maj-min: 8:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%) used: 576 KiB (0.2%) fs: vfat
    dev: /dev/sda1 maj-min: 8:1
  ID-3: /home raw-size: 896.73 GiB size: 896.73 GiB (100.00%) used: 363.38 GiB (40.5%)
    fs: btrfs dev: /dev/sda2 maj-min: 8:2
  ID-4: /var/log raw-size: 896.73 GiB size: 896.73 GiB (100.00%) used: 363.38 GiB (40.5%)
    fs: btrfs dev: /dev/sda2 maj-min: 8:2
  ID-5: /var/tmp raw-size: 896.73 GiB size: 896.73 GiB (100.00%) used: 363.38 GiB (40.5%)
    fs: btrfs dev: /dev/sda2 maj-min: 8:2
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 31.29 GiB used: 1.8 MiB (0.0%) priority: 100 dev: /dev/zram0
  ID-2: swap-2 type: partition size: 34.49 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/sda3
    maj-min: 8:3
Sensors:
  System Temperatures: cpu: 34.4 C mobo: 29.0 C gpu: nvidia temp: 28 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 477 Uptime: 2h 39m wakeups: 0 Memory: 31.29 GiB used: 4.99 GiB (16.0%) Init: systemd
  v: 251 default: graphical tool: systemctl Compilers: gcc: 12.1.1 alt: 11 clang: 14.0.6
  Packages: pacman: 2214 lib: 555 Shell: Bash v: 5.1.16 running-in: pty pts/1 (SSH) inxi: 3.3.20
Garuda (2.6.5-1):
  System install date:     2022-01-22
  Last full system update: 2022-08-16
  Is partially upgraded:   No
  Relevant software:       NetworkManager
  Windows dual boot:       Probably (Run as root to verify)
  Snapshots:               Snapper
  Failed units:            

Every time I am playing around with remote connection I have to specify the connection type from the Local machine RDP's application and could not configure the Remote machine to force a connection type to the Local machine. All I can do is setup a DEFAULT connection type on the remote machine.

In a way that makes sense as the remote machine doesn't know what the local machine wants and has installed unless the local machine specifies it to the remote.

Since RDP and VNC are not the same technology, when the remote receives a request that it cannot understand or that is not its default technology then it will not understand the request.

I am using Remmina on my local Garuda machines and if the remote linux (all Garudas of course!) is setup with both XRDP and XVNC I get a choice in a dropdown upon connection when I don't specifically force the connection type from the Remmina remote machine configuration. I can choose from 3 or 4, I have no idea how I installed all of those... but at least I don't need to "let the connection fail" before I change its type.

In that sense, is there a way to disable RDP and only enable VNC by default?
I have no idea on that but maybe it's a good place to start?

3 Likes

From the local machine, i'm using the microsoft remote desktop client for mac. I didn't see an option to use VNC, although it will connect and establish a VNC session. Since it's a work machine, i am kind of bound to the tools they provide.

I guess i'll have to live with it. SSH and SCP work for most things i need to do anyway (running DL projects on my GPU at home while i'm at work). Graphical sessions are just a convenience thing.

Thanks for your reply! :smiley:

Yeah but I understand how freakin useful they are. :slight_smile:

If there is a way for the remote linux machine to force a connection type to the local machine, I have not seen that yet, maybe I never looked deep enough, it was one way of fixing an issue I had in the past but found another way to do it in the end.

It’s linux afterall so pretty much anything is possible. :smiley:

2 Likes