Remmina - The GTK+ Remote Desktop Client  v1.4.33
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.
remmina_stats.c File Reference

Remmina usage statistics module. More...

Go to the source code of this file.

Data Structures

struct  ProfilesData
 

Functions

JsonNode * remmina_stats_get_os_info ()
 
JsonNode * remmina_stats_get_user_env ()
 Gets the following user environment: More...
 
JsonNode * remmina_stats_get_version ()
 
JsonNode * remmina_stats_get_gtk_version ()
 
JsonNode * remmina_stats_get_gtk_backend ()
 
JsonNode * remmina_stats_get_wm_name ()
 
JsonNode * remmina_stats_get_indicator ()
 
static void remmina_profiles_get_data (RemminaFile *remminafile, gpointer user_data)
 Given a remmina file, fills a structure containing profiles keys/value tuples. More...
 
JsonNode * remmina_stats_get_profiles ()
 Add a JSON member profile_count with a child for each protocol used by the user. More...
 
JsonNode * remmina_stats_get_secret_plugin ()
 Add a JSON member ACTIVESECRETPLUGIN which shows the current secret plugin in use by Remmina. More...
 
JsonNode * remmina_stats_get_primary_password_status ()
 Add a JSON member HASPRIMARYPASSWORD which shows the status of the master password. More...
 
JsonNode * remmina_stats_get_kiosk_mode ()
 Add a json member KIOSK which shows the status of the kiosk. More...
 
JsonNode * remmina_stats_get_all ()
 Get all statistics in JSON format to send periodically to the PHP server. More...
 

Detailed Description

Remmina usage statistics module.

Author
Antenore Gatta and Giovanni Panozzo
Date
12 Feb 2018

Since October 29, 2021 data is not collected nor sent to remmina.org anymore. All the code intended to send data has been removed. The following documentation has to be kept for those with versions of Remmina older than 1.4.22.

