Page 1 of 1

~/.xsession do not exec

PostPosted: Sep 17th, '23, 20:35
by cefer
Hi
I am new in mageia
I have one $HOME/.xsession script but it do not run
It run in arch and debian, but not is invoked for Mageia what ignore the script
I try chmod +x but nothing
ideas?
Thanks

Re: ~/.xsession do not exec

PostPosted: Sep 17th, '23, 20:59
by doktor5000
Hi there, some more information would be appreciated.
What Mageia version do you use, what display manager, what desktop environment? Also, how do you start your X session currently?
And what do you want to put in your ~/.xsession ?

Re: ~/.xsession do not exec

PostPosted: Sep 17th, '23, 21:17
by cefer
yesterday i have download and install xfce version. It use lightdm

My now test file ~/.xsession contain 2 lines:

#!/bin/bash
echo "Testing..." >~/xsession.log

But nothing happen

Re: ~/.xsession do not exec

PostPosted: Sep 17th, '23, 23:29
by benmc
does the command
cefer wrote:echo "Testing..." >~/xsession.log
have the desired output when run by itself in your terminal?

Re: ~/.xsession do not exec

PostPosted: Sep 18th, '23, 00:51
by cefer
Investigating further, I have noticed that mageia does not run ~/.xsession ~/.xsessionrc ~/.xprofile ~/.xinitrc no any other script.
So I have modified /etc/X11/Xsession script adding one line:
Code: Select all
if [ -n "$DESKTOP" ]; then
    case $DESKTOP in
       failsafe)
        xsetroot -cursor_name left_ptr
   type -p rxvt > /dev/null >& 2 && exec rxvt -geometry 80x24-0-0
   type -p xterm > /dev/null >& 2 && exec xterm -geometry 80x24-0-0
   type -p xvt > /dev/null >& 2 && exec xvt
   type -p twm > /dev/null >& 2 && exec twm
   ;;
   default)
   ;;
   *)
   if type -p "$DESKTOP" > /dev/null; then
       . ~/.xsession & # <<<<<<~~~~~~~~~~~~~~~~~~~~ LINE 129 ADDED
            exec /bin/sh -c "$DESKTOP"
   elif


Now lightdm run a session startup script in $HOME