Skip to content
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

Merged
merged 4 commits into from
Feb 22, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions sesman/startwm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,14 @@ wm_start()
if [ -r /etc/X11/Xsession ]; then
pre_start

# if /etc/xrdp/export_desktop_session file exists, souurce it.
# /etc/xrdp/export_desktop_session script exports DESKTOP_SESSION environment varible
# The value shall be one of "ls -1 /usr/share/xsessions|cut -d. -f1".
# e.g. export DESKTOP_SESSION=ubuntu
if [ -r /etc/xrdp/export_desktop_session ]; then
. /etc/xrdp/export_desktop_session
fi
# if you want to start preferred desktop environment,
# add following line,
# [ -n "$XRDP_SESSION" ] && export DESKTOP_SESSION=<your preferred desktop>
# 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/"
Copy link
Contributor

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

# e.g. [ -n "$XRDP_SESSION" ] && export DESKTOP_SESSION==ubuntu
Copy link
Contributor

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

Copy link
Contributor

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


Copy link
Member

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/

# STARTUP is the default startup command.
# if $1 is empty and STARTUP was not set
Expand Down