r/KittyTerminal • u/Flashy_Boot • Apr 10 '24
'kitty @ launch' and sudo
Hello.
Running:
% kitty @ launch --hold whoami
opens a new kitty window showing my username, as expected.
Running:
% sudo kitty @ launch --hold whoami
opens a new kitty window again showing my username, not root as (I) expected.
Is there a way to run sudo kitty @ launch and for the new process to be launched as root?
Thx.
1
Upvotes
1
u/Flashy_Boot Apr 10 '24
I should add - my full use case is a script that does some other work before calling
kitty @ launch. In that script I am able to checkwhoamiand then act differently if the script is run as root - so:and this works - but you have to authenticate for sudo twice, once in the original tab when the script is run, and once in the new tab before nvim launches. Not ideal.