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
  •  


Lenovo IdeaPad 5 Laptop, 15.6

Lenovo IdeaPad 5 Laptop, 15.6" FHD IPS Touch, Ryzen 5 5625U, 16GB, 512GB SSD

$516.99



Lenovo IdeaPad 5i Laptop, 15.6

Lenovo IdeaPad 5i Laptop, 15.6" FHD Touch, Intel i5-1235U, 16GB, 512GB SSD

$577.99



Lenovo IdeaPad 5i Laptop, 15.6

Lenovo IdeaPad 5i Laptop, 15.6" FHD IPS Touch, i7-1255U, 16GB, 1TB SSD

$679.99



Lenovo Thinkpad Yoga Touchscreen Laptop Computer Windows 10 4GB 256GB SSD HDMI picture

Lenovo Thinkpad Yoga Touchscreen Laptop Computer Windows 10 4GB 256GB SSD HDMI

$134.99



Lenovo - Ideapad Gaming 3 15.6

Lenovo - Ideapad Gaming 3 15.6" FHD Laptop - Ryzen 5 5600H - 8GB Memory - NVI...

$549.99



Lenovo ThinkPad T460 14

Lenovo ThinkPad T460 14" Laptop Core i7-6600U 6th 2.60GHz WebCam Backlit HDMI

$175.00



Lenovo Flex 5i 14

Lenovo Flex 5i 14" Laptop Intel Core i3-1115G4 8GB Ram 256GB SSD W11H in S Mode

$246.99



Lenovo ThinkPad T470 14

Lenovo ThinkPad T470 14" FHD Core i7-6600U 2.60GHz Webcam Backlit HDMI USB-C

$225.00



Lenovo Chromebook 500 Touchscreen 1.1GHz, 4GB RAM, 32GB SSD - FLIP AROUND picture

Lenovo Chromebook 500 Touchscreen 1.1GHz, 4GB RAM, 32GB SSD - FLIP AROUND

$51.25



Lenovo Laptop Computer SL510 15.6

Lenovo Laptop Computer SL510 15.6" Core 2 Duo 4GB 250GB HD DVD WiFi Windows 10

$149.95