Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

N00bs try cron on Arch EndeavourOS #123

Closed
jojojojojoj5564656465465 opened this issue Nov 7, 2022 · 8 comments
Closed

N00bs try cron on Arch EndeavourOS #123

jojojojojoj5564656465465 opened this issue Nov 7, 2022 · 8 comments
Labels

Comments

@jojojojojoj5564656465465

I don't understand why it doesn't work :

I do sudo crontab -e

It opens a blank nano page, then I fill the command

* * * * * alacritty

Nothing happen

@gnuhead-chieb
Copy link

Cron is not designed for running GUI applications.
You need to do workaround for running GUI application from cron jobs.

First, run echo $XAUTHORITY $DISPLAY on your session.
In my case, this outputs /run/user/1000/xauth_TeTWzm :1
This output result depends on your environment

In this case, you have to configure cron setting like this * * * * * XAUTHORITY=/run/user/1000/xauth_TeTWzm DISPLAY=:1 alacritty

@gnuhead-chieb
Copy link

Did you solve the problem?

@jojojojojoj5564656465465
Copy link
Author

i did
sudo nano crontab -e and past

          • XAUTHORITY=/run/user/1000/xauth_TeTWzm DISPLAY=:1 alacritty
          • XAUTHORITY=/home/manjaro/.Xauthority DISPLAY=:0 alacritty
            Didn't work but i think it's because of arch

@gnuhead-chieb
Copy link

try without sudo

@jojojojojoj5564656465465
Copy link
Author

image

I cannot write if i am wihout sudo

@gnuhead-chieb
Copy link

sudo crontab -e -u [username]

@jojojojojoj5564656465465
Copy link
Author

image

i also did systemctl enable --now cronie.service after still not work

@jojojojojoj5564656465465
Copy link
Author

image

Works but doesn't open my zsh terminal

@t8m t8m added the question label Mar 6, 2023
@t8m t8m closed this as completed Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants