-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve "#2522 use startup command from /usr/share/xsession ..." #2557
Conversation
Personally I'm not keen on the /etc/xrdp/export_desktop_session. This can easily be added into The rest of it looks good to me though. What do you think @akarl10 ? |
looks good. [ -n "$XRDP_SESSION" ] && export DESKTOP_SESSION=<your preferred desktop> in ~/.profile, but of course /etc/profile.d is a good place too |
if [ -r /etc/xrdp/export_desktop_session ]; then | ||
. /etc/xrdp/export_desktop_session | ||
fi | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed in the PR, please remove this bit.
By all means add a comment to point the user to ~/.profile
or /etc/profile.d/
sesman/startwm.sh
Outdated
# in either of following file. | ||
# 1. ~/.profile | ||
# 2. create a file (any filename is OK) in /etc/profile.d | ||
# <your preferred desktop> shall be one of "ls -1 /usr/share/xsessions/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest "ls -1 /usr/share/xsessions/" without .desktop suffix
sesman/startwm.sh
Outdated
# 1. ~/.profile | ||
# 2. create a file (any filename is OK) in /etc/profile.d | ||
# <your preferred desktop> shall be one of "ls -1 /usr/share/xsessions/" | ||
# e.g. [ -n "$XRDP_SESSION" ] && export DESKTOP_SESSION==ubuntu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should probably be DESKTOP_SESSION=ubuntu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the documentation. This way we give some kind of "best practice" and prevent too many custom solutions/hacks that might break if upstream changes something
I tried to put
into ~/.profile.
|
say Hooray to [email protected] the 3-5 sec timeout is the time it takes to stop that unit after the LAST session of the user (if you would have a ssh session active this environment will not clear) |
Understood. Thanks. |
I think in a2a8a0b the documentation is already fixed. At least I am happy with this inline doc If we stick to the .profile recommendation we could remove the comment about SessionVariables (note that sesman.ini never contained DESKTOP_SESSION so this would be the only place that was mentioned) |
Agreed. @Hiero32 - do you want to remove this comment at lines 60 and 61?
then we'll merge this. |
There are a couple of reasons I prefer .profile and /etc/profile.d.
I replaced
with
Also I confirmed /etc/profile.
|
Thanks @Hiero32 for sticking with this. |
It is good way to set STARTUP in startwm.sh.
Many desktop environments do not start wthout it on debian/ubuntu.
Users need to write lines in .xsessionrc/.xsession., however it is difficult to set environment variables correctly.
This fixes an issue in #2522 and adds some improvements.
This is a workaround for some desktop environments. e.g. gnome-flashback-metacity.
use startup command from /usr/share/xsession if DISPLAY_SESSION is set #2522 expects DESKTOP_SESSION is set in sesman.ini in the SessionVariables section.
I think it is a bit inconvenient for users to modify sesman.ini.
I added to source the file /etc/xrdp/export_desktop_session, if exists.
Simplest content in /etc/xrdp/export_desktop_session is to just one line to export DESKTOP_SESSION environment variable as follows.
Because /etc/xrdp/export_desktop_session is shell script, more functionality can be added.
For example, if multiple users use the server and only userA wants to use gnome-flashback-metacity, and others want to use ubuntu, following /etc/xrdp/export_desktop_session works.