Score:0

Installing VS Code on Ubuntu 20.04 with auto updates

cn flag

I did see How do I uninstall Visual Studio Code? and https://code.visualstudio.com/docs/setup/linux

Mentions snap and apt as ways to install with auto-updates. Wanted to know which is the way to get it with the latest stable changes? I usually install via apt, but snap is listed first here, is there any advantage? Just trying to pick the best so I do not need to deal with the update notifications that take me to the website to download the .deb file again and manually install it as I did originally.

(I also looked at Why won't Visual Studio Code update run on 20.04? that talks about manually installing from downloaded .deb I don't want that).

Also is there anyway to export the settings, uninstall and then reimport them when I install from the repo? It talks about sync in the code preferences but not sure where and how its syncing, can't see what account its syncing too.

Score:2
mz flag

Wanted to know which is the way to get it with the latest stable changes?

I would say it's your call. Both are maintained by Microsoft developers and are updated simultaneously.

I usually install via apt, but snap is listed first here, is there any advantage?

The definition of advantage varies from user to user. But this might answer your question, If a package is available as both a deb and a snap, which method is preferrable?

..so I do not need to deal with the update notifications that take me to the website to download the .deb file again and manually install it as I did originally.

It's been a while I'm using Visual Studio Code installed from deb archive. During the installation, repositories are auto-added to ensure smooth update delivery. Make sure you don't disable the Microsoft repositories. Updates can be installed via Software Updater or using sudo apt update; sudo apt upgrade.

..is there anyway to export the settings, uninstall and then reimport them when I install from the repo?

Some settings are stored in workspace folders. You can also check Settings Sync in Visual Studio Code. Note that this is still in preview, i.e., in development stage.

Nate T avatar
it flag
MS developers? Anyone can maintain a debian package. Google the term "orphaned Debian packages" and you'll see what I mean. Even still, good answer. Also, google "snap channels" to see what I meant by "the are at the same version." I didn't mean Apt & Snap, but Snap & Snap. Boy my hands are getting tired. I'm done for now. : )}
Nate T avatar
it flag
Oops, just remembered we are talkin about a MS app. I get it now... (facepalm)
Score:1
it flag

If you install with snap, you can add the flag --channel=edge, or just --edge, to get the newest release. The reason it isn't available by default is because it hasn't been tested enough to be considered "stable" by Snap. That doesn't mean it hasn't been tested by the application developers.

In my experience, The edge release is usually the same version you would get if you were to download from the developer's website.

The full command is:

Sudo snap install code --channel=edge --classic

Alternatively, you can install from the beta channel with --beta. Obviously this one is even riskier / newer than the edge channel version. I am not sure how Snap defines beta, though. It may be an actual MS beta or maybe just the package is beta.

Nate T avatar
it flag
The edge channel is the main reason I go with SNAP over apt when possible. Apt lets you define the version as well, but I don't think they have the edge installs. As far as I know, that is for installing older versions.
Kulfy avatar
mz flag
I don't use snaps, but if by edge you mean insiders/preview release, MS do have insiders deb archive. See https://code.visualstudio.com/insiders/#linux. Currently it's 1.59.0 and stable is at 1.58.2.
Nate T avatar
it flag
It isn't the same thing. When MS releases a build as "stable", it is still considered high risk by snap until Snap tests it iand confirms the stability for themselves. The Snap edge build is likely just the most recent stable MS build. I will check the version of the edge release and post here. Also, if you download anything from the gui app store that comes with 20.04, 20.10, 21.04, it is a snap, as the "Marketplace" app (app title is "Software") is a frontend for the snapstore.
Nate T avatar
it flag
For Code, the stable & edge builds are currently the same. They both point to build c3f12631 which was released on July 15. To see for yourself run `snap info code`.
Nate T avatar
it flag
I have more added, I just never posted. Got sidetracked. Now Ive gotta dig it out of the never ending pit that is my browsers. Gimme a few... If I don't come back, tell somebody. XD
Kulfy avatar
mz flag
The "store" lists software from Snaps as well as repositories configured. Since by default, I assume, nobody has configured MS repositories, VS code is shown as Snap only package. Also, I was thinking if stable and edge points to same commit then what's the difference?
Nate T avatar
it flag
They won't always point to the same. this is why I prefer snap. If you install as edge, it will _always_ be on edge channel. As such , it will always be upgraded a bit sooner than the stable. It will spend a portion of its time at the default version for Snap, and the rest of the time it will be ahead. How far ahead, and the size of the portions depend on the developer as there are currently no standards that quantifiably define what it means to be an edge channel.
Nate T avatar
it flag
I hated Snaps at the beginning, as I thought the architecture was too tightly coupled. Now, after better understanding them, I realize that it is the opposite. For one thing, each snap runs in its own env. The advantages are obvious. Also, ALL of your apps are in one place. It will take you a bit to find them XD but you look only once. Then you know. No more "devs decide" aka "where the hell..". Gods praise standardization! I don't think apt should be replaced, I do think both have a place. Snap solves some of Apt's biggest issues.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.