Results 1 to 4 of 4

Thread: howto Statup Scripts

  1. #1
    Junior Member
    Join Date
    Sep 2013
    Posts
    2

    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

  2. #2
    Senior Member registered user
    Join Date
    Feb 2010
    Posts
    512
    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'.

  3. #3
    Junior Member
    Join Date
    Sep 2013
    Posts
    2
    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?

  4. #4
    Senior Member registered user
    Join Date
    Feb 2010
    Posts
    512

    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
  •  


1U BareMetal pfsense opnsense Router Firewall DNS Server 6x 10GB Ethernet Ports picture

1U BareMetal pfsense opnsense Router Firewall DNS Server 6x 10GB Ethernet Ports

$169.00



HP ProLiant MicroServer Gen8 Server Xeon E3-1220L 8GB RAM No HDD's picture

HP ProLiant MicroServer Gen8 Server Xeon E3-1220L 8GB RAM No HDD's

$229.99



HP Proliant Microserver N40L 8GB ECC Ram w/ MSI Nvidia G210 HMDI picture

HP Proliant Microserver N40L 8GB ECC Ram w/ MSI Nvidia G210 HMDI

$175.00



HPE ProLiant MicroServer Gen10 Plus v2 Ultra Micro Tower Server - 1 x Intel Pent picture

HPE ProLiant MicroServer Gen10 Plus v2 Ultra Micro Tower Server - 1 x Intel Pent

$551.66



HP ProLiant MicroServer N40L AMD Turion II 1.5GHz 8GB RAM No HDDs No PSU - Read picture

HP ProLiant MicroServer N40L AMD Turion II 1.5GHz 8GB RAM No HDDs No PSU - Read

$75.00



HP ProLiant MicroServer Gen8 Server Pentium G20202T 16GB RAM No Hdd No OS picture

HP ProLiant MicroServer Gen8 Server Pentium G20202T 16GB RAM No Hdd No OS

$150.00



HPE ProLiant MicroServer Gen10 Plus v2 Ultra Micro Tower Server - 1 x Intel Xeon picture

HPE ProLiant MicroServer Gen10 Plus v2 Ultra Micro Tower Server - 1 x Intel Xeon

$687.40



Lenovo ThinkServer TS140 Intel Xeon E3-1226 v3 3.30GHz 16GB RAM No HDD picture

Lenovo ThinkServer TS140 Intel Xeon E3-1226 v3 3.30GHz 16GB RAM No HDD

$82.07



Supermicro 2U X9DRH-7TF SAS2 Xeon 2x E5-2680 v2 2.8GHz 128GB RAID 12x 3.5

Supermicro 2U X9DRH-7TF SAS2 Xeon 2x E5-2680 v2 2.8GHz 128GB RAID 12x 3.5"

$349.99



SuperMicro 1U X10DRL-i Server- (2x)Xeon E5-2650 V4 @2.2GHz, 128GB DDR4-NO H picture

SuperMicro 1U X10DRL-i Server- (2x)Xeon E5-2650 V4 @2.2GHz, 128GB DDR4-NO H

$299.99