Openbox Logout and icons

I’ve installed and setup Openbox, from what I can see most things work as they are supposed.
My main problem is that I lack the knowledge to see if it is actually anything wrong.
Posting my configuration.nix Hopefully one of you can take a look to see if there is something wrong,
or if everything looks fine.
I do have some problems, for example:
Logout:
When running xfce4-session-logout from terminal I get this error:
Recived error while trying to log out
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown:
The name org.xfce.SessionManager was not provided by
any .service files

Tint2:
For some reason tint2 won’t update when I hit apply and the only way to see any changes is know of is to rebbot from the terminal

Icons:
I got help to learn to import my own theme, but I’m not sure if its possible but can this be done for icons to?
i tried renaming my icons and put them in the folder where I had my theme but it won’t work.
Adding tat file aswell in hope if someone also can see if there is something wrong there?

#                               anna / sommerfugl
#                               configuration.nix
#                                November 2020

{ config, pkgs, ... }:

{
  imports =
    [ # Hardware
      ./hardware-configuration.nix
    ];

  # Systemd-boot EFI boot
  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;

  # Hostname
  networking.hostName = "sommerfugl";

  # Networking.
  networking.networkmanager.enable = true;

  networking.useDHCP = false;
  networking.interfaces.enp0s25.useDHCP = true;
  networking.interfaces.wlp3s0.useDHCP = true;


  # Set your time zone.
   time.timeZone = "Europe/Stockholm";

  # Flatpak
   services.flatpak.enable = true;
   xdg.portal.enable = true;
   xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];

  # Proprietary
   nixpkgs.config.allowUnfree = true;

  # Call Package
   environment.pathsToLink = [ "share/theme" "/share/xfce4"  ];

  # Packages
  # $ nix search wget
   environment.systemPackages = with pkgs; [
   (pkgs.callPackage ./natt.nix { })
   (pkgs.callPackage ./dag.nix { })
   #  System
     wget
     microcodeIntel
     lm_sensors
     xarchiver
     zip
     unzip
     unrar
     ranger
     dmenu
     htop
   #  Online
     chromium
     tdesktop
     transmission-gtk
   #  Office
     atom
     nano
    # libreoffice-still
     zathura
     gimp
     blender
  #   Entertainment
     vlc
     gpodder
     deadbeef
     bookworm
  #   Games
     ppsspp
  #   Junk
     neofetch
    #plank
  #   Themes
    #yaru-theme
    #adapta-gtk-theme
  #   Openbox
     openbox-menu
     obconf
     tint2
   ];

  # Fonts
   fonts.fonts = with pkgs; [
     source-code-pro
   ];


  # Firewall
   networking.firewall.enable = false;

  # Print
   services.printing.enable = true;

  # Sound.
   sound.enable = true;
   hardware.pulseaudio.enable = true;

  # Enable the X11
   services.xserver.enable = true;
   services.xserver.layout = "us";
   services.xserver.xkbOptions = "eurosign:e";

  # Enable touchpad
   services.xserver.libinput.enable = true;

  # Enable the Desktop
   services.xserver.displayManager.lightdm.enable = true;
   services.xserver.desktopManager.xfce.enable = true;
   services.xserver.windowManager.openbox.enable = true;


  # Don't forget ‘passwd’.
   users.users.anna = {
     isNormalUser = true;
     extraGroups = [ "wheel" "networkmanager" ];
   };


  system.stateVersion = "20.09";

}
{ stdenv, fetchurl, gtk-engine-murrine }:

let
  themeName = "dag";
in
stdenv.mkDerivation rec {
  pname = "dag-theme";
  version = "1.3.0";

  src = /home/anna/Templates/Themes/dag;

  propagatedUserEnvPkgs = [
    gtk-engine-murrine
  ];

  installPhase = ''
    runHook preInstall
    mkdir -p $out/share/themes/${themeName}
    cp -a * $out/share/themes/${themeName}
    runHook postInstall
  '';

  meta = with stdenv.lib; {
    description = "A flat and light theme with a modern look";
    homepage = "https://github.com/EliverLara/${themeName}";
    license = licenses.gpl3;
    platforms = platforms.all;
    maintainers = with maintainers; [ alexarice ];
  };
}

I managed to solve the problem with openbox logout, it was not a dbus problem at all.

