Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-02-03 15:25:33

Danielsan
Member
Registered: 2017-11-22
Posts: 89

Trying to debug XFCE4-Session on FreebSD 13.6

To be precise I am not actually trying to debug since I do not have knowledge but I am some core dump on my FreeBSD box caused by Xfce and I'd like to open some bug reports.

The point is if I use a login manager I get a lot of meaningful info, but so far I am launching the session from the terminal:

startx >> ~/.xsession.log

But in this way I get error mainly from the running applications not from XFCE hence I tried to use this variable:

XFSM_VERBOSE
              When defined, this environment variable enables debugging
              messages to be saved to ~/.xfce4-session.verbose-log The log
              file from the last session run with this environment variable
              set is retained at ~/.xfce4-session.verbose-log.last These
              debugging messages are useful for troubleshooting and
              development.

as in:

$ cat .xinitrc 
#! /bin/sh

XFSM_VERBOSE=1
exec /usr/local/bin/startxfce4 --with-ck-launch

But I do not have any log files...

What am I doing wrong?

Thanks,

D.


Debian ~ Devuan & FreeBSD + XFCE = <3

Offline

#2 2022-02-03 16:17:57

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Trying to debug XFCE4-Session on FreebSD 13.6

Try this instead in your ,xinitrc file (it will create an ~/.xsession-errors log file for you):

[ -f ~/.xsession-errors ] && mv ~/.xsession-errors ~/.xsession-errors.old
exec /usr/local/bin/startxfce4 --with-ck-launch > ~/.xsession-errors 2>&1

