You are not logged in.

#1 2021-10-09 20:45:08

redshoe
Member
Registered: 2015-12-16
Posts: 88

[Solved] Why some applications do not start with dmenu?

I've recently installed solvespace from AUR, and casually thought I could start the application using dmenu without problem. But, as it turns out if I do that I don't get anything on my screen. Instead when I run the application using the terminal it works.... Any ideas?

Thanks.

Last edited by redshoe (2021-10-11 13:05:24)

Offline

#2 2021-10-09 23:00:00

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 3,719

Re: [Solved] Why some applications do not start with dmenu?

Moving to AUR issues.

Offline

#3 2021-10-10 00:47:27

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 25,714
Website

Re: [Solved] Why some applications do not start with dmenu?

Does it start from a terminal if you direct /dev/null to it's stdin?

EDIT: nope, or at least I can't replicate that.

Last edited by Trilby (2021-10-10 00:54:34)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2021-10-10 01:31:09

redshoe
Member
Registered: 2015-12-16
Posts: 88

Re: [Solved] Why some applications do not start with dmenu?

Trilby wrote:

Does it start from a terminal if you direct /dev/null to it's stdin?

EDIT: nope, or at least I can't replicate that.


like the following?

solvespace 0> /dev/null

If so, yes.

Offline

#5 2021-10-10 03:20:37

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,332

Re: [Solved] Why some applications do not start with dmenu?

Try and change the desktop entry to:

Exec=solvespace

If it works;-), add a patch to your PKGBUILD...

edit: it's probably because of my vague dmenu script this even works, here..

Last edited by qinohe (2021-10-10 04:15:26)

Offline

#6 2021-10-10 04:26:25

redshoe
Member
Registered: 2015-12-16
Posts: 88

Re: [Solved] Why some applications do not start with dmenu?

qinohe wrote:

Try and change the desktop entry to:

Exec=solvespace

If it works;-), add a patch to your PKGBUILD...

edit: it's probably because of my vague dmenu script this even works, here..

I can not see the script.

How do I update the PKGBUILD?

Offline

#7 2021-10-10 05:03:14

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,332

Re: [Solved] Why some applications do not start with dmenu?

redshoe wrote:

I can not see the script.

That's because it's a local script ;-)

How do I update the PKGBUILD?

Have you first tried to change the desktop entry file and see if it works '/usr/share/applications/solvespace.desktop' ?
I doubt it though,,,

Offline

#8 2021-10-10 13:05:53

redshoe
Member
Registered: 2015-12-16
Posts: 88

Re: [Solved] Why some applications do not start with dmenu?

qinohe wrote:
redshoe wrote:

I can not see the script.

That's because it's a local script ;-)

How do I update the PKGBUILD?

Have you first tried to change the desktop entry file and see if it works '/usr/share/applications/solvespace.desktop' ?
I doubt it though,,,

Yeah. It is already set it as '/usr/share/applications/solvespace.desktop' and it does not work.

Offline

#9 2021-10-10 14:47:24

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,332

Re: [Solved] Why some applications do not start with dmenu?

I wouldn't have expected it... well I have tried to run solvespace with a few different scripts, and they all excute it just fine. There is some bug in it I haven't investigated: 'SolveSpace! connect failed: No such file or directory' but besides that no problems

The fact it wouldn't run with 'Exec=/usr/bin/solvespace' on my side is because of my own 'dmenu_gui' script!

We can say there is probably something in your setup preventing you to use dmenu to start solvespace.
If use 'solvespace 0> /dev/null' it runs, though, it should also run just using 'solvespace'!

Are you running a patched dmenu, if so wich one?
I sure I'm not of much help right now, but I also don't have a clear view of what is going awry!

You said you couldn't see the script, if you're still curious:
I am using some patches...

#!/bin/bash
# shellcheck disable=1091

[ -f "$XDG_CONFIG_HOME"/dmenu/dmenurc ] &&
 . "$XDG_CONFIG_HOME"/dmenu/dmenurc || dmnews='dmenu -i'

desktoppath=("/usr/share/applications"
             "$HOME/.local/share/applications")
dmenu_cache="$HOME/.cache/guiapps/apps"

[ ! -e "$XDG_CACHE_HOME"/guiapps ] && mkdir "$XDG_CACHE_HOME"/guiapps
[ ! -e "$XDG_CACHE_HOME"/guiapps/apps ] && touch "$XDG_CACHE_HOME"/guiapps/apps

[ -f "$dmenu_cache" ] || stest -dqr -n "$dmenu_cache" "${desktoppath[@]}"

