Search found 204 matches

by Matthew_Wai
Tue Apr 16, 2019 10:06 am
Forum: Scripts & Bash
Topic: (Solved) The service has been enabled but failed. How can I make it run?
Replies: 13
Views: 397

Re: (Solved) The service has been enabled but failed. How can I make it run?

Sorry for my stubbornness, but I think I have found a workaround: matthew@matthew-pc:~$ cat /home/matthew/@/After_waking #!/bin/bash pon dsl-provider && sleep 20s && pon dsl-provider && sleep 20s /usr/bin/sudo -u matthew -i XDG_RUNTIME_DIR=/run/user/$(id -u matthew) DISPLAY=:0 /usr/bin/mailnag matth...
by Matthew_Wai
Tue Apr 16, 2019 3:17 am
Forum: Software & Applications
Topic: Crontab does not work properly.
Replies: 22
Views: 347

Re: Crontab does not work properly.

my crontab line would simply be N N N N N ~/@/Sync/FreeFileSync ~/@/Sync/Backup.ffs_batch It did not work. No files were backed up. 04 15 16 4 * ~/@/Sync/FreeFileSync ~/@/Sync/Backup.ffs_batch Apr 16 15:04:01 matthew-pc cron[1011]: (matthew) RELOAD (crontabs/matthew) Apr 16 15:04:01 matthew-pc CRON...
by Matthew_Wai
Mon Apr 15, 2019 4:33 am
Forum: Software & Applications
Topic: Crontab does not work properly.
Replies: 22
Views: 347

Re: Crontab does not work properly.

that's part one: don't use sudo crontab but just crontab to use your own user's crontab. Yes, second you'll need to export DISPLAY and possibly more due to even your own cron tab not running in graphical context -- but one step at a time. Thank you! The first and second steps worked because files w...
by Matthew_Wai
Sun Apr 14, 2019 1:47 pm
Forum: Software & Applications
Topic: Crontab does not work properly.
Replies: 22
Views: 347

Re: Crontab does not work properly.

/home/matthew/@/Sync/FreeFileSync The above will bring up a GUI but not back up files. The following will not bring up a GUI but back up files in the background. /home/matthew/@/Sync/FreeFileSync "~/@/Sync/Backup.ffs_batch" Both of them can be run via Terminal. Nether of them can be run via Crontab...
by Matthew_Wai
Sun Apr 14, 2019 1:29 pm
Forum: Software & Applications
Topic: Crontab does not work properly.
Replies: 22
Views: 347

Re: Crontab does not work properly.

22 23 14 4 * "/home/matthew/Testing" &> /home/matthew/cron.log 23 01 15 4 * "/home/matthew/Testing" &> /home/matthew/cron.log Apr 15 01:23:01 matthew-pc cron[1013]: (root) RELOAD (crontabs/root) Apr 15 01:23:01 matthew-pc CRON[5150]: pam_unix(cron:session): session opened for user root by (uid=0) A...
by Matthew_Wai
Sun Apr 14, 2019 1:29 pm
Forum: Software & Applications
Topic: Crontab does not work properly.
Replies: 22
Views: 347

Re: Crontab does not work properly.

@reboot export DISPLAY=:0 && cd /home/matthew && ./the-script_here Command xdpyinfo | grep display tells display's number. matthew@matthew-pc:~$ cat /home/matthew/Testing #!/bin/bash echo [$$] Start at $(date) "/home/matthew/@/Sync/FreeFileSync" echo [$$] Finish at $(date) matthew@matthew-pc:~$ xdp...
by Matthew_Wai
Sun Apr 14, 2019 11:25 am
Forum: Software & Applications
Topic: Crontab does not work properly.
Replies: 22
Views: 347

Re: Crontab does not work properly.

#!/bin/bash echo [$$] Start at $(date) "/home/matthew/@/Sync/FreeFileSync" echo [$$] Finish at $(date) The above script brought up nothing. Nothing happened. Have I missed something? 22 23 14 4 * "/home/matthew/Testing" Apr 14 23:22:01 matthew-pc cron[1046]: (root) RELOAD (crontabs/root) Apr 14 23:...
by Matthew_Wai
Sun Apr 14, 2019 11:07 am
Forum: Software & Applications
Topic: Crontab does not work properly.
Replies: 22
Views: 347

Re: Crontab does not work properly.

The script is just for testing. I actually want Crontab to run "/home/matthew/@/Sync/FreeFileSync", which is a "Program (application/x-executable)" rather than a script, and I am unable to add anything into the program, which backs up files automatically.
by Matthew_Wai
Sun Apr 14, 2019 10:54 am
Forum: Software & Applications
Topic: Crontab does not work properly.
Replies: 22
Views: 347

Re: Crontab does not work properly.

xenopeek wrote:
Sun Apr 14, 2019 10:39 am
add some echo statements into your script to find out where in the script it fails.
What should be added into the following script, which cannot be run via Crontab either?

Code: Select all

#!/bin/bash
gnome-disks &_
xdg-open /home/matthew/@
by Matthew_Wai
Sun Apr 14, 2019 7:46 am
Forum: Software & Applications
Topic: Crontab does not work properly.
Replies: 22
Views: 347

Re: Crontab does not work properly.

