# Custom autostart script not working

**URL:** https://dietpi.com/forum/t/custom-autostart-script-not-working/1960
**Category:** Troubleshooting
**Created:** [12 February 2018 13:05 UTC](https://dietpi.com/forum/t/custom-autostart-script-not-working/1960 "2018-02-12T13:05:47Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![gurnarok](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/g/82dd89/32.png) [@gurnarok](https://dietpi.com/forum/u/gurnarok)
#### Post date: [12 February 2018 13:05 UTC](https://dietpi.com/forum/t/custom-autostart-script-not-working/1960/1 "2018-02-12T13:05:47Z")

</div>

Hi, I am having a problem with custom script.

```nohighlight
#!/bin/bash
#---Examples---

# - Chromium
#xinit chromium

# - LXDE
#startx

# - Print hello
#echo -e "Hello"

#---Put your code below this line---
echo 123 > /root/bootok

```

```nohighlight
root@Mars:~# ls -lh /root/
total 92K
drwxr-xr-x 4 root root 4.0K Feb 12 11:34 configs
drwxr-xr-x 2 root root 4.0K Jan 31 07:20 Desktop
-rw-r--r-- 1 root root 0 Jan 31 08:07 kodi_crashlog-20180131_080705.log
-rw-r--r-- 1 root root 82K Feb 1 18:31 kodi_crashlog-20180201_183123.log

```

In boot screen, I see a strange message:

```nohighlight
Started DietPi autostart (Custom /var/lib/dietpi/dietpi-autostart/custom.sh).
/bin/echo: /bin/echo: cannot execute binary file

```

So what is going on? How can I fix this? I am trying to delay Kodi from starting, giving MariaDB time to start.

---

_[View the full topic](https://dietpi.com/forum/t/custom-autostart-script-not-working/1960)._
