brainsteam.co.uk/brainsteam/content/posts/2023/09/30/TIL_ Unlocking Ubuntu Remot...

52 lines
2.2 KiB
Markdown
Raw Normal View History

2024-09-08 15:00:57 +01:00
---
categories:
- Software Development
date: '2023-09-30 09:34:37'
draft: false
tags:
- til
title: 'TIL: Unlocking Ubuntu Remotely'
type: posts
---
<!-- wp:paragraph -->
<p>My use case is starting a game stream from my steamdeck after my pc has locked itself. The game will start but the desktop lock screen/screensaver is visible and you can't play or do anything.</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>You need to SSH in as the active user (from another device like your phone or another laptop) and run:</p>
<!-- /wp:paragraph -->
<!-- wp:enlighter/codeblock {"language":"bash"} -->
<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">loginctl list-sessions
</pre>
<!-- /wp:enlighter/codeblock -->
<!-- wp:paragraph -->
<p>You will get a table output with a list of sessions:</p>
<!-- /wp:paragraph -->
<!-- wp:enlighter/codeblock {"language":"bash"} -->
<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">SESSION UID USER SEAT TTY
38 1000 james pts/1
44 1000 james pts/2
5 1000 james seat0 tty2
</pre>
<!-- /wp:enlighter/codeblock -->
<!-- wp:paragraph -->
<p>You want to take the one that has a seat allocated and run unlock against it:</p>
<!-- /wp:paragraph -->
<!-- wp:enlighter/codeblock {"language":"bash"} -->
<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">loginctl unlock-session 5
</pre>
<!-- /wp:enlighter/codeblock -->
<!-- wp:paragraph -->
<p>Hopefully this will unlock the screen and your steamdeck screen will show the application you're trying to use.</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p><a href="https://askubuntu.com/questions/341014/unlock-login-screen-using-command-line">https://askubuntu.com/questions/341014/unlock-login-screen-using-command-line</a></p>
<!-- /wp:paragraph -->