Any session that I start with "-d -m" doesn't accept "-X stuff [...]" commands unless I've attached to the screen at least once. There is no error message, the commands just do not get through.

The problem is that I start the session from a cron job and am unable to attach to the screen from within cron.

**Steps to repeat**

```
$ screen -m -d -S mydaemon bash
$ screen -S mydaemon -X stuff "`printf "exit\\r"`"
$ screen -ls
        32456.mydaemon  (Detached)
$ screen -r -S mydaemon
$ ^a d
$ screen -S mydaemon -X stuff "`printf "exit\\r"`"
$ screen -ls
No Sockets found in /var/run/screen/S-user

```

^a d indicates pressing Ctrl+a then pressing d.

**Versions**

```
CentOS release 5.5 (Final)
Screen version 4.00.03 (FAU) 23-Oct-06

```