synthwave-vscode
synthwave-vscode copied to clipboard
Cant enable Neon Dreams on Ubuntu
Cant enable Neon Dreams on Ubuntu. VScode gives message.
You must run VS code with admin priviliges in order to enable Neon Dreams
This is a non standard thing for a VScode extension to ask for. Doing so would defeat the purpose of not using it for security reasons.
VS doesn't support the glow by default and to patch support the extension has to modify core VS code files. In most cases that modification requires elevated permissions. As the readme says, enabling the glow (and therefore modifying the core) is experimental and done at the user's own discretion.
If you choose not to enable the glow, the base colour theme can still function without making any modifications.
I'd really like to enable the neon, but running vscode as root? no way man... There's a lot of extensions running on it. There's no other way?
You need to change the owner of VSCode installation files folder into you current user, most likely you can find that folder in /usr/share
then apply this command :
sudo chown -R ${whoami} /usr/share/code
After that you can apply the Neon Dreams setup in VSCode and then run this command again to set the owner back to the root:
sudo chown -R root /usr/share/code
You need to change the owner of VSCode installation files folder into you current user, most likely you can find that folder in
/usr/share
then apply this command :sudo chown -R ${whoami} /usr/share/code
After that you can apply the Neon Dreams setup in VSCode and then run this command again to set the owner back to the root:
sudo chown -R root /usr/share/code
I tried this on my arch machine and still end up getting the same original error. I had to change the installation path according to whereis code
which spat out /opt/visual-studio-code/bin/code
So I ended up running the command:
sudo chown -R ${whoami} /opt/visual-studio-code/bin/code
yet when running the "enable" command in VSCode, I still get the error :/
You need to change the owner of VSCode installation files folder into you current user, most likely you can find that folder in
/usr/share
then apply this command :sudo chown -R ${whoami} /usr/share/code
After that you can apply the Neon Dreams setup in VSCode and then run this command again to set the owner back to the root:sudo chown -R root /usr/share/code
I tried this on my arch machine and still end up getting the same original error. I had to change the installation path according to
whereis code
which spat out/opt/visual-studio-code/bin/code
So I ended up running the command:sudo chown -R ${whoami} /opt/visual-studio-code/bin/code
yet when running the "enable" command in VSCode, I still get the error :/
You need to replace ${whoami} for your system user, like: sudo chown -R perrito /opt/visual-studio-code/bin/code
You need to replace ${whoami} for your system user, like: sudo chown -R perrito /opt/visual-studio-code/bin/code
That didn't work either. After playing around with it some more again I was able to get it to work, but by using the following:
sudo chown -R brad /opt/visual-studio-code
I turned on the glow, then reverted the permissions back with:
sudo chown -R root /opt/visual-studio-code
You need to change the owner of VSCode installation files folder into you current user, most likely you can find that folder in
/usr/share
then apply this command :sudo chown -R ${whoami} /usr/share/code
After that you can apply the Neon Dreams setup in VSCode and then run this command again to set the owner back to the root:
sudo chown -R root /usr/share/code
Thanks! I was looking for that. Also don't use snap installation and ubuntu software (both the same). Install your VSCode with the .deb file from official website.
I'm using Manjaro KDE Plasma with VScode 1.48.2-1
and the way it worked for me was :point_down: all other ones mentioned above did not work in my case
sudo chown -R ${whoami} /usr/lib/code
sudo chown -R root /usr/lib/code
Just in case anyone else is having the same distro :nerd_face:
this also happens on vscode remote container mode.
how did you get it to work on remote container? I'm on WSL ubuntu and all executable "code" files returned by "whereis code" are owned by the same user as "whoami" returns in the vs code terminal
For me
sudo chown -R $USER /usr/share/code-insiders/
worked
@talk2sunil83 It worked for me too. Thanks dude
For me (Arch Linux):
VScode 1.53.2-1
sudo chown -R ${whoami} /opt/visual-studio-code/
sudo chown -R root /opt/visual-studio-code/
i'm using arch linux, i installed code-insiders through snap, solution doesn't seems to work , please help
i'm using arch linux, i installed code-insiders through snap, solution doesn't seems to work , please help
Where is vscode installed in that situation?
Might be able to get more info with whereis code
. (or whatever is the name of the binary) I personally haven't used snap much in the past, but I assume a similar solution as above will work once you find where vscode is installed on your system.
You need to change the owner of VSCode installation files folder into you current user, most likely you can find that folder in
/usr/share
then apply this command :sudo chown -R ${whoami} /usr/share/code
After that you can apply the Neon Dreams setup in VSCode and then run this command again to set the owner back to the root:sudo chown -R root /usr/share/code
Thanks! I was looking for that. Also don't use snap installation and ubuntu software (both the same). Install your VSCode with the .deb file from official website.
how do you install the debian file.... i had issues doing this
i'm using arch linux, i installed code-insiders through snap, solution doesn't seems to work , please help
Where is vscode installed in that situation?
Might be able to get more info with
whereis code
. (or whatever is the name of the binary) I personally haven't used snap much in the past, but I assume a similar solution as above will work once you find where vscode is installed on your system.
it brought this: code-insiders: /usr/bin/code-insiders /var/lib/snapd/snap/bin/code-insiders.url-handler /var/lib/snapd/snap/bin/code-insiders
You need to change the owner of VSCode installation files folder into you current user, most likely you can find that folder in
/usr/share
then apply this command :sudo chown -R ${whoami} /usr/share/code
After that you can apply the Neon Dreams setup in VSCode and then run this command again to set the owner back to the root:sudo chown -R root /usr/share/code
Thanks! I was looking for that. Also don't use snap installation and ubuntu software (both the same). Install your VSCode with the .deb file from official website.
how do you install the debian file.... i had issues doing this
i mean the tar.gz file....made a mistake, not debian
You need to replace ${whoami} for your system user, like: sudo chown -R perrito /opt/visual-studio-code/bin/code
That didn't work either. After playing around with it some more again I was able to get it to work, but by using the following:
sudo chown -R brad /opt/visual-studio-code
I turned on the glow, then reverted the permissions back with:
sudo chown -R root /opt/visual-studio-code
This worked for me but won't work if you installed with snapd or flatpak
I can solve it without using Linux Terminal of WSL. steps:
- install the extension in Windows and WSL (Window Subsystem For Linux). but, do not configurate nothing yet. you have to execute the program with administrator powers.
2.Open the settings in Visual studio Code
- Open the Json Formatt Settings of Visual Studio Code
4.Make sure you have your settings as you want
5.Activate the Neon Dreams
- Until here, it is done for windows, to activate in WSL
- You have to change using this way. Clicking there and changing to WSL.
8.Open any project, and it should be activate automaticly.
I hope it works for you. For me, it worked
so, if you opened WSL how I told, it should work. This is the last picture, where it shows that the extentio is working on WSL too
#149 I had a fix for this one. Hope it helps! I'm using Ubuntu 20.04.2 LTS :)
You need to change the owner of VSCode installation files folder into you current user, most likely you can find that folder in
/usr/share
then apply this command :sudo chown -R ${whoami} /usr/share/code
After that you can apply the Neon Dreams setup in VSCode and then run this command again to set the owner back to the root:sudo chown -R root /usr/share/code
Thanks! I was looking for that. Also don't use snap installation and ubuntu software (both the same). Install your VSCode with the .deb file from official website.
Thanks for this comment I uninstall VSCode because I was use the Ubuntu Store and install from the official website and all was success.
You need to change the owner of VSCode installation files folder into you current user, most likely you can find that folder in
/usr/share
then apply this command :sudo chown -R ${whoami} /usr/share/code
After that you can apply the Neon Dreams setup in VSCode and then run this command again to set the owner back to the root:
sudo chown -R root /usr/share/code
I got an error when I tried to run the first command: chown: missing operand after ‘/usr/share/code
. So, I researched a little more and found a similar solution in AskUbuntu that change the name used as username to an echo using $USER
as param: sudo chown $USER -R /usr/share/code
.
For me
sudo chown -R $USER /usr/share/code-insiders/
worked
Finally managed to get it working thank you!
For me
sudo chown -R $USER /usr/share/code-insiders/
worked
Thanks worked on debian buster
For those above having problems, here are some hints. You can figure out where your install is using
realpath $(which code)
which will give you a path like /usr/share/code/bin/code. If you remove /bin/code, the root of the install is at /usr/share/code; you can then do
sudo chown -R $(whoami) /usr/share/code
What's wrong with the command above is in bash, ${whoami} is replaced with the environment variable whoami, which is probably empty; $(whoami) with parentheses executes the command whoami and returns the result, which is your username. You could also just use $USER.
You need to replace ${whoami} for your system user, like: sudo chown -R perrito /opt/visual-studio-code/bin/code
That didn't work either. After playing around with it some more again I was able to get it to work, but by using the following:
sudo chown -R brad /opt/visual-studio-code
I turned on the glow, then reverted the permissions back with:
sudo chown -R root /opt/visual-studio-code
Worked for me on Manjaro Gnome 40
I can solve it without using Linux Terminal of WSL. steps:
- install the extension in Windows and WSL (Window Subsystem For Linux). but, do not configurate nothing yet. you have to execute the program with administrator powers.
2.Open the settings in Visual studio Code
![]()
- Open the Json Formatt Settings of Visual Studio Code
4.Make sure you have your settings as you want
5.Activate the Neon Dreams
![]()
- Until here, it is done for windows, to activate in WSL
![]()
- You have to change using this way. Clicking there and changing to WSL.
8.Open any project, and it should be activate automaticly.
I hope it works for you. For me, it worked
it worked for me , on my remote vscode-server, update ~/.vscode-server/data/Machine/settings.json
I'd been trying to do this, but I was using the wrong directory as whereis code
command gave me two directories.
code: /usr/bin/code /usr/share/code
For me, the sudo chown -R username /usr/share/code
works perfectly <3
Do not forget to revert the permissions to root!!!