You are not logged in.

#1 2019-07-29 13:14:46

postmanpat
Member
Registered: 2019-07-29
Posts: 3

[Solved] GNU Screen / how to lock AND detach

Hi every one,

I use GNU Screen:
https://wiki.archlinux.org/index.php/GNU_Screen

A screen can be lock with the binding: C-a x
which is convinient for example to have a screen session for root activities.

I would like to be able to lock and detach from a screen session (I tried c-a x, c-a d without success)
However, I have not figured out how to detach from the session after the latter has been locked.

Have a nice summer.

Last edited by postmanpat (2019-07-30 11:46:32)

Offline

#2 2019-07-29 13:35:40

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,688
Website

Re: [Solved] GNU Screen / how to lock AND detach

FTR, lockscreen is badly named. It doesn't lock the screen session, it detaches the session and locks the current terminal.

See https://www.gnu.org/software/screen/man … /Lock.html


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2019-07-30 11:45:36

postmanpat
Member
Registered: 2019-07-29
Posts: 3

Re: [Solved] GNU Screen / how to lock AND detach

Thanks WorMzy for your reply and the link,

I find it curious that Screen only detaches the session.
I just need to open a new terminal and attach to the detached session to bypass the lock... (!!)

I should maybe mark this thread as solved since you answered the question.
However, if anybody find some kind of hack, let us know.

Thank you again and take care.

Offline

#4 2019-07-30 12:56:40

postmanpat
Member
Registered: 2019-07-29
Posts: 3

Re: [Solved] GNU Screen / how to lock AND detach

Hello,

The Gnu Screen's function I was looking for was 'password'.
1) To password protect a session:
C-a :password
and type twice the password you want to use

2) If you want to remove any password from the session:
C-a :password ""

3) If you want to protect all your screen session with the same password.
- Create a new session: screen -S toto
- Protect the session: C-a :password and type twice your choosen password
- Paste the encrypted password in the current buffer: C-a ]
- Write encrypted password in your ~/.screenrc by adding the line: password <encryptedpassword>

http://damien.krotkine.com/2011/09/01/p … sword.html

Bye!

Last edited by postmanpat (2019-07-30 13:25:43)

Offline

#5 2019-07-30 13:21:59

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,688
Website

Re: [Solved] GNU Screen / how to lock AND detach

Thanks for sharing your solution, I've learnt something new as well!


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB