Open Lyndeno opened 2 years ago
I had the same problem since a while and investigated quite a bit. I expected it has to do with some Gnome/Dbus/Env problem (just because there are tons of those with Sway and NixOS).
I basically rebuilt my sway setup to try to debug this problem and use up to date Nix packages (I did not use programs.sway
before). So now I am basically running Sway like suggested in the NixOS repo and Greetd wiki. Note that I have to run Sway from Greetd via dbus-run-session sway
although programs.sway
with base = true
should do this but for me it does not seem to. Maybe @colemickens can enlighten us :-)
Switching to this config fixed the problem for me:
# https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/programs/sway.nix
programs.sway = {
enable = true;
wrapperFeatures = {
base = true;
gtk = true;
};
extraSessionCommands = ''
# SDL:
export SDL_VIDEODRIVER=wayland
# QT (needs qt5.qtwayland in systemPackages):
export QT_QPA_PLATFORM=wayland-egl
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
# Fix for some Java AWT applications (e.g. Android Studio),
# use this if they aren't displayed properly:
export _JAVA_AWT_WM_NONREPARENTING=1
'';
extraPackages = with pkgs; [ swaylock swayidle foot dmenu mako grim slurp ];
};
# minimal greetd: log in spec'd user automatically
# https://nixos.wiki/wiki/Greetd
services.greetd = {
enable = true;
settings = rec {
initial_session = {
command = "dbus-run-session sway";
user = "mh";
};
default_session = initial_session;
};
};
I am having this issue with Hyprland, using wofi to launch nautilus. If it is launched from the terminal, it works fine. I already have this overlay for hyprland, but it still does not work:
(final: prev:
{
hyprland = prev.hyprland.overrideAttrs (old: {
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.wrapGAppsHook ];
});
})
I am having this issue with Hyprland, using wofi to launch nautilus. If it is launched from the terminal, it works fine. I already have this overlay for hyprland, but it still does not work:
This is exactly my current problem.
This Reddit thread has a similar issue and points to this nixOS discourse.
The error seems, that the calling application doesn't set the PATH or DBus environment properly?
At least with Hyprland (as a flake) my hypr.conf
starts with the following, which I assume does this:
exec-once = /nix/store/xxx-dbus-1.14.10/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target
I am having this issue with Hyprland, using wofi to launch nautilus. If it is launched from the terminal, it works fine. I already have this overlay for hyprland, but it still does not work:
This is exactly my current problem.
This Reddit thread has a similar issue and points to this nixOS discourse.
The error seems, that the calling application doesn't set the PATH or DBus environment properly? At least with Hyprland (as a flake) my
hypr.conf
starts with the following, which I assume does this:exec-once = /nix/store/xxx-dbus-1.14.10/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target
I forgot to leave an update here, but you are right. For me, this fixed it:
exec-once=dbus-update-activation-environment PATH
Describe the bug
When using Nautilus in sway, this does not happen in Gnome, right clicking a file like a .pdf, then "Open with other application" will show "No applications found for "file.pdf""
This happens for pretty much all files, though when doing this on a .jpg it shows "Imv" and "Signal Desktop" as possible applications to open in.
Launching Nautilus from a terminal works just fine.
Steps To Reproduce
Expected behavior
Nautilus should know how to open a file.
Screenshots
Additional context
Sway is configured with gtk wrapper features enabled.
Notify maintainers
@bobby285271 @hedning @dasj19 @maxeaubrey
Metadata