New comment by cinerea0 on void-packages repository https://github.com/void-linux/void-packages/pull/23296#issuecomment-778544368 Comment: > How do you start your session and the portal? I start wayfire by running a script manually in a TTY after I log in. It sets some environment variables; you can see it in the collapsed section below.
startwayfire.sh ```shell #!/bin/bash # Functionality variables # if $XDG_DATA_DIRS is not set, set it to the spec recommended value [ -z "$XDG_DATA_DIRS" ] && export XDG_DATA_DIRS="/usr/local/share:/usr/share" # path for wf-config and wlroots export LD_LIBRARY_PATH=/usr/lib/wayfire # path is needed for wf-shell clients PATH=$PATH # path to find .desktop files like wcm export XDG_DATA_DIRS=$XDG_DATA_DIRS # maybe necessary? export XDG_SESSION_TYPE=wayland export XDG_CURRENT_DESKTOP=sway # Display scaling export GDK_DPI_SCALE=1.4 export QT_SCALE_FACTOR=1.4 export QT_FONT_DPI=96 export XCURSOR_SIZE=36 export XCURSOR_THEME=capitaine-cursors # Theming export QT_QPA_PLATFORM=wayland-egl export QT_QPA_PLATFORMTHEME=qt5ct export SDL_VIDEODRIVER=wayland # Application variables export MOZ_ENABLE_WAYLAND=1 # Logging if [ -d "$XDG_DATA_HOME" ]; then DEFAULT_LOG_DIR=$XDG_DATA_HOME/wayfire else DEFAULT_LOG_DIR=$HOME/.local/share/wayfire fi mkdir -p $DEFAULT_LOG_DIR # Running if [ $? != 0 ]; then echo "Could not create log directory $DEFAULT_LOG_DIR" echo "Using stdout as log" #wayfire #exec dbus-launch --exit-with-session wayfire exec dbus-run-session /usr/bin/wayfire else LOG_FILE=$DEFAULT_LOG_DIR/wayfire.log if [ -f $LOG_FILE ]; then cp $LOG_FILE $LOG_FILE.old fi echo "Using log file: $LOG_FILE" #wayfire &> $LOG_FILE exec dbus-run-session /usr/bin/wayfire &> $LOG_FILE fi ```
As for the portal, I start it through wayfire's autostart plugin. I have the following line in the `[autostart]` section of `wayfire.ini`: `portal = /usr/libexec/xdg-desktop-portal`