You are not logged in.

#1 2022-11-25 12:32:02

leouscin
Member
Registered: 2022-11-25
Posts: 9

[Solved] No X11 applications working whatsoever

I have a ton of problems with all applications concerning the X window manger.
I google myself to death but nothing, absolutely nothing worked.
I am using KDE btw.

1. When I try to install Matlab I get his output:

[leouscin@archlinux matlab_R2022b_glnxa64]$ ./install
Authorization required, but no authorization protocol specified
terminate called after throwing an instance of 'framework::window::DisplayError'
  what():  No display available.
Aborted (core dumped)

2. xhost isn't working

[leouscin@archlinux matlab_R2022b_glnxa64]$ DISPLAY=:0
[leouscin@archlinux matlab_R2022b_glnxa64]$ xhost +si:localuser:root
Authorization required, but no authorization protocol specified

xhost:  unable to open display ":0"

3. Cannot take a screenshot

[leouscin@archlinux matlab_R2022b_glnxa64]$ scrot image.png
Authorization required, but no authorization protocol specified

scrot: Can't open X display. It *is* running, yeah? [:0]
[leouscin@archlinux matlab_R2022b_glnxa64]$ DISPLAY=:0 scrot image.png
Authorization required, but no authorization protocol specified

scrot: Can't open X display. It *is* running, yeah? [:0]

4. xauth list is empty and the .Xauthority file is empy

[leouscin@archlinux matlab_R2022b_glnxa64]$ xauth list
[leouscin@archlinux matlab_R2022b_glnxa64]$ 

5.  I changed the sshd_config file but nothing happened

X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

My best guess is that every one of those issues could be solved if the .Xauthority file had the right content. However, any attempts to generate content for that file have failed. I have absolutely no clue how to fill that file with the content in the right syntax manually.

Last edited by leouscin (2022-11-26 00:24:57)

Offline

#2 2022-11-25 13:05:57

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 18,213

Re: [Solved] No X11 applications working whatsoever

What's your output of

hostnamectl

? Seeing @archlinux makes me think of transient hostnames and the connection to the xorg server can get hosed if you change the hostname while a xorg server is running. Make sure you set a static hostname: https://wiki.archlinux.org/title/Networ … e_hostname

Last edited by V1del (2022-11-25 13:06:40)

Offline

#3 2022-11-25 15:04:37

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 27,802
Website

Re: [Solved] No X11 applications working whatsoever

The context suggests this is for X11 forwarding over ssh, right?  Please describe the setup: the machine labeled "archlinux" in the output above is the remote machine, right?  What is the local client machine?  You're running Xorg on the local machine and configured X11 forwarding on the client, right?  If so, describe how.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2022-11-25 16:22:17

leouscin
Member
Registered: 2022-11-25
Posts: 9

Re: [Solved] No X11 applications working whatsoever

V1del wrote:

What's your output of

hostnamectl

? Seeing @archlinux makes me think of transient hostnames and the connection to the xorg server can get hosed if you change the hostname while a xorg server is running. Make sure you set a static hostname: https://wiki.archlinux.org/title/Networ … e_hostname

The output is

[leouscin@archlinux ~]$ hostnamectl
 Static hostname: archlinux
         Icon name: computer-laptop
         Chassis: laptop ?      
         Machine ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
         Boot ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
         Operating System: Arch Linux                      
         Kernel: Linux 6.0.9-arch1-1
         Architecture: x86-64
         Hardware Vendor: HUAWEI
         Hardware Model: RLEF-XX
 Firmware Version: 1.22

Last edited by leouscin (2022-11-25 16:52:44)

Offline

#5 2022-11-25 16:28:45

seth
Member
Registered: 2012-09-03
Posts: 35,092

Re: [Solved] No X11 applications working whatsoever

Assuming OP isn't trying to forward X11 on ssh and that's just teh result of a wild google search wrt xauth

loginctl session-status # my money is on this being a wayland session and xwayland not available

Last edited by seth (2022-11-25 16:29:02)

Offline

#6 2022-11-25 16:40:27

leouscin
Member
Registered: 2022-11-25
Posts: 9

Re: [Solved] No X11 applications working whatsoever

