Open sveinungss opened 5 years ago
I was running into the exact same problem. This is because the AUR PKGBUILD doesn't run the postinstall.sh
script inside install_scripts
folder. As a workaround I was manually creating a automathemely.timer
and automathemely.service
in /etc/systemd/system/
and automathemely.desktop
file in /etc/xdg/autostart/
using the code in postinstall.sh
.
But "florianmw", the package maintainer, just fixed the AUR PKGBUILD today. I would recommend reinstalling the package and enabling and starting the timer:
systemctl --user --global enable automathemely.timer
systemctl --user --global start automathemely.timer
I hope this helps.
Thank you! I've removed and reinstalled automathemely (as you wrote, the package had just been updated). The first command is passed with no comment, but the second returns no such file or catalogue.
Maybe you're running those commands using sudo
or as root
?
Well, systemctl always asks for sudo
password, which I gather is standard. Curiously, when I logged on just now, automathemely worked as expected, switching to dark theme. I tried searching for the automathemely.timer service, but cannot find it anywhere, not with htop
, nor with systemctl
.
Are you using --user
and --global
? Because AFAIK user timers are completely independent from system timers, and --global
means on all users on the machine.
I did use both --user
and --global
yes. Tried now with --systemctl --user enable automathemely.timer
and then I get "no such file or directory". If I run systemctl --global enable automathemely.timer
it returns nothing (which I guess means it works?). However, if I then run systemctl --global start automathemely.timer
I get "no such file or directory".
Hmmm that's weird.
Have you tried doing sudo systemctl --global --user enable automathemely.timer
and then systemctl --user start automathemely.timer
?
Then maybe try systemctl --user status automathemely.timer
and see if it outputs anything
I am also running this issue, but still being unfamiliar with linux on Ubuntu 18.10 I'm pretty lost at what to do to resolve this. I also had the uninstall issue but used apt get remove after reboot to finally get it ripped out so I could reinstall it.
Settings sseems to save
automathemely.timer and .desktop are where they are supposed to be, so I don't know what I'm doing wrong. I've been trying to test the theme switching but just changing my time to pm instead of am (9:42AM as of typing this). So not sure what I am doing wrong. Hopefully someone here can help me out.
Having this issue too, Gnome with Arch Linux.
For Arch Linux users please used the fixed AUR package as @nrayamajhee mentioned (thanks for your hint :+1:). It automatically enables the timer and autostart now. @C2N14 provided the correct systemd commands. Please note with
sudo systemctl --global --user enable automathemely.timer
you enable the timer for all users on the machine.systemctl --user start automathemely.timer
starts the timer for the current user. sudo systemctl --global --user start automathemely.timer
is invalid.@C2N14 maybe it's better to put the automathemely.timer
and automathemely.service
in the package instead of creating it in the postinst script. I decided to do it like that in the AUR package, because I didn't want to rely on SUDO_USER
. This wouldn't work if the user doesn't install the package via sudo for example.
For those who try to activate autostart by copying the automathemely.desktop file to the autostart directory, please note that by default the configuration manager is started instead of the scheduler. In the post_install
I used (run by root):
sed 's/\(Exec=automathemely\)\ \-\-manage/\1/' \
/usr/share/applications/automathemely.desktop >| \
/etc/xdg/autostart/automathemely.desktop
If you want to it for your user only the better option is to do it like that (because it's always better to not throw around with sudo like popcorn in the cinema):
mkdir -p $HOME/.config/autostart
sed 's/\(Exec=automathemely\)\ \-\-manage/\1/' \
/usr/share/applications/automathemely.desktop >| \
$HOME/.config/autostart/automathemely.desktop
I had got automathemely working by following one of @nrayamajhee earlier comments (with the exception of the desktop file, with which I did nothing):
Hey all, I can't speak for Antergos or Ubuntu, but the way I fixed this issue on Arch Linux with the app downloaded from AUR is simply copying the .timer and .service file from usr/lib/systemd/user to /etc/systemd/system/ and making sure I have the .desktop file in /etc/xdg/autostart/ The I simply enabled the service globally with root permission: sudo systemctl enable automathemely.timer sudo systemctl start automathemely.timer
But I wanted to see if I could get it to work by using the instructions from @florianmw . So I uninstalled automathemely and removed the timer and service files, rebooted, reinstalled automathemely, rebooted again for good measure, and tried the command:
sudo systemctl --global --user enable automathemely.timer
That, however, threw an error: Failed to connect to bus: No such file or directory Then I tried one of the commands given by @nrayamajhee :
systemctl --user --global enable automathemely.timer
And that worked. However, moving on to
systemctl --user start automathemely.timer
I get the No such file or directory error again.
@sveinungss You're right. Sorry there was a copy-paste error in my command.
It is sudo systemctl --global enable automathemely.timer
without --user
.
Whereas systemctl --user start automathemely.timer
should work.
Like said the package install script is already doing this. There's no need to enable the timer manually, except the install script gave an error. Does systemctl --user list-timers
list the timer?
Thanks for testing!
@florianmw Thank you for being so patient! OK, so I tired sudo systemctl --global enable automathemely.timer
and that passes without comment. However, systemctl --user start automathemely.timer
throws the usual error. Moreover, when I try systemctl --user list-timers
, I get the same error (Failed to connect to bus: No such file or directory). I guess this means that there are no (active) timers in the user service manager. I therefore tried to pass systemctl list-timers
. This gives a list of 6 timers, none of which are automathemely.timer. However, this reports only listing active timers, so I also tried systemctl list-timers --all
to list all loaded timers including inactive ones. Then, finally, does automathemely.timer show up, but with n/a for NEXT LEFT LAST active times. Hence, automathemely.timer is loaded (which I guess fits with the fact that the enable
commands pass without comment, but it is not successfully started. EDIT: I also tried to pass systemctl --user list-timers --all
, but that also just throws the usual error. Hence, there are no loaded timers for user.
@sveinungss Please note to execute all systemctl
commands with --user
argument as your own user! Please make sure you do not execute those as root or with sudo, because this will lead to the error message you're getting.
you saved my day, i just clone the source and run the script myself, then easily check that it's running with
systemctl --user status automathemely.timer
@sveinungss Please note to execute all
systemctl
commands with--user
argument as your own user! Please make sure you do not execute those as root or with sudo, because this will lead to the error message you're getting.
Thanks for the tip, but as I've stated previously, running any kind of systemctl
command results in a sudo password prompt. I haven't found any way around this.
Automathemely does not appear to be getting the proper sunrise and sundown times. This is the output of systemctl status --user automathemely.timer
automathemely.timer - Update automathemely sun times daily
Loaded: loaded (/usr/lib/systemd/user/automathemely.timer; enabled; vendor preset: enabled)
Active: active (waiting) since Wed 2019-07-31 16:03:05 EDT; 9h ago
Trigger: Fri 2019-08-02 00:00:00 EDT; 22h left
Jul 31 16:03:05 monochrome systemd[1993]: Started Update automathemely sun times daily.
As you can see, it only runs at midnight, which is not correct. Automathemely runs at boot, and then at midnight. This is not the correct behavior.
Automathemely does not appear to be getting the proper sunrise/sundown times.
Is there any log I need to capture to help fix this bug?
Can this issue be replicated? @C2N14
Is there any idea why automathemely does not pick up the proper times for sunrise/sunset? @C2N14
自动机似乎没有获得正确的日出和日落时间。 这是输出
systemctl status --user automathemely.timer
automathemely.timer - Update automathemely sun times daily Loaded: loaded (/usr/lib/systemd/user/automathemely.timer; enabled; vendor preset: enabled) Active: active (waiting) since Wed 2019-07-31 16:03:05 EDT; 9h ago Trigger: Fri 2019-08-02 00:00:00 EDT; 22h left Jul 31 16:03:05 monochrome systemd[1993]: Started Update automathemely sun times daily.
如您所见,它仅在午夜运行,这是不正确的。 Automathemely在启动时运行,然后在午夜运行。 这不是正确的行为。
Trigger: Sat 2020-10-24 00:00:00 CST; 4h 25min left same issues
Running automathemely (installed from AUR) on Antergos (on kernel: 5.0.2-arch1-1-ARCH) with Gnome (3.30.02). The program does everything it is supposed to do, except change the themes automatically. I have to invoke it manually by restarting the scheduler. If I do so, it correctly identifies day/night and changes the theme. I'm fairly new to Arch and Gnome (and really linux in general), so please feel free to tell me what I need to provide you with for tracking down the problem.