So I have used the method of installing tigervnc-server and xrdp in order to allow users to rdp into a centos 7 server. What I need to do now is get the rdp to default to xfce for the users.
Question is, I have gnome and xfce installed side by side and I want the rdp to default to xfce. how would this be done? I can log in at physical workstation with xfce or gnome perfectly fine if I select it one the login screen, but can’t seem to get the rdp to default to xfce for users logging in via rdp. It always defaults to gnome.
I tried:
1. placing startxfce4 at the front of the list in /etc/xrdp/startwm.sh (didn’t work)
2. commenting out wm_start and placing startxfce4 in it’s place (didn’t work)
3. Created a ~/.xsession file and populated it with startxfce4 (didn’t work)
Also, if there is another method of enabling rdp from windows machines to the server which will default to the xfce DE, that would be great! But for the time being, I'm going with what has always worked with me since I don't mind gnome.
XRDP and xfce
Re: XRDP and xfce
I've found this solution:
Then copy & paste:
Make it executable:
And restart the xrdp server:
I still have no idea how to make it default to all users.
Source: http://qiita.com/tukiyo3/items/38b53f3c6a9970cfafe4
Code: Select all
nano ~/.Xclients
Code: Select all
#!/bin/bash
XFCE="$(which xfce4-session 2>/dev/null)"
exec "$XFCE"
Code: Select all
chmod +x .Xclients
Code: Select all
sudo service xrdp restart
Source: http://qiita.com/tukiyo3/items/38b53f3c6a9970cfafe4
-
- Posts: 1
- Joined: 2020/04/21 06:30:11
Re: XRDP and xfce
To make it default for all the users, place a file named "startwm-bash.sh" in the /etc/xrdp directory with the exact same contents
Assign executable permission to the file.
Lastly modify the sesman.ini file to use the above script as the default window manager.
Modify the defaultwindow manager to look like below
Although the path says it is relative to /etc/xrdp, It worked for me after giving the absolute path of the executable.
Restart the xrdp service
Code: Select all
cat /etc/xrdp/startwm-bash.sh
#!/bin/bash
XFCE="$(which xfce4-session 2>/dev/null)"
exec "$XFCE"
Lastly modify the sesman.ini file to use the above script as the default window manager.
Code: Select all
vi /etc/xrdp/sesman.ini
Code: Select all
DefaultWindowManager=/etc/xrdp/startwm-bash.sh
Restart the xrdp service
Code: Select all
service xrdp restart