<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Knowledge Base (Posts about vnc)</title><link>https://bgstack15.ddns.net/blog/</link><description></description><atom:link href="https://bgstack15.ddns.net/blog/categories/vnc.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2024 &lt;a href="mailto:bgstack15@gmail.com"&gt;bgstack15&lt;/a&gt; 
&lt;a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"&gt;
&lt;img alt="Creative Commons License BY-SA"
style="border-width:0; margin-bottom:12px;"
src="https://bgstack15.ddns.net/.images/l_by-sa_4.0_88x31.png"&gt;&lt;/a&gt;</copyright><lastBuildDate>Thu, 29 Aug 2024 12:45:38 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Minimalize Artemis display for vnc</title><link>https://bgstack15.ddns.net/blog/posts/2024/08/29/minimalize-artemis-display-for-vnc/</link><dc:creator>bgstack15</dc:creator><description>&lt;div&gt;&lt;p&gt;A fellow netizen named &lt;a href="https://bgstack15.ddns.net/blog/outbound/https:/noseynick.org"&gt;NoseyNick&lt;/a&gt; has a great plan for making Artemis run way better on an x11vnc display: blank out the textures. He also has great scripts to use if you want to run an Artemis game server on somebody else's computer.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://bgstack15.ddns.net/blog/posts/2024/08/29/minimalize-artemis-display-for-vnc/"&gt;Read more…&lt;/a&gt; (1 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>artemis</category><category>hack</category><category>vnc</category><guid>https://bgstack15.ddns.net/blog/posts/2024/08/29/minimalize-artemis-display-for-vnc/</guid><pubDate>Thu, 29 Aug 2024 12:30:29 GMT</pubDate></item><item><title>Resize x11vnc session</title><link>https://bgstack15.ddns.net/blog/posts/2024/08/25/resize-x11vnc-session/</link><dc:creator>bgstack15</dc:creator><description>&lt;div&gt;&lt;p&gt;Here's a cool trick I devised. This idea is original to me. I remember using spice guest tools in spice guests in libvirt/qemu/kvm/virt-manager to automatically (or at least make available) change screen resolutions.&lt;/p&gt;
&lt;p&gt;Remmina as a vnc viewer of course can be resized, and I have a script that I run on the client side, to ssh to the target &lt;a href="https://bgstack15.ddns.net/blog/posts/2023/07/22/x11vnc-to-login-screen/"&gt;x11vnc server&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The idea is that on the client x11 instance, you run the following command which finds the window with that hostname as the title (hardcoded to only Remmina windows), and then passwordlessly sshes to that host and uses the XAUTHORITY and DISPLAY info to add a xrandr resolution to this desired window size and then uses that resolution.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://bgstack15.ddns.net/blog/posts/2024/08/25/resize-x11vnc-session/"&gt;Read more…&lt;/a&gt; (3 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>oneliner</category><category>resolution</category><category>vnc</category><category>x11vnc</category><guid>https://bgstack15.ddns.net/blog/posts/2024/08/25/resize-x11vnc-session/</guid><pubDate>Sun, 25 Aug 2024 12:53:00 GMT</pubDate></item><item><title>Supporting Linux desktop support clients with x11vnc, Wireguard, and Remmina</title><link>https://bgstack15.ddns.net/blog/posts/2022/11/25/supporting-linux-desktop-support-clients-with-x11vnc-wireguard-and-remmina/</link><dc:creator>bgstack15</dc:creator><description>&lt;p&gt;I have a Linux desktop support customer! (Read: I have a friend for whom I set up a Ubuntu desktop system. It's not ideal I realize, but it's better than Windows.)&lt;/p&gt;
&lt;p&gt;On his Ubuntu desktop, I set up Wireguard as a peer to my main wg peer on my network. When his computer is on, it automatically connects. If he needs help where I need to see his screen, I connect over ssh and forward a port:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;ssh -L 5900:localhost:5900
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And then once there I &lt;code&gt;su - customername&lt;/code&gt; and start x11vnc.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;x11vnc -display :0 -once -localhost
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And now on my client side I run Remmina and connect to &lt;code&gt;localhost&lt;/code&gt; as type vnc. And then I can work on the same console session that my customer sees, while we're on the phone together.&lt;/p&gt;
&lt;h2&gt;Backstory&lt;/h2&gt;
&lt;p&gt;I already had a wireguard peer set up on my network for a multitude of reasons. Adding wireguard to autostart Ubuntu is well-established and outside the scope of this document. I remember reading in the past about some way to connect to an existing X11 console session, and x11vnc is the solution for that type of operation. Teamviewer is not FLOSS, and I gave it up years ago. Before that, I used LogMeIn.&lt;/p&gt;</description><category>desktop</category><category>forwarding</category><category>ssh</category><category>vnc</category><category>wireguard</category><category>x11</category><guid>https://bgstack15.ddns.net/blog/posts/2022/11/25/supporting-linux-desktop-support-clients-with-x11vnc-wireguard-and-remmina/</guid><pubDate>Fri, 25 Nov 2022 13:30:19 GMT</pubDate></item><item><title>Changing screen resolution on Linux terminal server</title><link>https://bgstack15.ddns.net/blog/posts/2018/07/08/changing-screen-resolution-on-linux-terminal-server/</link><dc:creator>bgstack15</dc:creator><description>&lt;p&gt;If you're using xvnc on Linux (for example, if you're running &lt;a href="https://bgstack15.ddns.net/blog/posts/2017/11/01/xfce-on-xrdp-on-fedora-26/"&gt;Xfce on xrdp on
Fedora&lt;/a&gt;) and you want to resize the display, here's a way to do it.&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;DISPLAY=:10 xrandr --output VNC-0 --mode 1024x768
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You could also use an --auto instead of a --mode XxY setting. Apparently I
like to redo my own work. Check out
&lt;a href="https://gitlab.com/bgstack15/bgscripts/blob/master/src/usr/bin/resize.sh"&gt;resize.sh&lt;/a&gt;
from my &lt;a href="https://gitlab.com/bgstack15/bgscripts"&gt;bgscripts&lt;/a&gt; package.&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;for word in $( xrandr --listactivemonitors | awk 'NR != 1 { print &lt;span class="nv"&gt;$NF&lt;/span&gt;; }'; ); do xrandr --output &lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;word&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt; --auto 1&amp;gt;/dev/null 2&amp;gt;&lt;span class="ni"&gt;&amp;amp;1;&lt;/span&gt; done
&lt;/code&gt;&lt;/pre&gt;</description><category>oneliner</category><category>vnc</category><category>x11</category><category>xrandr</category><guid>https://bgstack15.ddns.net/blog/posts/2018/07/08/changing-screen-resolution-on-linux-terminal-server/</guid><pubDate>Sun, 08 Jul 2018 12:40:00 GMT</pubDate></item><item><title>List current xvnc sessions in xrdp so you can reconnect to your old one</title><link>https://bgstack15.ddns.net/blog/posts/2018/01/16/list-current-xvnc-sessions-in-xrdp-so-you-can-reconnect-to-your-old-one/</link><dc:creator>bgstack15</dc:creator><description>&lt;h2&gt;tl;dr&lt;/h2&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;{ echo "user pid Xdisplay port"; { ps -ef | awk '/Xvnc :[[:digit:]]+/ {print $1,$2,$9}' | while read tu tpid tvnc; do sudo netstat -tlpn | awk -v "tpid=&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tpid&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;" '$0 ~ tpid {print $4;}' | sed -r -e 's/^.*://;' -e "s/^/&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tu&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt; &lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tpid&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt; &lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tvnc&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt; /;" ; done ; } | sort -k3 ; } | column -c4 -t
&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;The story&lt;/h2&gt;
&lt;p&gt;I connected to a gnome session on a terminal server, and disconnected. I
wanted to reconnect to my current session, but apparently I got a new X
session. After some research, I learned you can configure xrdp to prompt for
the port number so you can get back to the previous session. However, then you
have to know what to type in. After doing a manual ps and netstat, I found
some useful numbers. What I needed to enter was &lt;strong&gt;the tcp port number, so
5919&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;The explanation&lt;/h3&gt;
&lt;p&gt;You can have an entry in the /etc/xrdp/xrdp.ini file like the following block.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="k"&gt;[xrdp8]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;Reconnect&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;lib&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;libvnc.so&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;username&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;ask&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;ask&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;ip&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;127.0.0.1&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;ask&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;When you connect over RDP, select the "Reconnect" module and type in a port
number, which you can find from the output of the oneliner.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;{ echo "user pid Xdisplay port"; { ps -ef | awk '/Xvnc :[[:digit:]]+/ {print $1,$2,$9}' | while read tu tpid tvnc; do sudo netstat -tlpn | awk -v "tpid=&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tpid&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;" '$0 ~ tpid {print $4;}' | sed -r -e 's/^.*://;' -e "s/^/&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tu&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt; &lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tpid&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt; &lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tvnc&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt; /;" ; done ; } | sort -k3 ; } | column -c4 -t