Trilby wrote:

The context suggests this is for X11 forwarding over ssh, right?  Please describe the setup: the machine labeled "archlinux" in the output above is the remote machine, right?  What is the local client machine?  You're running Xorg on the local machine and configured X11 forwarding on the client, right?  If so, describe how.

Essentially I want to be able to install matlab on my system.
When I contacted support and showed them my problem and my console output they replied this:

Please note that Arch Linux is not listed as system requirements for MATLAB R2022b.
Still, I suggest you try this solution, please run this command on Linux terminal:
xhost +SI:localuser:root

If this command is not available in your Terminal, try installing the xorg-xhost or xorg package to get the display server.
Then try running this command again and if successful, try running the installer as root.

Now because matlab install is throwing the same error as everything that's related to xorg, xauth, ssh, xhost etc I'm assuming the installation script is trying to remotely connect somewhere. That's probably why they suggested to me that I try running xhost first to see if that works. Again, I've been googling myself through all of these errors and nothing really worked.
To answer all your questions:
1. The context suggests this is for X11 forwarding over ssh, right? - I'm not sure but I think so
2. The machine labeled "archlinux" in the output above is the remote machine, right? - No, it's my local laptop
3. What is the local client machine? - My home laptop
4. You're running Xorg on the local machine and configured X11 forwarding on the client, right? - Yes, apparently, but only because it was listed as one of the possible solutions to the problem. I can reverse those changes.
Like I said before, I think I have to somehow generate the .Xauthority file so xauth list would create an output. I have tried a couple of things but apparently not the right ones.

Last edited by leouscin (2022-11-25 16:48:12)

Offline

#7 2022-11-25 16:43:51

leouscin
Member
Registered: 2022-11-25
Posts: 9

Re: [Solved] No X11 applications working whatsoever

seth wrote:

Assuming OP isn't trying to forward X11 on ssh and that's just teh result of a wild google search wrt xauth

loginctl session-status # my money is on this being a wayland session and xwayland not available

That first statement sound about right.

[leouscin@archlinux ~]$ loginctl session-status
2 - leouscin (1000)
           Since: Fri 2022-11-25 16:18:05 UTC; 23min ago
          Leader: 650 (sddm-helper)
            Seat: seat0; vc2
             TTY: tty2
         Service: sddm; type wayland; class user
         Desktop: KDE
           State: active
            Unit: session-2.scope
                  ├─650 /usr/lib/sddm/sddm-helper --socket /tmp/sddm-auth15651b49-ed2e-4863-b46b-2bb4e81cf240 --id 1 --start "/usr/lib/plasma>
                  ├─663 /usr/bin/kwalletd5 --pam-login 6 8
                  └─664 /usr/bin/startplasma-wayland

Nov 25 16:18:06 archlinux systemd[1]: Started Session 2 of User leouscin.
Nov 25 16:18:06 archlinux sddm-helper[662]: pam_kwallet5: final socket path: /run/user/1000/kwallet5.socket
Nov 25 16:18:06 archlinux sddm-helper[664]: Jumping to VT 2
Nov 25 16:18:06 archlinux sddm-helper[664]: VT mode didn't need to be fixed

Offline

#8 2022-11-25 16:53:18

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,127

Re: [Solved] No X11 applications working whatsoever

See https://wiki.archlinux.org/title/Wayland#XWayland. You need to install xwayland, as seth said.

Edit: In case you've not looked at it, https://wiki.archlinux.org/title/MATLAB#Installation may be helpful when you've got xwayland installed.

Last edited by cfr (2022-11-25 16:57:04)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#9 2022-11-25 16:58:19

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 27,802
Website

Re: [Solved] No X11 applications working whatsoever

leouscin wrote:

1. The context suggests this is for X11 forwarding over ssh, right? - I'm not sure but I think so

No.  You are not shelling into one computer from another, and there is no such thing required to install matlab.

