diff options
Diffstat (limited to 'home/xyz/.local/bin/matlab')
-rwxr-xr-x | home/xyz/.local/bin/matlab | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/home/xyz/.local/bin/matlab b/home/xyz/.local/bin/matlab index 44af8bdf..c3ee6690 100755 --- a/home/xyz/.local/bin/matlab +++ b/home/xyz/.local/bin/matlab @@ -4,14 +4,17 @@ # https://wiki.archlinux.org/title/Java#Gray_window,_applications_not_resizing_with_WM,_menus_immediately_closing # https://wiki.archlinux.org/title/MATLAB#Unable_to_launch_the_MATLABWindow_application # https://faq.i3wm.org/question/2564/cant-open-matlab-from-dmenu.1.html +# https://wiki.archlinux.org/title/MATLAB#Desktop_entry +# use /tmp as working (startup) directory and save simulink files there to avoid hard link error: +# https://bbs.archlinux.org/viewtopic.php?id=277970 cmd () { - _JAVA_AWT_WM_NONREPARENTING=1 LD_PRELOAD=/lib64/libfreetype.so "$bin_dir/matlab" -desktop "$@" + _JAVA_AWT_WM_NONREPARENTING=1 LD_PRELOAD=/lib64/libfreetype.so "$bin_dir/matlab" -sd "$startup_dir" -desktop -nosplash "$@" } startup_dir=/tmp/matlab bin_dir="$HOME/programs/MATLAB/R2022a/bin" -[ -d "$startup_dir" ] || mkdir -p "$startup_dir" +[ -d "$startup_dir" ] || mkdir "$startup_dir" if ! cmd "$@"; then "$bin_dir/activate_matlab.sh" |