translated

This commit is contained in:
geekpi 2023-11-22 09:20:16 +08:00
parent 30a8ee821d
commit 505b6ace24
2 changed files with 175 additions and 174 deletions

View File

@ -1,174 +0,0 @@
[#]: subject: "Install VSCodium on Fedora"
[#]: via: "https://itsfoss.com/install-vscodium-fedora/"
[#]: author: "Anuj Sharma https://itsfoss.com/author/anuj/"
[#]: collector: "lujun9972/lctt-scripts-1693450080"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Install VSCodium on Fedora
======
Visual Studio Code (VS Code) is a popular cross-platform text editor developed by Microsoft. It's built on the Electron framework and is widely used by developers for coding and text editing tasks. The core of VS Code, known as "Code - OSS," is open source and distributed under the MIT License. However, Microsoft adds specific customizations and releases its branded version of the editor under a proprietary license.
To address concerns about [telemetry][1] and licensing, there's an alternative called "[VSCodium][2]," which is a community-driven, telemetry-disabled, and MIT-licensed version of VS Code.
![VSCodium running on Fedora 39.][3]
In this tutorial, I will guide you through the process of installing and running VSCodium on a Fedora Linux system.
There are three ways to do that:
1. Installing by downloading the rpm file from the release page. But, you need to repeat the process to get the package updated (which can get frustrating).
2. Adding [paulcarroty][4] repo (as mentioned on [VSCodium][5] website). So, that when you [update your Fedora system][6] VScodium will also get updated (which is quite seamless).
3. Using the flatpak version which you probably have tried by installing it from Gnome software already (I had a bad experience with the same so mileage may vary).
The first one is very straightforward i.e. downloading and [installing the rpm file][7] from the [release page][8]. So, let's cut to the chase and follow the other two methods.
### Method 1: Installing VSCodium by adding the repository
Open a terminal: You can open a terminal by searching for "Terminal" in the application menu.
Add the GPG key: So that the package manager trusts the packager of the repo.
```
sudo rpmkeys --import https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg
```
Add the VSCodium repository: The following command will add the repo to your Fedora system.
```
printf "[gitlab.com_paulcarroty_vscodium_repo]\nname=download.vscodium.com\nbaseurl=https://download.vscodium.com/rpms/\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg\nmetadata_expire=1h" | sudo tee -a /etc/yum.repos.d/vscodium.repo
```
Install VSCodium: Now that you've added the VSCodium repository, you can install it using the following command (ones who love bleeding edge software can replace the package name to **codium-insiders** for installing the insiders version):
```
sudo dnf install codium
```
Launch VSCodium: You can now launch VSCodium either from the application menu or by running the following command in the terminal:
```
codium
```
#### Removing VSCodium
If you did not like VSCodium and the fact that it's based on Electron or maybe you switched to Neovim for good. You can remove it using this command:
```
sudo dnf remove codium
```
You may keep the repository and signature added to your system or maybe not (why not).
So, let's get rid of that repo:
```
sudo rm /etc/yum.repos.d/vscodium.repo
```
### Method 2: Install VSCodium using flatpak
You can install the flatpak also. So, here are the steps to install VSCodium using Flatpak on Fedora:
You can Install it straight away on Fedora by having flathub enabled which is probably enabled if you are using one of the latest iterations and have 3rd party repos enabled for Fedora. Just search for VSCodium in Gnome Software and click Install.
![Installing the flatpak from Gnome Software][9]
But, for the folks running older versions for some reason or they might have a fork with flatpak not enabled can follow suit.
Install Flatpak and enable Flathub: Fedora usually comes with Flatpak pre-installed. If it's not installed, you can install it using the following command:
```
sudo dnf install flatpak
```
To enable the Flathub repository, use the following command:
```
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
```
Now that you have Flatpak set up, you can install VSCodium using the Flathub repository. Run the following command:
```
flatpak install flathub com.vscodium.codium
```
Launch VSCodium: You can launch VSCodium via Flatpak using the following command:
```
flatpak run com.vscodium.codium
```
Alternatively, you can also search for "VSCodium" in your application menu and launch it from there.
That's it! You should now have VSCodium installed and running on your Fedora system using Flatpak.
To remove it use the command below:
```
sudo flatpak uninstall com.vscodium.codium
```
### Here comes the Bottomline
If you have used VS Code then you will not find any difference whatsoever between both the software. It is just for the sake of openness and freedom from the evil telemetry of Microsoft's version.
Coming to Fedora I installed the flatpak version first but VSCodium did not show any window decorations in the Wayland session (which is default obviously). Making it difficult to navigate using mouse.
![VSCodium flatpak showing no window decorations.][10]
I tried some methods to fix it but had no luck due to flatpak's weird locations for config files. If someone has or can figure out the workaround for above issue can comment down below. But using the rpm version was seamless (Maybe the skeptics were right about alternative package management systems).
Extensions and Plugins were fine for most of the part. You can also follow this tutorial to install on any distro from The Enterprise Linux family e.g. Alma Linux, Rocky Linux etc.
--------------------------------------------------------------------------------
via: https://itsfoss.com/install-vscodium-fedora/
作者:[Anuj Sharma][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/anuj/
[b]: https://github.com/lujun9972
[1]: https://code.visualstudio.com/docs/getstarted/telemetry
[2]: https://itsfoss.com/vscodium/
[3]: https://itsfoss.com/content/images/2023/10/codium-on-fedora.png
[4]: https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo
[5]: https://vscodium.com/
[6]: https://itsfoss.com/update-fedora/
[7]: https://itsfoss.com/install-rpm-files-fedora/
[8]: https://github.com/VSCodium/vscodium/releases
[9]: https://itsfoss.com/content/images/2023/10/codium-flatpak-fedora.png
[10]: https://itsfoss.com/content/images/2023/10/codium-flatpak-no-decorations.png

View File

@ -0,0 +1,175 @@
[#]: subject: "Install VSCodium on Fedora"
[#]: via: "https://itsfoss.com/install-vscodium-fedora/"
[#]: author: "Anuj Sharma https://itsfoss.com/author/anuj/"
[#]: collector: "lujun9972/lctt-scripts-1693450080"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
在 Fedora 上安装 VSCodium
======
Visual Studio CodeVS Code是微软开发的一款流行的跨平台文本编辑器。它基于 Electron 框架构建被开发人员广泛用于编码和文本编辑任务。VS Code 的核心,称为 “Code - OSS”是开源的并在 MIT 许可证下分发。然而,微软添加了特定的自定义功能,并在专有许可下发布了其品牌版本的编辑器。
为了解决有关[遥测][1]和许可的问题,有一个名为 “[VSCodium][2]” 的替代方案,它是社区驱动、禁用遥测且获得 MIT 许可的 VS Code 版本。
![VSCodium running on Fedora 39][3]
在本教程中,我将指导你完成在 Fedora Linux 系统上安装和运行 VSCodium 的过程。
有三种方法可以做到这一点:
1. 从发布页面下载 rpm 文件进行安装。但是,你需要重复该过程才能更新软件包(这可能会令人沮丧)。
2. 添加 [paulcarroty][4] 仓库(如 [VSCodium][5] 网站所述)。因此,当你[更新你的 Fedora 系统][6] VScodium 也会得到更新(这是相当无缝的)。
3. 使用 flatpak 版本,你可能已经尝试过从 Gnome 软件中安装该版本(我有过同样的糟糕经历,因此可能会有所不同)。
第一个非常简单,即从[发布页面][8]下载并[安装 rpm 文件][7]。那么,让我们切入主题并遵循其他两种方法。
### 方法 1通过添加仓库来安装 VSCodium
打开终端:你可以通过在应用菜单中搜索 “Terminal” 来打开终端。
添加 GPG 密钥:以便包管理器信任仓库的打包者。
````
sudo rpmkeys --import https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg
````
添加 VSCodium 仓库:以下命令会将仓库添加到你的 Fedora 系统。
````
printf "[gitlab.com_paulcarroty_vscodium_repo]\nname=download.vscodium.com\nbaseurl=https://download.vscodium.com/rpms/\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://gitlab .com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg\nmetadata_expire=1h" | sudo tee -a /etc/yum.repos.d/vscodium.repo
````
安装VSCodium现在你已经添加了 VSCodium 存储库,你可以使用以下命令安装它(喜欢前沿软件的人可以将软件包名称替换为 **codium-insiders** 来安装 insider 版本):
````
sudo dnf install codium
````
启动 VSCodium你现在可以从应用菜单或在终端中运行以下命令来启动 VSCodium
````
codium
````
#### 删除 VSCodium
如果你不喜欢 VSCodium 以及它基于 Electron 的事实,或者改用 Neovim。你可以使用以下命令删除它
````
sudo dnf remove codium
````
你可以将仓库和签名添加到你的系统中,也可以不保留(为什么不)。
因此,让我们摆脱该仓库:
````
sudo rm /etc/yum.repos.d/vscodium.repo
````
### 方法 2使用 flatpak 安装 VSCodium
你也可以安装 flatpak。因此以下是在 Fedora 上使用 Flatpak 安装 VSCodium 的步骤:
你可以通过启用 flathub 直接在 Fedora 上安装它,如果你使用的是最新版本之一并且为 Fedora 启用了第三方仓库,那么可能会启用该功能。只需在 Gnome Software 中搜索 VSCodium 并单击安装即可。
![Installing the flatpak from Gnome Software][9]
不过,由于某些原因运行旧版本的用户,或者他们可能有一个未启用 flatpak 的分叉,也可以效仿。
安装 Flatpak 并启用 FlathubFedora 通常预装了 Flatpak。如果尚未安装你可以使用以下命令进行安装
````
sudo dnf install flatpak
````
要启用 Flathub 仓库,请使用以下命令:
````
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
````
现在你已经设置了 Flatpak你可以使用 Flathub 仓库安装 VSCodium。运行以下命令
````
flatpak install flathub com.vscodium.codium
````
启动 VSCodium你可以使用以下命令通过 Flatpak 启动 VSCodium
````
flatpak run com.vscodium.codium
````
或者,你也可以在应用菜单中搜索 “VSCodium” 并从那里启动它。
就是这样! 你现在应该已经使用 Flatpak 在 Fedora 系统上安装并运行了 VSCodium。
要删除它,请使用以下命令:
````
sudo flatpak uninstall com.vscodium.codium
````
### 下面是底线
如果你使用过 VS Code那么你不会发现这两个软件之间有任何区别。这只是为了开放和免受微软版本的邪恶遥测的影响。
在 Fedora我首先安装了 flatpak 版本,但在 Wayland 会话中VSCodium 没有显示任何窗口装饰(这显然是默认的)。这让我很难用鼠标导航。
![VSCodium flatpak showing no window decorations.][10
我尝试了一些方法来解决这个问题,但由于 flatpak 配置文件的位置很奇怪,所以没有成功。如果有人有或能找到解决上述问题的办法,请在下面发表评论。不过,使用 rpm 版本倒是天衣无缝(也许怀疑论者对替代软件包管理系统的看法是对的)。
扩展和插件在大部分情况下都没有问题。你也可以按照本教程在企业 Linux 系列的任何发行版(如 Alma Linux、Rocky Linux 等)上安装。
--------------------------------------------------------------------------------
via: https://itsfoss.com/install-vscodium-fedora/
作者:[Anuj Sharma][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/anuj/
[b]: https://github.com/lujun9972
[1]: https://code.visualstudio.com/docs/getstarted/telemetry
[2]: https://itsfoss.com/vscodium/
[3]: https://itsfoss.com/content/images/2023/10/codium-on-fedora.png
[4]: https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo
[5]: https://vscodium.com/
[6]: https://itsfoss.com/update-fedora/
[7]: https://itsfoss.com/install-rpm-files-fedora/
[8]: https://github.com/VSCodium/vscodium/releases
[9]: https://itsfoss.com/content/images/2023/10/codium-flatpak-fedora.png
[10]: https://itsfoss.com/content/images/2023/10/codium-flatpak-no-decorations.png