You are not logged in.

#1 2015-02-16 09:02:30

Dunkit
Member
Registered: 2014-11-14
Posts: 20

[solved] dmenu is not showing application

Hi all,

I'm using i3 with dmenu_run as my application launcher.
If I'm not mistaken, every executable that's in my PATH should show up there.
However, my Sublime Text 3 executable (which is on a mounted HDD in /media/data/...) doesn't.

I've checked that the path to that executable is in the PATH env variable. The chmod of the executable is:

[fabian@desktop sublime_text_3]$ ls -l sublime_text
-rwxrwxrwx 1 root root 5173248 Aug 27 05:50 sublime_text

Does anyone know what's going wrong?

Thanks,
Fabian.

Last edited by Dunkit (2015-02-16 12:35:57)

Offline

#2 2015-02-16 09:29:42

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] dmenu is not showing application

Offline

#3 2015-02-16 10:08:01

Dunkit
Member
Registered: 2014-11-14
Posts: 20

Re: [solved] dmenu is not showing application

Thanks for the tip, but unfortunately nothing changed...

Offline

#4 2015-02-16 10:33:55

satanselbow
Member
Registered: 2011-06-15
Posts: 538

Re: [solved] dmenu is not showing application

Does the app start from a home terminal? You say it is in your $PATH but supply no evidence wink

Offline

#5 2015-02-16 10:37:38

Dunkit
Member
Registered: 2014-11-14
Posts: 20

Re: [solved] dmenu is not showing application

Yeah, that works fine...

[fabian@desktop ~]$ which sublime_text
/media/data/Downloads/sublime_text_3/sublime_text

Offline

#6 2015-02-16 10:48:11

parazyd
Member
From: Amsterdam
Registered: 2012-10-14
Posts: 259
Website

Re: [solved] dmenu is not showing application

For an ugly workaround you could symlink it to /usr/bin or somewhere where dmenu checks by default.

Offline

#7 2015-02-16 11:03:10

Dunkit
Member
Registered: 2014-11-14
Posts: 20

Re: [solved] dmenu is not showing application

True point in two ways:
1) Yay, that works!
2) Yeah, it's ugly...

But thanks, it does the job for now!

Any other suggestions what might be causing this issue?

Offline

#8 2015-02-16 11:05:35

parazyd
Member
From: Amsterdam
Registered: 2012-10-14
Posts: 259
Website

Re: [solved] dmenu is not showing application

Perhaps dmenu doesn't use PATH, but simply checks the default values?

Offline

#9 2015-02-16 11:11:38

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [solved] dmenu is not showing application

Dunkit wrote:

Yeah, that works fine...

[fabian@desktop ~]$ which sublime_text
/media/data/Downloads/sublime_text_3/sublime_text

Since it's still not clear how you set your PATH: if you run dmenu_run from that same interactive shell, does it show sublime_text?

Offline

#10 2015-02-16 11:53:29

Dunkit
Member
Registered: 2014-11-14
Posts: 20

Re: [solved] dmenu is not showing application

Raynman wrote:

Since it's still not clear how you set your PATH: if you run dmenu_run from that same interactive shell, does it show sublime_text?

I set the PATH in my .bashrc, but I've also tried .xinitrc and .bash_profile with no difference in the result. But we're getting closer to the problem: running

 echo $PATH > /tmp/path 

in dmenu revealed that the PATH variable dmenu_run has does not change no matter where I export PATH.

Running dmenu_run from a terminal with the correct PATH variable indeed shows that dmenu_run then knows about sublime_text.

So the question is where do I have to export the PATH variable so that dmenu_run has the correct PATH right away?!

Last edited by Dunkit (2015-02-16 11:53:48)

Offline

#11 2015-02-16 12:23:28

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [solved] dmenu is not showing application

Dunkit wrote:

So the question is where do I have to export the PATH variable so that dmenu_run has the correct PATH right away?!

You normally start dmenu_run through i3 with some keybinding, right? How do you start i3? (1) with a DM or (2) (auto)login to your shell and then startx? For (1) it depends on the DM, for (2) the shell (bash?) is started as a login shell and the .(bash_)profile should be read (but then .xinitrc is executed where i3 gets started, so exporting PATH there should also do the trick).

Last edited by Raynman (2015-02-16 12:25:56)

Offline

#12 2015-02-16 12:25:13

parazyd
Member
From: Amsterdam
Registered: 2012-10-14
Posts: 259
Website

Re: [solved] dmenu is not showing application

Delete your dmenu_cache. Also try setting your PATH in ~/.profile

Offline

#13 2015-02-16 12:33:58

Dunkit
Member
Registered: 2014-11-14
Posts: 20

Re: [solved] dmenu is not showing application

Thanks, I got it:
I'm using gdm so I created a ~/.xprofile file exporting the correct path!
But I'm not quite sure if I prefer that over the symlink method, yet. Or I might install Sublime Text somewhere else, I'll have to check what's the nicest solution for me...

Thanks again!

Offline

#14 2015-02-16 12:41:52

parazyd
Member
From: Amsterdam
Registered: 2012-10-14
Posts: 259
Website

Re: [solved] dmenu is not showing application

Sidenote: If you aren't logging in from TTY, dmenu won't be interactive, and will not be seeing your bashrc/whatever.

Offline

#15 2016-10-26 19:39:40

Quardah
Member
Registered: 2014-08-26
Posts: 146

Re: [solved] dmenu is not showing application

This is somewhat necro but i found out something that might be useful to future user concerning dmenu behavior.

If you  $PATH contains

~/.bin

dmenu will NOT check into your home's .bin folder.

Instead, remove the previous from your path and change it for

/home/<your username>/.bin

Hopefully this will help future users who find this thread with google.

Enjoy!


ThinkPad P16s AMD / KDE

Offline

Board footer

Powered by FluxBB