FluentTerminal
FluentTerminal copied to clipboard
Admin rights
How can I start terminal with admin rights? As I know UWP app can't start as administrator. For example, I want to install Chocolatey Package Manager, but I see this.

P.S, Sorry me for my english language. =)
I have no idea so far if this can be achieved with the limitations of UWP. You could try this: http://blog.lukesampson.com/sudo-for-windows
Would be nice to know if it works 🤔
Centennial Apps can call for admin rights (see Desktop App Converter in the store) so you can maybe elevate to admin rights the Node.js part that calls the commands
I will have a look at this, but I am afraid this will be a Microsoft exclusive thing.
FYI, there is no node.js running in the background of this App, the SystemTray is using winpty to host the shell processes. Guess I should write down something about the general architecture soon.
Just want to be helpful. Here what I've found:
There are two problems:
- This is not supported for UWP FullTrust processes right now (At least not until RS5)
- If we start SystemTray elevated every shell would be always elevated. I don't think this would be as intended.
What might work is to further encapsulate TerminalSession in a new process that we start with startInfo.Verb = "runas"; But I'm not 100% sure if this will work, needs some more investigation.
But nevertheless thanks for your effort 😃
I'd love to run FluentTerminal as my main console emulator, but not being able to right-click and Run as Administrator is a big drawback.
@spurll As a temporary workaround (or, permanent?), I use the following solution: http://blog.lukesampson.com/sudo-for-windows
(as @felixse pointed out in post 2)
We might actually be able to support elevated shells starting with the 1809 update and ConPTY
Has anyone found a solution yet?
So far only the workarounds that were posted here. A real solution is dependent on 1809, which I had no chance to install yet
There exists new information within a blog series (originally anwesered within here).
Maybe there are information about how to handle this with UWP.
For Chocolatey , you can give access to C:\ProgramData\chocolatey for users in "rigth click chocolatey folder>Properties>Security>Edit>Users>Tick Full Access and save by clicking OK or approving whatever prompt you get
I have no idea so far if this can be achieved with the limitations of UWP. You could try this: http://blog.lukesampson.com/sudo-for-windows
Would be nice to know if it works 🤔
sudo for windows works very well
For those who have UAC problems with Chocolatey, I highly suggest you try this: scoop - https://github.com/lukesampson/scoop. scoop installs software to your local user folder, and doesn't mess up PATH, so it doesn't require UAC. (Also I consider it faster than Chocolatey.)
Thanks for the great app. In order to have PowerShell starting always as admin using sudo I have set the "Arguments" of the PowerShell profile to (I couldn't get environment path working and therefore hard-coded the path):
-nop -noexit -Command "YOURPROFILEPATH\scoop\shims\sudo.cmd powershell"
@ynsgnr sudo for windows works in FluentTerminal?
@TylerLeonhardt It works for me
Thanks for the great app. In order to have PowerShell starting always as admin using sudo I have set the "Arguments" of the PowerShell profile to (I couldn't get environment path working and therefore hard-coded the path):
-nop -noexit -Command "YOURPROFILEPATH\scoop\shims\sudo.cmd powershell"
Nice trick but it makes the Admin PS session run inside the current session, so basically you have to type "exit" twice to completely close the shell. I figured out another way to achieve this: Create a new terminal profile and set the path to your sudo.cmd as the executable and use "powershell" as the argument. Set this profile as default or set a keybinding and you have a "real" Admin PS session.
Just a side-note for this workaround.
Choco's refreshenv command seems to not work if you started your shell with sudo.cmd.
You may need to restart the terminal if in need of an env reload.
New Windows Terminal can be opened as administrator, why Fluent Terminal still have this issue?
Hello, there is a tutorial on the web on how to achieve this: https://stefanwick.com/2018/10/07/app-elevation-samples-part-3/ is this something that will be looked into?
I tried this back then, but I didn't find a way to integrate this with WinPty. I'm tending towards embedding https://github.com/gerardog/gsudo or doing something similar.
I was ready to make this beauty my go-to software, but a terminal without admin rights isn't a proper terminal. Rather disappointing but looking forward for a future release that provides this essential capability.
As a workaround, I use scoop to install sudo for windows
was looking for a new terminal to switch to from conemu (too many super tiny but irritating drawbacks/bugs in that) and fluent was great, but inability to run as admin is a huge deal breaker.
one additional major reason, and not just chocolatey, is WSL2 + VSCode launch in the filesystem.
it works fine in the native PS, but if i drop into wsl2 and try to launch code in current dir from wsl2 it spits out an access denied error:
/mnt/c/Program Files/Microsoft VS Code/Code.exe: Permission denied
sounds like a similar admin level issue, but maybe not. in either case, there's definitely something with permissions that's happening within this app.
some details: windows build: 2004 wsl2 distro: ubuntu 20.04
Somehow I seem too stupid to get it working. %USERPROFILE%\scoop\shims\sudo.cmd cmd.exe as well as the same with the powershell insta closes the instance right after. I'm doing something wrong but am too stupid to figure out what.
Somehow I seem too stupid to get it working. %USERPROFILE%\scoop\shims\sudo.cmd cmd.exe as well as the same with the powershell insta closes the instance right after. I'm doing something wrong but am too stupid to figure out what.
Rather than starting your shell with sudo, you need to invoke sudo per command.
Somehow I seem too stupid to get it working. %USERPROFILE%\scoop\shims\sudo.cmd cmd.exe as well as the same with the powershell insta closes the instance right after. I'm doing something wrong but am too stupid to figure out what.
Rather than starting your shell with
sudo, you need to invokesudoper command.
How?
How?

Thanks for the great app. In order to have PowerShell starting always as admin using sudo I have set the "Arguments" of the PowerShell profile to (I couldn't get environment path working and therefore hard-coded the path):
-nop -noexit -Command "YOURPROFILEPATH\scoop\shims\sudo.cmd powershell"
How do I that exactly?