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.
echo $DISPLAY
andsudo echo $DISPLAY
return? Well, for the second one, you already wrote it is:10.0
. – nobody Jan 05 '24 at 12:40:11.0
as the output. Does this info help at all? – hymcode Jan 05 '24 at 12:54: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