Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
セッションをロックのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
セッションをロック
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
[[Category:セキュリティ]] [[en:Session lock]] [[ru:Session lock]] セッションの画面をロックするユーティリティは数多くあります。ただし、使用するユーティリティは、使用している環境 (仮想コンソールまたは特定のディスプレイサーバー (Xorg または Wayland) に大きく依存することに注意して下さい。 参照 [[アプリケーション一覧#スクリーンロック]] == 環境別 == {{Merge|List of applications#Screen lockers|Same purpose, only split into categories.}} === 仮想コンソール === {{ic|vlock}} または {{Pkg|physlock}} を使用して、仮想コンソールをロックできます。 === Xorg === Xorg でセッションをロックするには多くの方法があるため、このセクションは不完全になる可能性があります。ただし、いくつかの方法には次のものがあります。 * {{Pkg|xlockmore}} パッケージ内の {{ic|xlock}} * {{Pkg|xsecurelock}} パッケージ内の {{ic|xsecurelock}} * {{Pkg|xscreensaver}} パッケージの {{ic|xscreensaver-command -lock}} * {{Pkg|xss-lock}} * {{Pkg|slock}} パッケージの中の [[slock]] * {{Pkg|kscreenlocker}} * {{Pkg|i3lock}} * {{AUR|i3lock-color}} * {{AUR|alock}} ほとんどのデスクトップ環境には、セッションをロックする何らかの方法が用意されています。 === Wayland === {{Pkg|swaylock}} または {{Pkg|waylock}} でセッションをロックできます。 == ロックのトリガー == セッションをロックするには、さまざまな方法があります。 * ターミナルから * GUI を使用 ** デスクトップアイコンから ** ホットコーナーの使用 ** メニュー (マウスまたはキーボード操作) からを選択します * [[キーボードショートカット|ショートカット]] から * イベントから ** 非アクティブ ([[#非アクティブ|systemd]]、[[#xss-lock|xss-lock]]、[[#xautolock|xautolock]] を使用) イベントから ** [[#systemd イベント|systemd イベント]] (サスペンド、ハイバネートなど) 最後のポイント (イベントからロックをトリガーする) は、最も厄介です。 * アクショントリガーでロックを実行し、その後、最初のアクションを実行する。 * イベントトリガーから、イベントチェーンにロックを追加する。今のところ、これは systemd を使ってしかできません。 === シェルトリガー === ==== Zsh ==== To execute a command after terminal inactivity, you can use the TMOUT environment variable. You can combine it with a trap on the ALARM signal to execute the lock. Without a trap, it will just terminate the shell. You might want to detect if you are in a graphical environment, otherwise your GUI terminals might start disappearing without you understanding why. === Xorg triggers === ==== xss-lock ==== {{pkg|xss-lock}} is triggered by one of two things: * systemd events * [[DPMS]] The advantage of this is that you can control a lock issued manually, by inactivity, and by a suspend command at the same place. To execute an action on one of those events: $ xss-lock <locker-utility> ===== systemd events ===== By default, xss-lock subscribes to {{ic|suspend}}, {{ic|hibernate}}, {{ic|lock-session}}, and {{ic|unlock-session}} with appropriate actions (run locker and wait for user to unlock or kill locker). You can prevent xss-lock from being triggered by {{ic|suspend}} and {{ic|hibernate}} using {{ic|--ignore-sleep}}. You can trigger a manual lock using {{ic|loginctl lock-session}}. ===== DPMS ===== To configure DPMS signaling timeout: # Trigger screensaver after 10 minutes of inactivity xset s on xset s 600 DPMS signaling can also be configured in {{ic|/etc/X11/xorg.conf.d/}} in the {{ic|Monitor}} section. Using DPMS signaling, you can set a second timer, for example to notify the user or to dim the screen. For example (from {{man|1|xss-lock}}): # Dim the screen after three minutes of inactivity, lock the screen two minutes later using i3lock: xset s 180 120 xss-lock -n dim-screen.sh -- i3lock -n An example {{ic|dim-screen.sh}} script can be found in {{ic|/usr/share/doc/xss-lock}}. {{Note|When using xss-lock with [[DPMS]], you will have to blank the screen yourself. It will not be triggered when looking at videos.}} ==== xautolock ==== $ xautolock -time 12 -locker "systemctl suspend" -detectsleep {{Note|1= xautolock has restrictive timer limits: * 1 min to 1 hour for {{ic|time}} * 10 min to 2 hour for {{ic|killtime}} It might be necessary to add {{ic|-detectsleep}} to prevent xautolock from locking the session after resuming. One nice feature of xautolock is the {{ic|corners}}. }} === Wayland triggers === ==== swayidle ==== {{Pkg|swayidle}} listens for idle activity from the Wayland compositor, as well as systemd events, and executes commands accordingly. See [[Sway#Idle]]. ==== D-Bus notification ==== Using {{ic|loginctl lock-session}}, or the {{ic|lock}} action in {{man|5|logind.conf}}, you can notify the system through DBUS that you want to lock. This notification can then be processed, for example by xss-lock. ==== Inactivity ==== In {{man|5|logind.conf}}, you can configure the {{ic|IdleAction}} to {{ic|lock}}. This will trigger a DBUS notification, that will have to be processed (for example by xsslock) to lock the session. Note that this is for a global system (so this is not ideal for a multi user environment). Note also that "this requires that user sessions correctly report the idle status to the system". ==== Units ==== ===== Before suspend or hibernate ===== You can use a [[Power management#Sleep hooks|Sleep hook]]. {{bc|1= [Unit] Description=Lock the screen Before=sleep.target [Service] User=%I Type=forking Environment=DISPLAY=:0 ExecStart=/usr/bin/i3lock -c 000000 [Install] WantedBy=sleep.target }} To enable it for a certain user, [[enable]] {{ic|sleep@''Username''.service}}. ===== Lid closing ===== You can use the {{ic|lock}} action using the related [[Power management#ACPI events|ACPI event]]. == See also == * [https://geoff.greer.fm/2018/01/02/linux-laptop-locking/ Geoff Greer's site: Linux Laptop Locking]
このページで使用されているテンプレート:
テンプレート:AUR
(
ソースを閲覧
)
テンプレート:Bc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:Man
(
ソースを閲覧
)
テンプレート:Note
(
ソースを閲覧
)
テンプレート:Pkg
(
ソースを閲覧
)
セッションをロック
に戻る。
検索
検索
セッションをロックのソースを表示
話題を追加