- Putting the line:
Matlab is unable to start QT app freeview within matlab on Fedora 37 with wayland
19 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
Harshit Gupta
2022-11-15
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:
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.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!