hai everyone!! ![]()
happens only in x11 (e.g. leftwm). whomst a thunk it, mate!
systemd[1767]: Starting Portal service (GTK/GNOME implementation)...
.xdg-desktop-po[2317]: cannot open display:
systemd[1767]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status=1/FAILURE
systemd[1767]: xdg-desktop-portal-gtk.service: Failed with result 'exit-code'.
systemd[1767]: Failed to start Portal service (GTK/GNOME implementation).
hehe⦠but thereās more!!! this one makes me chortle and giggle quite a wee bit, haha! (after a reboot)
systemd[1866]: Failed to start Portal service (GTK/GNOME implementation).
systemd[1866]: xdg-desktop-portal-gtk.service: Start request repeated too quickly.
systemd[1866]: xdg-desktop-portal-gtk.service: Failed with result 'exit-code'.
and it repeats ad nauseam.
is this a hoo hoo or a haa haa moment, guys, does anyone know? i cant not use xorg until i finish all my silly little x11 exclusive games⦠as soon as i do, x11 go byebye, mwahahaha!
ANYWAY!
no, unplugging and plugging it back again doesnt help. hmm, i really thought it would work this time though!
my $DISPLAY is :0 both in xorg and wl.
i also tried adding it thusly:
xdg.portal.extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
unfortunately, to no avail⦠even with lib.mkForce!
and nope, i have absolutely nothing in xdg.portal.config (for now). is that a problem, not changing anything?
in x11 i have these portal services launched:
xdg-desktop-portal-gtk (epic fail)
xdg-desktop-portal (worky yay)
as mentioned, in wayland (hyprland) i caught them all:
xdg-desktop-portal-gtk
xdg-desktop-portal-hyprland
xdg-desktop-portal
in another wayland (niri) session:
xdg-desktop-portal-gnome
xdg-desktop-portal-gtk
xdg-desktop-portal
interesting⦠would you look at that! they all work (clarification: only in wayland!
of course, AS PER USUAL, i may have done something in my configuration.nix. oh, but what did i do last timeā¦? I DONT REMEMBER! thatās the fun bit! im such a goofā¦
but i really dont know⦠a variable? perchance! i shall have a proper look at it all tomorrow, i suppose!
![]()
EDIT: whoopsie doodles, i forgot to say helloā¦
(sry it was 3 in the morning)
EDIT2: not a variable. i dont have anything of GTK_USE_PORTAL=1 or GDK_DEBUG=portals set at all. i dont even use them (at the moment).
people on the internet say that itās a certified āsession errorā, however, i have literally nothing that changes .xinitrc and the like? okay, MAYBE its this thing, but i had THAT (see below) for the last couple a months and everything was alright?
environment.etc."xdg/autostart/xrandr.desktop".text = ''
[Desktop Entry]
Type=Application
Name=xrandr
Exec=sh -c "xrandr --output eDP --off && xrandr --output DisplayPort-0 --mode 1280x1024 --rate 60.02 --primary"
NoDisplay=true
''; # config.ron! -- 1280x1024@60.02, 1024x768@60.00, 1280x1024@75.03, 1024x768@75.03
ā¦which eventually starts After=graphical-session.target
nevermind how horrid it looks (but pls tell me if i can improve this somehow? do i actually put it into .xinitrc or something? services.xserver.displayManager.sessionCommands or environment.extraInit? i probably should⦠i dont need a ādesktop entryā!), this DOES NOT break a session, right? SURELYā¦
EDIT: nah, mate. even without my xrandr script, the gtk portalās still properly \033[0;31mF\033[0;32mU\033[0;33mC\033[0;34mK\033[0;35mE\033[0;36mD\033[0m, which is quite unfortunate⦠i was thinking perhaps itās the moment when it is executing, the monitors are blank, therefore it sees no display? but no.
but anyway⦠the oddities dont stop here. the very same script i am talking about? it doesnt start either!
sh[1956]: /run/current-system/sw/bin/sh: regel 1: xrandr: opdracht niet gevonden
systemd[1883]: app-xrandr@autostart.service: Main process exited, code=exited, status=127/n/a
systemd[1883]: app-xrandr@autostart.service: Failed with result 'exit-code'.
excuse me, EXCUSE ME, you cant find xrandr? let me help you find xrandr:
~ where xrandr
/run/current-system/sw/bin/xrandr
~
~ which xrandr
/run/current-system/sw/bin/xrandr
~
~ xrandr
Screen 0: minimum 320 x 200, current 1280 x 1024, maximum 16384 x 16384
eDP connected (normal left inverted right x axis y axis)
800x1280 60.00 +
800x600 60.00
640x480 60.00
256x160 58.79
DisplayPort-0 connected primary 1280x1024+0+0 (normal left inverted right x axis y axis) 376mm x 301mm
1280x1024 60.02*+ 75.02
1280x960 60.00
1280x800 59.91
1152x864 75.00
1280x720 60.00
1024x768 75.03 60.00
832x624 74.55
800x600 75.00 60.32
640x480 75.00 59.94
720x400 70.08
~
see? worky. in bash, sh, zsh, etc.
EDIT: okay after removing the sh -c "" part and just using the Exec=xrandr, it says this then:
xrandr[2177]: /run/current-system/sw/bin/xrandr: unrecognized option '&&'
xrandr[2177]: Try '/run/current-system/sw/bin/xrandr --help' for more information.
systemd[2106]: app-xrandr@autostart.service: Main process exited, code=exited, status=1/FAILURE
systemd[2106]: app-xrandr@autostart.service: Failed with result 'exit-code'.
ā¦uhm⦠what. but it literally applies the monitor changes? how can it fail, when it clearly worked? WHATEVER! itās not even related to my portal situationā¦
oh, by the way, i just noticed. bwahaha, xorg thinks that im using a DP connection. thatās hilarious! i am using HDMI to connect to a DVI-d (passive adapter)! (wait, now that i think about it, i think wayland also thinks the same? is this⦠normal?)
but anyway, i have a slight suspicion it could be one of those ājust pin a version ya @#$%!ā situations, is it? but i raelly dont wanna do this, i have no idea how to, and i know it takes quite a lot of scary and unknown lines of code (unknown to me, that is, i am a noob, btwā¦)
also, i tried using my backup of flake.lock (sorry i keep forgetting to mention i am using flakes, nixos/nixpkgs/nixos-unstable branch, but do i have to? isnt it the norm by now using something āexperimentalā?) and no, nothingās changed⦠alas⦠defeated, shamefully so
EDIT3: UH OH. but whatās this?
systemctl --user status xdg-desktop-portal.service
.xdg-desktop-po[3814]: Failed to ReadAll() from Settings implementation: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not activate remote peer 'org.freedesktop.impl.portal.desktop.gtk': startup job failed
what the hell?! time to debugā¦
well. no. first of all, i just āfixedā this error by removing all the gtk* (settings) related folders in my .config folder (they were empty anyway), and now itās gone, apart from a few āfallbackā warnings, which is fine, because it is the only portal that exists in xorg (EDIT: maybe it would have been a better idea to use pkgs.nwg-look or something to wipe the configs? but i digress). but it all STILL revolves around this SPECIFIC error line which has no description whatsoever:
.xdg-desktop-po[1234]: cannot open display:
there is no relevant information on this in the whole of internetā¦
EDIT4: i found this:
but it is utterly useless. i dont have xdg-desktop-portal-gnome (in my xorg session) and i ALREADY have dbus-broker services (nixos default)??? should i switch from gtk to gnome XDP? perchance. but i want to try something really quick⦠STABLE. VERSION. itās time to downgrade a package (it is my first time everā¦), yay!
![]()
one moment pleaseā¦
EDIT5: WELP.
i tried downgrading the portal viaā¦
flake.nix
...
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11"; # ALSO TRIED 25.05
};
...
configuration.nix
xdg.portal.extraPortals = [
inputs.nixpkgs-stable.legacyPackages.${pkgs.system}.xdg-desktop-portal-gtk # pkgs.xdg-desktop-portal-gtk
];
and after half an hour of wasted time it just spat out this:
error: builder for '/nix/store/gg2vysicfpq7381dpd08bm5l1jgfkkh8-user-units.drv' failed with exit code 1;
last 1 log lines:
> ln: failed to create symbolic link '/nix/store/31j5i02v21z9xq4wj521pxvlfz353x6f-user-units/xdg-desktop-portal-gtk.service': File exists
For full logs, run:
nix log /nix/store/gg2vysicfpq7381dpd08bm5l1jgfkkh8-user-units.drv
error: 1 dependencies of derivation '/nix/store/lyscf981438rskkngw6pmrhvlj7ly9qf-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/w1aap5nl7dcfd6xyb3l6h5xyqz5i80da-nixos-system-deck-25.11.20250913.c23193b.drv' failed to build
well. i dont think thatās a skill issue, at least. though i did have some difficulties setting another branch up⦠i eventually used this (edited)⦠and it worked (i dont care about the āverbosityā of the line, but i do care about whether it is an overlay or notā¦). but then i found this, which does⦠pretty much the same thing, right? or maybe it is only for non-flake channels? i will make a post about it later on⦠AFTER THIS!
ā¦but maybe it doesnt even work at all with any package? okay, letās tryā¦
environment.systemPackages = [
inputs.nixpkgs-stable.legacyPackages.${pkgs.system}.hyfetch
];
and that worked for that - it compiled! epic. as i expected. nowā¦
now that downgrading didnt help, the portal situation ominously persists⦠![]()