Replies: 5 comments 4 replies
-
|
I think for some programs u can just do: In the case of env variables: but this will apply the env globally, even if not needed, and will apply until hyprland load it configs meaning they wont affect hyprland itself Also there are some processes that require shell |
Beta Was this translation helpful? Give feedback.
-
|
Okay, so answering my question Reading after the difference of As a result made a quick 'n dirty modification in the v.0.47.2 source release and built a Hyprland where /bin/sh -c -> /bin/env -S changes has been done:
As a first round Hyprland seems to works on user level, and got rid of all the additional
Second round after moving back from env-mod to original check the
Some additional tests necessary,checking them across reboots etc. I think some environment value setup is missing with removing Keep using the mod-env version till figuring out, additional tests appreciated. |
Beta Was this translation helpful? Give feedback.
-
|
It seems the Once that's cleared it can be PR-d into mainline. |
Beta Was this translation helpful? Give feedback.
-
|
So the quick 'n dirty patch or change or jump from the Edit: #!/bin/bash
if [ `ps -p 1 -o comm=` == "systemd" ]; then
/bin/env -S systemctl --user import-environment DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME PATH XDG_DATA_DIRS &&
hash dbus-update-activation-environment 2>/dev/null &&
systemctl --user import-environment DISPLAY QT_QPA_PLATFORMTHEME WAYLAND_DISPLAY XDG_CURRENT_DESKTOP;
fiFixed script above: following the logic from ConfigManager.cpp to either run the first line or the second depending if the underlying system is systemd based or not. Possible bug: it seems both lines actually ran based on hyprland logs. however the lines adds same environment variables, but the first adds more plus utilize them over dbus too. Fixme: I'm not a C++ dev unfortunately. The two non-systemwide things did not work first and were part of my DE kind setup:
The piece I found not working comes from the Linux distro:
All in all, this |
Beta Was this translation helpful? Give feedback.
-
|
A streamlined version of Hyprland build commands - works with 0.50.1 too. This does the job getting rid of There's a Dockerfile ongoing for full Hyprland, its ecosystem and Wayland friends build here, its for Debian:testing. A debian:stable is ongoing, but Trixie marked release date 2025 Aug 9, so maybe I'll wait it out :) The final systemd / dbus variables script to run: Add the above like this as kind of the first exec-once statement into your hyprland.conf: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
Is it possible to run any or all processes/programs from hyprland.conf set with
execexec-oncedirectly, eg. cut out the/bin/sh -cportion from the equation?With nwg-dock-hyprland, nwg-drawer, nwg-menu, they are starting the selected apps with
/bin/env -Swhich leaves no footprint in memory/cpu usage, nor they are just not left in an additional process in the process list/tree. Of course there could some hard reasons I'm not aware about yet why they are there like environment to do so, hence this post. :)But I'm wondering if it is possible to cut them out.
In my case various environment values are set (env GTK, QT & gsettings) in the hyprland.conf, so I can start lighter apps up-to heavy ones (browsers and alike) with
/bin/env -S. Until now without issue and having no additional/bin/sh -cwrapping aorund them. BUT they've started from the nwg-* apps, which in return still started with/bin/sh -c.Anyway, long story short: is it possible to get a rid of those
/bin/sh -cprefixes in case of the exec/exec-once statements?I've checked the source there are at least 5 points, where it has been hardcoded (Edit list fixed & updated):
/bin/sh -c/bin/sh -cwrap, but 'gnome-text-editor' without wrapThanks
Beta Was this translation helpful? Give feedback.
All reactions