NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.34k stars 13.58k forks source link

GTK apps run from emacs daemon do not have KDE style #48551

Closed tobiasBora closed 5 years ago

tobiasBora commented 5 years ago

Issue description

On my KDE desktop, I configured a dark theme for GTK apps. I also run emacs daemon by using the services.emacs.enable = true; option in configuration.nix, and then connects to it with emacseditor. However, it appears that if I run okular from emacs, using either M-! okular, M-x shell <RET> okular, or from a LaTeX mode, okular has an ugly theme. However, if I run it from a non-daemon emacs instance, it works great, so I guess that the emacs system service does not configure properly the environment variables for KDE.

Technical details

oxij commented 5 years ago

This behaviors would be hard to change without duplicating KDE environment setting in emacs systemd user service. Since plasma5 NixOS module does almost none of that environment magic I imagine most of it is done by Plasma itself.

Which means that if you want it, you would have to either "reverse-engineer" those environment computations and add them to emacs module (which, I imagine, would be very ugly; also, you would have to repeat that each time you change anything in KDE UI settings), or you can just start emacs --daemon from under KDE session instead of running it from systemd.

I suggest doing the latter and closing this.

tobiasBora commented 5 years ago

Makes sense, thank you for your comment.