Matlab is unable to start QT app freeview within matlab on Fedora 37 with wayland
Show older comments
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
Accepted Answer
More Answers (0)
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!