F5F Stay Refreshed Software Operating Systems How to create startup scripts in Ubuntu?

How to create startup scripts in Ubuntu?

How to create startup scripts in Ubuntu?

Pages (2): Previous 1 2
W
whatuppants
Junior Member
47
07-16-2023, 06:10 AM
#11
Discuss the goals and common applications of ETC RC local
W
whatuppants
07-16-2023, 06:10 AM #11

Discuss the goals and common applications of ETC RC local

I
193
07-18-2023, 03:07 AM
#12
I just checked all three options, but none worked for me.
I
itzMikaHackzZ_
07-18-2023, 03:07 AM #12

I just checked all three options, but none worked for me.

O
Olivier2201
Member
61
07-24-2023, 07:52 AM
#13
You need to install necessary software and configure your system before starting your Linux box. This typically involves setting up a desktop environment, installing essential packages, and ensuring proper permissions.
O
Olivier2201
07-24-2023, 07:52 AM #13

You need to install necessary software and configure your system before starting your Linux box. This typically involves setting up a desktop environment, installing essential packages, and ensuring proper permissions.

S
sharpeye27
Junior Member
6
07-24-2023, 08:28 AM
#14
I've received your message.
S
sharpeye27
07-24-2023, 08:28 AM #14

I've received your message.

F
Foreignpear
Junior Member
30
07-28-2023, 09:39 AM
#15
did you attempt sudo -i then add it to your crontab? at the moment the settings show a single star (*) with five stars total.
F
Foreignpear
07-28-2023, 09:39 AM #15

did you attempt sudo -i then add it to your crontab? at the moment the settings show a single star (*) with five stars total.

G
Greeperakos
Member
174
07-28-2023, 10:32 AM
#16
I'll attempt it again after the reboot.
G
Greeperakos
07-28-2023, 10:32 AM #16

I'll attempt it again after the reboot.

_
___Alex___
Member
109
07-29-2023, 10:04 AM
#17
Two different startup apps for this query:
1. A tool to disable mouse acceleration in Ubuntu 15.10
2. An alternative method or application suggestion related to the topic
_
___Alex___
07-29-2023, 10:04 AM #17

Two different startup apps for this query:
1. A tool to disable mouse acceleration in Ubuntu 15.10
2. An alternative method or application suggestion related to the topic

_
_Chives
Junior Member
30
08-02-2023, 08:12 PM
#18
Hey! The idea from deXxterlab97 seems most accurate, though some of the other suggestions might not apply in all cases. There are different methods to launch programs or scripts when the system starts. I’d think about it this way: System-wide start-up options Per-user or per-login setups Crontab doesn’t fit into either group; instead, services like crond are part of the first category. This matters because certain tasks shouldn’t run before a user logs in. Linux and most Unix systems are designed for multiple users. If you put preferences meant for a single user in system-wide files, they might not work at all or could be ignored when the user logs in. Also, other users might find it annoying if they don’t want the same settings. So, for your situation, set the commands to run under your desktop environment when you log in—like /etc/rc.d instead of crontab. This avoids issues with X.org needing to run them and respects user preferences. The method you use depends on your desktop environment (KDE, Gnome, etc.). Crontab is useful for scheduling jobs at intervals, not necessarily at startup, and running it with sudo can affect permissions. Using “* * * * *” will trigger the program every minute, which uses minimal CPU but isn’t a clean solution. According to the man page, you can also use “@reboot”, but it might not work if crond runs before the GUI appears.
_
_Chives
08-02-2023, 08:12 PM #18

Hey! The idea from deXxterlab97 seems most accurate, though some of the other suggestions might not apply in all cases. There are different methods to launch programs or scripts when the system starts. I’d think about it this way: System-wide start-up options Per-user or per-login setups Crontab doesn’t fit into either group; instead, services like crond are part of the first category. This matters because certain tasks shouldn’t run before a user logs in. Linux and most Unix systems are designed for multiple users. If you put preferences meant for a single user in system-wide files, they might not work at all or could be ignored when the user logs in. Also, other users might find it annoying if they don’t want the same settings. So, for your situation, set the commands to run under your desktop environment when you log in—like /etc/rc.d instead of crontab. This avoids issues with X.org needing to run them and respects user preferences. The method you use depends on your desktop environment (KDE, Gnome, etc.). Crontab is useful for scheduling jobs at intervals, not necessarily at startup, and running it with sudo can affect permissions. Using “* * * * *” will trigger the program every minute, which uses minimal CPU but isn’t a clean solution. According to the man page, you can also use “@reboot”, but it might not work if crond runs before the GUI appears.

H
Holmer9
Junior Member
41
08-03-2023, 01:15 AM
#19
yes you can add it to crontab with @reboot at startup. ubuntu will run the code after every boot. you might execute a script using sleep 100, which means it waits 100 seconds before running and appends & sign to the cron command. this ensures your task executes once everything starts. i don’t think any moder pc requires such long wait times just to begin.
H
Holmer9
08-03-2023, 01:15 AM #19

yes you can add it to crontab with @reboot at startup. ubuntu will run the code after every boot. you might execute a script using sleep 100, which means it waits 100 seconds before running and appends & sign to the cron command. this ensures your task executes once everything starts. i don’t think any moder pc requires such long wait times just to begin.

Pages (2): Previous 1 2