「Xrdp」の版間の差分
(→Xorg backend: 翻訳) |
(→トラブルシューティング: 英語版の最新版に差し替え) |
||
79行目: | 79行目: | ||
=== Black screen with a desktop environment === |
=== Black screen with a desktop environment === |
||
− | If you get a black screen and you use a desktop environment, it may be a result of [[D-Bus]] not being properly initialized. |
+ | If you get a black screen and you use a desktop environment, it may be a result of [[D-Bus]] not being properly initialized. Some DEs (like KDE Plasma) might also be able to restore fully working applications/windows from a previous session, which makes it seem that "only plasmashell" is missing. |
+ | |||
+ | Try running the desktop environment with {{ic|dbus-launch --exit-with-session}} in your {{ic|~/.xinitrc}} file. For KDE Plasma, you can use the command {{ic|/usr/lib/plasma-dbus-run-session-if-needed startplasma-x11}} or {{ic|dbus-launch --exit-with-session startplasma-x11}}. |
||
+ | |||
+ | === Green screen === |
||
+ | |||
+ | If the login dialog appears, but no desktop environment starts when you click OK, change {{ic|1=param=Xorg}} to {{ic|1=param=/usr/lib/Xorg}} in {{ic|/etc/xrdp/sesman.ini}}. |
||
=== loginctl or systemctl --user not working === |
=== loginctl or systemctl --user not working === |
||
90行目: | 96行目: | ||
{{hc|/etc/pam.d/xrdp-sesman|2= |
{{hc|/etc/pam.d/xrdp-sesman|2= |
||
#%PAM-1.0 |
#%PAM-1.0 |
||
+ | auth include system-remote-login |
||
− | |||
− | auth |
+ | '''-auth optional pam_gnome_keyring.so''' |
− | '''-auth |
+ | '''-auth optional pam_kwallet5.so''' |
+ | account include system-remote-login |
||
− | '''-auth optional pam_kwallet5.so''' |
||
+ | password include system-remote-login |
||
− | |||
+ | '''-password optional pam_gnome_keyring.so use_authtok''' |
||
− | account include system-remote-login |
||
+ | session include system-remote-login |
||
− | |||
+ | '''-session optional pam_gnome_keyring.so auto_start''' |
||
− | password include system-remote-login |
||
− | '''- |
+ | '''-session optional pam_kwallet5.so auto_start''' |
− | |||
− | '''session optional pam_keyinit.so force revoke''' |
||
− | session include system-remote-login |
||
− | '''-session optional pam_gnome_keyring.so auto_start''' |
||
− | '''-session optional pam_kwallet5.so auto_start''' |
||
}} |
}} |
||
− | If you only use gnome-keyring it is not necessary to include the kwallet5 lines, and vice versa. |
+ | Then, add {{ic|etc/pam.d/xrdp-sesman}} (no leading slash) to {{ic|NoUpgrade}} in {{ic|/etc/pacman.conf}}. If you only use gnome-keyring it is not necessary to include the kwallet5 lines, and vice versa. |
=== Prevent autostart items from starting === |
=== Prevent autostart items from starting === |
||
− | To prevent user defined {{ic|~/.config/autostart}} items |
+ | To prevent user defined {{ic|~/.config/autostart}} items from starting you can set the autostart directory param on the session in the {{ic|~/.xinitrc}} to use only the global {{ic|/etc/xdg/autostart}} directory. |
{{bc|<nowiki> |
{{bc|<nowiki> |
||
131行目: | 132行目: | ||
If sound still does not work, try manually starting PulseAudio with {{ic|pulseaudio &}} in your {{ic|~/.xinitrc}}. |
If sound still does not work, try manually starting PulseAudio with {{ic|pulseaudio &}} in your {{ic|~/.xinitrc}}. |
||
+ | |||
+ | === Two-finger scrolling is too fast === |
||
+ | |||
+ | Use the xorg backend, make sure xorgxrdp is 0.9.19 or newer. Then add {{ic|1=XRDP_XORG_TOUCHPAD_SCROLL_HACK=yes}} to the {{ic|[SessionVariables]}} section of {{ic|/etc/xrdp/sesman.ini}}. |
||
+ | |||
+ | See [https://github.com/neutrinolabs/xorgxrdp/issues/150 upstream issue #150] for details. |
||
+ | |||
+ | === Restricted functionality within remote system === |
||
+ | |||
+ | A user may not have the same access permissions when logged into a system remotely as the same user does when logged in locally. Additional configuration may be required of the [[polkit]] permissions policies to grant access, including to mounted drives or to control network connections. |
||
+ | |||
+ | ==== Mounted drives ==== |
||
+ | |||
+ | For remote access permissions to mounted drives see [[udisks#Permissions]]. |
||
+ | |||
+ | ==== NetworkManager ==== |
||
+ | |||
+ | For remote access permissions to NetworkManager see [[NetworkManager#Set up PolicyKit permissions]]. |
||
== 参照 == |
== 参照 == |
2024年1月10日 (水) 04:39時点における版
xrdp は Microsoft の Remote Desktop Protocol (RDP) をサポートするデーモンです。Xvnc または xorgxrdp をバックエンドとして使用します。
目次
- 1 インストール
- 2 使用方法
- 3 Tips and tricks
- 4 トラブルシューティング
- 4.1 Black box around cursor
- 4.2 Black screen
- 4.3 Black screen with a desktop environment
- 4.4 Green screen
- 4.5 loginctl or systemctl --user not working
- 4.6 Prompts for gnome-keyring or KDE Wallet
- 4.7 Prevent autostart items from starting
- 4.8 No sound
- 4.9 Two-finger scrolling is too fast
- 4.10 Restricted functionality within remote system
- 5 参照
インストール
xrdpAUR パッケージ (または開発版を使いたい場合は xrdp-gitAUR) をインストールしてください。これはバックエンドとして、Xvnc のみサポートします。
Xorg バックエンド
バックエンドの代わりに xorgxrdp を使用するには、xorgxrdpAUR パッケージを インストール して下さい。
使用方法
xrdp を起動したら RDP クライアントからローカルホストに接続できます (標準の RDP ポートは 3389)。xrdp は小さなメッセージウィンドウを表示します。
sessman-Xvnc を選択した場合、ホストのアカウントのユーザー名とパスワードを指定することができ、xrdp は新しい Xvnc インスタンスを起動します。/etc/xrdp/startwm.sh
にある SESSION リストからウィンドウマネージャが開きます。
セッションウィンドウを閉じて RDP 接続を終了すると、次回 RDP で接続したときは同じセッションにアクセスすることができます。セッションウィンドウからウィンドウマネージャやデスクトップ環境を終了した場合、セッションが終了され、次回は新しいセッションが開きます。
xrdp は既に同じジオメトリのセッションが開かれていないか確認して、ジオメトリ/解像度が一致しない場合は新しいセッションを起動します。
Tips and tricks
ブート時に自動起動
xrdpAUR パッケージには systemd のサービスファイルが含まれています。xrdp.service
を有効化してください。
Graphical acceleration
For Xorg sessions, you can enable OpenGL and Vulkan graphical acceleration by installing xorgxrdp-glamorAUR for Intel and AMD GPUs and xorgxrdp-nvidiaAUR for Nvidia GPUs.
Sound
Install the necessary PulseAudio modules with pulseaudio-module-xrdpAUR.
Vino で実行 (root セッションの Gnome VNC-Server)
サーバーを有効化すると vino-preferences から確認できるようになります。Vino はデフォルトでポート 5900 を使って接続するので、xrdp の設定ファイルを編集する必要があります。以下のコードを使って xrdp の設定ファイル (/etc/xrdp/xrdp.ini
) に vino のセッションを追加してください。
/etc/xrdp/xrdp.ini
[xrdp8] name=Vino-Session lib=libvnc.so username=ask password=ask ip=127.0.0.1 port=5900
VNC 接続エラーが発生した場合は、vino-server
デフォルトで TLS 接続のみを受け入れることが原因である可能性があります。xrdp
接続できるように、これを標準の VNC 認証に変更する必要があります。
$ gsettings set org.gnome.Vino require-encryption false
vino-server
ループバックインターフェースのみリッスンするように制限することもできます
$ gsettings set org.gnome.Vino network-interface lo
xrdp サーバを再起動することを忘れないでください。そうすれば、vino セッションに接続できるはずです(xfreerdp を使ってテスト済み)。
トラブルシューティング
Black box around cursor
If you encounter black box around mouse pointer create ~/.Xresources-xrdp
with line Xcursor.core:1
and load it in ~/.xinitrc
like
xrdb ~/.Xresources-xrdp exec startlxde
You may need to install xorg-xrdb.
Black screen
You may get a black screen after logging into the session manager if your ~/.xinitrc
has --exit-with-session
set in the dbus_args
.
Try copying ~/.xinitrc
to ~/.xrdpinitrc
, removing --exit-with-session
, and updating /etc/xrdp/startwm.sh
to call ~/.xrdpinitrc
instead of ~/.xinitrc
. You might need to append your desktop environment to the call to .xrdpinitrc, as is mentioned in ~/.xinitrc; eg. . ~/.xrdpinitrc xfce
.
Black screen with a desktop environment
If you get a black screen and you use a desktop environment, it may be a result of D-Bus not being properly initialized. Some DEs (like KDE Plasma) might also be able to restore fully working applications/windows from a previous session, which makes it seem that "only plasmashell" is missing.
Try running the desktop environment with dbus-launch --exit-with-session
in your ~/.xinitrc
file. For KDE Plasma, you can use the command /usr/lib/plasma-dbus-run-session-if-needed startplasma-x11
or dbus-launch --exit-with-session startplasma-x11
.
Green screen
If the login dialog appears, but no desktop environment starts when you click OK, change param=Xorg
to param=/usr/lib/Xorg
in /etc/xrdp/sesman.ini
.
loginctl or systemctl --user not working
Try commenting out all the references to systemd-home
in /etc/pam.d/system-auth
. See this issue.
Prompts for gnome-keyring or KDE Wallet
If you are prompted to login to gnome-keyring or [KDE Wallet] when your session starts, modify the file /etc/pam.d/xrdp-sesman
as follows:
/etc/pam.d/xrdp-sesman
#%PAM-1.0 auth include system-remote-login -auth optional pam_gnome_keyring.so -auth optional pam_kwallet5.so account include system-remote-login password include system-remote-login -password optional pam_gnome_keyring.so use_authtok session include system-remote-login -session optional pam_gnome_keyring.so auto_start -session optional pam_kwallet5.so auto_start
Then, add etc/pam.d/xrdp-sesman
(no leading slash) to NoUpgrade
in /etc/pacman.conf
. If you only use gnome-keyring it is not necessary to include the kwallet5 lines, and vice versa.
Prevent autostart items from starting
To prevent user defined ~/.config/autostart
items from starting you can set the autostart directory param on the session in the ~/.xinitrc
to use only the global /etc/xdg/autostart
directory.
get_session(){ local dbus_args=(--sh-syntax) case "$SESSION" in awesome) dbus_args+=(awesome) ;; bspwm) dbus_args+=(bspwm-session) ;; budgie) dbus_args+=(budgie-desktop) ;; cinnamon) dbus_args+=(cinnamon-session -a /etc/xdg/autostart) ;;
No sound
This could be a symptom of an issue with loginctl, so try that fix above. The following error may be encountered in the system journal:
Failed to load module "module-x11-publish" (argument: "display=:10.0 xauthority="): initialization failed.
This is the result of systemd improperly starting PulseAudio. One workaround is to disable the user unit files pulseaudio.service
and pulseaudio.socket
either for your own user or for all users, and make PulseAudio start when needed by setting autospawn
to yes
in /etc/pulse/client.conf
.
If sound still does not work, try manually starting PulseAudio with pulseaudio &
in your ~/.xinitrc
.
Two-finger scrolling is too fast
Use the xorg backend, make sure xorgxrdp is 0.9.19 or newer. Then add XRDP_XORG_TOUCHPAD_SCROLL_HACK=yes
to the [SessionVariables]
section of /etc/xrdp/sesman.ini
.
See upstream issue #150 for details.
Restricted functionality within remote system
A user may not have the same access permissions when logged into a system remotely as the same user does when logged in locally. Additional configuration may be required of the polkit permissions policies to grant access, including to mounted drives or to control network connections.
Mounted drives
For remote access permissions to mounted drives see udisks#Permissions.
NetworkManager
For remote access permissions to NetworkManager see NetworkManager#Set up PolicyKit permissions.