From b8b09ad80c1f292106004d449926133bacd9f100 Mon Sep 17 00:00:00 2001 From: Alessandro Mauri Date: Mon, 6 Apr 2020 19:27:08 +0200 Subject: [PATCH] Changed setting xdg user dirs with xdg-user-dirs Setting the user dirs manually can cause gtk file explorer dialogs to not open correctly freezing applications that try to use it. Firefox had this behaviour after having installed and removed flatpak adn dependencies which included xdg-user-dirs, strange because it worked before without it. It is worth noting that this error does not give any hints or error message, moreover the gui remains active but unresponding I found out what caused the error essentially by chance. --- conf/config/user-dirs.dirs | 15 ++++++ conf/config/user-dirs.locale | 1 + startw | 88 ++++++++++++++++++------------------ 3 files changed, 61 insertions(+), 43 deletions(-) create mode 100644 conf/config/user-dirs.dirs create mode 100644 conf/config/user-dirs.locale diff --git a/conf/config/user-dirs.dirs b/conf/config/user-dirs.dirs new file mode 100644 index 0000000..7f9a959 --- /dev/null +++ b/conf/config/user-dirs.dirs @@ -0,0 +1,15 @@ +# This file is written by xdg-user-dirs-update +# If you want to change or add directories, just edit the line you're +# interested in. All local changes will be retained on the next run. +# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped +# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an +# absolute path. No other format is supported. +# +XDG_DESKTOP_DIR="$HOME/Desktop" +XDG_DOWNLOAD_DIR="$HOME/Downloads" +XDG_TEMPLATES_DIR="$HOME/Templates" +XDG_PUBLICSHARE_DIR="$HOME/Public" +XDG_DOCUMENTS_DIR="$HOME/Documents" +XDG_MUSIC_DIR="$HOME/Music" +XDG_PICTURES_DIR="$HOME/Pictures" +XDG_VIDEOS_DIR="$HOME/Videos" diff --git a/conf/config/user-dirs.locale b/conf/config/user-dirs.locale new file mode 100644 index 0000000..3e0b419 --- /dev/null +++ b/conf/config/user-dirs.locale @@ -0,0 +1 @@ +en_US \ No newline at end of file diff --git a/startw b/startw index 6e5b40d..cb75e07 100755 --- a/startw +++ b/startw @@ -29,49 +29,6 @@ then "$STARTW_ROOT"/addts >> "$STARTW_LOG_FILE" & fi -# -# SET ENVIRONMENT VARIABLES -# - -# Enable wayland native support -export _JAVA_AWT_WM_NONREPARENTING=1 -export MOZ_ENABLE_WAYLAND=1 -export SDL_VIDEODRIVER=wayland -export QT_QPA_PLATFORM=wayland-egl -export QT_WAYLAND_FORCE_DPI=physical -export BEMENU_BACKEND=wayland -# Do NOT uncomment this, breaks stuff -# export GDK_BACKEND=wayland -# Set the hardware acceleration driver -export LIBVA_DRIVER_NAME=vdpau -# Set the default interface used by wpa_cli -export WPA_CLI_INTERFACE=wlp2s0 -# Set the editor -export EDITOR=vim -# Application compatibility -export GIO_USE_VFS="local" -export GIO_USE_VOLUME_MONITOR="unix" -# XDG specification variables -export XDG_CURRENT_DESKTOP=Unity -export XDG_DATA_HOME=$HOME/.local/share -export XDG_CACHE_HOME=$HOME/.cache -export XDG_CONFIG_HOME=$HOME/.config -export XDG_DESKTOP_DIR="$HOME/Desktop" -export XDG_DOCUMENTS_DIR="$HOME/Documents" -export XDG_DOWNLOAD_DIR="$HOME/Downloads" -export XDG_MUSIC_DIR="$HOME/Music" -export XDG_PICTURES_DIR="$HOME/Pictures" -export XDG_PUBLICSHARE_DIR="$HOME/Public" -export XDG_TEMPLATES_DIR="$HOME/Templates" -export XDG_VIDEOS_DIR="$HOME/Videos" -# Clean home directory -export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc -export ATOM_HOME="$XDG_DATA_HOME"/atom -export BASH_COMPLETION_USER_FILE="$XDG_CONFIG_HOME"/bash-completion/bash_completion -export CARGO_HOME="$XDG_DATA_HOME"/cargo -# Set user script dir -export SCRIPT_DIR="$XDG_CONFIG_HOME"/scripts - # # APPLY USER CONFIG # @@ -103,6 +60,51 @@ for f in "$DOTS_ROOT"/config/* ; do ln -sf "$f" "$HOME/.config/" done +# +# SET ENVIRONMENT VARIABLES +# + +# Enable wayland native support +export _JAVA_AWT_WM_NONREPARENTING=1 +#export MOZ_ENABLE_WAYLAND=1 +export SDL_VIDEODRIVER=wayland +export QT_QPA_PLATFORM=wayland-egl +export QT_WAYLAND_FORCE_DPI=physical +export BEMENU_BACKEND=wayland +# Set the hardware acceleration driver +export LIBVA_DRIVER_NAME=vdpau +# Set the default interface used by wpa_cli +export WPA_CLI_INTERFACE=wlp2s0 +# Set the editor +export EDITOR=vim +# Application compatibility +export GIO_USE_VFS="local" +export GIO_USE_VOLUME_MONITOR="unix" +# XDG specification variables +export XDG_CURRENT_DESKTOP=Unity +export XDG_DATA_HOME=$HOME/.local/share +export XDG_CACHE_HOME=$HOME/.cache +export XDG_CONFIG_HOME=$HOME/.config +xdg-user-dirs & +# Clean home directory +export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc +export ATOM_HOME="$XDG_DATA_HOME"/atom +export BASH_COMPLETION_USER_FILE="$XDG_CONFIG_HOME"/bash-completion/bash_completion +export CARGO_HOME="$XDG_DATA_HOME"/cargo +# Set user script dir +export SCRIPT_DIR="$XDG_CONFIG_HOME"/scripts + +# Do NOT uncomment this, breaks stuff +# export GDK_BACKEND=wayland +# export XDG_DESKTOP_DIR="$HOME/Desktop" +# export XDG_DOCUMENTS_DIR="$HOME/Documents" +# export XDG_DOWNLOAD_DIR="$HOME/Downloads" +# export XDG_MUSIC_DIR="$HOME/Music" +# export XDG_PICTURES_DIR="$HOME/Pictures" +# export XDG_PUBLICSHARE_DIR="$HOME/Public" +# export XDG_TEMPLATES_DIR="$HOME/Templates" +# export XDG_VIDEOS_DIR="$HOME/Videos" + # # LAUNCH APPLICATIONS #