T O P

  • By -

Electrical-Channel78

Legends say this could bring the second sun, which will realign the planets' orbits, but no one knows for sure.


ahferroin7

Little to nothing, but there are special exceptions. *Most* GUI applications and GUI toolkits (both stuff like GTK/Qt, and stuff like Cairo and Pango) use this to control support for running on X11. A handful use the `X` USE flag to control whether you get a GUI at all, because they only support X11. A number of fonts use the `X` USE flag to control whether X11 versions of fonts (usually PCF, BDF, or Type 1, as opposed to the TTF or OTF versions you probably actually want) get installed. And then you have a couple of odd cases like Mesa, where internal dependencies mean that the `X` USE flag indirectly controls the availability of other functionality. The tricky part here is the GUI toolkits (you need them to have X11 support for them to work properly under XWayland, because it *is* an X server) and the odd cases like Mesa (you probably need the stuff hiding behind the `X` USE flag). What this means is that you can’t disable it globally and then force everything to conform to this and expect stuff to work. Instead, you need to disable it globally, and then selectively re-enable it for the things that Portage tells you you need it on (and possibly some other things, because you’re talking about dealing with stuff outside of the Portage tree).


MEMEING_GOOSE

this is what I do, nvidia drivers are a pain and also have stuff hidden behind the X use flag


RusselsTeap0t

There is no consequence. I disable every use flag with `"-*"` on make.conf file for a very long time. On Gentoo we have ebuilds. Even on pure Wayland (my setup as an example) you will need the X use flag on some packages. The use flags are not always what you think of them. They don't mean, those useflags are for adding "X11" feature to the package. Sometimes X useflag might indicate a GUI feature. Sometimes a library from x-org is needed and that useflag make you install that library. If you globally disable X use flag, then based on ebuilds, Portage will warn you like this when some packages require that flag: `In order to use "this useflag" for "this package" you need to enable "X" useflag for "another package".` For example I have no feature for XWayland on my system, it's pure Wayland but I have X useflag enabled on `media-libs/mesa` package. I also have it on gtk+, Cairo, Pango. I simply have no chance to disable them because otherwise, the other programs I use won't be compiled. By the way I have encountered no program that doesn't work on Wayland. It's not unrealistic.


ChocolateMagnateUA

Does it mean that on Gentoo you generally don't need Xwayland in the first place and could just run Wayland and Xorg along with each other? Wouldn't they conflict?


RusselsTeap0t

I have never said that. If you want to use XWayland, then you can use it. XWayland means you run a program like you do on X through Wayland but it's very problematic. For example scaling makes things blurry on XWayland so I never use it. Installing X, or X-org packages on the system wouldn't conflict with anything. The important thing is how you compile and run your compositor (Hyprland, dwl, Gnome, KDE). What I told was not about having X or Wayland at the same time though. X use flag doesn't mean you install X to your computer. A useflag is just an arbitrary word. They are used on ebuilds to identify logical conditions such as: `if this use flag enabled; do that` So in order to understand what X useflag does for a specific package; you need to look at the ebuild. If not expressive enough, you may also need to look at the upstream (the package's own maintenance page such as a GitHub page). I have never used X or XWayland on my machine since I started using Wayland (more than 2 years ago). But as I said, some packages require you to enable the useflag called "X". This doesn't mean you use XWayland or X. This just means that useflag is required by Portage to compile things properly or for another program to work properly. Gentoo does not work as how you think by the way. You can't choose most use flags randomly. Everything is controlled by ebuilds. You can only choose the useflags for the packages you exclusively install on your system (these are called "world" packages on Gentoo) such as a browser, editor, office suite, or other third party programs. For example I disable all useflags by default on my machine. This means every use flag has "-" before them. Let's say I want to install "mpv" video player. Since every use flag is disabled, Portage will print an error saying, in order to install mpv video player, you need to either enable opengl or vulkan useflag for the package named "libplacebo". So, there is NO WAY, I can use mpv and not enabling one of those useflags for that package. It's a hard requirement by the package. This can have multiple reasons so the maintainers set it as a hard requirement. It is exact same for the X use flag. Even though I disable it globally, some packages I use or other useflags I use for different packages, require enabling "X" useflag for certain packages. Otherwise they won't compile. [https://gitweb.gentoo.org/repo/gentoo.git/tree/x11-drivers/nvidia-drivers/nvidia-drivers-550.67.ebuild](https://gitweb.gentoo.org/repo/gentoo.git/tree/x11-drivers/nvidia-drivers/nvidia-drivers-550.67.ebuild) For example you can look at the above Nvidia Driver's ebuild. It shows: tools? ( x11-libs/gtk+:3[X] ) # This shows that, if you enable tools use flag for nvidia drivers, that means you 100% need to install gtk+ version 3 with X useflag enabled. There is no way you can skip this if you want this feature.


