linux, "Open Outside MATLAB" not work
15 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
debian12+kde5(wayland/x11) and also debian12+gnome, MATLAB 2025a update1(and also 2024b).
When I right-click on the MATLAB file browsing window to execute "Open outside MATLAB", there is no response, and when I open the Linux log('sudo journalctl -f'), I find the error as follows
Aug 21 07:12:24 debian plasmashell[8435]: qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
Aug 21 07:12:24 debian plasmashell[8435]: qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
Aug 21 07:12:24 debian plasmashell[8435]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Aug 21 07:12:24 debian systemd-coredump[8437]: [] Process 8435 (kde-open5) of user 1000 dumped core.
Module libudev.so.1 from deb systemd-252.38-1~deb12u1.amd64
Stack trace of thread 8435:
#0 0x00007f4ed0ea9eec n/a (libc.so.6 + 0x8aeec)
#1 0x00007f4ed0e5afb2 raise (libc.so.6 + 0x3bfb2)
#2 0x00007f4ed0e45472 abort (libc.so.6 + 0x26472)
#3 0x00007f4ed149c5e5 _ZNK14QMessageLogger5fatalEPKcz (libQt5Core.so.5 + 0x9c5e5)
#4 0x00007f4ed1b11114 _ZN22QGuiApplicationPrivate25createPlatformIntegrationEv (libQt5Gui.so.5 + 0x111114)
#5 0x00007f4ed1b1154b _ZN22QGuiApplicationPrivate21createEventDispatcherEv (libQt5Gui.so.5 + 0x11154b)
#6 0x00007f4ed15d34d0 _ZN23QCoreApplicationPrivate4initEv (libQt5Core.so.5 + 0x1d34d0)
#7 0x00007f4ed1b1247c _ZN22QGuiApplicationPrivate4initEv (libQt5Gui.so.5 + 0x11247c)
#8 0x00007f4ed217612f _ZN19QApplicationPrivate4initEv (libQt5Widgets.so.5 + 0x17612f)
#9 0x00005579e9ffe7cc n/a (kde-open + 0x47cc)
#10 0x00007f4ed0e4624a n/a (libc.so.6 + 0x2724a)
#11 0x00007f4ed0e46305 __libc_start_main (libc.so.6 + 0x27305)
#12 0x00005579e9ffeb31 n/a (kde-open + 0x4b31)
ELF object binary architecture: AMD x86-64
Aug 21 07:12:24 debian plasmashell[8434]: Aborted (core dumped)
2 Commenti
Harald
il 22 Ago 2025
Hi,
"Open Outside MATLAB" invokes the default application that the operating system uses for opening a particular type of file, so...
- What is the extension of the file you try to "open outside MATLAB"?
- Does opening the file directly in Linux succeed?
- Have you tried this with other extensions, e.g., rather standard ones like .csv or .txt? Do you then also encounter the problem?
Best wishes,
Harald
Risposte (1)
sneha
il 3 Set 2025
Tried to reproduce your issue but did not encounter any of the error you have mentioned so these could be some solutions and workarounds:
The error isn't with MATLAB itself, but with the program it's trying to run (kde-open5).
Solution 1: Use a Different Command for "Open Outside MATLAB"
The most effective solution is to configure MATLAB to use a different command to open files, one that is less prone to this type of library conflict. You can change this behaviour within MATLAB's preferences.
- In MATLAB, go to Preferences.
- Navigate to MATLAB -> General -> External Programs.
- Under the "File Browser" section, look for the field that specifies the command to open files. It might be empty or set to something like xdg-open or kde-open.
- Change this command to a more robust, non-desktop-specific utility. Good options include:
- xdg-open: This is the standard utility for opening files on Linux. It uses the Freedesktop.org standards to determine the correct application to open a file. It is generally more reliable than desktop-specific tools.
- nautilus-open-files: This command is specific to GNOME's file manager, Nautilus, and can sometimes resolve issues.
- dolphin-open-files: This is the KDE equivalent.
Note: xdg-open is the recommended option as it's designed to work across different desktop environments like GNOME and KDE without issue.
Solution 2: Set the QT_QPA_PLATFORM Environment Variable
This workaround forces the application to use a specific Qt platform plugin. You can launch MATLAB from the terminal with a specific environment variable to ensure it uses the correct platform. This is a temporary fix but can help diagnose the problem.
- Open your terminal.
- Run the following command:
Bash
export QT_QPA_PLATFORM=xcb
matlab
This tells any Qt application launched from this terminal session to use the XCB plugin, which is for X11-based systems. It bypasses the Wayland issue.
You can make this change permanent by adding export QT_QPA_PLATFORM=xcb to your .bashrc or .profile file in your home directory.
Solution 3: Fix the System's Qt Library Configuration
This is the most involved solution and might require advanced system administration skills. The error messages suggest that the system's Qt libraries are not being found correctly. This could be due to an incomplete installation of a Qt package or an issue with the library paths.
- Reinstall or Install Qt Packages: Ensure you have the necessary Qt platform plugins installed. On a Debian system, you can use the following commands:
- For Wayland: sudo apt install qtwayland5
- For X11: sudo apt install libqt5gui5 and sudo apt install libqt5widgets5
- Check Library Paths: Verify that the system's library paths are correctly configured. Sometimes, mixing and matching libraries from different sources can cause these conflicts. You can check the LD_LIBRARY_PATH environment variable to see if any custom paths are interfering with the system's default ones.
Solution 4: Workaround for the File Browser
Instead of using the context menu, you can work around the issue by manually opening the file from the command line within MATLAB.
- In the MATLAB Command Window, you can use the ! (exclamation mark) operator to execute a shell command.
- Navigate to the directory of your file.
- Use the !xdg-open filename.ext command to open the file. This bypasses the problematic context menu action.
References:
0 Commenti
Vedere anche
Categorie
Scopri di più su Environment and Settings in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!