1
1

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.

TigerVNC server の仕様変更に対応する

Posted at

crontabに


@reboot        /usr/bin/vncserver :1

て書いて再起動時に自動起動するようにしてたんですが、
version 1.11.0からは

$ vncserver :1
vncserver has been replaced by a systemd unit.
Please read /usr/share/doc/tigervnc/HOWTO.md for more information.

このHOWTO.mdの内容は https://gist.github.com/rexlx/57b5a0ce212976dac0f237776976eb23

はてさて困った

対処

/etc/tigervnc/vncserver-config-mandatory

にgnomeの場合は

session=gnome

xfceの場合は

session=xfce

を追記。

どうやら

$ ll /usr/share/xsessions/
合計 40
-rw-r--r--  1 root root  132 2020-07-22 03:57 com.redhat.Kiosk.desktop
-rw-r--r--  1 root root 1394 2020-05-16 08:38 gnome-classic.desktop
-rw-r--r--  1 root root 8471 2020-07-22 03:57 gnome-custom-session.desktop
-rw-r--r--  1 root root 1303 2020-07-22 03:57 gnome-xorg.desktop
-rw-r--r--  1 root root 1303 2020-07-22 03:57 gnome.desktop
-rw-r--r--  1 root root 6273 2020-03-29 22:16 xfce.desktop
-rw-r--r--. 1 root root  130 2019-05-14 14:58 xinit-compat.desktop

の中から指定するようだ。

/etc/tigervnc/vncserver.users

:<display number>=<username>

を追記する。
例)

1:hoge

サービスの起動設定

root権限で

cp -a /usr/lib/systemd/system/vncserver@.service /usr/lib/systemd/system/vncserver@:<display number>.service

例)

cp -a /usr/lib/systemd/system/vncserver@.service /usr/lib/systemd/system/vncserver@:1.service

あとはサービスの自動起動設定と起動

systemctl enable vncserver@:1
systemctl start vncserver@:1

おつかれさまでした。

1
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?