swhkd icon indicating copy to clipboard operation
swhkd copied to clipboard

Tip of main causes all alacritty terminals to be launched at /root

Open mendess opened this issue 1 year ago • 2 comments

Version Information: commit has d7182b6854ea1873c388f38714b923570cb71f86

  • Distribution Information Linux weatherlight 6.12.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 10 Jan 2025 00:39:41 +0000 x86_64 GNU/Linux
  • swhkd version Simple-Wayland-HotKey-Daemon 1.3.0-dev

Describe the bug: When an alacritty terminal is spawned, it's shell working directory is /root

Expected behavior: The shell's working directory should be ~

Actual behavior: The shell's working directory should be /root

To Reproduce: Install the version at the commit mentioned previously

Additional information: I don't think this is related to alacritty, I added the following to my swhkdrc

super + N
    notify-send $PWD "$(pwd)"

and the notification I got said /root twice

mendess avatar Mar 06 '25 18:03 mendess

@newtoallofthis123 Can you look at this? If need be we will roll back to old security model policy.

Shinyzenith avatar Mar 08 '25 13:03 Shinyzenith

I am looking into it It is not really the security model issue, but rather how we are launching the process.

When actually forking into the deescalated child process, I suppose we would have to also account for the cwd of a user since the env is being emulated.

newtoallofthis123 avatar Mar 08 '25 15:03 newtoallofthis123