mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-24 23:32:12 +08:00
Submit systemd-specific configuration for TigerVNC
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@23831 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
parent
279fc64ecd
commit
019bc05b50
@ -44,6 +44,10 @@
|
||||
<listitem>
|
||||
<para>October 21st, 2020</para>
|
||||
<itemizedlist>
|
||||
<listitem revision="systemd">
|
||||
<para>[renodr] - Add configuration instructions for the systemd
|
||||
variant of TigerVNC.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>[renodr] - Adapt gnome-nettool to work with current versions of
|
||||
ping, ping6, and netstat.</para>
|
||||
|
@ -92,6 +92,12 @@
|
||||
</note>
|
||||
|
||||
<itemizedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>
|
||||
Required patch:
|
||||
<ulink url="&patch-root;/tigervnc-&tigervnc-version;-configuration_fixes-1.patch"/>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Optional files:
|
||||
@ -102,6 +108,9 @@
|
||||
<listitem>
|
||||
<para><ulink url="&sources-anduin-http;/tigervnc/vncserver.1"/></para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><ulink url="&sources-anduin-http;/tigervnc/Xsession"/></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</listitem>
|
||||
@ -135,6 +144,16 @@
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Tigervnc</title>
|
||||
|
||||
<para>
|
||||
First, make adjustments to the configuration files to make them
|
||||
compatible with LFS systems:
|
||||
<!-- Replaces an incompatible PAM file and disables SELinux support
|
||||
in systemd units. Also modifies the search path for
|
||||
/usr/libexec/vncserver to include /etc/X11/tigervnc -->
|
||||
</para>
|
||||
|
||||
<screen><userinput remap="pre">patch -Np1 -i ../tigervnc-&tigervnc-version;-configuration_fixes-1.patch</userinput></screen>
|
||||
|
||||
<para>
|
||||
Install <application>tigervnc</application> by running the following
|
||||
commands:
|
||||
@ -187,6 +206,13 @@ make install &&
|
||||
( cd unix/xserver/hw/vnc && make install ) &&
|
||||
|
||||
[ -e /usr/bin/Xvnc ] || ln -svf $XORG_PREFIX/bin/Xvnc /usr/bin/Xvnc</userinput></screen>
|
||||
|
||||
<para revision="sysv">
|
||||
Finally, modify the PAM file to be compatible with elogind:
|
||||
</para>
|
||||
|
||||
<screen role="root" revision="sysv"><userinput>sed -i 's/pam_systemd.so/pam_elogind.so/' /etc/pam.d/tigervnc</userinput></screen>
|
||||
|
||||
<!-- These are installed as part of 'make install' for the client.
|
||||
<para>
|
||||
Finally, create a menu entry. As the
|
||||
@ -282,6 +308,72 @@ startlxde &</screen>
|
||||
system and vncviewer for the remote system.
|
||||
</para>
|
||||
|
||||
<bridgehead renderas="sect3" revision="systemd">Server Configuration</bridgehead>
|
||||
|
||||
<note revision="systemd">
|
||||
<para>
|
||||
This section is optional and is only useful if you want to have VNC
|
||||
sessions launch on system startup. Both configuration methods can
|
||||
coexist on the same system.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<para revision="systemd">
|
||||
On systemd systems, another method of configuration is available.
|
||||
This configuration provides the added benefit of having a systemd scope
|
||||
get started for VNC sessions, which allows desktop environments like
|
||||
<application>GNOME</application> to autostart services once the VNC
|
||||
session is started. This configuration also gives the added benefit
|
||||
of starting VNC Sessions on system startup. To setup the VNC server
|
||||
in this fashion, follow these instructions.
|
||||
</para>
|
||||
|
||||
<para revision="systemd">
|
||||
First, install a rudimentary Xsession file so that the VNC server
|
||||
can initialize X sessions properly:
|
||||
</para>
|
||||
|
||||
<screen role="root" revision="systemd"><userinput>install -vdm755 /etc/X11/tigervnc &&
|
||||
install -v -m755 ../Xsession /etc/X11/tigervnc</userinput></screen>
|
||||
|
||||
<para revision="systemd">
|
||||
Next, setup a user mapping in
|
||||
<filename>/etc/tigervnc/vncserver.users</filename>. This tells the VNC
|
||||
Server which session is allocated to a user.
|
||||
<!-- For example: :1=renodr will assign 'renodr' to :1 -->
|
||||
</para>
|
||||
|
||||
<screen role="root" revision="systemd"><userinput>echo ":1=$(whoami)" >> /etc/tigervnc/vncserver.users</userinput></screen>
|
||||
|
||||
<para revision="systemd">
|
||||
Next, setup a configuration file to tell
|
||||
<application>vncserver</application> which desktop environment should be
|
||||
used and what display geometry should be used. There are several other
|
||||
options that can be defined in this file, but they are outside the scope
|
||||
of BLFS.
|
||||
</para>
|
||||
|
||||
<screen revision="systemd"><userinput>cat > ~/.vnc/config << EOF
|
||||
<literal># Begin ~/.vnc/config
|
||||
|
||||
session=LXDE # The session must match one listed in /usr/share/xsessions.
|
||||
geometry=1024x768
|
||||
|
||||
# End ~/.vnc/config</literal>
|
||||
EOF</userinput></screen>
|
||||
|
||||
<para revision="systemd">
|
||||
To start the VNC Server, run the following command:
|
||||
</para>
|
||||
|
||||
<screen role="root" revision="systemd"><userinput>systemctl start vncserver@:1</userinput></screen>
|
||||
|
||||
<para revision="systemd">
|
||||
To start the VNC Server when the system boots, run the following command:
|
||||
</para>
|
||||
|
||||
<screen role="root" revision="systemd"><userinput>systemctl enable vncserver@:1</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
|
Loading…
Reference in New Issue
Block a user