When Remmina starts asks the user to share some usage statistics with the Remmina developers. As per the opt-in model (https://en.wikipedia.org/wiki/Opt-in_email), without the consent of the user, no data will be collected. Additionally a user can ask, at any moment, that any data linked to their profile to be deleted, and can change the Remmina settings to stop collecting and sharing usage statistics.

All the data are encrypted at client side using RSA, through the OpenSSL libraries, and decrypted offline to maximize security.

The following example show which kind of data are collected.

{
"UID": "P0M20TXN03DWF4-9a1e6da2ad"
"REMMINAVERSION": {
"version": "1.2.0-rcgit-26"
"git_revision": "9c5c4805"
"snap_build": 0
}
"SYSTEM": {
"kernel_name": "Linux"
"kernel_release": "4.14.11-200.fc26.x86_64"
"kernel_arch": "x86_64"
"lsb_distributor": "Fedora"
"lsb_distro_description": "Fedora release 26 (Twenty Six)"
"lsb_distro_release": "26"
"lsb_distro_codename": "TwentySix"
"etc_release": "Fedora release 26 (Twenty Six)"
}
"GTKVERSION": {
"major": 3
"minor": 22
"micro": 21
}
"GTKBACKEND": "X11"
"WINDOWMANAGER": {
"window_manager": "GNOME i3-gnome"
}
"APPINDICATOR": {
"appindicator_supported": 0
"appindicator_compiled": 1
"icon_is_active": 1
"appindicator_type": "AppIndicator on GtkStatusIcon/xembed"
}
"PROFILES": {
"profile_count": 457
"SSH": 431
"NX": 1
"RDP": 7
"TERMINAL": 2
"X2GO": 5
"SFTP": 4
"PYTHON_SIMPLE": 4
"SPICE": 3
"DATE_SSH": "20180209"
"DATE_NX": ""
"DATE_RDP": "20180208"
"DATE_TERMINAL": ""
"DATE_X2GO": ""
"DATE_SFTP": ""
"DATE_PYTHON_SIMPLE": ""
"DATE_SPICE": ""
}
"ENVIRONMENT": {
"language": "en_US.utf8"
}
"ACTIVESECRETPLUGIN": {
"plugin_name": "kwallet"
}
"HASPRIMARYPASSWORD": {
"primary_password_status": "OFF"
}
}

All of these data are solely transmitted to understand:

  • On which type of system Remmina is used
  • Operating System
  • Architecture (32/64bit)
  • Linux distributor or OS vendor
  • Desktop Environment type.
  • Main library versions installed on the system in use by Remmina.
  • Protocols used
  • Last time each protocol has been used (globally).
See also
https://www.remmina.org for more info.

Definition in file remmina_stats.c.

Function Documentation

◆ remmina_profiles_get_data()

static void remmina_profiles_get_data ( RemminaFile remminafile,
gpointer  user_data 
)
static

Given a remmina file, fills a structure containing profiles keys/value tuples.

This is used as a callback function with remmina_file_manager_iterate.

Todo:
Move this in a separate file.

Source date -> from profile

Destination date -> The date in the pdata structure

When both date in the hash and in the profile are valid we compare the date

If the date in the hash less than the date in the profile, we take the latter

If the date in the profile is NOT valid and the date in the hash is valid we keep the latter

If the date in the hash is NOT valid and the date in the profile is valid we keep the latter

If both date are NULL, we insert NULL for that protocol

If there is not the protocol in the hash, we add it

If the date in the profile is not NULL we use it

Otherwise we set it to NULL

Definition at line 511 of file remmina_stats.c.

◆ remmina_stats_get_all()

JsonNode* remmina_stats_get_all ( void  )

Get all statistics in JSON format to send periodically to the PHP server.

The caller should free the returned buffer with g_free()

Warning
This function is usually executed on a dedicated thread, not on the main thread.
Returns
a pointer to the JSON string.

The section ENVIRONMENT collect all the user’s environment related settings.

Definition at line 806 of file remmina_stats.c.

◆ remmina_stats_get_gtk_backend()

JsonNode* remmina_stats_get_gtk_backend ( )
Warning
this function is usually executed on a dedicated thread, not on the main thread

Definition at line 381 of file remmina_stats.c.

◆ remmina_stats_get_gtk_version()

JsonNode* remmina_stats_get_gtk_version ( )
Warning
this function is usually executed on a dedicated thread, not on the main thread

Definition at line 356 of file remmina_stats.c.

◆ remmina_stats_get_indicator()

JsonNode* remmina_stats_get_indicator ( )

Support for StatusNotifier or AppIndicator

StatusNotifier/Appindicator supported by desktop

libappindicator is compiled in remmina.

Remmina not compiled with -DWITH_APPINDICATOR=on

StatusNotifier/Appindicator NOT supported by desktop

Remmina icon is active

libappindicator fallback to GtkStatusIcon/xembed");

Remmina fallback to GtkStatusIcon/xembed

Remmina icon is NOT active

Definition at line 457 of file remmina_stats.c.

◆ remmina_stats_get_kiosk_mode()

JsonNode* remmina_stats_get_kiosk_mode ( )

Add a json member KIOSK which shows the status of the kiosk.

Returns
a JSON Node structure containing the status of the primary password

Definition at line 775 of file remmina_stats.c.

◆ remmina_stats_get_os_info()

JsonNode* remmina_stats_get_os_info ( )
Warning
this function is usually executed on a dedicated thread, not on the main thread
Todo:
Add other means to identify a release name/description to cover as much OS as possible, like /etc/issue

Definition at line 173 of file remmina_stats.c.

◆ remmina_stats_get_primary_password_status()

JsonNode* remmina_stats_get_primary_password_status ( )

Add a JSON member HASPRIMARYPASSWORD which shows the status of the master password.

Returns
a JSON Node structure containing the status of the primary password

Definition at line 745 of file remmina_stats.c.

◆ remmina_stats_get_profiles()

JsonNode* remmina_stats_get_profiles ( )

Add a JSON member profile_count with a child for each protocol used by the user.

Count how many profiles are in use and for each protocol in use counts of how many profiles that uses such protocol.

The data can be expressed as follows:

PROTO PROF COUNT
RDP 2560
SPICE 334
SSH 1540
VNC 2
PROTO LAST USED
RDP 20180129
SPICE 20171122
SSH 20180111
Returns
a JSON Node structure containing the protocol usage statistics.
Warning
this function is usually executed on a dedicated thread, not on the main thread

Definition at line 644 of file remmina_stats.c.

◆ remmina_stats_get_secret_plugin()

JsonNode* remmina_stats_get_secret_plugin ( )

Add a JSON member ACTIVESECRETPLUGIN which shows the current secret plugin in use by Remmina.

Returns
a JSON Node structure containing the secret plugin in use

Definition at line 716 of file remmina_stats.c.

◆ remmina_stats_get_user_env()

JsonNode* remmina_stats_get_user_env ( )

Gets the following user environment:

  • Gets the user’s locale (or NULL by default) corresponding to LC_ALL.
Returns
a JSON Node structure containing the user’s environment.

Definition at line 291 of file remmina_stats.c.

◆ remmina_stats_get_version()

JsonNode* remmina_stats_get_version ( )
Warning
this function is usually executed on a dedicated thread, not on the main thread

Detect if Remmina is running under Flatpak

Definition at line 314 of file remmina_stats.c.

◆ remmina_stats_get_wm_name()

JsonNode* remmina_stats_get_wm_name ( )

We try to get the GNOME Shell version

When everything else fails with set the WM name to NULL

Definition at line 413 of file remmina_stats.c.