You are not logged in.
I installed joplin CLI on .local/share/joplin and made a link to my $PATH
From terminal, I can do joplin and it opens just fine but if I bind joplin to keyboard shortcut it does not work, nothing happens.
What is the cause and how do I fix this?
Last edited by b42 (2023-12-25 15:40:39)
Offline
made a link to my $PATH
What does this mean, exactly? Please share the name and full contents of the file(s) you edited.
Sounds like you've added to PATH in ~/.bashrc (or so), which would only be applied to that shell.
Jin, Jîyan, Azadî
Offline
I did
NPM_CONFIG_PREFIX=~/.local/share/joplin npm install -g joplin and
sudo ln -s ~/.local/share/joplin/bin/joplin ~/.local/bin/joplinas official joplin documentation explains here:
https://joplinapp.org/help/apps/terminal/
.local/bin has been added to my $PATH in .zprofile
Last edited by b42 (2023-12-23 21:42:02)
Offline
.local/bin has been added to my $PATH in .zprofile
Please share the [...] full contents of the file
Also: which desktop environment is this and how is it launched? Some display managers will ignore ~/.zprofile: https://bbs.archlinux.org/viewtopic.php?id=211162
Jin, Jîyan, Azadî
Offline
sorry I confused here a little bit.
I have not edited .zprofile, .local/bin is added to my $PATH by default.
DE - KDE Plasma
Offline
Looks like you might need to set PATH for Plasma in a .sh file under ~/.config/plasma-workspace/env/, as per https://userbase.kde.org/Session_Environment_Variables.
Disclaimer: I don't use Plasma (too many knobs).
Jin, Jîyan, Azadî
Offline
but the thing is that it is already in my $PATH:
/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perlOffline
But that's from your terminal, right? The desktop might not inherit that.
You could try using this from the desktop application launcher to test:
sh -c 'echo $PATH > ~/results.txt'Then check the contents of ~/results.txt.
Jin, Jîyan, Azadî
Offline
How do I do that exactly from that desktop application launcher?
Offline
Just type it in. It works for me with dmenu/bemenu anyway. Not sure about the Plasma launcher.
Or just use the full path for the keyboard shortcut.
Jin, Jîyan, Azadî
Offline
output
/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perlLast edited by b42 (2023-12-23 22:40:09)
Offline
So does using the full path for the keyboard shortcut work?
Jin, Jîyan, Azadî
Offline
no, unfortunately it does not..
Offline
Missed this:
sudo ln -s ~/.local/share/joplin/bin/joplin ~/.local/bin/joplin
So the ~/.local/bin/joplin symlink is now root owned. Delete the symlink and run the `ln` command again without `sudo`.
Jin, Jîyan, Azadî
Offline
Did that, still does not work.
Offline
When you attempted to use the full path for the keybind did you use "~" or did you give the full directory names? It could be that the keybind application doesn't understand "~". Be sure to try both the original file location and the symlink location.
Last edited by Head_on_a_Stick (2023-12-24 19:40:13)
Jin, Jîyan, Azadî
Offline
I used joplin only because it is in my $PATH and it works from terminal.
But I changed it to full path /home/user/.local/bin/joplin and it still does not work.
Can it be because it is a strange package that was neither from package manager nor built from source but NPM_CONFIG_PREFIX (which I dont even have a clue what it is)?
Offline
FFS it's a terminal application, isn't it? Sorry, I should have checked, my fault entirely.
If you want to open it from a keybind then you will have to open a terminal with Joplin running inside it.
For example:
xterm -e joplinAny reason why you're not using the AUR package?
Jin, Jîyan, Azadî
Offline
Yes, it is a terminal application.
xterm -e joplinIt works!! I just had to replace xterm with konsole since I use konsole on this device.
So for every terminal application to bind to keyboard shortcut I have to use
$TerminalAppName -e $AppIWantToRun?
I just think that the original way to install that the developer provides is better and maybe 'more' open-source. I might be totally wrong, could you explain the difference between the method I installed and AUR?
Oh, another reason is I believe that if I want to migrate to another device I will take the app itself (which in this case lies in .local/bin/joplin) and config (.config/joplin) and will simply copy the files to another device with all my data and config settings.
Offline
The -e option is pretty common but not universal. Check the relevant man page, as usual.
Using packages is better because the software is easier to keep track of and remove cleanly. Always read the PKGBUILD before installing from the AUR though, it would be _very_ easy to upload malware to the AUR.
Jin, Jîyan, Azadî
Offline
has there been many instances with malware in AUR?
May I ask what DE you use?
Offline
Jin, Jîyan, Azadî
Offline
Thank you for your help!
Offline