findit() {
  find "${desktoppath[@]}" -name '*.desktop' -exec awk -F '[ =]' \
   '/^Terminal=true/ { term=1; }
    /^Exec[^\/]*$/ { if (!term) cmds[$2] = 1; }
    END { for (key in cmds) print key; }' '{}' \; \
    | sort -b | uniq > ~/.cache/guiapps/apps
}
findit

< "$dmenu_cache" $dmnews -z 400 -x 750 -y 150 "$@" -p "GUI apps:"| ${SHELL:-"/bin/sh"}

edit: You can find the original code in the 'Dmenu Hacking Thread' (see) #322 & #323
https://bbs.archlinux.org/viewtopic.php?id=80145&p=13

Last edited by qinohe (2021-10-10 15:07:30)

Offline

#10 2021-10-10 15:10:24

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 25,714
Website

Re: [Solved] Why some applications do not start with dmenu?

Please launch dmenu_run from a terminal then enter 'solvespace' (and hit enter) and report any errors or output on the terminal that launched dmenu_run.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#11 2021-10-10 15:14:33

redshoe
Member
Registered: 2015-12-16
Posts: 88

Re: [Solved] Why some applications do not start with dmenu?

Trilby wrote:

Please launch dmenu_run from a terminal then enter 'solvespace' (and hit enter) and report any errors or output on the terminal that launched dmenu_run.


This works lol. Wonder why it is not working with my window manager shortcut 'alt+d'. In my window manager I have the dmenu run it as

bindsym $mod+d exec "dmenu -b -fn 'fixedsys-Excelsior-12'"

in order to place it on the bottom of the screen with a font of my choice. Would this be the problem?

Edit: Hmmm.... solvespace lanuches on the terminal wit the command "dmenu -b -fn 'fixedsys-Excelsior-12'"..

Last edited by redshoe (2021-10-10 15:43:51)

Offline

#12 2021-10-10 16:25:48

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,332

Re: [Solved] Why some applications do not start with dmenu?

You didn't see it yet, I assume...
The bindsym syntax you use for i3 config is wrong, have a look at the example: /etc/i3/config

Offline

#13 2021-10-10 17:11:35

redshoe
Member
Registered: 2015-12-16
Posts: 88

Re: [Solved] Why some applications do not start with dmenu?

qinohe wrote:

You didn't see it yet, I assume...
The bindsym syntax you use for i3 config is wrong, have a look at the example: /etc/i3/config

Dang. What the hell. The config format changed alot! I've been using the old config file that mine looks nothing like the new one! But, adhering to the new config setup did not help with the dmenu issue.

Offline

#14 2021-10-10 17:22:56

redshoe
Member
Registered: 2015-12-16
Posts: 88

Re: [Solved] Why some applications do not start with dmenu?

qinohe wrote:

I wouldn't have expected it... well I have tried to run solvespace with a few different scripts, and they all excute it just fine. There is some bug in it I haven't investigated: 'SolveSpace! connect failed: No such file or directory' but besides that no problems

The fact it wouldn't run with 'Exec=/usr/bin/solvespace' on my side is because of my own 'dmenu_gui' script!

We can say there is probably something in your setup preventing you to use dmenu to start solvespace.
If use 'solvespace 0> /dev/null' it runs, though, it should also run just using 'solvespace'!

Are you running a patched dmenu, if so wich one?
I sure I'm not of much help right now, but I also don't have a clear view of what is going awry!

You said you couldn't see the script, if you're still curious:
I am using some patches...

#!/bin/bash
# shellcheck disable=1091

[ -f "$XDG_CONFIG_HOME"/dmenu/dmenurc ] &&
 . "$XDG_CONFIG_HOME"/dmenu/dmenurc || dmnews='dmenu -i'

desktoppath=("/usr/share/applications"
             "$HOME/.local/share/applications")
dmenu_cache="$HOME/.cache/guiapps/apps"

[ ! -e "$XDG_CACHE_HOME"/guiapps ] && mkdir "$XDG_CACHE_HOME"/guiapps
[ ! -e "$XDG_CACHE_HOME"/guiapps/apps ] && touch "$XDG_CACHE_HOME"/guiapps/apps

[ -f "$dmenu_cache" ] || stest -dqr -n "$dmenu_cache" "${desktoppath[@]}"

findit() {
  find "${desktoppath[@]}" -name '*.desktop' -exec awk -F '[ =]' \
   '/^Terminal=true/ { term=1; }
    /^Exec[^\/]*$/ { if (!term) cmds[$2] = 1; }
    END { for (key in cmds) print key; }' '{}' \; \
    | sort -b | uniq > ~/.cache/guiapps/apps
}
findit

