Linux Root mode
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Greetings VS Code team,
I have been developing a module named FightingEntropy for both Windows as well as Linux.
I have a Hyper-V dev VM set up with RHEL 9.8 so that I can (write + compile) assemblies that will be compatible across platforms.
I had to remove all of the dotnet packages that RHEL keeps reinstalling after each update, and then reinstall the dotnet packages from the microsoft.repo. After doing this, the C# dev kit works, and so does Roslyn, and so I am able to safely compile the assembly after doing all of this.
After a fair amount of development over the last month, I've gotten my FightingEntropy.Linux assembly to load up within FightingEntropy.Core, but it is having issues accessing certain paths because of the lack of elevation.
When I go to load the module, it will have trouble accessing certain paths on Linux because it is not running as root.
When trying to run as root, it clearly says "NOT A GOOD IDEA BRO..." and a bunch of stuff doesn't work.
When I go to do like sudo pwsh in the PowerShell Extension, it will elevate... but then highlighting code and pressing F8 no longer works.
So, I write the stuff for C# in VSCode on Linux, then I use PowerShell to check whether it's working, and I'm running into these elevation issues.
I'm not trying to reinvent the wheel here, Copilot has wasted a good chunk of my time trying to find a workaround.
I am working on some strategies to get around this somehow so that my core module will load up ubiquitously across platforms, but I'm hoping maybe you guys could do me a solid and either tell me how to get the highlight + F8 stuff to work within the elevated console...
...or if I just gotta ensure that it will only load the module IF it is already in superuser.
-mcc85s
Contributor guide
Assessment
This issue has not been assessed yet.