Showing posts with label xrdp. Show all posts
Showing posts with label xrdp. Show all posts

Thursday, June 5, 2025

Sunday, June 30, 2024

fix firefox display problem on Raspberry pi OS via xrdp remote

 
change the following 

Option 2)
By default Xrdp uses the /etc/ssl/private/ssl-cert-snakeoil.key file that is readable only by members of the “ssl-cert” group. Run the following command to add the xrdp user to the group :

Code: Select all

sudo adduser xrdp ssl-cert

Code: Select all

sudo nano /etc/X11/xrdp/xorg.conf
And find the line Option DRMDevice line and change it to
Option "DRMDevice" ""
reboot raspberry pi

reference

--30--

Wednesday, September 8, 2021

Install Xrdp on Ubuntu 20.04 LTS

 


This page has a nice workaround to try with a black screen on XRDP.  Need to figure out how it works, but nice to have it.


Edit /etc/xrdp/startwm.sh

Add these lines just before the lines that test & execute Xsession as shown in the screenshot below.

unset DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR

restart Xrdp
systemctl restart xrdp

retry remote login.

--30--

Thursday, August 19, 2021

install xrdp for remote desktop on friendlyarm ubuntu version, focal 20.04.

Must translate thru google translate.  Translated version copied and pasted here.

XRDP with xorg doesn't work, probably due to missing hardware to frame buffer.  Seems to rig to use vnc remote desktop method to  remote the desktop.

Installed xfce4 for window manager

<run following thru google translate for updated info>
snapshot copied and saved 8/19/2021

https://wiki.friendlyarm.com/wiki/index.php/How_to_setup_XRDP_server_on_NanoPC-T4


How to setup XRDP server on NanoPC-T4

View Chinese

1 Step1: Install XRDP remote desktop

Enter the following command to install:

sudo apt install  -y tigervnc-standalone-server xrdp
 sudo  sed  -e  's/^new_cursors=true/new_cursors=false/g'  -i  / etc / xrdp / xrdp.ini

2 Step2: Edit /etc/xrdp/startwm.sh

Edit /etc/xrdp/startwm.sh:

sudo  vim  / etc / xrdp / startwm.sh