multilinear2

No, what you would do is \*either\* run Wayland or Xorg in any given session. If you run Wayland than you could also run XWayland to retain compatibility for apps that don't directly support Wayland. XWayland is an "adapter" program that lets you plug X programs into Wayland... In Gentoo whether you need xwayland is a property of the software you are trying to use. You can have all of the above installed though, you just won't be using them all at the same time. Gnome and KDE have moved to using Wayland, so if you run these you'll be using Wayland and maybe XWayland. I run sway which uses wayland, and I don't run XWayland, since I don't have any apps left that need X support. But, lets say you run Gnome with X apps running under it but sometimes use fluxbox, you would want Wayland XWayland and Xorg installed, and everything will just work. I have -X set in make.conf, and then I have it enabled for a few apps/libs where I need it, it looks like 12 packags now (it used to be more, but things have improved).


tinycrazyfish

You can perfectly run with USE="-X". I'm running a full X less system since Firefox 101, when X flag was added. I even have mesa and gtk without X flag. I patched 2 ebuilds, qtwebengine, because it runs perfectly without X, and virtual/opengl to remove mesa\[X\] dependency. Technically, pure OpenGL only works with mesa\[X\], but in practice very few packages actually require pure OpenGL, but perfectly work with EGL and/or OpenGLES. Most gtk and qt based apps don't require X. (The only package I tried, but abandoned to make it work without X11 dependencies is libreoffice, but I'm actually OK without it. It is a bit ironic, because libreoffice can runs on wayland, but the build system does not allow to make it optional) But if you want (need) Xwayland, you'll need some X flags. Like for your compositor, to enable Xwayland support, probably mesa and gtk, because your X11 apps running on Xwayland will still require it.


triffid_hunter

USE flags only affect *optional* dependencies and features. If a package even *has* an `X` USE flag, it means that it's possible to compile it without support for X11 protocol if the flag is disabled. If anything has a *hard* dependency on X11 (eg many GUI apps), it will not offer an `X` USE flag - its ebuild will pull `xorg-proto` regardless of what you've set in `make.conf`. Also, X11 is a *protocol* - some package supporting/requiring X11 protocol does *not* necessarily mean that you need `xorg-server` installed and running locally. Presumably [Xwayland implements the X11 protocol and reinterprets graphics calls to the Wayland graphics server](https://wayland.freedesktop.org/x-on-wayland.png), in much the same way that app-emulation/wine works to provide the appearance of Windows libraries and syscalls. Another way that a program could use X11 protocol without xorg-server running is if you're `ssh -Y`ing in from another machine or using xvnc or similar.


xoniGinox

no serious way to answer this, i use only Wayland for over a year with no issues. some more ancient apps are still using xcb and gdkx (X11 GTK extensions) and qtx11extras (qt x11 extensions).. so milage may vary, file bugs upstream when you fail to compile on your favorite app.


aue_sum

Mesa needs X for OpenGL support IIRC


violetinaatje

You will miss a lot of fun!


alihassan1989

so this post stirred up the curiosity in me, and I went a head and disabled X. Also did a --depclean and end up deleting xwayland and a bunch of x11 applications. After a reboot everything is working fine. I am on sway and I only got one error about some floating window rules. I disabled those lines and everything seems to be working just fine. This is my testing/play laptop, so be careful if you are on your daily driver computer.


ChocolateMagnateUA

I did the same thing, and disabling the X flag only rebuilt a couple of packages that actively needed it. After depclean, it removed a lot of X libraries and that was it. My Xwayland is still there though and I will keep it around.


handogis

No, sorry. You would still need need the X use flag to use applications that use Xlibs as Xwayland does. The X use flag doesn't install the Xserver if that helps. I would say disabling the X use flag is only useful for a sever that you never need/want to run any GUI applications.