リモートコンソール†
xrdp のインストール†
munakata@mvc:~$ sudo apt install -y xrdp
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
状態情報を読み取っています... 完了
以下の追加パッケージがインストールされます:
xorgxrdp
提案パッケージ:
guacamole xrdp-pulseaudio-installer
以下のパッケージが新たにインストールされます:
xorgxrdp xrdp
アップグレード: 0 個、新規インストール: 2 個、削除: 0 個、保留: 0 個。
498 kB のアーカイブを取得する必要があります。
この操作後に追加で 3,303 kB のディスク容量が消費されます。
取得:1 http://jp.archive.ubuntu.com/ubuntu bionic/universe amd64 xorgxrdp amd64 0.9.5-2 [78.7 kB]
取得:2 http://jp.archive.ubuntu.com/ubuntu bionic/universe amd64 xrdp amd64 0.9.5-2 [419 kB]
498 kB を 3秒 で取得しました (165 kB/s)
以前に未選択のパッケージ xorgxrdp を選択しています。
(データベースを読み込んでいます ... 現在 240686 個のファイルとディレクトリがインストールされています。)
.../xorgxrdp_0.9.5-2_amd64.deb を展開する準備をしています ...
xorgxrdp (0.9.5-2) を展開しています...
以前に未選択のパッケージ xrdp を選択しています。
.../xrdp_0.9.5-2_amd64.deb を展開する準備をしています ...
xrdp (0.9.5-2) を展開しています...
xrdp (0.9.5-2) を設定しています ...
Generating 2048 bit rsa key...
ssl_gen_key_xrdp1 ok
saving to /etc/xrdp/rsakeys.ini
Created symlink /etc/systemd/system/multi-user.target.wants/xrdp-sesman.service → /lib/systemd/system/xrdp-sesman.service.
Created symlink /etc/systemd/system/multi-user.target.wants/xrdp.service → /lib/systemd/system/xrdp.service.
xorgxrdp (0.9.5-2) を設定しています ...
libc-bin (2.27-3ubuntu1) のトリガを処理しています ...
systemd (237-3ubuntu10.29) のトリガを処理しています ...
man-db (2.8.3-2ubuntu0.1) のトリガを処理しています ...
ureadahead (0.100.0-21) のトリガを処理しています ...
セッションタイプがXorgの場合はカーソルのバックグラウンドに黒い四角い領域が表示されてしまうので、new_cursorsを無効にする†
munakata@mvc:~$ sudo sed -e 's/^new_cursors=true/new_cursors=false/g' -i /etc/xrdp/xrdp.ini
munakata@mvc:~$ sudo systemctl restart xrdp
Ubuntu向けにカスタマイズされた設定をロードする為に~/.xsessionrcにて以下の環境変数を設定†
munakata@mvc:~$ cat .xsessionrc
export GNOME_SHELL_SESSION_MODE=ubuntu
export XDG_CURRENT_DESKTOP=ubuntu:GNOME
export XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop
export XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg
セッションタイプをXorgで接続した場合の認証を常に失敗させるルールを追加†
munakata@mvc:~$ sudo cat /etc/polkit-1/localauthority/50-local.d/xrdp-color-manager.pkla
[Netowrkmanager]
Identity=unix-user:*
Action=org.freedesktop.color-manager.create-device
ResultAny=no
ResultInactive=no
ResultActive=yes
munakata@mvc:~$ sudo systemctl restart polkit
Windows10 のリモートデスクトップ接続で接続する†
参考 URL†
samba 設定最適化†
smb.conf
[global]
dos charset = CP932
unix charset = UTF-8
workgroup = TEAMSPIRIT
server string = %h server (Samba, Ubuntu)
map to guest = Bad User
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
lanman auth = Yes
log file = /var/log/samba/log.%m
max log size = 1000
unix extensions = No
dns proxy = No
usershare allow guests = Yes
usershare owner only = No
panic action = /usr/share/samba/panic-action %d
idmap config * : backend = tdb
ntlm auth = yes
[HDR_master]
path = /mnt/dtv_master
browsable =yes
read only = No
writable = yes
guest ok = yes
hosts allow = 192.168.1., 127.0.0.1
hosts deny = ALL
create mask=760
force create mode=760
directory mask=2775
force directory mode=2775
force group=munakata
[HDR_Slave]
path = /mnt/dtv_slave
browsable =yes
read only = No
writable = yes
guest ok = yes
hosts allow = 192.168.1., 127.0.0.1
hosts deny = ALL
create mask=760
force create mode=760
directory mask=2775
force directory mode=2775
force group=munakata
[HDR_Third]
path = /mnt/dtv_recover
browsable =yes
read only = No
writable = yes
guest ok = yes
hosts allow = 192.168.1., 127.0.0.1
hosts deny = ALL
create mask=760
force create mode=760
directory mask=2775
force directory mode=2775
force group=munakata
[HDR_Recipe]
comment = magu's HDR space
path = /mnt/dtv_recipe
browsable =yes
read only = No
writable = yes
guest ok = yes
hosts allow = 192.168.1., 127.0.0.1
hosts deny = ALL
create mask=760
force create mode=760
directory mask=2775
force directory mode=2775
force group=munakata
[HDR_264]
comment = magu's encoded video
path = /mnt/dtv_h264
read only = No
guest ok = Yes
force user = munakata
force group = munakata
hosts allow = 192.168.1., 127.0.0.1,
hosts deny = ALL
create mask=760
force create mode=760
directory mask=2775
force directory mode=2775
pukiwiki_sync†
同期スクリプト†
ローカル表示用 CSS (/var/www/html/pukiwiki/skin/pukiwiki.css.php)†
Apache ログ解析(awstatus)†
参考 URL†