You are not logged in.

#1 2017-01-09 04:38:39

Bronze
Member
Registered: 2016-12-23
Posts: 61

systemd: can't resume screen

systemct status responds with:

            └─minecraftd.service
               ├─10797 SCREEN -dmS minecraft /bin/bash -c cd '/srv/minecraft'; java -server ...

However: screen -ls or -r lists no screens. What am I doing wrong?

Offline

#2 2017-01-09 15:43:53

SmallAndSimple
Member
Registered: 2015-11-25
Posts: 58

Re: systemd: can't resume screen

Is the user that starts the screen process the same user as you? If it is not, the screen will not find the sessions. Also: can you verify in some other way that this screen is alive?

Offline

#3 2017-01-09 17:24:58

Bronze
Member
Registered: 2016-12-23
Posts: 61

Re: systemd: can't resume screen

Thanks for the response.
The server is owned by a different user: "minecraft". It is started at startup by systemd (automatic).

ps -aux | grep -i screen

returns

root     15660  0.4  0.0  23932  2576 ?        Ss   10:22   0:16 SCREEN -dmS minecraft /bin/bash -c cd '/srv/minecraft'; java -server ...

[EDIT] I managed to connect to the screen after "su root" and "su minecraft" (user minecraft doesn't have a password). Is there no other way to connect to the screen?

Last edited by Bronze (2017-01-10 02:27:04)

Offline

#4 2017-01-11 11:38:23

SmallAndSimple
Member
Registered: 2015-11-25
Posts: 58

Re: systemd: can't resume screen

This: http://unix.stackexchange.com/questions … ther-users seems to imply that there exists a `multiuser on` option that you can use to connect to the screen session from your own user.
You could also write a script that executes "sudo su minecraft" and the screen connect command in that order.

Offline

#5 2017-01-15 16:58:12

Bronze
Member
Registered: 2016-12-23
Posts: 61

Re: systemd: can't resume screen

Thanks!
Since systemd starts the screen, I am now looking for automating the suggested commands.
I found this:
http://serverfault.com/questions/155322 … -another-u

Will try (and mark solved when it works)

Offline

Board footer

Powered by FluxBB