How to run/start VsCode on Centos 7 - visual-studio-code

I'm a beginner studying centos.
I installed centos and vscode, but there's no response when I click the vscode icon.
And when i enter the [code] at the terminal, only an error message comes out and it can't be executed (the screen below).
​And if you look at the top left of my screen, it says [Activities]. Is this normal?
I saw [Applications] other centos image
enter image description here
enter image description here

Both problems stem from logging in as the root user. This is not a good idea for many reasons (e.g., security, desktop shortcuts do not work correctly, etc.), and, once deployed, your program may not work correctly for non-privileged users.
If you need to run as root, the command from the Terminal is:
code "/home/<your default username>/<optional projects directory>" --user-data-dir="." --no-sandbox
Output:
However, if you have no reason to use root over sudo, I strongly recommend you log out as root, and run VS Code as a regular user. Also, VS Code will continue to warn you about being root.
As far as the Gnome desktop, Applications on CentOS 7 and Activities on CentOS 8+.

Related

On MacOS Monterey 12.5 all IDE terminal sessions open at $HOME in stead of project root

As usual, not sure what caused the problem. Started laptop as usual.
But now every project i open, opens in $HOME directory instead of start directory, which is project root by default.
Tried vscode, webstorm, intellij - results were the same.
Further investigation have shown, that dragging absolute path to the terminal + enter causes following error:
zsh: permission denied: /Users/<MyName>/Code/Local/Rust/http-server
I have full read/write permissions, i added FullDiskPermissions to all apps that might need them.
Apps with full disk permissions:
I know it sounds like a minor issue, but i code every day and it's really annoying.
It's not actually an answer, i still don't know what solved it. But i somehow managed to resume the old behaviour.
The problem was global, terminal was opening in the wrong path everywhere, even from the Finder.
I reinstalled zsh, oh-my-zsh, volta (node.js version control tool) - so make sure to check if you have any of the following installed.
And after a day torture it suddenly started working as it used to.

VSCode on Linux Mint, integrated terminal not able to type anything

Hi I'm running Linux Mint 19 and I have just installed vscode using the snapd package manager. I've not used vscode on linux before as my usual editor is emacs. However, on a fresh new install of vscode, the integrated terminal does not work, there is just a non blinking cursor in the top left of the screen, but no prompt and no keyboard strokes are registering. This appears to be a common problem as there are a lot of posts about it if googled, but they are all for Windows versions and none of the solutions that I'm able to try do anything. I've tried to open a new terminal window, but the same thing happens I just get two terminal windows that I now cannot use. I've also tried checking the box that says Code-runner: Run In Terminal, but that does nothing either. What can I do to get this to work please, I looks to me like it is just not connected to either a bash or Zsh(which I normally use). Any help on this would be appreciated.
Instead of starting vscode with its default shell script (usually located on /usr/share/code/bin/code), the integrated terminal only works for me when starting it directly from the compiled binary (typically found on /usr/share/code/code, which is the same as the launcher created by the installer:
/usr/share/code/code --no-sandbox --unity-launch %F
While I searched for a solution in the past I've also noticed that lots of folks solved similar problems just by adding --disable-gpu flag, so might be worth checking out as well.

Jupyter webpages not displaying properly

Screen shot here.
With Cntrl-Shift-I
No matter how I install Jupyter(aka IPython) I get a dud webpage. It does not display tabs or menus as expected.
The screen shot above is from a 64bit Windows Anaconda install. It was a default install. Install finished. No changes to configuration. First action after install was select IPython menu item in start menu.
Now, trust me, I have tried everything. I have tried installing IPython from pip over top my python2.7 installation, anaconda etc. No matter how I install it ends up with the same problem. I even tried 32bit installs etc.
It doesn't appear to be the browser as both IE and Chrome see the same mangled display.
It is almost like the css files are not being picked up or are not there at all.
I opted to allow the installation of the Anaconda to update my environment variables etc. so the dang blasted thing should be finding where it has put itself.
What is the likely cause? What is the fix please?
I did have a very similar issue on Windows recently. Some program has overwritten your mime type associations. For me it was Inkscape killing SVG by setting the mime type to application/svg.
Try this on terminal:
import mimetypes
mimetypes.guess('file.css')
You should get text/css. If you get application/css this is most likely your problem. My solution: Change back the mime type association. Start regedit and search for application/css in HKEY_CLASSES_ROOT. Replace it with text/css.
Please refer to this https://github.com/ipython/ipython/issues/7024 for further reference.

VSCode ran once on install, won't run or install again

I'm running this on Windows 7 SP1 with most (if not all) current patches. I have administrative permissions on this machine.
The first time I ran VSCodeSetup.exe, it ran the installer for several minutes then launched the actual application.
I got called into a surprise meeting, so I closed it thinking I'd look at it again later.
However, when I returned to my computer and tried to launch it, I found no evidence that it was actually installed... no desktop icon, no entry in the start menu, no Explorer integration...
I tried running VSCodeSetup.exe again, but all it does it show the installer screen for a split second, which then vanishes.
Since then, I've tried the suggestions outlined in VSCode Installation Failed - Failed to extract installer to install the application, even going so far as to run Update.exe --uninstall followed by running VSCodeSetup.exe again, but nothing has worked.
I even tried disabling my antivirus software and running the installer again, to no avail.
Does anyone know what I can do to get VSCode working again?
According to the comments and answers to Install VSCode in a specific folder, Visual Studio Code installs itself to %LOCALAPPDATA%\Code on Windows.
While I'm not sure why it didn't register itself with Explorer, I can at least create a shortcut to %LOCALAPPDATA%\Code\bin\code.cmd (with icon %LOCALAPPDATA%\Code\app.ico) to get it working again.
Or remove the directory entirely and run VSCodeSetup.exe to install it again, which still doesn't add Explorer integration... but this time at least the PATH now has code in it.
On windows VSCode is installed as Code.exe and its located in your
C:\Users\<windows-user>\AppData\Local\Code\app-<version-number>\Code.exe
or
C:\Users\John\AppData\Local\Code\app-0.5.0\Code.exe

Teamviewer on Centos 5.8 - No login screen on next reboot

Yesterday I installed Teamviewer 7 on my Centos 5.8 desktop. After a reboot, am not able to see the login screen. Only a blue color screen is visible.
I read https://superuser.com/questions/403548/os-x-stuck-at-blue-screen-after-installing-teamviewer-host-and-rebooting?rq=1
But how do I do that on Centos?
I know that to login to Single User Mode, we need to press a key while the os boots up. And then type single in the cmd. And then?
Once in Single User Mode, you can try to remove TeamViewer from your system.
For example, if you have installed TeamViewer by running the rpm -ivh teamviewer_linux.rpm command, you can run the rpm -e teamviewer_linux command to uninstall it.
I don't think that the Mac OS link you've referred to can be very useful in your case.
If you peek into the teamviewer_linux.rpm (for example by running the command rpm -qpl teamviewer_linux.rpm) you won't find any "Launch Agents and Daemons", since on CentOS TeamViewer is wrapped around a Windows Emulator (wine).
By default the TeamViewer files gets installed in the /opt/teamviewer folder; the only exception is the startup script /usr/bin/teamviewer7.
Finally, the rpm post-installation script does nothing more and nothing less than create a desktop icon and add a menu entry, so I can't really understand how the TeamViewer installation could have broken your system.