Question about X11

There are X11 libraries available on Haiku. I was able to build FLTK from source after installing the development packages for the needed X11 libraries. But when I try to start an app in the terminal I get the error message "Can’t open display: ", comimg from FLTK because XOpenDisplay() failed. In some older discussions I read that Haiku has no X server, but what’s the point of all the X libraries then?

Compatibility with some code.

That features would work if some does an implementation of a X11 server, emulated in a window or just coded for the system.

To make it possible to port an X11 server, like XSDL:

Or to run x11 programs from Haiku trough ssh on a Linux host where X11 already available.

Honestly we really should drop all the X11 libraries. @mmu_man added the first of them, but I don’t know why?

I have a native FLTK port started, but it’s not finished. See here.

Well, yes and no (although it can sometimes be useful) :

Because libXpm. Yes, I needed libXpm for my (native!) XEmacs port and this crap requires all of the X11 libs. :tired_face:

The other option is to patch it like they did for AmigaOS but it’s ugly and I’m not sure it’d be accepted upstream. Or maybe if it’s done in a clean enough way…

You could test by ssh -X from a Linux machine, for example. But in general there is a lot of useless stuff in haikudepot now. A mix of laziness, people going “oh shiny!” and porting some lib for no reason, and too much automation of getting packages to the users without checking if they are useful.

I agree the X11 libs should be removed, and XEmacs should use translators to open its icons, just like gvim does.

2 Likes

As they are the “only” way to get a x11-dependant app to work on, i dont see much reason to remove them right now. I know that porting those imply having an x11 server ported to get along too,but apps may be missing.

Guess almost 99% of those apps are not going to be ported tho, cause most are old but… still.

Btw, i tried to forward the display requirements in a Haiku machine to a Xming display server (X11 on windows), a Mobaxterm display server(another one) and a Debian x11 server without success, in two steps:

  • Authentication failing
  • Protocol failing (operation not supported) if auth was disabled.

So unless i misconfigured some values, right now forwarding to a X11 server doesnt work either.

Gimp and Inkscape are useful apps for me. I believe they still require an X11 server running? (I use them on Mac with XQuartz)… There was a (primitive) X11 server for BeOS…could be interesting to see if we could get the code and get an X11 server working on Haiku, no?

1 Like

Iirc, both depend on GTK libraries which may or may not depend on other backends. I compiled gtk3 with support for broadway backend in Haiku (stopped it there).

Unfortunately, GTK is a mess with configuration and config files, so to get something big working above it, we would need to setup its basic fonts/themes and yada yada in the expected paths.

In the long road, having a native version of gtk (faking headers) would be easier/shorter than compiling all that mess.

Despite all the efforts put in the Qt port, I think it still does not do justice to Haiku and the simplicity of native apps. It tries to integrate, but you can still see the apps are much slower to start, that there are dozen of dependencies installed, etc.

Porting X11apps with a running X11 server would be even worse, most likely. You may argue that it is somewhat ok as a transition, until we get native apps. But I think the time would be more wisely invested into writing native apps. That’s only my choice however, so I apply it in the code I write myself, and I am happy to use Qt apps in some cases.

2 Likes

While I mostly agree… Native apps FTW… I would actually like it to be possible to more easily find Native applications in HaikuDepot as a way of promoting them rather than limiting toolkit options needlessly. It’s better to build up on strengths, and provide an easy path to native applications rather than shoot yourself in the foot by limiting options or being patronizing in UI design.

Providing a basic rootless X11 server would be a nice option to have, not as an end goal but as a midway point in a port… basically the same Pros/Cons as QT. It would also be handy for the occasional ssh -X obviously there are even some old Electronic gear that run on X (HP/Agilent mostly) that would be neat to use from Haiku.

3 Likes

Hi @cb88; There is a ticket for this; I am trying to get some other stuff done in there at the moment, but hope to get to this at some point! It is a good idea.

1 Like

+1 Just to flesh out this: the cool thing about a basic rootless X11 server is that you can run apps like Gimp and Inkscape that are running from a remote linux machine (nothing needs to be installed on Haiku) when you ssh -X into the remote linux.

1 Like

Yup. We know that native always beat ported software (specially dependencies issue).
But Haiku isnt going to have a native alternative for all software that is released right now (wish it was so easy).

So it’s probably going to have a balanced amount of both (or unbalanced towards native), with the right focus on native if creating a new application.

On the X11 server specific topic, i dont know. Maybe having one doesnt hurt, but wont probably be used much, i think.
For all the specified software on the topic (GTK based) you can have a fake broadway backend (using haiku ui toolkit) and every app could run into its own window, within the os itself. The problem is that many of them depend on GTK and other libraries that are not ported, or are a bit old, or mean having a lot of gtk-like libraries to port one by one.

(^^ Voluntary skipping again talking about the GTK expected paths being “wrong” from a Haiku point of view)

X11 programs are so ubiquitous that they can be displayed anywhere, run anywhere. If the port is viable, keep it.

That would be unnecessarily harsh, in my opinion. I mean they don’t do any harm by just being there, do they? :wink:

On the topic of an X server on Haiku I don’t think it is badly needed or should have a high priority. But still it would be quite cool to have it. I’ve got some old unix workstations and it would be fun to connect to them from Haiku over XDMCP.

i would drop x11 completely. we have a different and potentially better means of running remote desktop and Qt affords us plenty in terms of good portable apps already. there’s enough without adding the whole history of desktop unix and all its mess.

1 Like

You’re jumping the gun there… Haiku doesn’t actually have “X11” in even remotely the same sense as Linux or BSD, it has it in the same sense as Windows has it… so its not like there is something to drop from Haiku itself at all… as Haiku doesn’t natively do X11.

2 Likes

I am pretty sure he meant this: https://github.com/haikuports/haikuports/tree/master/x11-libs

They clutter the list of packages in HaikuDepot and eventually accidentally get linked in to apps, instead of people properly cleaning the unneeded stuff from there.

1 Like