2

First off, relevant specs:

  • Arch Linux x86_64
  • Thinkpad T450s
  • Kernel: 4.13.12-1-ARCH
  • Shell: zsh 5.4.2
  • WM: i3 + Ly (w/ polybar, rofi)

I am having a problem with getting MATLAB to launch from rofi, or even from a menu in polybar. It starts perfectly fine when I invoke the "matlab" command from the terminal, but whenever I attempt to use a gui solution (such as dmenu or rofi, or the menu module in polybar) to launch it, the MathWorks splash screen appears for a second, closes, and pings a system beep. I am an intermediate level linux user, and have exhausted all of my best attempts at deriving a solution. Help!

edit: also, matlab is in my $PATH

1

After much searching, I pieced together something that works pretty well for the polybar menu. If you create a script somewhere in your $PATH, lets name it matlab_desktop, and include the code (what i included):

#!/usr/bin/env zsh
/path_to_matlab/matlab -desktop

then have polybar point to matlab_desktop instead of matlab, then the polybar menu will run it. It will also show up in dmenu/rofi since it is in the path. No idea why this works, but it does!

I realize this answer is specific to matlab, but I am sure it is applicable to any other application that will not start in dmenu/rofi/etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.