bugGNU Octave - Bugs: bug #65251, Octave needs Xwayland for...

 
 

bug #65251: Octave needs Xwayland for launching despite being a native Wayland application

Submitter:  itshog <itshog>
Submitted:  Sun 04 Feb 2024 11:59:32 AM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Need Info Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * 8.4.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 04 Feb 2024 05:17:13 PM UTC, comment #6: 

comment #5:

> In the old days, a reasonable way to do that on a Unix-like system was to check whether the DISPLAY environment variable was set.
>

Could Octave perform the same check with the WAYLAND_DISPLAY environment variable? Then, instead of trying to open the X11 display it should try to connect to the wayland compositor in use, or do whatever the wayland equivalent of "trying to open the display" is.

itshog <itshog>
Sun 04 Feb 2024 05:05:22 PM UTC, comment #5: 

When Octave starts, it tries to determine whether there is a graphical display available.  If there is, it attempts to open the graphical user interface.  Otherwise, it attempts to open a command-line interface in a terminal.

In the old days, a reasonable way to do that on a Unix-like system was to check whether the DISPLAY environment variable was set.

The code is here:  http://hg.savannah.gnu.org/hgweb/octave/file/4b99c92fc2b2/src/display-available.c

There are currently three separate ways we attempt to detect whether a graphical display is available.  The code path to use is selected by the configuration variables OCTAVE_USE_WINDOWS_API, HAVE_FRAMEWORK_CARBON, and HAVE_X_WINDOWS.  If we need another special case for Wayland, what should the code be and how do we detect that case?

See also

http://hg.savannah.gnu.org/hgweb/octave/file/4b99c92fc2b2/libinterp/corefcn/cdisplay.c

http://hg.savannah.gnu.org/hgweb/octave/file/4b99c92fc2b2/configure.ac#l1784

http://hg.savannah.gnu.org/hgweb/octave/file/4b99c92fc2b2/configure.ac#l1804

http://hg.savannah.gnu.org/hgweb/octave/file/4b99c92fc2b2/oct-conf-post-private.in.h#l54



John W. Eaton <jwe>
Group administrator
Sun 04 Feb 2024 04:46:47 PM UTC, comment #4: 

comment #3:

> What do you mean by "latest source"? Does building Octave 9 (from the "stable" branch) work?
> How did you configure Octave?
> Did you build the GUI against Qt6? Does it open (ignoring the failing test)?


These are the commands I used to build Octave:

hg clone https://hg.octave.org/octave
cd octave
hg update stable
./bootstrap
mkdir .build && cd .build
./../configure --prefix=$HOME/my_octave
make -j$(nproc)
make check
make install

Anyway, ignoring the tests, when I run

./run-octave --gui

from the .build directory I get the same behaviour that I reported before: despite being a native wayland application, the Octave GUI (even when built with qt6) refuses to open if Xwayland is not available.

itshog <itshog>
Sun 04 Feb 2024 03:36:42 PM UTC, comment #3: 

What do you mean by "latest source"? Does building Octave 9 (from the "stable" branch) work?
How did you configure Octave?
Did you build the GUI against Qt6? Does it open (ignoring the failing test)?

Markus Mützel <mmuetzel>
Group administrator
Sun 04 Feb 2024 03:08:07 PM UTC, comment #2: 

comment #1:

> Is this still an issue if you build Octave 9 with Qt6?
>


I'm currently unable to build from latest source on Arch Linux. When running "make test" following the instructions here it segfaults at "libinterp/octave-value/ov-class.cc-tst".

Also, I got two warning during compilation about "libGraphicsMagick++.la" and "libGraphicsMagick.la" being moved.

itshog <itshog>
Sun 04 Feb 2024 01:44:51 PM UTC, comment #1: 

Is this still an issue if you build Octave 9 with Qt6?

Markus Mützel <mmuetzel>
Group administrator
Sun 04 Feb 2024 11:59:32 AM UTC, original submission:  

Trying to launch the GUI in an environment without Xwayland results in the following warnings:


octave: X11 DISPLAY environment variable not set
octave: disabling GUI features


After the warnings the CLI version is launched instead.

When Xwayland is available but not running (for instance, when using Sway with "xwayland enable" in the configuration file, which automatically launches Xwayland when an application needs it) the GUI launches normally as a native wayland window, and after a few seconds the Xwayland process is automatically terminated. So, if I understand correctly, Octave doesn't actually need Xwayland for running, and only makes use of it during the startup phase: would it be possible to remove this dependency on Xwayland, making it possible to use Octave in pure wayland environments?

itshog <itshog>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by itshog (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-02-04 mmuetzel StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code