Matlab is unable to start QT app freeview within matlab on Fedora 37 with wayland

19 visualizzazioni (ultimi 30 giorni)
fs=getenv('FREESURFER_HOME');
setenv('FS_QT_HOME',fullfile(fs,'lib','qt'));
setenv('QTLIBPATH',fullfile(fs,'lib','qt','lib'))
setenv('QT_PLUGIN_PATH',fullfile(fs,'lib','qt','plugins'))
setenv('vtk',fullfile(fs,'lib','vtk'))
lib=getenv('LD_LIBRARY_PATH');
qtlib=getenv('QTLIBPATH');
plugins=getenv('QT_PLUGIN_PATH');
%plugins=genpath(plugins);
setenv('LD_LIBRARY_PATH',strcat(lib,':',qtlib,':',plugins,':',fullfile(fs,'lib','vtk')))
if upper < fdrtreshold
upper = fdrtreshold + 1;
end
fdrtreshold=num2str(fdrtreshold);upper=num2str(upper);
fdrtreshold=sprintf('%s,%s',fdrtreshold,upper);
leftcommand=sprintf('%s/%s/surf/lh.%s:annot=aparc.annot:annot_outline=1:overlay=%s:overlay_threshold=%s',SUBJECTS_DIR,template,surface,leftmgh,fdrtreshold);
rightcommand=sprintf('%s/%s/surf/rh.%s:annot=aparc.annot:annot_outline=1:overlay=%s:overlay_threshold=%s ',SUBJECTS_DIR,template,surface,rightmgh,fdrtreshold);
freeview=fullfile(fs,'bin','freeview');
qtplug=sprintf('export=%s', fullfile(fs,'lib','qt','plugins'));
libs=sprintf('export LD_LIBRARY_PATH=%s',strcat(lib,':',qtlib,':',plugins,':',fullfile(fs,'lib','vtk')));
system(libs)
system(qtplug)
commandline=sprintf('%s -f %s -f %s -viewport 3d',freeview,leftcommand,rightcommand);
system(commandline)
output
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
/usr/local/freesurfer/7.3.1-1/bin/freeview -f /usr/local/freesurfer/7.3.1-1/subjects/fsaverage/surf/lh.white:annot=aparc.annot:annot_outline=1:overlay=/home/knutjb/ANALYSIS/lar/glmv3/lar_group_area_20/lh_0-100/lh_area_20_0-100_log10p_MASK2.42.mgh:overlay_threshold=2.7357,3 -f /usr/local/freesurfer/7.3.1-1/subjects/fsaverage/surf/rh.white:annot=aparc.annot:annot_outline=1:overlay=/home/knutjb/ANALYSIS/lar/glmv3/lar_group_area_20/rh_0-100/rh_area_20_0-100_log10p_MASK2.42.mgh:overlay_threshold=2.7357,3 -viewport 3d: Aborted
ans =
134

Risposta accettata

Harshit Gupta
Harshit Gupta il 15 Nov 2022
As per my understanding, you are getting the following error-
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Please try the following to see if your issue is resolved:
  1. Putting the line:
export QT_QPA_PLATFORM=xcb
in your ".bashrc"file. The ".bashrc" file should be a hidden file in your home directory.
2. Switching from the "Wayland" window system to the "X11" window system.

Più risposte (0)

Categorie

Scopri di più su Startup and Shutdown in Help Center e File Exchange

Prodotti


Release

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by