user       pid    Xdisplay  port
mjohnso    11448  :17       5917
mjohnso    12939  :18       5918
bgstack15  1219   :19       5919
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://bgstack15.ddns.net/blog/2018/01/reconnect1.png"&gt;&lt;img alt="" src="https://bgstack15.ddns.net/blog/2018/01/reconnect1.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;h3&gt;Weblinks&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="https://askubuntu.com/questions/133343/how-do-i-set-up-xrdp-session-that-reuses-an-existing-session#360835"&gt;https://askubuntu.com/questions/133343/how-do-i-set-up-xrdp-session-that-reuses-an-existing-session#360835&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;</description><category>network</category><category>oneliner</category><category>rdp</category><category>sessions</category><category>vnc</category><category>x11</category><category>xrdp</category><guid>https://bgstack15.ddns.net/blog/posts/2018/01/16/list-current-xvnc-sessions-in-xrdp-so-you-can-reconnect-to-your-old-one/</guid><pubDate>Tue, 16 Jan 2018 13:34:27 GMT</pubDate></item><item><title>Xfce on Xrdp on Fedora 26</title><link>https://bgstack15.ddns.net/blog/posts/2017/11/01/xfce-on-xrdp-on-fedora-26/</link><dc:creator>bgstack15</dc:creator><description>&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;p&gt;This post will demonstrate how to set up a Fedora installation to act as a
terminal server that serves desktops over &lt;a href="https://msdn.microsoft.com/en-us/library/aa383015(v=vs.85).aspx"&gt;RDP&lt;/a&gt;. This will allow Windows computers to
connect to it, as well as a GNU/Linux system running xfreerdp clients. These
instructions should be easy to follow on any RHEL-based distros, and easily
adapted to others. The copy-paste segments have been tested on Fedora 26 but
the accompanying instructions should guide you in deploying a terminal server
on a broad range of GNU/Linux environments.&lt;/p&gt;
&lt;h2&gt;How to set up xrdp on Fedora&lt;/h2&gt;
&lt;p&gt;Ensure your desktop environment is installed. For CentOS 7 that would be
something similar to &lt;strong&gt;yum groupinstall "Server with gui"&lt;/strong&gt; or &lt;strong&gt;yum
groupinstall xfce&lt;/strong&gt;. Install the components necessary for rdp and vnc. When
the rdp server allows a user to connect, the user connects to a X windows
session in VNC.&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;yum -y install xrdp tigervnc-server
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Set up a firewall rule for the RDP port.&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;tf=/lib/firewalld/services/xrdp.xml; touch "&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tf&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;"; chmod 0644 "&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tf&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;"
cat &lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;EOF&lt;/span&gt; &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;"&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tf&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;"
&lt;span class="cp"&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;service&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;short&amp;gt;&lt;/span&gt;Remote Desktop Protocol (RDP)&lt;span class="nt"&gt;&amp;lt;/short&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;description&amp;gt;&lt;/span&gt;A RDP service that serves X desktop sessions. Using this allows a Windows client to connect using the built-in mstsc utility!&lt;span class="nt"&gt;&amp;lt;/description&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;port&lt;/span&gt; &lt;span class="na"&gt;protocol=&lt;/span&gt;&lt;span class="s"&gt;"tcp"&lt;/span&gt; &lt;span class="na"&gt;port=&lt;/span&gt;&lt;span class="s"&gt;"3389"/&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/service&amp;gt;&lt;/span&gt;
EOF
firewall-cmd --reload
firewall-cmd --permanent --add-service=xrdp
firewall-cmd --reload
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Running xfce or any arbitrary DE&lt;/h3&gt;
&lt;p&gt;On Fedora, for xfce specifically you need to make sure that X clients are told
to run xfce. The vnc services will try to start a window manager, but as of
the time of this writing xfce is not included in the list, so it will fail out
(or run gnome, if it's present). The file to inspect is
/etc/X11/xinit/Xclients, or the per-user settings at ~/.Xclients. For the etc
file, it should be fairly obvious how to add to it. Additionally, make sure
the file is executable! For Fedora 26 and xfce, you can inspect this patch
file, and then either run the patch statement or make the changes yourself
manually.&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# for all users
tf=/etc/X11/xinit/Xclients.patch; touch "&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tf&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;"; chmod 0644 "&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tf&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;";
cat &lt;span class="err"&gt;&amp;lt;&amp;lt;&lt;/span&gt;'EOFPATCH' &amp;gt;"&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tf&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;"
--- /etc/X11/xinit/Xclients 2017-02-12 00:38:18.000000000 -0500
+++ /etc/X11/xinit/Xclients.new 2017-10-14 08:12:34.340524791 -0400
@@ -12,6 +12,7 @@
 MSESSION="$(type -p mate-session)"
 STARTKDE="$(type -p startkde)"
 STARTLXDE="$(type -p startlxde)"
+STARTXFCE="$(type -p startxfce4)"

 # check to see if the user has a preferred desktop
 PREFERRED=
@@ -25,6 +26,8 @@
    PREFERRED="&lt;span class="nv"&gt;$STARTKDE&lt;/span&gt;"
     elif [ "&lt;span class="nv"&gt;$DESKTOP&lt;/span&gt;" = "LXDE" ]; then
    PREFERRED="&lt;span class="nv"&gt;$STARTLXDE&lt;/span&gt;"
+    elif [ "&lt;span class="nv"&gt;$DESKTOP&lt;/span&gt;" = "XFCE" ]; then
+   PREFERRED="&lt;span class="nv"&gt;$STARTXFCE&lt;/span&gt;"
     fi
 fi

@@ -44,6 +47,9 @@
 elif [ -n "&lt;span class="nv"&gt;$STARTLXDE&lt;/span&gt;" ]; then
     # if neither GNOME nor KDE then LXDE
     exec "&lt;span class="nv"&gt;$STARTLXDE&lt;/span&gt;"
+elif [ -n "&lt;span class="nv"&gt;$STARTXFCE&lt;/span&gt;" ]; then
+    # if none of the above, try XFCE.
+    exec "&lt;span class="nv"&gt;$STARTXFCE&lt;/span&gt;"
 fi

 # We should also support /etc/X11/xinit/Xclients.d scripts
EOFPATCH
patch -p1 /etc/X11/xinit/Xclients &lt;span class="err"&gt;&amp;lt;&lt;/span&gt; /etc/X11/xinit/Xclients.patch
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And for the individual users (I have yet to test to see if the normal order of
resolution of the X files lets this actually override it for the user):&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;tf=~/.Xclients; touch "&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tf&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;"; chmod 0700 "&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tf&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;";
cat &lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;EOF&lt;/span&gt; &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; "&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tf&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;"
exec /usr/bin/startxfce4
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And that's it! A sample &lt;a href="http://www.freerdp.com/"&gt;xfreerdp&lt;/a&gt; statement to
connect to this service could be:&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;xfreerdp /sec-rdp /cert-tofu /size:1520x820 /bpp:16 /v:192.168.1.76 -z /disp /audio-mode:0 /wallpaper /themes /u:bgstack15
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;[![Screenshot of session manager login screen in vnc in&lt;/h2&gt;
&lt;p&gt;xrdp](/2017/10/freerdp-sesman.png)](/2017/10/freerdp-sesman.png)
Login screen after connecting to xrdp service&lt;/p&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;h3&gt;Weblinks&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Using the patch utility &lt;a href="https://docs.moodle.org/dev/How_to_create_a_patch#Creating_a_patch_using_diff"&gt;https://docs.moodle.org/dev/How_to_create_a_patch#Creating_a_patch_using_diff&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;update file /etc/X11/xinit/Xclients &lt;a href="https://docs-old.fedoraproject.org/en-US/Fedora/13/html/Deployment_Guide/s1-x-runlevels.html"&gt;https://docs-old.fedoraproject.org/en-US/Fedora/13/html/Deployment_Guide/s1-x-runlevels.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://forum.xfce.org/viewtopic.php?id=8261"&gt;https://forum.xfce.org/viewtopic.php?id=8261&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;General xrdp guide &lt;a href="https://hostpresto.com/community/tutorials/using-a-desktop-environment-on-a-centos-7-vps/"&gt;https://hostpresto.com/community/tutorials/using-a-desktop-environment-on-a-centos-7-vps/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Notes about cinnamon on CentOS 7 &lt;a href="https://www.techbrown.com/install-cinnamon-2-6-on-fedora-22-centos-7-rhel-7.shtml"&gt;https://www.techbrown.com/install-cinnamon-2-6-on-fedora-22-centos-7-rhel-7.shtml&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;xrdp on centos 7 &lt;a href="http://idroot.net/tutorials/how-to-install-xrdp-on-centos-7/"&gt;http://idroot.net/tutorials/how-to-install-xrdp-on-centos-7/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.itzgeek.com/how-tos/linux/centos-how-tos/install-xrdp-on-centos-7-rhel-7.html"&gt;http://www.itzgeek.com/how-tos/linux/centos-how-tos/install-xrdp-on-centos-7-rhel-7.html&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;</description><category>rdp</category><category>vnc</category><category>xfce</category><category>xrdp</category><guid>https://bgstack15.ddns.net/blog/posts/2017/11/01/xfce-on-xrdp-on-fedora-26/</guid><pubDate>Wed, 01 Nov 2017 13:16:15 GMT</pubDate></item><item><title>Cinnamon on VNC on CentOS 7</title><link>https://bgstack15.ddns.net/blog/posts/2017/08/01/cinnamon-on-vnc-on-centos-7/</link><dc:creator>bgstack15</dc:creator><description>&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;This document describes how to install Cinnamon desktop environment on CentOS
7 for use in VNC. Basically, you can take a headless server and turn it into a
virtual desktop controller.&lt;/p&gt;
&lt;h3&gt;Caveats&lt;/h3&gt;
&lt;p&gt;Limitations of this design prevent this from scaling up past so many users, so
this would be best suited for home or small office use. VNC uses no security.
Consider alternatives or additions to this process when security is a
consideration.&lt;/p&gt;
&lt;h2&gt;Installing Cinnamon for VNC&lt;/h2&gt;
&lt;h3&gt;Installing the components&lt;/h3&gt;
&lt;p&gt;Install the vnc server.&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;yum install tigervnc-server tigervnc vnc
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Install the desktop environment.&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;yum install cinnamon
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Install any applications to be used.&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;yum install firefox gnome-terminal
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Configuring the components&lt;/h3&gt;
&lt;p&gt;For each user that uses a virtual desktop on this host, you will need a
separate systemd service, as well as a vnc password which is separate from the
regular user password. Also set up the xstartup file for vnc.&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;tu=bgstack15
tn=1
sudo cp -p /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@\:&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tn&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;.service
sed -r -i -e "s//&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tu&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;/g;' /etc/systemd/system/vncserver@\:&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tn&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;.service
systemctl enable vncserver@\:&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tn&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;.service
firewall-cmd --permanent --add-port 59$( printf '%02i' "&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tn&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;")/tcp
printf "For user &lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tu&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt; please provide new "
su - &lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tu&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt; -c vncpasswd
tf=~/.vnc/xstartup
test -f "&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tf&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;" &lt;span class="err"&gt;&amp;amp;&amp;amp;&lt;/span&gt; \cp -p "&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tf&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;" "&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tf&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;.$( date "+%Y-%m-%dT%H%M%S" )"; touch "&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tf&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;"; chmod 0755 "&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tf&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;"
cat &lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;EOF&lt;/span&gt; &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; "&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tf&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;"
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
[ -x /etc/vnc/xstartup ] &lt;span class="err"&gt;&amp;amp;&amp;amp;&lt;/span&gt; exec /etc/vnc/xstartup
[ -r &lt;span class="nv"&gt;$HOME&lt;/span&gt;/.Xresources ] &lt;span class="err"&gt;&amp;amp;&amp;amp;&lt;/span&gt; xrdb &lt;span class="nv"&gt;$HOME&lt;/span&gt;/.Xresources
exec /usr/bin/cinnamon-session
EOF
systemctl start vncserver@\:&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tn&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;.service
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Connecting to the desktop&lt;/h3&gt;
&lt;p&gt;On a client, run&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;vncviewer hostname:1
&lt;/code&gt;&lt;/pre&gt;</description><category>desktop</category><category>vnc</category><guid>https://bgstack15.ddns.net/blog/posts/2017/08/01/cinnamon-on-vnc-on-centos-7/</guid><pubDate>Tue, 01 Aug 2017 13:03:34 GMT</pubDate></item></channel></rss>