<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Ssh on akky blog</title>
    <link>http://blog.akky.me/tags/ssh/</link>
    <description>Recent content in Ssh on akky blog</description>
    <generator>Hugo</generator>
    <language>jp-ja</language>
    <lastBuildDate>Sun, 05 Jun 2022 02:30:43 +0900</lastBuildDate>
    <atom:link href="http://blog.akky.me/tags/ssh/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Lock Gnome Screen via SSH</title>
      <link>http://blog.akky.me/blog/20220605-lock-gnome-screen-via-ssh/</link>
      <pubDate>Sun, 05 Jun 2022 02:30:43 +0900</pubDate>
      <guid>http://blog.akky.me/blog/20220605-lock-gnome-screen-via-ssh/</guid>
      <description>&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;&#xA;&lt;p&gt;I want to lock gnome-session(Desktop) with a user logged in via ssh.&lt;/p&gt;&#xA;&lt;h2 id=&#34;script&#34;&gt;Script&lt;/h2&gt;&#xA;&lt;p&gt;Save below script and execute it.&lt;/p&gt;&#xA;&lt;script src=&#34;https://gist.github.com/akriaueno/b83963eb4ce320ea21945720ac877c3d.js&#34;&gt;&lt;/script&gt;&#xA;&#xA;&lt;p&gt;There are two key points at line 10.&lt;/p&gt;&#xA;&lt;h3 id=&#34;1-gnome-screensaver-command--l&#34;&gt;1. &lt;code&gt;gnome-screensaver-command -l&lt;/code&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Execute &lt;code&gt;gnome-screensaver-command&lt;/code&gt; as GNOME logged in user.&lt;/p&gt;&#xA;&lt;h3 id=&#34;2-dbus_session_bus_address&#34;&gt;2. &lt;code&gt;DBUS_SESSION_BUS_ADDRESS&lt;/code&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Set dbus environment varibale to execute &lt;code&gt;gnome-screensaver-command&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;reference&#34;&gt;Reference&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://askubuntu.com/questions/7776/how-do-i-lock-the-desktop-screen-via-command-line&#34;&gt;https://askubuntu.com/questions/7776/how-do-i-lock-the-desktop-screen-via-command-line&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://askubuntu.com/questions/707984/lock-screen-with-gnome-screensaver-command-as-root-from-etc-pm-sleep-d-script&#34;&gt;https://askubuntu.com/questions/707984/lock-screen-with-gnome-screensaver-command-as-root-from-etc-pm-sleep-d-script&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
  </channel>
</rss>