< "$dmenu_cache" $dmnews -z 400 -x 750 -y 150 "$@" -p "GUI apps:"| ${SHELL:-"/bin/sh"}

edit: You can find the original code in the 'Dmenu Hacking Thread' (see) #322 & #323
https://bbs.archlinux.org/viewtopic.php?id=80145&p=13

I am not using any script of some sort. Just vanilla. And, about your script and the link you have provided, I don't know how those are related to my issues. Could you elaborate?

Offline

#15 2021-10-10 17:29:09

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 25,714
Website

Re: [Solved] Why some applications do not start with dmenu?

redshoe wrote:

Wonder why it is not working with my window manager shortcut 'alt+d'.

Likely a difference in environment variables.  How do you start your i3 session?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#16 2021-10-10 17:29:10

seth
Member
Registered: 2012-09-03
Posts: 23,839

Re: [Solved] Why some applications do not start with dmenu?

redshoe wrote:
Trilby wrote:

Please launch dmenu_run from a terminal then enter 'solvespace' (and hit enter) and report any errors or output on the terminal that launched dmenu_run.


This works lol. Wonder why it is not working with my window manager shortcut 'alt+d'. In my window manager I have the dmenu run it as

localectl
locale
locale -a

Offline

#17 2021-10-10 20:22:32

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,332

Re: [Solved] Why some applications do not start with dmenu?

redshoe wrote:

I am not using any script of some sort. Just vanilla. And, about your script and the link you have provided, I don't know how those are related to my issues. Could you elaborate?

Not at all, though, in #6 you said

I can not see the script.

so, I though you may be curious about it that's all...

Offline

#18 2021-10-10 20:47:04

redshoe
Member
Registered: 2015-12-16
Posts: 88

Re: [Solved] Why some applications do not start with dmenu?

seth wrote:
redshoe wrote:
Trilby wrote:

Please launch dmenu_run from a terminal then enter 'solvespace' (and hit enter) and report any errors or output on the terminal that launched dmenu_run.


This works lol. Wonder why it is not working with my window manager shortcut 'alt+d'. In my window manager I have the dmenu run it as

localectl
locale
locale -a

output

[rangke@Angke ~]$ localectl
   System Locale: LANG=en_US.UTF-8
       VC Keymap: n/a
      X11 Layout: n/a

[rangke@Angke ~]$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

[rangke@Angke ~]$ locale -a
C
en_US.utf8
ko_KR.utf8
POSIX

Offline

#19 2021-10-10 20:50:42

seth
Member
Registered: 2012-09-03
Posts: 23,839

Re: [Solved] Why some applications do not start with dmenu?

nope, locale seems fine.

printenv
tr '\0' '\n' < /proc/$(pidof i3)/environ

Offline

#20 2021-10-10 21:19:19

redshoe
Member
Registered: 2015-12-16
Posts: 88

Re: [Solved] Why some applications do not start with dmenu?

