Code change:
With the urxvtd service enabled on NixOS, the first instance of does not display anything, but keeps running. All following instances work as expected. This differs from the behaviour of not enabling the urxvtd service and just running manually, where everything works as expected. Set . Reboot and log in. Open a non-urxvt terminal and run from it. I'm running on XFCE with XMonad, and the problem has been reproduced on plain XMonad. System: (Gorilla) Nix version: nix-env (Nix) 1.11.6 Nixpkgs version: "" /cc
Uhm, I can't reproduce it with either bspwm or no window manager. I will try XMonad later. update: Just tested with XMonad and negative. Are you sure you don't have anything else interfering? Can you test it in a VM?
I just encountered this issue on a fresh install of . I'm also using xmonad, though it might be unrelated. On boot, shows nothing. Upon opening xterm and running urxvtc, no new window opens but nor does the command return anything; it continues to run the job. Now if I open another xterm and run again I see both a .urxvtd-wrapped and a urxvtc instance, and running urxvtc now spawns a new terminal window as expected. Earlier when I ran I got a torrent of warnings for collisions, I think between with-unicode3 and with-unicode3-with-plugins, even though I've never put the latter in my config. Don't know if it's related. I've since GC'd and cleared old profiles, and the warnings were not reproduced on my most recent . Edit: actually I got the collision warnings again, so that's still a thing.
I have had this too for a while now but I had forgotten about this issue. I couldn't figure out what's the cause. I'll try investigating some more.
Is the problem still there with 18.09?
Yes, unfortunately it's still here.
I looked at this on NixOS 18.09 under XMonad. I think the issue is that urxvtd is not compatible with socket activation. When urxvtd starts, instead of listening on the socket provided by systemd, it creates its own fresh socket file at the same path (), replacing the old one. So when you start urxvtc the first time, it hangs because it's connecting to systemd's original socket whereas urxvtd has created and bound to a different one. When you start urxvtc a second time, the issue does not occur since urxvtd is already running (urxvtd creates a new socket only once, when it starts up). To verify I used these shell commands: systemctl --user stop urxvtd.service systemctl --user start ps -ef | grep urxvtd # urxvtd is not running stat --format %i "$RXVTSOCKET" # prints the inode of the socket file urxvtc # hangs, kill it with Ctrl-C ps -ef | grep urxvtd # now urxvtd has started stat --format %i "$RXVTSOCKET" # socket inode has changed urxvtc # works as normal stat --format %i "$RXVTSOCKET" # socket inode has not changed Checking [rxvt-unicode source code][1] confirms that it intends to delete the existing file at . [1]:
I have submitted a to fix this by removing the urxvtd socket activation.
thanks for figuring this out! tiny nit-pick the link to source code is wrong.
whoops! Fixed now.

Related discussion:
text: }; config = mkIf cfg.enable { <del> systemd.user = { sockets.urxvtd = { description = "socket for urxvtd, the urxvt terminal daemon"; wantedBy = [ "graphical-session.target" ]; partOf = [ "graphical-session.target" ]; socketConfig = { ListenStream = "%t/urxvtd-socket"; }; </del> <ins> systemd.user.services.urxvtd = { description = "urxvt terminal daemon"; wantedBy = [ "graphical-session.target" ]; partOf = [ "graphical-session.target" ]; path = [ pkgs.xsel ]; serviceConfig = { ExecStart = "${pkgs.rxvt_unicode-with-plugins}/bin/urxvtd -o"; Environment = "RXVT_SOCKET=%t/urxvtd-socket"; Restart = "on-failure"; RestartSec = "5s"; </ins> }; <del> services.urxvtd = { description = "urxvt terminal daemon"; path = [ pkgs.xsel ]; serviceConfig = { ExecStart = "${pkgs.rxvt_unicode-with-plugins}/bin/urxvtd -o"; Environment = "RXVT_SOCKET=%t/urxvtd-socket"; Restart = "on-failure"; RestartSec = "5s"; }; }; </del> }; environment.systemPackages = [ pkgs.rxvt_unicode-with-plugins ];