Linux Application on Ubuntu Server

I have a Linux app developed with Xojo 2023R4 that normally runs on Ubuntu Desktop and presents about a dozen user entry and response dialogs. For a special case usage of that app, I would like to run it on Ubuntu Server so I added a command line interface and suppress those dialogs.

When I attempt to run the application on Ubuntu Server , I get “Gtk-WARNING cannot open display” error even though no dialog is displayed. Is there a way to suppress this error so the application can run.

The “ldd AppName” command indicates all required libraries are present.

I understand this app could be implemented in a console application, but that seems like a lot of extra work to write and maintain for this rather special case usage.

Any ideas?

I suspect that this will always be an issue since the Desktop App type will always try to load some GUI elements for its platform - meaning that it will affect Windows, Mac, and Linux.

The only way around this is to create anew app that is of the Console app type and then move the non-UI code into the new project.

I suspect you are right that a conversion project to a console app is the only solution. Since that likely exceeds the budget for this special case and an application seems to work on Windows server and macOS Command line environments, I was hoping that something simple might do the trick on Linux. The executable runs from a Linux terminal on Ubuntu Desktop, but gives that Gtk-WARNING on Ubuntu Server and doesn’t run.

The difference is that macOS and windows both have a UI by default. If you used ssh to log into either of these OSs for a user who was not logged into to UI and tried to run your app, I bet your results would be different.