21 19 14 4 * "/home/matthew/@/Sync/FreeFileSync" &> /home/matthew/cron.log Apr 14 19:21:01 matthew-pc cron[1046]: (root) RELOAD (crontabs/root) Apr 14 19:21:01 matthew-pc CRON[7874]: pam_unix(cron:session): session opened for user root by (uid=0) Apr 14 19:21:01 matthew-pc CRON[7875]: (root) CMD ("...
by Matthew_Wai
Sun Apr 14, 2019 7:39 am
Forum: Newbie Questions
Topic: (Solved) Which version should be used instead of Windows Vista?
Replies: 22
Views: 632

Re: Which version should be used instead of Windows Vista?

wipe the whole drive and try the linux distros suggested. I think she has taken your suggestion according to the following: https://cdn.discuss.com.hk/t/b4ed98/f/800x0/https://img.discuss.com.hk/d/attachments/day_190414/20190414_820643fb7d5bd62255391TYTCqiwAe10.jpg She has installed a Chinese versi...
by Matthew_Wai
Sun Apr 14, 2019 6:18 am
Forum: Software & Applications
Topic: Crontab does not work properly.
Replies: 22
Views: 347

Re: Crontab does not work properly.

sudo crontab -l @reboot pon dsl-provider 14 18 14 4 * echo "Hello" > /home/matthew/Testing.txt 2>&1 14 18 14 4 * "/home/matthew/@/Sync/FreeFileSync" journalctl -e /usr/sbin/cron -- Reboot -- Apr 14 18:08:52 matthew-pc cron[1046]: (CRON) INFO (pidfile fd = 3) Apr 14 18:08:53 matthew-pc cron[1046]: (...
by Matthew_Wai
Sun Apr 14, 2019 1:26 am
Forum: Software & Applications
Topic: Crontab does not work properly.
Replies: 22
Views: 347

Crontab does not work properly.

I am trying to use Crontab. Task 1 was run, but task 2 was not although "/home/matthew/@/Sync/FreeFileSync" can be run via Terminal. How can I make task 2 run via Crontab? Task 1 is 10 13 14 4 * echo "Hello" > /home/matthew/Testing.txt 2>&1 Task 2 is 12 13 14 4 * "/home/matthew/@/Sync/FreeFileSync"
by Matthew_Wai
Sun Apr 14, 2019 1:08 am
Forum: Scripts & Bash
Topic: Problems with Mailnag: it is inactive although Internet connection is available.
Replies: 1
Views: 65

Re: Problems with Mailnag: it is inactive although Internet connection is available.

https://forums.linuxmint.com/viewtopic.php?f=42&t=275464#p1588347 I found the above post and modified the Mailnag.service accordingly, but the service is still inactive although Internet connection is available. The service becomes active only after I have manually run sudo systemctl start Mailnag.s...
by Matthew_Wai
Sat Apr 13, 2019 5:50 am
Forum: Scripts & Bash
Topic: (Solved) The service has been enabled but failed. How can I make it run?
Replies: 13
Views: 397

Re: (Solved) The service has been enabled but failed. How can I make it run?

Rene, I have started a new topic about Mailnag at viewtopic.php?f=213&t=292108
Would you be so kind as to help me solve the problems there?
by Matthew_Wai
Sat Apr 13, 2019 5:47 am
Forum: Scripts & Bash
Topic: Problems with Mailnag: it is inactive although Internet connection is available.
Replies: 1
Views: 65

Problems with Mailnag: it is inactive although Internet connection is available.

In "Mailnag Configuration", Mailnag has been enabled. In System Monitor, Mailnag is present. However, after Mint startup, I get no notification although Internet connection is available and my Yahoo account has new mail. I have to manually run /usr/bin/mailnag . Then a notification will pop up. I wa...
by Matthew_Wai
Fri Apr 12, 2019 4:33 am
Forum: Scripts & Bash
Topic: (Solved) The service has been enabled but failed. How can I make it run?
Replies: 13
Views: 397

Re: The service has been enabled but failed. How can I make it run?

I have not yet tried out Network Manager. I have disabled your "suspend.service" and set up the following "pppoe_connection.service": matthew@matthew-pc:~$ cat /etc/systemd/system/pppoe_connection.service [Unit] After=suspend.target [Service] ExecStart=/usr/bin/pon dsl-provider [Install] WantedBy=su...
by Matthew_Wai
Fri Apr 12, 2019 2:27 am
Forum: Scripts & Bash
Topic: (Solved) The service has been enabled but failed. How can I make it run?
Replies: 13
Views: 397

Re: The service has been enabled but failed. How can I make it run?

I do not and have not ever used PPPoE but the first question that would need to be answered is why you'd need to stop and restart it over suspend/resume in the first place, or why NetworkManager isn't doing so for you already, or whether or not NetworkManager could do so for you. I do remember from...
by Matthew_Wai
Thu Apr 11, 2019 1:16 am
Forum: Scripts & Bash
Topic: (Solved) The service has been enabled but failed. How can I make it run?
Replies: 13
Views: 397

Re: The service has been enabled but failed. How can I make it run?

Done as you said. See below: matthew@matthew-pc:~$ cat /usr/local/bin/suspend #!/bin/sh case $1 in pre) /usr/bin/poff dsl-provider /bin/systemctl stop fancontrol.service /usr/bin/killall -u matthew -q mailnag ;; post) /usr/bin/pon dsl-provider /bin/systemctl start fancontrol.service /usr/bin/sudo -u...
by Matthew_Wai
Wed Apr 10, 2019 1:59 pm
Forum: Scripts & Bash
Topic: (Solved) The service has been enabled but failed. How can I make it run?
Replies: 13
Views: 397

Re: The service has been enabled but failed. How can I make it run?

I’m sorry, rene. I think I asked a wrong question. I actually need to run three commands rather than start GNOME Disks when Mint wakes from suspension. The commands are: pon dsl-provider sudo service fancontrol start /usr/bin/mailnag Should I use three different service files to run them separately?...

Go to advanced search