0

I currently have an AlmaLinux 9.3 machine with remote accessing using xrdp. I have noticed that if I try to launch a program via in a Terminal Window like $ sudo gedit I get the following error message:

Invalid MIT-MAGIC-COOKIE-1 key
(gedit:21479): Gtk-WARNING **: 11:21:04.745: cannot open display: :10.0

However, if I execute the same command without sudo I get a gedit window appear. Or if I instead su to the root user account then execute the command $ gedit it works.

I would like to learn more about this error message and if there is anything I can do to rectify it. I have already looked around to see if others have experience this and I did find the following question asked: "Invalid MIT-MAGIC-COOKIE-1 key" when trying to run program remotely

However, I have not tried them due to being unsure what they actually do to the system.

Additional info about my system listed below:

  • xrdp session uses Xorg
  • Desktop Environment: xfce
  • Microsoft Remote Desktop used to access Linux Machine
  • Login greeter: lightDM

sshd_config settings:

  • X11Forwarding yes
  • X11DisplayOffset yes
  • X11UseLocalhost yes

I hope this information helps and thank you in advance.

hymcode
  • 83
  • What do commands echo $DISPLAY and sudo echo $DISPLAY return? Well, for the second one, you already wrote it is :10.0. – nobody Jan 05 '24 at 12:40
  • Hello @nobody, running both the commands you mentioned gave me: :11.0 as the output. Does this info help at all? – hymcode Jan 05 '24 at 12:54
  • Well, the question is, why do you get error report about display :10.0 if both commands say that :11.0 is used for displaying X11 applications. – nobody Jan 05 '24 at 13:35
  • You're absolutely right @nobody, I was surprised by the output showing :11.0 instead of :10.0. Maybe that's the issue, the program is being sent to the wrong display ? – hymcode Jan 05 '24 at 13:44

0 Answers0