-
howto Statup Scripts
Hello!
How do I get a script to execute on boot in a persistent usb knoppix install?
I tried this, but it didn't work:
Code:
knoppix@Microknoppix:~$ cat /home/knoppix/.config/autostart/startup.desktop
[Desktop Entry]
Name=Startup
ServerExec="/bin/mkdir /tmp/test"
Icon=
Type=Application
...but there's no /tmp/test directory on boot :\
more info about my setup:
Code:
knoppix@Microknoppix:~$ uname -a
Linux Microknoppix 3.9.6 #25 SMP PREEMPT Sat Jun 15 15:27:01 CEST 2013 i686 GNU/Linux
-
Senior Member
registered user
I would suggest that you read the latest Desktop Entry Specification. On the page Recognized desktop entry keys you will find out that there is no key 'ServerExec'.
-
Thanks for your fast response!
I updated the "ServerExec" line to "Exec" as per the link you provided, but there's still no /tmp/test file getting created on boot.
Code:
knoppix@Microknoppix:~$ cat .config/autostart/startup.desktop
[Desktop Entry]
Name=Startup
Exec="/bin/mkdir /tmp/external"
Icon=
Type=Application
If there's errors with processing .config/autostart/* files, is there anywhere these errors will be logged so I can check for messages?
-
Senior Member
registered user
Examples
The first desktop file will create a new directory /tmp/testdir if it does not already exist.
Code:
knoppix@Knoppix720cd:~$ cat /home/knoppix/.config/autostart/mkTestdir.desktop
[Desktop Entry]
Name=mkTestdir
Exec=/bin/mkdir -p /tmp/testdir
Terminal=false
Type=Application
The second desktop file will create an empty file /tmp/testfile if it does not already exist.
Code:
knoppix@Knoppix720cd:~$ cat /home/knoppix/.config/autostart/mkTestfile.desktop
[Desktop Entry]
Name=mkTestfile
Exec=/usr/bin/touch /tmp/testfile
Terminal=false
Type=Application
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Intel XEON SILVER SILVER 4114 SR3GK PROCESSOR
$19.99
Intel - Core i9-12900K Desktop Processor 16 (8P+8E) Cores up to 5.2 GHz Unloc...
$619.99
Intel - Core i7-12700K Desktop Processor 12 (8P+4E) Cores up to 5.0 GHz Unloc...
$419.99
Intel Xeon E5-2697A V4 2.6GHz CPU Processor 16-Core Socket LGA2011 SR2K1
$39.99
Intel Core i5-8500 3 GHz 8 GT/s LGA 1151 Desktop CPU Processor SR3XE
$49.99
AMD Ryzen 9 5950X 16-core 32-thread Desktop Processor
$319.99
Intel - Core i9-14900K 14th Gen 24-Core 32-Thread - 4.4GHz (6.0GHz Turbo) Soc...
$619.99
AMD Ryzen 5 5500 6-Core 3.6GHz Socket AM4 65W CPU Desktop Processor
$98.99
Intel Core i5-12400 Desktop Processor With HeatSink
$140.00
Intel i7-8700 Coffee Lake 3.2GHz 6-Core Max Turbo 4.6GHz Processor
$48.70