Remmina - The GTK+ Remote Desktop Client  v1.4.2
Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travellers, who need to work with lots of remote computers in front of either large monitors or tiny netbooks. Remmina supports multiple network protocols in an integrated and consistent user interface. Currently RDP, VNC, NX, XDMCP and SSH are supported.
Compilation-guide-for-RHEL.md
Go to the documentation of this file.
1 These are the instructions for people who want to test the latest version of Remmina (`master` branch) on RHEL-like operating systems.
2 
3 Current version of this guide was tested on vanilla CentOS 7 GNOME Desktop (specifically: [CentOS-7-x86_64-DVD-1908.iso](http://tux.rainside.sk/centos/7.7.1908/isos/x86_64/)), CentOS 8 Workstation (specifically: [CentOS-8.1.1911-x86_64-dvd1.iso](http://tux.rainside.sk/centos/8.1.1911/isos/x86_64/)) and Fedora 31 x86_64 (specifically: [Fedora-Workstation-Live-x86_64-31-1.9.iso](https://download.fedoraproject.org/pub/fedora/linux/releases/31/Workstation/x86_64/iso/Fedora-Workstation-Live-x86_64-31-1.9.iso)). However, it should work on all CentOS 7+, Red Hat 7+ and Fedora 20+ versions. If you find anything not working, raise an [issue](https://gitlab.com/Remmina/Remmina/issues/new).
4 
5 Note that although on CentOS 8 and Fedora, they use `dnf` package manager, there is still the `yum` symlink to `dnf`, so we decided to keep `yum` in this guide to make it usable on all of these distributions without any modifications.
6 
7 If you want to uninstall the program, follow the instructions in the step 0.
8 
9 **0.** It is important that no other Remmina or FreeRDP version is installed, therefore we need to remove it.
10 ```bash
11 # To check if a program is installed, we can use `whereis [program(s)]`
12 whereis freerdp remmina
13 
14 # When FreeRDP is installed from the CentOS repo, use this command to remove it
15 sudo yum -y remove freerdp*
16 
17 # When FreeRDP is installed from source code, enter the FreeRDP source code folder
18 # and run the following command
19 cd ${HOME}/freerdp
20 sudo rm $(cat install_manifest.txt)
21 
22 # When Remmina is installed from the CentOS repo, use this command to remove it
23 sudo yum -y remove remmina*
24 
25 # When Remmina is installed from source code, enter the `build` folder
26 # in Remmina source code folder and run the following command
27 cd ${HOME}/remmina/build
28 sudo make uninstall
29 
30 # Finally, we need to delete the empty folders of Remmina and FreeRDP
31 # This needs to be run for uninstallation of either programs
32 sudo rmdir $(find $(whereis freerdp remmina | grep -Po "^[^:]*: \K.*$") -type d | tac)
33 ```
34 
35 **1.** Add necessary repos. Note that on CentOS 7 GNOME Desktop only `epel` and `rpmfusion-free-updates` are not installed by default. I presume that `base`, `extras` and `updates` repos are installed on all version of CentOS 7.
36 ```bash
37 # Get some information of the currently installed distribution
38 # Note: This is used to determine what repositories are need to be be installed
39 # and to create the relevant URLs
40 distro_name="$(grep -Po '^ID="*\K[^"]*' /etc/os-release)"
41 distro_version="$(rpm -E %$distro_name)"
42 
43 if [ "$distro_name" = 'fedora' ]; then
44  distro_name_short='fedora'
45 else
46  distro_name_short='el'
47  epel_repo='epel-release'
48 fi
49 
50 # epel (on CentOS only): required for `openjpeg2-devel`, `openssl-devel`
51 # rpmfusion-free-updates (on both CentOS and Fedora): required for `ffmpeg-devel`
52 # PowerTools (on CentOS 8+ only)
53 # okay (on CentOS 8+); required for `avahi-ui-devel`, `openh264`, `libopenh264-devel`, `libx264-devel`
54 sudo yum -y install $epel_repo \
55  https://download1.rpmfusion.org/free/${distro_name_short}/rpmfusion-free-release-${distro_version}.noarch.rpm
56 
57 if [ "$distro_name" = 'centos' ] && [ "$distro_version" = 8 ]; then
58  sudo dnf config-manager --enable PowerTools
59  sudo rpm -ivh http://repo.okay.com.mx/${distro_name}/${distro_version}/x86_64/release/okay-release-1-3.el${distro_version}.noarch.rpm
60 
61  # Disable okay repo for potential package conflicts
62  sudo dnf config-manager --disable okay
63 fi
64 
65 if [ "$distro_name" = 'fedora' ]; then
66  sudo dnf config-manager --enable fedora-cisco-openh264
67 fi
68 ```
69 
70 **3.** Update `yum` cache and packages. This step might require a reboot.
71 ```bash
72 sudo yum -y upgrade
73 ```
74 
75 **4.** Install dependencies of FreeRDP and Remmina. Note that the installation dependencies for FreeRDP and Remmina was merged. If you want to know exactly which program requires which package, see the [Dependencies](#dependencies) section at the end of this document.
76 ```bash
77 sudo yum -y install alsa-lib-devel atk-devel avahi-ui-gtk3 cairo-devel cmake3 \
78  cups-devel docbook-style-xsl ffmpeg-devel gcc gcc-c++ git glib2-devel gnutls-devel \
79  gstreamer1-devel gstreamer1-plugins-base-devel gtk3-devel harfbuzz-devel \
80  json-glib-devel libappindicator-gtk3 libappindicator-gtk3-devel libgcrypt-devel \
81  libsecret-devel libSM-devel libsodium libsodium-devel libsoup-devel libssh-devel \
82  libusb-devel libvncserver-devel libX11-devel libXcursor-devel libXdamage-devel \
83  libXext-devel libXi-devel libXinerama-devel libxkbfile-devel libXrandr-devel libxslt \
84  libxslt-devel libXtst-devel libXv-devel make ninja-build openjpeg2-devel \
85  openssl-devel pango-devel pulseaudio-libs-devel vte291 vte291-devel webkitgtk4-devel \
86  xmlto xorg-x11-server-utils
87 
88 # On CentOS 8
89 if [ "$distro_name" = 'centos' ] && [ "$distro_version" = 8 ]; then
90  sudo yum -y install --enablerepo=okay avahi-ui-devel openh264 libopenh264-devel libx264-devel
91 fi
92 
93 # On Fedora
94 if [ "$distro_name" = 'fedora' ]; then
95  # TODO: Do we really need `libx264`? Or even `openh264` (that for CentOS too)?
96  sudo yum -y install avahi-ui-devel libx264 libx264-devel openh264 openh264-devel
97 fi
98 ```
99 
100 **5.** Clone FreeRDP and Remmina repos. You may want to modify the `${HOME}/{freerdp,remmina}` paths and the folder names.
101 ```bash
102 git clone --branch 2.0.0 https://github.com/FreeRDP/FreeRDP.git ${HOME}/freerdp
103 git clone https://gitlab.com/Remmina/Remmina.git ${HOME}/remmina
104 ```
105 
106 **6.** Build FreeRDP.
107 ```bash
108 mkdir ${HOME}/freerdp/build
109 cd ${HOME}/freerdp/build
110 # In the following line, the `DWITH_PULSE=ON` option needs to be included
111 # Note: `-DCMAKE_INSTALL_LIBDIR=/usr/lib64` is required when `-DCMAKE_INSTALL_PREFIX:PATH`
112 # is not `/usr`; otherwise Remmina will not find the `libfreerdp*` libraries
113 # Note: `-DWITH_OPENH264=ON -DWITH_X264=OFF` makes FreeRDP use H264 which results
114 # in extreme good quality for a quite good performance
115 cmake3 -DCMAKE_BUILD_TYPE=Debug -DWITH_SSE2=ON -DWITH_PULSE=ON -DWITH_CUPS=on -DWITH_WAYLAND=off \
116  -DCMAKE_INSTALL_LIBDIR=/usr/lib64 -DCMAKE_INSTALL_PREFIX:PATH=/opt -DWITH_OPENH264=ON \
117  -DWITH_X264=OFF ..
118 make && sudo make install
119 
120 # If you install FreeRDP and Remmina to `/opt`, you need to add `/opt/bin` to PATH
121 export PATH="$PATH:/opt/bin"
122 echo 'export PATH="$PATH:/opt/bin"' >> ${HOME}/.bashrc
123 
124 # You can test FreeRDP by connecting to an RDP host
125 xfreerdp +clipboard /sound:rate:44100,channel:2 /v:hostname /u:username
126 ```
127 
128 **7.** Make your system dynamic loader aware of the new libraries you installed
129 ```bash
130 sudo ldconfig
131 ```
132 
133 **8.** Build Remmina.
134 ```bash
135 mkdir ${HOME}/remmina/build
136 cd ${HOME}/remmina/build
137 # Note: `-DCMAKE_INSTALL_LIBDIR=/usr/lib64` is not required to successfully run Remmina,
138 # but `/usr/lib64` is the proper location for the libraries; again, it is not required
139 # at all when Remmina is installed to `/usr`
140 cmake3 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/opt -DCMAKE_INSTALL_LIBDIR=/usr/lib64 \
141  -DCMAKE_PREFIX_PATH=/opt --build=build ..
142 make && sudo make install
143 ```
144 
145 **9.** If Remmina is installed to a custom path (e.g. for use `/opt`), we need to create some symlinks in order to .
146 
147 ```bash
148 sudo mkdir -p /usr/share/icons/hicolor/scalable/panel /usr/share/icons/hicolor/apps
149 
150 for old in /opt/share/applications/*desktop $(find /opt/share/icons -type f | grep 'svg$\|png$'); do
151  new="${old/opt/usr}"
152  sudo ln -s $old $new
153 done
154 ```
155 
156 **10.** Now you should be able to run Remmina with the following command or using the GUI.
157 ```bash
158 remmina &> /dev/null &
159 ```
160 
161 ## Notes
162 
163 ### Remmina in the system tray on GNOME 3
164 
165 Current GNOME Shell versions does not include system tray, therefore vanilla GNOME will not show the Remmina system tray icon and menu. Press <kbd>Super</kbd>+<kbd>M</kbd> to see the Remmina icon on the message bar. If you want to fix this, you could install either [KStatusNotifierItem/AppIndicator Support](https://extensions.gnome.org/extension/615/appindicator-support/).
166 
167 Below is a guide how to install the extension. For more information on installing the `chrome-gnome-shell` , see the [documentation](https://wiki.gnome.org/Projects/GnomeShellIntegrationForChrome/Installation)
168 
169 <details>
170  <summary><b>How to install [KStatusNotifierItem/AppIndicator Support](https://extensions.gnome.org/extension/615/appindicator-support/) extension</b></summary>
171 
172 This method installs the extension locally (i.e. for current user only).
173 
174 1. Install `chrome-gnome-shell` package.
175 
176 ```bash
177 sudo yum -y install chrome-gnome-shell
178 ```
179 
180 2. Install the browser extension. Go to [GNOME extension website](https://extensions.gnome.org) and click on _Click here to install browser extension_; or you can install it from [Firefox Browser Add-ons](https://addons.mozilla.org/en-US/firefox/addon/gnome-shell-integration/).
181 
182 3. Install the [KStatusNotifierItem/AppIndicator Support](https://extensions.gnome.org/extension/615/appindicator-support/) extension by clicking on the toggle on that page (it must be on `on` position). Then confirm the installation.
183 
184 4. Don't forget to re-login the GNOME. :smiley:
185 </details>
186 
187 ### Remmina in the system tray on Xfce
188 
189 > :information_source: This might be outdated. If you know the current state of this issue or any workaround(s), open an [issue](https://gitlab.com/Remmina/Remmina/issues/new).
190 
191 Xfce and other desktop environments without app indicator support, will not show you the system tray icon if you are executing Remmina from its compilation folder (e.g. `~/remmina`) because it contains a folder named `remmina`. For more infomation, see [Bug #1363277 on Launchpad](https://bugs.launchpad.net/libappindicator/+bug/1363277).
192 
193 ### Dependencies
194 
195 1. If you are cloning the repositories, you need `git`.
196 
197 2. FreeRDP dependencies:
198 
199 ```bash
200 # Official guide (src: https://github.com/FreeRDP/FreeRDP/wiki/Compilation [rhel based])
201 gcc cmake ninja-build openssl-devel libX11-devel libXext-devel libXinerama-devel \
202  libXcursor-devel libXi-devel libXdamage-devel libXv-devel libxkbfile-devel \
203  alsa-lib-devel cups-devel ffmpeg-devel glib2-devel libusb-devel
204 # We had to install these at least on CentOS 8, but they are probably required on CentOS 7 too;
205 # otherwise the build failed
206 make gcc-c++ pulseaudio-libs-devel libXrandr-devel
207 # Recommended: these are required to build man pages
208 libxslt libxslt-devel docbook-style-xsl
209 # Recommended: for multimedia redirection, audio and video playback
210 gstreamer1-devel gstreamer1-plugins-base-devel
211 # Recommended: for some X11 addon
212 xorg-x11-server-utils
213 # Recommended: at build-time, FreeRDP states that this is 'required by virtual:world'
214 cairo-devel
215 ```
216 
217 3. Remmina dependencies (besides FreeRDP and its dependencies):
218 
219 ```bash
220 atk-devel avahi-ui-devel avahi-ui-gtk3 cmake3 gnutls-devel gtk3-devel harfbuzz-devel \
221  json-glib-devel libappindicator-devel libappindicator-gtk3 libappindicator-gtk3-devel \
222  libgcrypt-devel libopenh264-devel libsecret-devel libSM-devel libsodium libsodium-devel \
223  libsoup-devel libssh-devel libvncserver-devel libx264-devel libXtst-devel openh264 \
224  openjpeg2-devel pango-devel vte291 vte291-devel webkitgtk4-devel xmlto
225 ```