If this is just about some client programs failing to run on your current graphical session you should tell is about about that session: how do you start / launch KDE.  Are KDE programs starting (e.g., filemanager, etc).  I'd also second / third seth's prediction (that you are not running a Xorg session and Xwayland is not enabled or functioning properly - though I'd expect kde/plasma to run xwayaland automatically).

Last edited by Trilby (2022-11-25 16:59:33)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#10 2022-11-25 17:15:44

leouscin
Member
Registered: 2022-11-25
Posts: 9

Re: [Solved] No X11 applications working whatsoever

cfr wrote:

See https://wiki.archlinux.org/title/Wayland#XWayland. You need to install xwayland, as seth said.

Edit: In case you've not looked at it, https://wiki.archlinux.org/title/MATLAB#Installation may be helpful when you've got xwayland installed.

Xwayland got installed alongside 50 other packages when I ran pacman -S xorg. Just to be sure I ran pacman -S xorg-xwayland, but it didn't help in anyway.
The comment about matlab seemed the closest to the core problem I'm fighting with but unfortunately also a dead-end.

[leouscin@archlinux matlab_R2022b_glnxa64]$ ./install
Authorization required, but no authorization protocol specified
terminate called after throwing an instance of 'framework::window::DisplayError'
  what():  No display available.
Aborted (core dumped)
[leouscin@archlinux matlab_R2022b_glnxa64]$ ./bin/glnxa64/MATLABWindow 
./bin/glnxa64/MATLABWindow: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
[leouscin@archlinux matlab_R2022b_glnxa64]$ sudo pacman -S libgtk
error: target not found: libgtk
[leouscin@archlinux matlab_R2022b_glnxa64]$ sudo pacman -S libgtk-x11-2.0.so.0
error: target not found: libgtk-x11-2.0.so.0

Now as I'm writing this I'm simultaneously continuing my own research to the problem, so mavbe I'll find something when I dive deeper into your suggestions. In the meantime thank you all for the quick replies you guys are writing to help me out.

Offline

#11 2022-11-25 17:32:19

leouscin
Member
Registered: 2022-11-25
Posts: 9

Re: [Solved] No X11 applications working whatsoever

Trilby wrote:
leouscin wrote:

1. The context suggests this is for X11 forwarding over ssh, right? - I'm not sure but I think so

No.  You are not shelling into one computer from another, and there is no such thing required to install matlab.

If this is just about some client programs failing to run on your current graphical session you should tell is about about that session: how do you start / launch KDE.  Are KDE programs starting (e.g., filemanager, etc).  I'd also second / third seth's prediction (that you are not running a Xorg session and Xwayland is not enabled or functioning properly - though I'd expect kde/plasma to run xwayaland automatically).

Also an interesting answer. It even seems that your are right
1. How do you start / launch KDE? - I don't do it manually. As far I can tell it launches automatically on startup.
2. Are KDE programs starting? - The filemanagers (Dolphin and Thunar) both run smoothly. What's interesting however is that the NetworkManager never starts on startup. I have to run sudo NetworkManager --run-from-build-dir every time after I boot.
3. Xwayland is not enabled or functioning properly - This seems to be the case. I get the following output:

[leouscin@archlinux ~]$ Xwayland
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(EE) 
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE) 

Shall I run Xwayland with any specific command line arguments?

Offline

#12 2022-11-25 17:49:35

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 27,802
Website

Re: [Solved] No X11 applications working whatsoever

That library is part of gtk2, which if you install matlab correctly will be pulled in as a dependency.  Is there a reason you aren't using one of the AUR packages for matlab?

Also, your title / intro to this thread said no X11 applications work.  But you've been focused on this odd matlab installer (which I'd not bother with in the first place).  That an scrot failing - but I'm not sure that's expected to work with xwayland, it certainly will not do what you likely expect it to do.

leouscin wrote:

Shall I run Xwayland with any specific command line arguments?

