removed not needed variable, moved value inline
fixed chowning of /dev/tty, added env var setting