You are not logged in.

#1 2022-10-27 23:08:49

FearOfTheDark
Member
Registered: 2022-10-27
Posts: 6

[SOLVED] Cannot run some applications in dmenu

I am trying to run mattermost-desktop from dmenu but nothing opens. dmenu works for everything else, mattermost-desktop can be run from terminal. And also when I run dmenu_run from terminal and open mattermost-desktop it also works. Any ideas?
Thanks in advance.

Last edited by FearOfTheDark (2022-10-28 19:30:51)

Offline

#2 2022-10-28 06:38:30

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,218

Re: [SOLVED] Cannot run some applications in dmenu

Can you run "mattermost-desktop > /dev/null 2>&1"?

Offline

#3 2022-10-28 13:04:24

FearOfTheDark
Member
Registered: 2022-10-27
Posts: 6

Re: [SOLVED] Cannot run some applications in dmenu

It works. Just there is no output in the terminal as expected.

Offline

#4 2022-10-28 14:22:39

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,218

Re: [SOLVED] Cannot run some applications in dmenu

Sorry, I meant from dmenu

Offline

#5 2022-10-28 15:38:58

FearOfTheDark
Member
Registered: 2022-10-27
Posts: 6

Re: [SOLVED] Cannot run some applications in dmenu

I'm kinda confused. How can I run a command from dmenu?
I wrote a bash script that only has 1 line: "mattermost-desktop > /dev/null 2>&1" and run it from dmenu and it works if that's what you mean.
I can use this script as a workaround for the problem so it solves my problem actually. Thank you! But I'm still curious why mattermost-desktop doesn't work normally with dmenu.

Offline

#6 2022-10-28 15:46:04

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,218

Re: [SOLVED] Cannot run some applications in dmenu

I wrote a bash script that only has 1 line: "mattermost-desktop > /dev/null 2>&1" and run it from dmenu and it works if that's what you mean.

It's not what I meant but similar.
You can just type that into dmenu, it'll pass it to the shell (dmenu itself is just some generic input line) and the idea is that mattermost doesn't like if stdout or stderr is closed.

Offline

#7 2022-10-28 16:13:16

FearOfTheDark
Member
Registered: 2022-10-27
Posts: 6

Re: [SOLVED] Cannot run some applications in dmenu

I didn't know we could add dmenu worked that way. Good to know!
I also tried that now and it also works. So dmenu closes the stdout and the stderr by default and mattermost doesn't work in that case. Is there a solution to make dmenu not close them for mattermost? Or I should just use it with this workaround?

Offline

#8 2022-10-28 16:21:45

FearOfTheDark
Member
Registered: 2022-10-27
Posts: 6

Re: [SOLVED] Cannot run some applications in dmenu

I also found another workaround. There is logging level setting in mattermost-desktop. It was defaultly on info. I took it to lowest level which is errors. Now it works. But I think if a kind of error happens it will crash because there is no stderr.

Offline

#9 2022-10-28 17:03:43

xerxes_
Member
Registered: 2018-04-29
Posts: 1,067

Re: [SOLVED] Cannot run some applications in dmenu

I don't know if this is it, but you can try other start of .desktop apps in i3-wm, for example I have in i3 config file 2 bind search menus keys:

bindsym $mod+d exec dmenu_run
bindsym $mod+c exec --no-startup-id i3-dmenu-desktop

There are also in package manager bemenu, clipmenu, j4-dmenu-desktop, rofi.

Last edited by xerxes_ (2022-10-28 17:04:11)

Offline

#10 2022-10-28 18:52:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,218

Re: [SOLVED] Cannot run some applications in dmenu

FearOfTheDark wrote:

I also found another workaround. There is logging level setting in mattermost-desktop. It was defaultly on info. I took it to lowest level which is errors. Now it works. But I think if a kind of error happens it will crash because there is no stderr.

Probably.
You could run "mattermost-desktop 1> ~/mattermost.log 2> ~/mattermost.err" or something like that if you don't want to redirect the messages and errors into /dev/null
Or you run "xterm -e mattermost-desktop" to get a console for mattermost when starting it form dmenu.

Offline

#11 2022-10-28 19:23:02

FearOfTheDark
Member
Registered: 2022-10-27
Posts: 6

Re: [SOLVED] Cannot run some applications in dmenu

Makes sense. Thanks for the help!

Offline

#12 2022-10-28 19:29:21

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,218

Re: [SOLVED] Cannot run some applications in dmenu

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB