On 2/9/21 5:04 PM, the...@sys-concept.com wrote:
On 2/8/21 9:59 PM, the...@sys-concept.com wrote:
On 2/8/21 9:44 PM, cal wrote:
[snip]

When I'm directly in front of the PC and I have a log-in screen and type user 
ID + passwords
I was under impression that "startxfce4" would run automatically when from 
.xinitrc
~/.xinitrc
exec startxfce4

but it doesn't, when I log-in the XFCE4 is not starting automatically, I have 
to type manually: startxfce4

I see you have already solved your problem.  But it bears mentioning: .xinitrc 
is executed by runing `startx`, not by the login shell.

I see, so instead of going around and calling .xinitrc from .bash_profile

why not call  startxfce4 directly from .bash_profile

Instead of:
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then exec startx; fi

start as:
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then exec startxfce4; fi

It should work.

With the above setup starting "startxfce4" from .bash_profile, I get an error 
when ssh:
"No xauth data; using fake authentication data for X11 forwarding."

This error does not show up when "startxfce4" is run from .xinitrc
I don't know what difference it makes how xfce4 is started.
startx does some additional work besides just running the .xinitrc script. If you are not using a display manager, startx is the correct way to start X, with .xinitrc containing the commands to launch your window manager.

My .xinitrc:
if [ -d /etc/X11/xinit/xinitrc.d ]; then
    for f in /etc/X11/xinit/xinitrc.d/*; do
        [ -x "$f" ] && . "$f"
    done
    unset f
fi

exec dbus-launch --exit-with-session i3

Reply via email to