So, if i do this:
su -c 'screen -dmS screenname script to run' - user to run as
It won't work. The screen command is working if excecuted from root, so there is no problem there.
If I do:
su - user
screen
I get:
Cannot open your terminal '/dev/pts/0' - please check.
What is wrong?
EDIT: I've been searching around and can't seem to find any good solution to this problem.
I'll be going for the next best thing: running the screens as root.