diff options
author | Pierre Ossman <ossman@cendio.se> | 2018-07-16 15:58:06 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2020-03-12 12:03:32 +0100 |
commit | 1af1cfdf8709dd1a5574efa19fb4f0e68a98021e (patch) | |
tree | d04dd9e3a1a5e24d5a6955088f1f8bedcd616b45 /contrib/packages/deb | |
parent | 79960594551aa32a99506ff87fb0fed5f7bee5eb (diff) | |
download | tigervnc-1af1cfdf8709dd1a5574efa19fb4f0e68a98021e.tar.gz tigervnc-1af1cfdf8709dd1a5574efa19fb4f0e68a98021e.zip |
Start sessions via PAM
This sets up a more correct session as there are key tasks that
need to be performed by PAM. E.g. systemd will allocate cgroups
and start base services.
In order to easily handle this as a system service the mapping of
displays is now done via a configuration file.
Diffstat (limited to 'contrib/packages/deb')
8 files changed, 102 insertions, 74 deletions
diff --git a/contrib/packages/deb/ubuntu-bionic/debian/rules b/contrib/packages/deb/ubuntu-bionic/debian/rules index ff6ff18e..57e8e0ae 100644 --- a/contrib/packages/deb/ubuntu-bionic/debian/rules +++ b/contrib/packages/deb/ubuntu-bionic/debian/rules @@ -58,6 +58,7 @@ config-stamp: xorg-source-stamp -DBUILD_STATIC=off \ -DCMAKE_INSTALL_PREFIX:PATH=/usr \ -DSYSCONF_DIR:PATH=/etc \ + -DLIBEXEC_DIR:PATH=/usr/lib/$(DEB_HOST_MULTIARCH) \ -DUNIT_DIR:PATH=/lib/systemd/system (cd unix/xserver; \ export PIXMANINCDIR=/usr/include/pixman-1; \ @@ -172,20 +173,24 @@ install: build $(CURDIR)/debian/tigervncserver/usr/bin/tigervncconfig mv $(CURDIR)/debian/tigervncserver/usr/bin/vncpasswd \ $(CURDIR)/debian/tigervncserver/usr/bin/tigervncpasswd - mv $(CURDIR)/debian/tigervncserver/usr/bin/vncserver \ - $(CURDIR)/debian/tigervncserver/usr/bin/tigervncserver mv $(CURDIR)/debian/tigervncserver/usr/bin/x0vncserver \ $(CURDIR)/debian/tigervncserver/usr/bin/x0tigervncserver + mv $(CURDIR)/debian/tigervncserver/usr/sbin/vncsession \ + $(CURDIR)/debian/tigervncserver/usr/sbin/tigervncsession + mv $(CURDIR)/debian/tigervncserver/usr/lib/$(DEB_HOST_MULTIARCH)/vncserver \ + $(CURDIR)/debian/tigervncserver/usr/lib/$(DEB_HOST_MULTIARCH)/tigervncserver mv $(CURDIR)/debian/tigervncserver/usr/share/man/man1/vncconfig.1 \ $(CURDIR)/debian/tigervncserver/usr/share/man/man1/tigervncconfig.1 mv $(CURDIR)/debian/tigervncserver/usr/share/man/man1/vncpasswd.1 \ $(CURDIR)/debian/tigervncserver/usr/share/man/man1/tigervncpasswd.1 - mv $(CURDIR)/debian/tigervncserver/usr/share/man/man1/vncserver.1 \ - $(CURDIR)/debian/tigervncserver/usr/share/man/man1/tigervncserver.1 mv $(CURDIR)/debian/tigervncserver/usr/share/man/man1/x0vncserver.1 \ $(CURDIR)/debian/tigervncserver/usr/share/man/man1/x0tigervncserver.1 mv $(CURDIR)/debian/tigervncserver/usr/share/man/man1/Xvnc.1 \ $(CURDIR)/debian/tigervncserver/usr/share/man/man1/Xtigervnc.1 + mv $(CURDIR)/debian/tigervncserver/usr/share/man/man8/vncsession.8 \ + $(CURDIR)/debian/tigervncserver/usr/share/man/man8/tigervncsession.8 + mv $(CURDIR)/debian/tigervncserver/usr/share/man/man8/vncserver.8 \ + $(CURDIR)/debian/tigervncserver/usr/share/man/man8/tigervncserver.8 # delete development files rm -f $(CURDIR)/debian/tigervncserver/usr/lib/xorg/modules/extensions/libvnc.la # move viewer files to viewer package, rename on the fly @@ -216,6 +221,8 @@ install: build $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervncserver/ rm -rf $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervnc-*/ # dh_movefiles + sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' \ + debian/tigervncserver.postinst.in > debian/tigervncserver.postinst # Build architecture-independent files here. # Pass -i to all debhelper commands in this target to reduce clutter. diff --git a/contrib/packages/deb/ubuntu-bionic/debian/tigervncserver.postinst b/contrib/packages/deb/ubuntu-bionic/debian/tigervncserver.postinst deleted file mode 100644 index 32e7ea79..00000000 --- a/contrib/packages/deb/ubuntu-bionic/debian/tigervncserver.postinst +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -set -e - -if [ "$1" = "configure" ]; then - MAN=/usr/share/man/man1 - BIN=/usr/bin - update-alternatives --install \ - $BIN/vncserver vncserver $BIN/tigervncserver 64 \ - --slave \ - $MAN/vncserver.1.gz vncserver.1.gz $MAN/tigervncserver.1.gz - update-alternatives --install \ - $BIN/Xvnc Xvnc $BIN/Xtigervnc 74 \ - --slave \ - $MAN/Xvnc.1.gz Xvnc.1.gz $MAN/Xtigervnc.1.gz - update-alternatives --install \ - $BIN/x0vncserver x0vncserver $BIN/x0tigervncserver 74 \ - --slave \ - $MAN/x0vncserver.1.gz x0vncserver.1.gz $MAN/x0tigervncserver.1.gz - update-alternatives --install \ - $BIN/vncpasswd vncpasswd $BIN/tigervncpasswd 74 \ - --slave \ - $MAN/vncpasswd.1.gz vncpasswd.1.gz $MAN/tigervncpasswd.1.gz - update-alternatives --install \ - $BIN/vncconfig vncconfig $BIN/tigervncconfig 64 \ - --slave \ - $MAN/vncconfig.1.gz vncconfig.1.gz $MAN/tigervncconfig.1.gz -fi - -#DEBHELPER# - -exit 0 diff --git a/contrib/packages/deb/ubuntu-bionic/debian/tigervncserver.postinst.in b/contrib/packages/deb/ubuntu-bionic/debian/tigervncserver.postinst.in new file mode 100644 index 00000000..24913291 --- /dev/null +++ b/contrib/packages/deb/ubuntu-bionic/debian/tigervncserver.postinst.in @@ -0,0 +1,38 @@ +#!/bin/sh + +set -e + +if [ "$1" = "configure" ]; then + MAN=/usr/share/man + BIN=/usr/bin + SBIN=/usr/sbin + LIB=/usr/lib/@DEB_HOST_MULTIARCH@ + update-alternatives --install \ + $SBIN/vncsession vncsession $SBIN/tigervncsession 64 \ + --slave \ + $LIB/vncserver vncserver $LIB/tigervncserver \ + --slave \ + $MAN/man8/vncsession.8.gz vncsession.8.gz $MAN/man8/tigervncsession.8.gz \ + --slave \ + $MAN/man8/vncserver.8.gz vncserver.8.gz $MAN/man8/tigervncserver.8.gz + update-alternatives --install \ + $BIN/Xvnc Xvnc $BIN/Xtigervnc 74 \ + --slave \ + $MAN/man1/Xvnc.1.gz Xvnc.1.gz $MAN/man1/Xtigervnc.1.gz + update-alternatives --install \ + $BIN/x0vncserver x0vncserver $BIN/x0tigervncserver 74 \ + --slave \ + $MAN/man1/x0vncserver.1.gz x0vncserver.1.gz $MAN/man1/x0tigervncserver.1.gz + update-alternatives --install \ + $BIN/vncpasswd vncpasswd $BIN/tigervncpasswd 74 \ + --slave \ + $MAN/man1/vncpasswd.1.gz vncpasswd.1.gz $MAN/man1/tigervncpasswd.1.gz + update-alternatives --install \ + $BIN/vncconfig vncconfig $BIN/tigervncconfig 64 \ + --slave \ + $MAN/man1/vncconfig.1.gz vncconfig.1.gz $MAN/man1/tigervncconfig.1.gz +fi + +#DEBHELPER# + +exit 0 diff --git a/contrib/packages/deb/ubuntu-bionic/debian/tigervncserver.prerm b/contrib/packages/deb/ubuntu-bionic/debian/tigervncserver.prerm index 26608e37..2e8e77c4 100644 --- a/contrib/packages/deb/ubuntu-bionic/debian/tigervncserver.prerm +++ b/contrib/packages/deb/ubuntu-bionic/debian/tigervncserver.prerm @@ -4,8 +4,9 @@ set -e if [ "$1" = "remove" ] ; then BIN=/usr/bin + SBIN=/usr/sbin update-alternatives --remove \ - vncserver $BIN/tigervncserver + vncsession $SBIN/tigervncsession update-alternatives --remove \ Xvnc $BIN/Xtigervnc update-alternatives --remove \ diff --git a/contrib/packages/deb/ubuntu-xenial/debian/rules b/contrib/packages/deb/ubuntu-xenial/debian/rules index 35bc2d08..28af8d1e 100644 --- a/contrib/packages/deb/ubuntu-xenial/debian/rules +++ b/contrib/packages/deb/ubuntu-xenial/debian/rules @@ -59,6 +59,7 @@ config-stamp: xorg-source-stamp -DBUILD_STATIC=off \ -DCMAKE_INSTALL_PREFIX:PATH=/usr \ -DSYSCONF_DIR:PATH=/etc \ + -DLIBEXEC_DIR:PATH=/usr/lib/$(DEB_HOST_MULTIARCH) \ -DUNIT_DIR:PATH=/lib/systemd/system (cd unix/xserver; \ export PIXMANINCDIR=/usr/include/pixman-1; \ @@ -173,20 +174,24 @@ install: build $(CURDIR)/debian/tigervncserver/usr/bin/tigervncconfig mv $(CURDIR)/debian/tigervncserver/usr/bin/vncpasswd \ $(CURDIR)/debian/tigervncserver/usr/bin/tigervncpasswd - mv $(CURDIR)/debian/tigervncserver/usr/bin/vncserver \ - $(CURDIR)/debian/tigervncserver/usr/bin/tigervncserver mv $(CURDIR)/debian/tigervncserver/usr/bin/x0vncserver \ $(CURDIR)/debian/tigervncserver/usr/bin/x0tigervncserver + mv $(CURDIR)/debian/tigervncserver/usr/sbin/vncsession \ + $(CURDIR)/debian/tigervncserver/usr/sbin/tigervncsession + mv $(CURDIR)/debian/tigervncserver/usr/lib/$(DEB_HOST_MULTIARCH)/vncserver \ + $(CURDIR)/debian/tigervncserver/usr/lib/$(DEB_HOST_MULTIARCH)/tigervncserver mv $(CURDIR)/debian/tigervncserver/usr/share/man/man1/vncconfig.1 \ $(CURDIR)/debian/tigervncserver/usr/share/man/man1/tigervncconfig.1 mv $(CURDIR)/debian/tigervncserver/usr/share/man/man1/vncpasswd.1 \ $(CURDIR)/debian/tigervncserver/usr/share/man/man1/tigervncpasswd.1 - mv $(CURDIR)/debian/tigervncserver/usr/share/man/man1/vncserver.1 \ - $(CURDIR)/debian/tigervncserver/usr/share/man/man1/tigervncserver.1 mv $(CURDIR)/debian/tigervncserver/usr/share/man/man1/x0vncserver.1 \ $(CURDIR)/debian/tigervncserver/usr/share/man/man1/x0tigervncserver.1 mv $(CURDIR)/debian/tigervncserver/usr/share/man/man1/Xvnc.1 \ $(CURDIR)/debian/tigervncserver/usr/share/man/man1/Xtigervnc.1 + mv $(CURDIR)/debian/tigervncserver/usr/share/man/man8/vncsession.8 \ + $(CURDIR)/debian/tigervncserver/usr/share/man/man8/tigervncsession.8 + mv $(CURDIR)/debian/tigervncserver/usr/share/man/man8/vncserver.8 \ + $(CURDIR)/debian/tigervncserver/usr/share/man/man8/tigervncserver.8 # delete development files rm -f $(CURDIR)/debian/tigervncserver/usr/lib/xorg/modules/extensions/libvnc.la # move viewer files to viewer package, rename on the fly @@ -217,6 +222,8 @@ install: build $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervncserver/ rm -rf $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervnc-*/ # dh_movefiles + sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' \ + debian/tigervncserver.postinst.in > debian/tigervncserver.postinst # Build architecture-independent files here. # Pass -i to all debhelper commands in this target to reduce clutter. diff --git a/contrib/packages/deb/ubuntu-xenial/debian/tigervncserver.postinst b/contrib/packages/deb/ubuntu-xenial/debian/tigervncserver.postinst deleted file mode 100644 index 32e7ea79..00000000 --- a/contrib/packages/deb/ubuntu-xenial/debian/tigervncserver.postinst +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -set -e - -if [ "$1" = "configure" ]; then - MAN=/usr/share/man/man1 - BIN=/usr/bin - update-alternatives --install \ - $BIN/vncserver vncserver $BIN/tigervncserver 64 \ - --slave \ - $MAN/vncserver.1.gz vncserver.1.gz $MAN/tigervncserver.1.gz - update-alternatives --install \ - $BIN/Xvnc Xvnc $BIN/Xtigervnc 74 \ - --slave \ - $MAN/Xvnc.1.gz Xvnc.1.gz $MAN/Xtigervnc.1.gz - update-alternatives --install \ - $BIN/x0vncserver x0vncserver $BIN/x0tigervncserver 74 \ - --slave \ - $MAN/x0vncserver.1.gz x0vncserver.1.gz $MAN/x0tigervncserver.1.gz - update-alternatives --install \ - $BIN/vncpasswd vncpasswd $BIN/tigervncpasswd 74 \ - --slave \ - $MAN/vncpasswd.1.gz vncpasswd.1.gz $MAN/tigervncpasswd.1.gz - update-alternatives --install \ - $BIN/vncconfig vncconfig $BIN/tigervncconfig 64 \ - --slave \ - $MAN/vncconfig.1.gz vncconfig.1.gz $MAN/tigervncconfig.1.gz -fi - -#DEBHELPER# - -exit 0 diff --git a/contrib/packages/deb/ubuntu-xenial/debian/tigervncserver.postinst.in b/contrib/packages/deb/ubuntu-xenial/debian/tigervncserver.postinst.in new file mode 100644 index 00000000..24913291 --- /dev/null +++ b/contrib/packages/deb/ubuntu-xenial/debian/tigervncserver.postinst.in @@ -0,0 +1,38 @@ +#!/bin/sh + +set -e + +if [ "$1" = "configure" ]; then + MAN=/usr/share/man + BIN=/usr/bin + SBIN=/usr/sbin + LIB=/usr/lib/@DEB_HOST_MULTIARCH@ + update-alternatives --install \ + $SBIN/vncsession vncsession $SBIN/tigervncsession 64 \ + --slave \ + $LIB/vncserver vncserver $LIB/tigervncserver \ + --slave \ + $MAN/man8/vncsession.8.gz vncsession.8.gz $MAN/man8/tigervncsession.8.gz \ + --slave \ + $MAN/man8/vncserver.8.gz vncserver.8.gz $MAN/man8/tigervncserver.8.gz + update-alternatives --install \ + $BIN/Xvnc Xvnc $BIN/Xtigervnc 74 \ + --slave \ + $MAN/man1/Xvnc.1.gz Xvnc.1.gz $MAN/man1/Xtigervnc.1.gz + update-alternatives --install \ + $BIN/x0vncserver x0vncserver $BIN/x0tigervncserver 74 \ + --slave \ + $MAN/man1/x0vncserver.1.gz x0vncserver.1.gz $MAN/man1/x0tigervncserver.1.gz + update-alternatives --install \ + $BIN/vncpasswd vncpasswd $BIN/tigervncpasswd 74 \ + --slave \ + $MAN/man1/vncpasswd.1.gz vncpasswd.1.gz $MAN/man1/tigervncpasswd.1.gz + update-alternatives --install \ + $BIN/vncconfig vncconfig $BIN/tigervncconfig 64 \ + --slave \ + $MAN/man1/vncconfig.1.gz vncconfig.1.gz $MAN/man1/tigervncconfig.1.gz +fi + +#DEBHELPER# + +exit 0 diff --git a/contrib/packages/deb/ubuntu-xenial/debian/tigervncserver.prerm b/contrib/packages/deb/ubuntu-xenial/debian/tigervncserver.prerm index 26608e37..2e8e77c4 100644 --- a/contrib/packages/deb/ubuntu-xenial/debian/tigervncserver.prerm +++ b/contrib/packages/deb/ubuntu-xenial/debian/tigervncserver.prerm @@ -4,8 +4,9 @@ set -e if [ "$1" = "remove" ] ; then BIN=/usr/bin + SBIN=/usr/sbin update-alternatives --remove \ - vncserver $BIN/tigervncserver + vncsession $SBIN/tigervncsession update-alternatives --remove \ Xvnc $BIN/Xtigervnc update-alternatives --remove \ |