ReGreet
ReGreet copied to clipboard
Sway doesn't behave properly when ran through regreet
Just want to start by saying I am a little new at linux, but I'm pretty sure I'm doing everything right here.
Basically, in my sway config file, i have it execute a script called test which is in my /tmp/ directory (full permissions). I also have the permissions set to rwx for everyone. The only thing this script does, is make a file in my /tmp/ directory called 111. That's it. The purpose is just to see if the script is being run (ran?)
On startup, when Arch launches, this script will never be run. No matter what I do, I cannot get sway to run scripts. I've tried everything. Absolute paths, going to background, making a script launch another script, adding a delay, giving perms, etc. I've given superuser to greeter, I've given root to greeter, and nothing works.
When i launch sway normally (just by typing sway in a terminal), it all works fine though.
Before you ask,
Yes the config files are the same. When I make a change like changing the font size in that config file, the font size will change, but it just wont run exec command. Yes I've set proper permissions. Yes I'm sure the script is not working because I have another script in the sway config file that changes the background, which also doesn't work when loaded through regreet, but does through terminal.
Here's my /etc/greetd/config.toml file:
terminal] vt = 1
[default_session] command = "sway --config /etc/greetd/sway-config" user = "greeter"
And here's my /etc/greetd/sway-config fle
exec "regreet; swaymsg exit" include /home/username/.config/sway/config
the $HOME/.config/sway/config file is the one I'm trying to run the script in, but I've also tried running it in the config.toml file and the sway-config file to no avail. I've followed all the installation instructions on the regreet readme page, so I'm not sure what I could be doing wrong, other than this being a bug.
Okay I'm a little confused here. Where does this problem occur:
- The Sway that is used to launch ReGreet
- The Sway that ReGreet launches
Also, are you saying that everything in that config file works except for the script that uses the /tmp
directory? If yes, then this could be due to systemd making a private /tmp
directory; see this: https://systemd.io/TEMPORARY_DIRECTORIES/. To rule out whether this is the case, could you try another directory in your script?
Basically I'm saying the sway that is launched by regreet doesn't work.
And yes, everything works in that config file except for ANY script I try. I can change the font size, and it will change the font size, but if I do an exec anything, it just refuses to even try to open it. (very strange I know, I wish I even knew where to start looking for solutions).
I've done a bunch of different scripts, in a bunch of different directories. It's just my latest attempt that I tried the /tmp directory cause i knew for sure that it would have the permissions to access it.
But for example, in that same config file I have an exec to a script that should set the background of my sway, where the script is located in my $HOME/scripts folder (in path). This script also just wont run (but runs on startup perfectly fine when I'm not using regreet and open sway through terminal).
Just to clarify, everything else in the sway launched by regreet works, just not exec scripts for some reaosn
Please post the logs, along with the contents of the Sway session file that ReGreet loads (this should be in /usr/share/wayland-sessions
or something similar. Also, could you try this with gtkgreet?
I'm having the same issue in my Hyprland session meant to run Regreet. I think that greetd is the problem since it repros on gtkgreet too.
This is my config for Regreet, the only things that work out of the binds and execs are the regreet one and the exit bind.
env = XCURSOR_SIZE,24
env = GBM_BACKEND,nvidia-drm
env = LIBVA_DRIVER_NAME,nvidia
env = XDG_SESSION_TYPE,wayland
env = WLR_NO_HARDWARE_CURSORS,1
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
monitor = DP-2,2560x1440@144,0x0,1
monitor = DP-1,2560x1440@60,2560x0,1
monitor = ,preferred,auto,auto
exec-once = touch /home/sam/sddfsdf
exec-once = /etc/greetd/hypr.sh
exec-once = systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = /usr/bin/hyprpaper -c /home/sam/.config/hypr/hyprpaper.conf
# exec-once = regreet; hyprctl dispatch exit
$mainMod = SUPER
bind = $mainMod, TAB, exec, kitty
bind = $mainMod, M, exit,
I can't find any logs since they're put in stdout which gets cleared immediately when I quit (due to greetd starting another Hyprland session immediately).
Session file.
[Desktop Entry]
Name=Hyprland
Comment=An intelligent dynamic tiling Wayland compositor
Exec=Hyprland
Type=Application%
@Xenfo The logs should be stored in /var/log/regreet
by default instead of stdout. Could you check there?