[rangke@Angke ~]$ printenv
SHELL=/bin/bash
SAM_SCR=/home/rangke/Work/models/sam/
WINDOWID=35654036
COLORTERM=truecolor
ECMWF_API_KEY=9d19efb50a18cd4dcbc173673a1dc907
GTK_IM_MODULE=ibus
I3SOCK=/run/user/1000/i3/ipc-socket.647
ECMWF_API_URL=https://api.ecmwf.int/v1
XMODIFIERS=@im=ibus
LIBVA_DRIVER_NAME=radoensi
XDG_SEAT=seat0
PWD=/home/rangke
LOGNAME=rangke
XDG_SESSION_TYPE=tty
SYSTEMD_EXEC_PID=552
XAUTHORITY=/home/rangke/.Xauthority
WINDOWPATH=1
MOTD_SHOWN=pam
HOME=/home/rangke
LANG=en_US.UTF-8
LS_COLORS=ex=35:*.c=32:*.py=32:*.f=32:*.f03=32:*.f=32:*.f90=32:*.mp3=91:*.mkv=91:*.mp4=91:*.MOV=91:*.mov=91:*.avi=91:*.jpg=93:*.JPG=93:*.JPEG=93:*.jpeg=93:*.png=93:*.PNG=93:*.gif=93:*.GIF=93:*.tex=96:*.pdf=96:*.txt=96
VTE_VERSION=6600
INVOCATION_ID=dc202c697f04485b88ee735451000cbf
XDG_SESSION_CLASS=user
TERM=xterm-256color
CPLUS_INCLUDE_PATH=:/home/rangke/tools/pkgs/aocc-compiler-3.1.0/include
USER=rangke
LIBRARY_PATH=/home/rangke/tools/pkgs/aocc-compiler-3.1.0/lib:/home/rangke/tools/pkgs/aocc-compiler-3.1.0/lib32:/usr/lib64:/usr/lib:/usr/lib32:
ECMWF_API_EMAIL=joonghyun.in@stonybrook.edu
DISPLAY=:0
SHLVL=2
MOZ_ENABLE_WAYLAND=1
QT_IM_MODULE=ibus
XDG_VTNR=1
XDG_SESSION_ID=1
MPLBACKEND=GTK3Agg
LD_LIBRARY_PATH=/home/rangke/tools/pkgs/aocc-compiler-3.1.0/ompd:/home/rangke/tools/pkgs/aocc-compiler-3.1.0/lib:/home/rangke/tools/pkgs/aocc-compiler-3.1.0/lib32:/usr/lib64:/usr/lib:/usr/lib32:
XDG_RUNTIME_DIR=/run/user/1000
JOURNAL_STREAM=8:24443
PATH=/home/rangke/tools/pkgs/aocc-compiler-3.1.0/bin:/home/rangke/hw_conf:/home/rangke/tools/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
C_INCLUDE_PATH=:/home/rangke/tools/pkgs/aocc-compiler-3.1.0/include
MAIL=/var/spool/mail/rangke
_=/usr/bin/printenv
[rangke@Angke ~]$ tr '\0' '\n' < /proc/$(pidof i3)/environ
SHELL=/bin/bash
GTK_IM_MODULE=ibus
XMODIFIERS=@im=ibus
LIBVA_DRIVER_NAME=radoensi
XDG_SEAT=seat0
PWD=/home/rangke
LOGNAME=rangke
XDG_SESSION_TYPE=tty
SYSTEMD_EXEC_PID=552
XAUTHORITY=/home/rangke/.Xauthority
WINDOWPATH=1
MOTD_SHOWN=pam
HOME=/home/rangke
LANG=en_US.UTF-8
INVOCATION_ID=dc202c697f04485b88ee735451000cbf
XDG_SESSION_CLASS=user
TERM=linux
USER=rangke
DISPLAY=:0
SHLVL=1
MOZ_ENABLE_WAYLAND=1
QT_IM_MODULE=ibus
XDG_VTNR=1
XDG_SESSION_ID=1
XDG_RUNTIME_DIR=/run/user/1000
JOURNAL_STREAM=8:24443
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
MAIL=/var/spool/mail/rangke

Offline

#21 2021-10-11 02:42:23

loqs
Member
Registered: 2014-03-06
Posts: 13,929

Re: [Solved] Why some applications do not start with dmenu?

If you unset LD_LIBRARY_PATH does it still start from the console?

Offline

#22 2021-10-11 03:40:42

redshoe
Member
Registered: 2015-12-16
Posts: 88

Re: [Solved] Why some applications do not start with dmenu?

loqs wrote:

If you unset LD_LIBRARY_PATH does it still start from the console?

No it does not with the following error message.

solvespace: error while loading shared libraries: libomp.so: cannot open shared object file: No such file or directory

Offline

#23 2021-10-11 06:52:09

seth
Member
Registered: 2012-09-03
Posts: 23,839

Re: [Solved] Why some applications do not start with dmenu?

https://archlinux.org/packages/extra/x86_64/openmp/
You're using libomp from some locale AOCC installation (doesn't look like https://aur.archlinux.org/packages/aocc/ ?) and only export the library in your shell rc, so the rest of the system won't find it.
Fix or remove the AOCC installation and/or extend the library path to the system or wrap solvespace into a script that extends the LD_LIBRARY_PATH and run that wrapper script instead.

Offline

#24 2021-10-11 13:04:49

redshoe
Member
Registered: 2015-12-16
Posts: 88

Re: [Solved] Why some applications do not start with dmenu?

I think I found the problem.

Uninstalling AOCC and setting the LD_LIBRARY_PATH to generic path of /usr/lib gave me the same problem of

solvespace: error while loading shared libraries: libomp.so: cannot open shared object file: No such file or directory

It seems that I could run the solvespace when the AOCC is installed because AOCC has OpenMP library in its directory. So, when the LD_LIBRARY_PATH is set to whatever AOCC is using the solvespace could fine the libomp.so. As it turns out my system did not have OpenMP installed, that's why I could not run solvespace neither on the terminal, when LD_LIBRARY_PATH is removed, nor via dmenu. After installing OpenMP on my system, it is now working fine.

Thanks guys!

Offline

#25 2021-10-11 13:20:55

seth
Member
Registered: 2012-09-03
Posts: 23,839

Re: [Solved] Why some applications do not start with dmenu?

Yes, you've found it because that's what I told you in #23 …

Offline

Board footer

Powered by FluxBB