From your other post, I decided to install freebsd on a spare laptop the other day. Its been quite the adventure. Took a while to figure out the install cd/dvd/memstick images don't boot on legacy bios but rather on EFI. Then getting wifi to work was a challenge. Now I've got it installed and am working on configuring the system (power management, suspend/resume, backlight (not working natively), etc.

What issues are you having with Xfce on FreeBsd? On my install, Xfce is pretty solid.

Also, why are you using "--with-ck-launch" in your .xinitrc?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2022-02-03 16:30:02

Danielsan
Member
Registered: 2017-11-22
Posts: 89

Re: Trying to debug XFCE4-Session on FreebSD 13.6

ToZ wrote:

Try this instead in your ,xinitrc file (it will create an ~/.xsession-errors log file for you):

[ -f ~/.xsession-errors ] && mv ~/.xsession-errors ~/.xsession-errors.old
exec /usr/local/bin/startxfce4 --with-ck-launch > ~/.xsession-errors 2>&1

From your other post, I decided to install freebsd on a spare laptop the other day. Its been quite the adventure. Took a while to figure out the install cd/dvd/memstick images don't boot on legacy bios but rather on EFI. Then getting wifi to work was a challenge. Now I've got it installed and am working on configuring the system (power management, suspend/resume, backlight (not working natively), etc.

What issues are you having with Xfce on FreeBsd? On my install, Xfce is pretty solid.

Also, why are you using "--with-ck-launch" in your .xinitrc?

Thanks for all the suggestions.

So far the experience hasn't been smooth as in any Linux distros, even though it works fine, for instance I couldn't use any audio plugin since XFCE4 requires now pulse hence I had to install to good old volman applet, also Audio mixing has been quite painful I had to copy some random code on stackoverflow. Suspend/resume worked but I had to compile the nvidia-driver from the ports enabling a special features. Themes do not play nicely with docklike plugin. I had issue with ethernet adapter but this is unrelated with XFCE.

I wrote something here: gemini://gnuser.land/gemlog/2021-11-18-freebsd-13-virtualbox-part-03.gmi

Also, why are you using "--with-ck-launch" in your .xinitrc?

I am not sure where I got this, maybe from Debian...

Last edited by Danielsan (2022-02-03 17:05:54)


Debian ~ Devuan & FreeBSD + XFCE = <3

Offline

#4 2022-02-06 06:38:31

Danielsan
Member
Registered: 2017-11-22
Posts: 89

Re: Trying to debug XFCE4-Session on FreebSD 13.6

I found where I copied that command, from here:

https://freebsdfoundation.org/freebsd-p … n-freebsd/

Install Xfce from the binary package:

$ pkg install xfce

Xfce doesn’t offer its own login manager, so it can’t be started as FreeBSD boots in the same way as GNOME or KDE. To be able to start Xfce from the command line, first add this entry to ~/.xinitrc:

$ echo "exec /usr/local/bin/startxfce4 --with-ck-launch" > ~/.xinitrc

While Xfce will not automatically start when the system boots, it can now can be launched through the command line by starting the X Window System:

$ startx

Debian ~ Devuan & FreeBSD + XFCE = <3

Offline

#5 2022-02-06 12:08:17

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Trying to debug XFCE4-Session on FreebSD 13.6

Interesting, thanks. I'm not noticing any issues without the parameter being used, but will keep an eye on it.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#6 2022-02-06 16:31:44

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Trying to debug XFCE4-Session on FreebSD 13.6

Just finished some testing. If I use --with-ck-launch (which enables xfce4-session to use consolekit), I lose access to all shutdown, restart, suspend, etc options. I can only log out. If I don't use it, then all functions work properly.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2022-02-06 17:29:48

Danielsan
Member
Registered: 2017-11-22
Posts: 89

Re: Trying to debug XFCE4-Session on FreebSD 13.6

The same for me hence I cleaned up the .xinitrc this way:

#!/bin/sh

# set $XDG_MENU_PREFIX to "xfce-" so that "xfce-applications.menu" is picked
# over "applications.menu" in all Xfce applications.
if test "x$XDG_MENU_PREFIX" = "x"; then
  XDG_MENU_PREFIX="xfce-"
  export XDG_MENU_PREFIX
fi

# set DESKTOP_SESSION so that one can detect easily if an Xfce session is running
if test "x$DESKTOP_SESSION" = "x"; then
  DESKTOP_SESSION="xfce"
  export DESKTOP_SESSION
fi

# set XDG_CURRENT_DESKTOP so that Qt 5 applications can identify user set Xfce theme
if test "x$XDG_CURRENT_DESKTOP" = "x"; then
  XDG_CURRENT_DESKTOP="XFCE"
  export XDG_CURRENT_DESKTOP
fi

# $XDG_CONFIG_HOME defines the base directory relative to which user specific
# configuration files should be stored. If $XDG_CONFIG_HOME is either not set
# or empty, a default equal to $HOME/.config should be used.
if test "x$XDG_CONFIG_HOME" = "x" ; then
  XDG_CONFIG_HOME=$HOME/.config
fi
[ -d "$XDG_CONFIG_HOME" ] || mkdir "$XDG_CONFIG_HOME"

# $XDG_CACHE_HOME defines the base directory relative to which user specific
# non-essential data files should be stored. If $XDG_CACHE_HOME is either not
# set or empty, a default equal to $HOME/.cache should be used.
if test "x$XDG_CACHE_HOME" = "x" ; then
  XDG_CACHE_HOME=$HOME/.cache
fi
[ -d "$XDG_CACHE_HOME" ] || mkdir "$XDG_CACHE_HOME"

# set up XDG user directores.  see
# http://freedesktop.org/wiki/Software/xdg-user-dirs
if command -v xdg-user-dirs-update >/dev/null 2>&1; then
    xdg-user-dirs-update
fi

# For now, start with an empty list
XRESOURCES=""

# Has to go prior to merging Xft.xrdb, as its the "Defaults" file
test -r "/usr/local/etc/xdg/xfce4/Xft.xrdb" && XRESOURCES="$XRESOURCES /usr/local/etc/xdg/xfce4/Xft.xrdb"
test -r $HOME/.Xdefaults && XRESOURCES="$XRESOURCES $HOME/.Xdefaults"

BASEDIR=$XDG_CONFIG_HOME/xfce4
if test -r "$BASEDIR/Xft.xrdb"; then
  XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
elif test -r "$XFCE4HOME/Xft.xrdb"; then
  mkdir -p "$BASEDIR"
  cp "$XFCE4HOME/Xft.xrdb" "$BASEDIR"/
  XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
fi

# merge in X cursor settings
test -r "$BASEDIR/Xcursor.xrdb" && XRESOURCES="$XRESOURCES $BASEDIR/Xcursor.xrdb"

# ~/.Xresources contains overrides to the above
test -r "$HOME/.Xresources" && XRESOURCES="$XRESOURCES $HOME/.Xresources"

# load all X resources (adds /dev/null to avoid an empty list that would hang the process)
cat /dev/null $XRESOURCES | xrdb -merge -

# load local modmap
test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap

# Run the session

exec /usr/local/bin/startxfce4 --with-ck-launch > ~/.xsession-errors 2>&1

# if we got here, then exec failed
exit 1

Debian ~ Devuan & FreeBSD + XFCE = <3

Offline

#8 2022-02-06 17:44:25

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Trying to debug XFCE4-Session on FreebSD 13.6

You don't need all that extra stuff at the top - running startxfce4 will source the content of /usr/local/etc/xdg/xfce4/xinitrc. From /usr/local/bin/startxfce4:

exec $prog /usr/local/etc/xdg/xfce4/xinitrc $CLIENTRC $SERVERRC

By adding it there, you are running it twice. Not that it would harm the system in any way, just duplicating commands.

Since you are using "--with-ck-launch", are you able to shutdown, reboot, suspend from the Xfce menu system?

Here is my .xinitrc:

[ -f ~/.xsession-errors ] && mv ~/.xsession-errors ~/.xsession-errors.old
exec startxfce4 > ~/.xsession-errors 2>&1

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#9 2022-02-06 18:17:53

Danielsan
Member
Registered: 2017-11-22
Posts: 89

Re: Trying to debug XFCE4-Session on FreebSD 13.6

Now I got it! I'll recommend your suggestion to the FreeBSD folks that handle the handbook.


Debian ~ Devuan & FreeBSD + XFCE = <3

Offline

#10 2022-02-07 04:50:05

Danielsan
Member
Registered: 2017-11-22
Posts: 89

Re: Trying to debug XFCE4-Session on FreebSD 13.6

ToZ wrote:

You don't need all that extra stuff at the top - running startxfce4 will source the content of /usr/local/etc/xdg/xfce4/xinitrc. From /usr/local/bin/startxfce4:

exec $prog /usr/local/etc/xdg/xfce4/xinitrc $CLIENTRC $SERVERRC

By adding it there, you are running it twice. Not that it would harm the system in any way, just duplicating commands.

Since you are using "--with-ck-launch", are you able to shutdown, reboot, suspend from the Xfce menu system?

Here is my .xinitrc:

[ -f ~/.xsession-errors ] && mv ~/.xsession-errors ~/.xsession-errors.old
exec startxfce4 > ~/.xsession-errors 2>&1

Without "--with-ck-launch" shutdown, reboot, suspend do not work...

Hence your script would enable those functions this way:

[ -f ~/.xsession-errors ] && mv ~/.xsession-errors ~/.xsession-errors.old
exec startxfce4 --with-ck-launch > ~/.xsession-errors 2>&1

Debian ~ Devuan & FreeBSD + XFCE = <3

Offline

#11 2022-02-07 11:18:29

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Trying to debug XFCE4-Session on FreebSD 13.6

Danielsan wrote:

Without "--with-ck-launch" shutdown, reboot, suspend do not work...

Odd. For me its the other way around - if I keep it in, my shutdown, reboot, suspend doesn't work.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#12 2022-02-07 16:20:53

Danielsan
Member
Registered: 2017-11-22
Posts: 89

Re: Trying to debug XFCE4-Session on FreebSD 13.6

It may depends by the video drivers... I use the NVIDIA driver from the ports collections with the option to enable suspend/resume.

Last edited by Danielsan (2022-02-07 16:21:31)


Debian ~ Devuan & FreeBSD + XFCE = <3

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.009 seconds, 7 queries executed - Memory usage: 612.95 KiB (Peak: 629.8 KiB) ]