1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

KaliLinuxのVNC設定

Last updated at Posted at 2021-05-31

環境

$ uname -a
Linux kali 5.10.0-kali7-amd64 #1 SMP Debian 5.10.28-1kali1 (2021-04-12) x86_64 GNU/Linux

VNCサーバーのインストール

保留

VNCサーバーの起動/停止

# 起動
$ vncserver -geometry 1440x900 :1
# 停止
$ vncserver -kill :1

設定ファイルの変更

VNC接続をしてもグレーになるため、xstartupを以下のように書き換えます。

~/.vnc/xstartup
#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
startxfce4 &

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &

VNCサーバーの自動起動設定

VNCサーバの起動をサービス化する

/etc/systemd/system/vnc-server.service
[Unit]
Description = VNC server service

[Service]
ExecStart = sudo -u (ユーザ名) vncserver -geometry 1440x900 :1
ExecStop = sudo -u (ユーザ名) vncserver -kill :1
Type = forking

[Install]
WantedBy = multi-user.target
sudo chown root:root  /etc/systemd/system/vnc-server.service
sudo chmod 644  /etc/systemd/system/vnc-server.service

システムの起動時にサービスを有効にする

sudo systemctl enable vnc-server

サービスを開始とステータスを確認。

sudo systemctl start vnc-server.service
sudo systemctl status vnc-server.service

VNC接続時の日本語入力

保留

参考サイト

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?