Description of problem:
It seems the default shell is not activated when starting a terminal session within xfce when working remotely using x2go. Something seems wrong in the startup procedure, at least for my specific usecase.
* I am using a remote xfce4 desktop using x2go
* my default shell is tcsh
* I have no $HOME/.xfcerc file
* the problem persists even if I go to text mode and remove the $HOME/.config/xfce folder
The problem is that my terminals do not use the default tcsh when I open them. It is not just the xfce4-terminal, but it happens in other terminal types
as well (tested with konsole and mate-terminal as well).
The reason is displayed in $HOME/.xsession-x2go-$MACHINENAME-errors
This command: head -2 $HOME/.xsession-x2go-$MACHINENAME-errors
XSession-x2go: X session started for $USER at do 23 jan 2020 10:28:20 MET
/usr/share/Modules/init/tcsh: eval: line 3: syntax error near unexpected token `alias'
/usr/share/Modules/init/tcsh: eval: line 3: `if ( $?histchars && $?prompt ) alias module 'set _histchars = $histchars; unset histchars; set _prompt=$prompt:q; s
et prompt=""; eval "`/usr/bin/tclsh /usr/share/Modules/libexec/modulecmd.tcl tcsh \!*:q`"; set _exit="$status"; set histchars = $_histchars; unset _histchars; s
et prompt=$_prompt:q; unset _prompt; test 0 = $_exit' ;'
/usr/share/Modules/init/tcsh: line 15: syntax error near unexpected token `alias'
so to me it seams this
"/usr/bin/tclsh /usr/share/Modules/libexec/modulecmd.tcl tcsh"
call generates a piece of tcsh script, but then the system tries
to use bash to execute it.
Version-Release number of selected component (if applicable):
This combination gives me the problem:
Steps to Reproduce:
1. connect to the remove system using x2go
2. start a fresh xfce desktop session
3. open any terminal window
the terminal uses /bin/bash as shell
the default shell for the users, in my case /bin/tcsh, should be used.
the problem does not occur if I start a local xfce session. Tested this both on my local and on the remote system. Details:
a local test with fedora 31 on my laptop did not reproduce the problem.
a local test with fedora 30 at my remote system did not reproduce the problem.
so clearly the problem is in xfce or the interaction between x2go, xfce and the startup scripts in environment-modules.
There are a number of things interacting here, namely:
- x2go launches everything with bash to have a consistent scripting language
- Fedora sets SHELL=/bin/bash via (sometimes ~/.bash_profile ->) ~/.bashrc -> /etc/bashrc
- /etc/x2go/Xsession launches the session with a login shell using $SHELL
- With SHELL set, xfce4-teminal uses that for new terminals
One workaround is to remove (or move) your ~/.bash_profile and ~/.bashrc files - but this will hobble bash if you ever do use it for a terminal shell. But the session is still launched with bash which still leads to the module errors you reported (though these I think are more symptom than cause).
This is the patch I've proposed to upstream (this gets installed as /etc/x2go/Xsession):
diff --git a/x2goserver-xsession/etc/Xsession b/x2goserver-xsession/etc/Xsession
index 270a0b3..522f37e 100755
@@ -117,6 +117,10 @@ if ! echo "*" >>"$WRITE_TEST"; then
rm -f "$WRITE_TEST"
+# Determine the users login shell and use that to launch the session
+SHELL=$(getent passwd $LOGNAME | cut -d: -f7)
+[ -z "$SHELL" ] && SHELL=/bin/bash
if [ -f /etc/debian_version ] || [ -f /etc/devuan_version ]; then
and reported here: https://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=1434
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '31'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 31 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fedora 31 changed to end-of-life (EOL) status on 2020-11-24. Fedora 31 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.