My other problem. I was at Nixos package search and downloaded an expression. I tried to import it like a theme.
Adding the file and the error message I get in my terminal. Maybe someone has some clue as to that I am doing wrong.

{ stdenv
, fetchFromGitHub
, gtk3
, breeze-icons
, hicolor-icon-theme
, pantheon
}:

stdenv.mkDerivation rec {
  pname = "tester-icons";
  version = "2020-08-09";

  src = /home/anna/Templates/Icons/tester;

  nativeBuildInputs = [
    gtk3
  ];

  propagatedBuildInputs = [
    breeze-icons
    hicolor-icon-theme
    pantheon.elementary-icon-theme
  ];

  dontDropIconThemeCache = true;

  installPhase = ''
    runHook preInstall
    mkdir -p $out/share/icons
    cp -a Luna* $out/share/icons
    for theme in $out/share/icons/*; do
      gtk-update-icon-cache $theme
    done
    runHook postInstall
  '';

  meta = with stdenv.lib; {
    description = "Icon pack based on marwaita and papirus icons";
    homepage = "https://github.com/darkomarko42/Luna-Icons";
    license = [ licenses.gpl3Only ];
    platforms = platforms.linux;
    maintainers = with maintainers; [ romildo ];
  };
}
[anna@sommerfugl:~]$ sudo nixos-rebuild switch --show-trace
building Nix...
building the system configuration...
these derivations will be built:
  /nix/store/g07r2nmm1j1z1cbssgwv52iiqlqrklwy-tester-icons-2020-08-09.drv
  /nix/store/gd2s3pn66nd7f3159d2nr3aqd7kxsi60-system-path.drv
  /nix/store/x397yk24vq3g5pxzrvpryvqyn40q04sz-dbus-1.drv
  /nix/store/5xb5bzsf22r82qi5wnfkj82k9sj810pi-unit-dbus.service.drv
  /nix/store/m7l2731km3smazdjdpjxwxbspsy0sqj3-unit-polkit.service.drv
  /nix/store/xrm88ay33cr0vxgy5lhyiy4crsnss8s8-unit-accounts-daemon.service.drv
  /nix/store/zgvf0m6l0bicyjdspy2iicl7pb9hkk37-unit-systemd-fsck-.service.drv
  /nix/store/6kkxygv2n0a635i1z33s077xyc4kb0kf-system-units.drv
  /nix/store/zzivdk1jnhv2aqarb3mbw3jg64m10gg1-unit-dbus.service.drv
  /nix/store/srd1zjvd0plckf1hyh54f0w2blzg62lh-user-units.drv
  /nix/store/kdqx0367gb7gk356dwavyywibk7ai1jw-etc.drv
  /nix/store/vak65yhlvlq33347k956jmwfqvrii0cm-nixos-system-sommerfugl-20.09.1500.edb26126d98.drv
building '/nix/store/g07r2nmm1j1z1cbssgwv52iiqlqrklwy-tester-icons-2020-08-09.drv'...
unpacking sources
unpacking source archive /nix/store/712gci8pyxwzlsjq9d744sp14dsfcj0j-tester
source root is tester
patching sources
configuring
no configure script, doing nothing
building
no Makefile, doing nothing
glibPreInstallPhase
installing
cp: missing destination file operand after '/nix/store/vf9jci7ifn657s1q5qpl90bs94l95m81-tester-icons-2020-08-09/share/icons'
Try 'cp --help' for more information.
builder for '/nix/store/g07r2nmm1j1z1cbssgwv52iiqlqrklwy-tester-icons-2020-08-09.drv' failed with exit code 1
cannot build derivation '/nix/store/gd2s3pn66nd7f3159d2nr3aqd7kxsi60-system-path.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/vak65yhlvlq33347k956jmwfqvrii0cm-nixos-system-sommerfugl-20.09.1500.edb26126d98.drv': 1 dependencies couldn't be built
error: build of '/nix/store/vak65yhlvlq33347k956jmwfqvrii0cm-nixos-system-sommerfugl-20.09.1500.edb26126d98.drv' failed

From the error message, it sounds like there are no files matching Luna* so the glorious bash replaces it by nothing, essentially running cp -a $out/share/icons.

Tried to change cp -a Luna* $out/share/icons to cp -a tester* $out/share/icons tester as thats the folder name. but still get error.
Is it possible to remove that part or is it needed even when I have the files on my hardrive?

Update:
Removed that whole bit, still getting the same error

You can try adding ls command to print the list of files and find out what you can copy. You will need to copy the files into $out if you want to have them inside the package.

oh my, Thats new to me, could you explain how i do that?
Ive only used ls comand to see my home folder in the terminal ><

Just add ls one line before cp in the installPhase. The individual phases are bash scripts so you can use many of the same commands as you would in the terminal (provided you add the packages they are in to build inputs – but ls, cp and many others are provided by default).

not sure if this is what you meant:
ls, cp -a tester* $out/share/icons gave:

[anna@sommerfugl:~]$ sudo nixos-rebuild switch --show-trace
building Nix…
building the system configuration…
these derivations will be built:
/nix/store/nqcis179i9zqx60pyjwpjgd9vg87wa68-tester-icons-2020-08-09.drv
/nix/store/ms50zii9f34bsmgvs9d9b6m7sxyvpskv-system-path.drv
/nix/store/06b4sk0wskgzv5pryjgpmwf5yx0jmpqk-unit-accounts-daemon.service.drv
/nix/store/08plzzd1dd73dck7apzg67h3nzajbm87-unit-polkit.service.drv
/nix/store/45i1h0frx12dx7lyxjqdxmd1jm13l8wm-dbus-1.drv
/nix/store/pdwr81fjblcgspqxmibh2fw256kch2cx-unit-dbus.service.drv
/nix/store/xd0ylkissfm1arq2xa92ll3jddajg6lj-unit-systemd-fsck-.service.drv
/nix/store/rzvnfkjypznkxmr1z2clgwzdcvhz6452-system-units.drv
/nix/store/z5jqw0n1v4557zpbswsvhpwssw9irs7x-unit-dbus.service.drv
/nix/store/z60vlv68g0nyzy48kxi6s93k7mny3hcn-user-units.drv
/nix/store/j8pkicljfjvyg76cndr3hkahajs1jvla-etc.drv
/nix/store/2xhjqwlhp8698nh0v67wh8w2adg4w2sg-nixos-system-sommerfugl-20.09.1500.edb26126d98.drv
building ‘/nix/store/nqcis179i9zqx60pyjwpjgd9vg87wa68-tester-icons-2020-08-09.drv’…
unpacking sources
unpacking source archive /nix/store/9iri7fmnsrdm0b5gh5yfld2vbj0zlbs0-tester
source root is tester
patching sources
configuring
no configure script, doing nothing
building
no Makefile, doing nothing
glibPreInstallPhase
installing
/nix/store/333six1faw9bhccsx9qw5718k6b1wiq2-stdenv-linux/setup: line 1303: ls,: command not found
builder for ‘/nix/store/nqcis179i9zqx60pyjwpjgd9vg87wa68-tester-icons-2020-08-09.drv’ failed with exit code 127
cannot build derivation ‘/nix/store/ms50zii9f34bsmgvs9d9b6m7sxyvpskv-system-path.drv’: 1 dependencies couldn’t be built
cannot build derivation ‘/nix/store/2xhjqwlhp8698nh0v67wh8w2adg4w2sg-nixos-system-sommerfugl-20.09.1500.edb26126d98.drv’: 1 dependencies couldn’t be built
error: build of ‘/nix/store/2xhjqwlhp8698nh0v67wh8w2adg4w2sg-nixos-system-sommerfugl-20.09.1500.edb26126d98.drv’ failed




not sure if this is what you meant:
   ls cp -a tester* $out/share/icons gave:

> [anna@sommerfugl:~]$ sudo nixos-rebuild switch --show-trace
> building Nix...
> building the system configuration...
> these derivations will be built:
>   /nix/store/v2cfkd90jqp4j338xn8g243j6vmcqaw1-tester-icons-2020-08-09.drv
>   /nix/store/n2xaz27wgkmbdc618ihvjrg1xs68c6jx-system-path.drv
>   /nix/store/q55kr4nkqvlxj6as64kdxllgdx0hip5m-dbus-1.drv
>   /nix/store/hqbw0b2zmc7rabgjcg4fs2hz2hwcs2q9-unit-dbus.service.drv
>   /nix/store/8wy5wl12gn8ip39z4gxaw4jbiciifgzx-user-units.drv
>   /nix/store/dsw3zfx51znz1d1263fvwa0jz07rh8pv-unit-dbus.service.drv
>   /nix/store/l2y4pq2f5snf8f652s7nlmdb6giika0x-unit-accounts-daemon.service.drv
>   /nix/store/mh070vp73712dks4i2arzywiia6ix057-unit-systemd-fsck-.service.drv
>   /nix/store/pl6kzwvjzgw0hm9jzfzy9l4k3d2ki6pp-unit-polkit.service.drv
>   /nix/store/a09ycalw92zh26x919dx5hhrplgq3chg-system-units.drv
>   /nix/store/i9ij8gl5v2fzx6b814hkcf34v4sid14s-etc.drv
>   /nix/store/zvz5qpbxi3wsfvl6vbrvapc9sfkk8ilm-nixos-system-sommerfugl-20.09.1500.edb26126d98.drv
> building '/nix/store/v2cfkd90jqp4j338xn8g243j6vmcqaw1-tester-icons-2020-08-09.drv'...
> unpacking sources
> unpacking source archive /nix/store/9iri7fmnsrdm0b5gh5yfld2vbj0zlbs0-tester
> source root is tester
> patching sources
> configuring
> no configure script, doing nothing
> building
> no Makefile, doing nothing
> glibPreInstallPhase
> installing
> ls: cannot access 'cp': No such file or directory
> /nix/store/jniac5ks5r88acz9ys4q9ywsspbacrk9-tester-icons-2020-08-09/share/icons:
> .  ..
> builder for '/nix/store/v2cfkd90jqp4j338xn8g243j6vmcqaw1-tester-icons-2020-08-09.drv' failed with exit code 2
> cannot build derivation '/nix/store/n2xaz27wgkmbdc618ihvjrg1xs68c6jx-system-path.drv': 1 dependencies couldn't be built
> cannot build derivation '/nix/store/zvz5qpbxi3wsfvl6vbrvapc9sfkk8ilm-nixos-system-sommerfugl-20.09.1500.edb26126d98.drv': 1 dependencies couldn't be built
> error: build of '/nix/store/zvz5qpbxi3wsfvl6vbrvapc9sfkk8ilm-nixos-system-sommerfugl-20.09.1500.edb26126d98.drv' failed


The files im trying to copy is located in 
/home/anna/Templates/Icons/tester/
it contains the folders 16  / places / and index.theme

Would it be better if I used another file format r my import? Something like

As this file don’t have the cp thingy on it

No I meant ls on a separate line. doing ls, cp … would not work, just like it does not work in your terminal.

If the files in the directory are 16, places and index.theme, you will want a code like

mkdir -p $out/share/icons/tester
cp -a 16 places index.theme $out/share/icons/tester

Adwaita does not need an installPhase because it has a Makefile with installation instructions so the default installPhase calling those instructions can be used.

tried that with

installPhase = ‘’
runHook preInstall
mkdir -p $out/share/icons/tester
cp -a 16 places index.theme $out/share/icons/tester
for theme in $out/share/icons/*; do
gtk-update-icon-cache $theme
done
runHook postInstall
‘’;

got the message:
glibPreInstallPhase
installing
cp: cannot stat ‘places’: No such file or directory
builder for ‘/nix/store/wd38hk40bgwdy8r41mpdkgvfhah0r6i5-tester-icons-2020-08-09.drv’ failed with exit code 1
cannot build derivation ‘/nix/store/1icdjxww264s0v5siqwpgb4wi4f2yijj-system-path.drv’: 1 dependencies couldn’t be built
cannot build derivation ‘/nix/store/y44fyrn0210lgb2yf52np78msmbgxpaj-nixos-system-sommerfugl-20.09.1500.edb26126d98.drv’: 1 dependencies couldn’t be built
error: build of ‘/nix/store/y44fyrn0210lgb2yf52np78msmbgxpaj-nixos-system-sommerfugl-20.09.1500.edb26126d98.drv’ failed

the files to copy : 16 and Places are folders with images and so in them ( dont know if that matters)

I was basing the command on the files you mentioned previously. If the Places directory starts with a capital P, you will need to use that in the cp command.

yay, that worked when I changed places to Places it had no problems

thank you soooo much.

A new day and a new thing learned.
:slight_smile: :slight_smile: :slight_smile: