Closed ipsod closed 6 years ago
I fixed this by removing /usr/local/bin/nagastart.sh &
from my ~/.profile
, and adding a symlink to the script in ~/.config/autostart-scripts
on Linux Mint KDE 17.2. If that works on other distros, it might be preferable.
Yep, .profile seems problematic altogether, I did not know a good distro-independent way of auto starting a script on boot. Lets see if someone using other distro can confirm your way is better. Thanks!
I was studying this issue and the most correct way still seems to be .config/autostart. As soon as systemd will support graphical-session.target that should solve the issue once and for all systemd distros.
I think that was my initial approach (in fact there is still a naga.desktop file). But it is marked as "Only works in Ubuntu". I seem to recall that it was due to a permission issue?. Maybe it will work now.
In Debian that works as well, but I did not check other distros.
~/.config/autostart is the proper solution, however some window managers expect the user to write scripts to execute the .desktop files manually. You should not try to automatically support window managers however. Just printing out a warning like echo "Some window managers do not support ~/.config/autostart. Please add nagastart.sh to be executed when your window manager starts."
is enough.
~/.profile is always the wrong solution. Many programs will silently break if commands in ~/.profile write to stdout or stderr, since ~/.profile is executed every time a shell session is started, regardless of what program started that shell.
Ok @Ameliorate I followed you suggestion, lets see how it goes. Now .profile is not modified and naga.desktop is copied to autostart. I pushed a bunch of commits.
This is weird, but the daemon seems to be preventing Spacemacs from launching. When I try to open Spacemacs, it hangs, and in my system monitor I see that there's a second instance of "naga" running (maybe in Spacemacs'/emacs' shell environment?).
This is a really odd problem - any idea how to fix it?