No.  Your compositor should be configured to run xwayland if needed.  But first, show the output of the command seth requested (edit: oops, sorry, how'd I miss that, it does confirm wayland is used.)

Last edited by Trilby (2022-11-25 20:24:27)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#13 2022-11-25 19:54:48

seth
Member
Registered: 2012-09-03
Posts: 35,092

Re: [Solved] No X11 applications working whatsoever

The session-status is in #7 (capped, because it's copypasted out of the pager) but wrt

Trilby wrote:

you've been focused on this odd matlab installer

Can you run eg. xterm from https://archlinux.org/packages/extra/x86_64/xterm/ ?
(scrot is not necessarily the best test case, a screenshot utility isn't your average X11 client)

Second: can you log into a plasma X11 session?

Offline

#14 2022-11-25 23:12:09

leouscin
Member
Registered: 2022-11-25
Posts: 9

Re: [Solved] No X11 applications working whatsoever

Trilby wrote:

That library is part of gtk2, which if you install matlab correctly will be pulled in as a dependency.  Is there a reason you aren't using one of the AUR packages for matlab?

Also, your title / intro to this thread said no X11 applications work.  But you've been focused on this odd matlab installer (which I'd not bother with in the first place).  That an scrot failing - but I'm not sure that's expected to work with xwayland, it certainly will not do what you likely expect it to do.

leouscin wrote:

Shall I run Xwayland with any specific command line arguments?

No.  Your compositor should be configured to run xwayland if needed.  But first, show the output of the command seth requested (edit: oops, sorry, how'd I miss that, it does confirm wayland is used.)

I know I've been focused on this matlab installer but I'd also like screenshots to work. The problem seems to be that certain display functions aren't working the way they should. I think if I can fix that it'll automatically fix all the things I've explained in the post matlab, screenshots etc.
Installation of matlab through the AUR packages seems to have more problems than installing it from the official mathworks website:

[leouscin@archlinux matlab]$ ./install.sh
unzip:  cannot find or open matlab_*_glnxa64.zip, matlab_*_glnxa64.zip.zip or matlab_*_glnxa64.zip.ZIP.

No zipfiles found.
mv: cannot stat 'matlabroot/bin/glnxa64/libfreetype.so.6': No such file or directory
./install.sh: line 6: ./matlabroot/install: No such file or directory
mv: cannot stat 'matlab/*/*': No such file or directory
rmdir: failed to remove 'matlab/*': No such file or directory
tar: matlab: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
==> Making package: matlab 9.13.0.2049777-3 (Fri 25 Nov 2022 11:10:16 PM UTC)
==> Checking runtime dependencies...
==> Installing missing dependencies...
error: target not found: matlab-meta
==> ERROR: 'pacman' failed to install missing dependencies.
==> Missing dependencies:
  -> matlab-meta
==> Checking buildtime dependencies...
==> ERROR: Could not resolve all dependencies.
[leouscin@archlinux matlab]$ sudo ./install.sh
unzip:  cannot find or open matlab_*_glnxa64.zip, matlab_*_glnxa64.zip.zip or matlab_*_glnxa64.zip.ZIP.

No zipfiles found.
mv: cannot stat 'matlabroot/bin/glnxa64/libfreetype.so.6': No such file or directory
./install.sh: line 6: ./matlabroot/install: No such file or directory
mv: cannot stat 'matlab/*/*': No such file or directory
rmdir: failed to remove 'matlab/*': No such file or directory
tar: matlab: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
==> ERROR: Running makepkg as root is not allowed as it can cause permanent,
catastrophic damage to your system.

Offline

#15 2022-11-25 23:49:16

leouscin
Member
Registered: 2022-11-25
Posts: 9

Re: [Solved] No X11 applications working whatsoever

seth wrote:

The session-status is in #7 (capped, because it's copypasted out of the pager) but wrt

Trilby wrote:

you've been focused on this odd matlab installer

Can you run eg. xterm from https://archlinux.org/packages/extra/x86_64/xterm/ ?
(scrot is not necessarily the best test case, a screenshot utility isn't your average X11 client)

Second: can you log into a plasma X11 session?

YOU ARE THE MAN!
Almost everything works now.
Just to clarify, there's still a problem with Xwayland, it still throws the following error:

[leouscin@archlinux matlab_R2022b_glnxa64]$ Xwayland
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(EE) 
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE) 

HOWEVER,
I've rebooted my pc and started a KDE session on plasma-X11 instead of plasma-Xwayland which I now realize makes sense to do because like I said most of my problems seemed to have something to do with X11 not running. OBVIOUSLY it wasn't because Xwayland was running. I understand now that (and please correct me if I get this wrong) KDE has at least 2 seperate sub-display-managers (Xwayland and X11) and it's important to know which one is running for running display applications.
It seems that was one thing I had no knowledge about.
The following problems have been solved:

1. Matlab is officially installing - the ./install command didn't throw an error after I fixed it using the guide from https://wiki.archlinux.org/title/MATLAB … pplication
2. xhost works
3. Taking screenshots using scrot works
4. xauth list is no longer empty

I feel kinda stupid now but thank you all for the help!

EDIT: How do I mark this thread as solved?

Last edited by leouscin (2022-11-26 07:44:02)

Offline

#16 2022-11-26 00:11:56

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,127

Re: [Solved] No X11 applications working whatsoever

leouscin wrote:

Just to clarify, there's still a problem with Xwayland, it still throws the following error:

[leouscin@archlinux matlab_R2022b_glnxa64]$ Xwayland
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(EE) 
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE) 

xwayland is not designed to run in an X11 session. (I'm not sure it is designed to be run directly even in wayland.)

leouscin wrote:

HOWEVER,
I've rebooted my pc and started a KDE session on plasma-X11 instead of plasma-Xwayland which I now realize makes sense to do because like I said most of my problems seemed to have something to do with X11 not running. OBVIOUSLY it wasn't because Xwayland was running. I understand now that (and please correct me if I get this wrong) KDE has at least 2 seperate sub-display-managers (Xwayland and X11) and it's important to know which one is running for running display applications.

There are two graphical environments. One is X11. The other, newer one is Wayland. Xwayland allows you to run (some?) X applications in a Wayland session. If you've installed all the necessary stuff, you can choose to run KDE as an X11 session or as a Wayland session. If you run it as a Wayland session, you may find xwayland useful; if you run it as an X11 session, you won't.

But this isn't really to do with KDE. KDE has just been modified to run on Wayland as an alternative to X11. Some desktop environments work on one, some on both. Look up Wayland and X11 in the wiki for more information.

Eventually, they say Wayland will replace X. Right now, you will probably find one or the other works better for you. (When I tried to run KDE on Wayland, it didn't work at all, even though Fedora had silently switched the default to Wayland. Doubtless that experience has biased my views.)

leouscin wrote:

EDIT: How do I mark this thread as solved?

Edit your original post and change the title to add the tag.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#17 2022-11-26 00:23:48

leouscin
Member
Registered: 2022-11-25
Posts: 9

Re: [Solved] No X11 applications working whatsoever

cfr wrote:
leouscin wrote:

Just to clarify, there's still a problem with Xwayland, it still throws the following error:

[leouscin@archlinux matlab_R2022b_glnxa64]$ Xwayland
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(EE) 
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE) 

xwayland is not designed to run in an X11 session. (I'm not sure it is designed to be run directly even in wayland.)

leouscin wrote:

HOWEVER,
I've rebooted my pc and started a KDE session on plasma-X11 instead of plasma-Xwayland which I now realize makes sense to do because like I said most of my problems seemed to have something to do with X11 not running. OBVIOUSLY it wasn't because Xwayland was running. I understand now that (and please correct me if I get this wrong) KDE has at least 2 seperate sub-display-managers (Xwayland and X11) and it's important to know which one is running for running display applications.

There are two graphical environments. One is X11. The other, newer one is Wayland. Xwayland allows you to run (some?) X applications in a Wayland session. If you've installed all the necessary stuff, you can choose to run KDE as an X11 session or as a Wayland session. If you run it as a Wayland session, you may find xwayland useful; if you run it as an X11 session, you won't.

But this isn't really to do with KDE. KDE has just been modified to run on Wayland as an alternative to X11. Some desktop environments work on one, some on both. Look up Wayland and X11 in the wiki for more information.

Eventually, they say Wayland will replace X. Right now, you will probably find one or the other works better for you. (When I tried to run KDE on Wayland, it didn't work at all, even though Fedora had silently switched the default to Wayland. Doubtless that experience has biased my views.)

leouscin wrote:

EDIT: How do I mark this thread as solved?

Edit your original post and change the title to add the tag.

Alright, thanks for the clarification.

Offline

Board footer

Powered by FluxBB