Comment out the last two lines in the file (comment method: add # sign at the beginning of the line), as shown below:

# test -x /etc/X11/Xsession && exec /etc/X11/Xsession 
# exec /bin/sh /etc/X11/Xsession

Then add the following at the end of the file:

lxsession -s LXDE -e LXDE

3 Step3: Edit /etc/xrdp/xrdp.ini

Edit /etc/xrdp/xrdp.ini

sudo  vim  / etc / xrdp / xrdp.ini

Scroll to the address of "; Session types", delete all other session types, only [Xvnc] is left:

;
; Session types
;
; Some session types such as Xorg, X11rdp and Xvnc start a display server.
; Startup command-line parameters for the display server are configured
; in sesman.ini. See and configure also sesman.ini.
 [ Xvnc ] 
name =Xvnc
 lib =libvnc.so
 username =ask
 password =ask
 ip =127.0.0.1
 port =- 1 
#xserverbpp=24 
#delay_ms=2000

4 Step4: Disable light-locker

Since light-locker will not work properly in the XRDP environment, we need to disable it in the XRDP environment. In order not to affect the real environment, here we use a packaging script to solve the problem. First, rename the original file:

the sudo  CP  / usr / bin / Light-Locker / usr / bin / Light-locker.orig
 the sudo  RM  / usr / bin / Light-Locker

Create another script to call it, and use the editor to create a file /usr/bin/light-locker with the following content:

#!/bin/sh
 
# The light-locker uses XDG_SESSION_PATH provided by lightdm. 
if  [  !  -Z  " \$ {XDG_SESSION_PATH}"  ] ; then 
  / usr / bin / light-locker.orig
 else 
  # Disable light-locker in XRDP. 
  true 
fi 
EOF

Give the script executable permissions:

sudo  chmod  755  / usr / bin / light-locker

5 Step5: Start xrdp service

sudo systemctl enable xrdp
 sudo systemctl restart xrdp

6 Step6: Test the remote desktop connection

Use the Microsoft Remote Desktop client to create a new connection, the address is the IP address of the development board, and the user name and password are pi. In order to get a better experience, the resolution is recommended to be set to 1280x800, and the color depth is 24 bits. The settings are as shown in the figure below. Shown:

  • Xrdp-ip.png
  •  
  • Xrdp-settings.png

After the connection is successful, as shown in the figure below:
Win-xrdp-friendlydesktop.png


--30--

Thursday, May 20, 2021

xrdp on debian 9 notes.

 


Install xrdp xfce4 and vnc
 
apt install -y xrdp tigervnc-standalone-server

problem with xrdp.ini having autorun= default to the Session ID rather than reasonable value
change the autorun= to add autorun=Xvnc
 
cant seem to run Xorg session, but with xvnc installed works okay
 
upstream error
https://github.com/neutrinolabs/xrdp/issues/750
 
original error in Fedora 24
https://bugzilla.redhat.com/show_bug.cgi?id=1450681
 
error message is:
 /var/log/xrdp.log shows [ERROR] xrdp_wm_log_msg: Section "HPC15" not configured in xrdp.ini

install xsession and xsessionrc as follows
https://www.hiroom2.com/2018/05/07/ubuntu-1804-xrdp-xfce-en/

another file on debian 9 xrdp
https://ekozel.com/2019/10/05/setup-remote-desktop-xrdp-on-debian-9/

https://portal.databasemart.com/kb/a457/how-to-install-desktop-environment-and-xrdp-service-in-debian-9.aspx

 
 
 
 
--30--

Saturday, January 11, 2020

xrdp and xfce4 problems on Ubuntu 18.04.4 release (started in 18.04.2)



described here:
https://github.com/microsoft/linux-vm-tools/issues/49

more info here, matches problem:

https://github.com/microsoft/linux-vm-tools/issues/76

This install fixed the problem on ubuntu 18.04.4

apt-get -y install xorgxrdp xorg-video-abi-23 xserver-xorg-core

cluster fuck

--30--

Friday, January 11, 2019

xrdp and xrdp-sesman problems


update to the xrpd sesman recently via update killed the xrdp.

bug report included below.

if necessary, have to log in and and manually start xrdp-sesman

service xrdp restart seems not to restart xrdp-sesman, so connections fail after you restart it after reboot

xrdp failed (problem connecting) when package was auto-updated

Unable to start XRDP service

#854548 xrdp sesman service fails

--30--

Thursday, January 10, 2019

xinit xsession xsessionrc notes


This is a brief on xinit xsession etc.

https://unix.stackexchange.com/questions/281858/difference-between-xinitrc-xsession-and-xsessionrc


~/.xinitrc is executed by xinit, which is usually invoked via startx. This program is executed after logging in: first you log in on a text console, then you start the GUI with startx. The role of .xinitrc is to start the GUI part of the session, typically by setting some GUI-related settings such as key bindings (with xmodmap or xkbcomp), X resources (with xrdb), etc., and to launch a session manager or a window manager (possibly as part of a desktop environment).

~/.xsession is executed when you log in in graphical mode (on a display manager) and the display manager invokes the “custom” session type. (With the historical display manager xdm, .xsession is always executed, but with modern display managers that give the user a choice of session type, you usually need to pick “custom” for .xsession to run.) Its role is both to set login-time parameters (such as environment variables) and to start the GUI session.

~/.xsessionrc is executed on Debian (and derivatives such as Ubuntu, Linux Mint, etc.) by the X startup scripts on a GUI login, for all session types and (I think) from all display managers. It's also executed from startx if the user doesn't have a .xinitrc, because in that case startx falls back on the same session startup scripts that are used for GUI login. It's executed relatively early, after loading resources but before starting any program such as a key agent, a D-Bus daemon, etc. It typically sets variables that can be used by later startup scripts. It doesn't have any official documentation that I know of, you have to dig into the source to see what works.


--30--

Sunday, September 24, 2017

armbian wifi, xrdp install


  1. Ubuntu-desktop (already installed, but we did sudo apt-get install and found out)
  2. TightVNCServer
  3. XRDP (with, of course vnc4server installed with the package)

https://docs.ubuntu.com/core/en/stacks/network/network-manager/docs/configure-wifi-connections

https://people.freedesktop.org/~lkundrak/nm-docs/nmcli-examples.html

First, determine the name of the WiFi interface:

$ nmcli d
DEVICE             TYPE      STATE         CONNECTION
...
wlan0              wifi      disconnected     --
 
Make sure the WiFi radio is on (which is its default state):

$ nmcli r wifi on
 
Then, list the available WiFi networks:

$ nmcli d wifi list
*  SSID           MODE   CHAN  RATE       SIGNAL  BARS  SECURITY
   ...
   my_wifi      Infra  5     54 Mbit/s  89      ▂▄▆█  WPA2
 
As an example, to connect to the access point 'my_wifi', you would use the following command:

$ nmcli d wifi connect my_wifi password <password>
 
<password> is the password for the connection which needs to have 8-63 characters or 64 hexadecimal characters to specify a full 256-bit key.


Monday, August 7, 2017

systemd action 9 suspended


getting systemd action 9 suspended.

Hint here:

https://askubuntu.com/questions/108924/missing-dev-xconsole-causes-rsyslog-to-stop-as-well-as-all-other-services

https://unix.stackexchange.com/questions/168215/create-several-dev-xconsole-files-automatically-upon-boot

https://devcentral.nasqueron.org/T806
"Root cause: rsyslog was trying to use xconsole, a program not installed, to send some logs to."

seems to have vanished after installing xterm, though not clear why.

/etc/init.d/rsyslogd has code to create /dev/xconsole (which is supposedly the problem it's missing) by linking /run/xconsole to /dev/xconsole.

After installing xterm they are both still missing.

Note: this system is a server configured system with xfce4 xrdp and tightvnc installed to give remote access.  Suggestion that xterm was missing is in other online hints.

Sunday, August 6, 2017

XRDP failure log message: connecting to 127.0.0.1 5910 error - problem connecting


The messages

connecting to sesman ip 127.0.0.1 port 3350
sesman connect ok
sending login info to sesman
login successful for display 10
started connecting
connecting to 127.0.0.1 5910
error - problem connecting


Printed in the dialog box when attempting to connect to an XRDP enabled system.

The latter problem implies a connectivity problem, which couldn't be further from the cause.

Many sites insist that installing XRDP, vncserver (of some sort) in one order or another is the problem.  Also misleading.

Then you look in xrdp-sesman-log in /var/log, you will see this

[INFO ] starting Xvnc session...
[ERROR] X server for display 10 startup timeout
[INFO ] starting xrdp-sessvc - xpid=3531 - wmpid=3530
[ERROR] X server for display 10 startup timeout
[ERROR] another Xserver is already active on display 10
[DEBUG] aborting connection...[20130627-08:55:49]
[INFO ] ++ terminated session:  username root, display :10.0, session_pid 3529, \
      ip 192.168.0.227:59050 - socket: 7

Indicating that somehow your RDP session has two Xservers active.  What happens when you log in is that a login method is performed to authenticate, and the top dialog indicates the progress of that.

Then it will spawn some VNC server session for the X session (uses 10, 11, etc.) to connect.

If you read the symptoms here, there is already a session or server on 5910.  Completely wrong.

To find the problem, one has to try running the window manager.  I don't know if this would happen for other than xfce4, which I use, but it produces the root problem.  run:

If you try running vncserver, you will see at the end of the startup this:

[dix] Could not init font path element /usr/share/fonts/default/Type1, removing from list!
[dix] Could not init font path element built-ins, removing from list!

Fatal server error:
could not open default font 'fixed'

Turns out that if any failure occurs in the chain of events between the authentication after the RDP login and getting the session going, you get the " Xserver is already active on display" message in the var log sesman log.

Other errors I suspect produce the same nonsense, someone reported when the vnc server and client couldn't agree on a geometry, the same error occurred.

This is probably the solution to all the load order issues and which vnc server (real or tight) package you use.

quoting:
I have solved it by installing xfonts-base

This also solved my problem.

Thursday, July 6, 2017

Redhat EL7.3 XRDP install



http://www.itzgeek.com/how-tos/linux/centos-how-tos/install-xrdp-on-centos-7-rhel-7.html

xrdp is an Open Source Remote desktop Protocol server, which allows you to RDP to your Linux server from Windows machine; it is capable of accepting connections from  rdesktop, freerdp, and remote desktop clients. This how to will help you to setup xrdp server on CentOS 7 / RHEL 7.

Prerequisites:

1. This was written when xrdp is available neither on CentOS repositories nor on EPEL repository, after a lot of Google search; i found desktop repository (http://li.nux.ro/) which was having xrdp for CentOS 7 / RHEL 7. We need to manually setup the repository on CentOS 7.
2. Don’t forget to install Gnome on CentOS 7

Automatic (recommended):

Install EPEL and nux Desktop repository rpms.
# rpm -Uvh https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
# rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm

Manual:

Create a repository file.
# vi /etc/yum.repos.d/xrdp.repo
Place the following content. Once added, save and close the file.
[xrdp]
name=xrdp
baseurl=http://li.nux.ro/download/nux/dextop/el7/x86_64/
enabled=1
gpgcheck=0

Installation:

Issue the  following command to install xrdp
# yum -y install xrdp tigervnc-server
You will get the following output, make sure you are getting package from the newly created repository.
 --> Running transaction check
---> Package xrdp.x86_64 0:0.6.1-2.el7.nux will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
Package        Arch             Version                   Repository      Size
================================================================================
Installing:
xrdp           x86_64           0.6.1-2.el7.nux           xrdp           271 k
 
Transaction Summary
================================================================================
Install  1 Package
 
Total download size: 271 k
Installed size: 1.5 M
Is this ok [y/d/N]: y
Downloading packages:
xrdp-0.6.1-2.el7.nux.x86_64.rpm                            | 271 kB   00:05
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : xrdp-0.6.1-2.el7.nux.x86_64                                  1/1
Verifying  : xrdp-0.6.1-2.el7.nux.x86_64                                  1/1
 
Installed:
xrdp.x86_64 0:0.6.1-2.el7.nux
Once it is installed, lets start the xrdp service.
# systemctl start xrdp.service
xrdp will listen on 3389, lets confirm this by issuing following command.
# netstat -antup | grep xrdp
tcp        0      0 0.0.0.0:3389            0.0.0.0:*               LISTEN      1508/xrdp
tcp        0      0 127.0.0.1:3350          0.0.0.0:*               LISTEN      1507/xrdp-sesman
By default, services wont auto start after system reboot. Issue the following command to enable the service at system start up.
# systemctl enable xrdp.service
Next is to create iptables rule to allow rdp connection from the external machines, following command will add the exception for rdp port (3389).
# firewall-cmd --permanent --zone=public --add-port=3389/tcp
# firewall-cmd --reload
Configure SELinux
# chcon --type=bin_t /usr/sbin/xrdp
# chcon --type=bin_t /usr/sbin/xrdp-sesman

Test:

Now take rdp from any windows machine using Remote Desktop Connection, enter ip address of Linux server in computer field and click on  connect.
CentOS 7 – xrdp MSTSC
You would be asked to enter the user name and password, you can either use root or any user that you have it on system. Make sure you use module “sesman-Xvnc”.
CentOS 7 – xrdp Login page
If you click ok, you will see the processing. In less than a half min, you will get a desktop.
CentOS 7 – xrdp Desktop

Monday, September 12, 2016

Freya OS notes

Freya is a modified Ubuntu.  Some notes on changing the desktop and adding tools to make it useful are here.

Chrome:

https://johnsdeveloperblog.wordpress.com/2015/04/22/some-things-to-do-after-installing-elementary-os-freya/

XRDP setup:


sudo apt-get update
sudo apt-get install xfce4

echo xfce4-session >~/.xsession
sudo service xrdp restart

xx

xx