(updating with Atom repositories) |
|||
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
[https://atom.io '''Atom'''] is an open-source, configurable yet beginner-friendly text editor developed by GitHub. It is built using web technologies on top of the Electron framework. Admin users (that is users in the <code>wheel</code> group, that are able to execute <code>sudo</code> commands) or users with the root password can [[Atom#Installation|install Atom]], while other users | [https://atom.io '''Atom'''] is an open-source (licensed under the MIT License), configurable yet beginner-friendly text editor developed by GitHub. It is built using web technologies (and written mostly in CoffeeScript, CSS and JavaScript) on top of the [[Electron]] framework. Admin users (that is users in the <code>wheel</code> group, that are able to execute <code>sudo</code> commands) or users with the root password can [[Atom#Installation|install Atom]], while other users must use alternative methods of running Atom such as via [[Atom#AppImage|AppImages]]. | ||
== Installation == | == Installation == | ||
Its development team provides Debian, RPM and tar (file extension: <code>.tar.gz</code>) binaries for 64-bit Linux, but not for 32-bit systems. There are three main ways of installing Atom: | Its development team provides Debian, RPM and tar (file extension: <code>.tar.gz</code>) binaries for 64-bit Linux, but not for 32-bit systems. There are three main ways of installing Atom: | ||
1. | 1. Add Atom's provided repositories | ||
2. Using the | 2. Using official binary releases from the Atom development team (suitable for 64-bit systems only). | ||
3. By manually compiling its source code and installing the resulting RPM. | 3. By manually compiling its source code and installing the resulting RPM. | ||
The | The recommended method is #1. This method allows for auto-updating and dependency resolution, and is the fastest. | ||
=== Atom's Repositories === | |||
For up to date instructions check Atom's page [https://flight-manual.atom.io/getting-started/sections/installing-atom/#red-hat-and-centos-yum-or-fedora-dnf here] | |||
The instructions are copied below. | |||
<pre> | |||
sudo rpm --import https://packagecloud.io/AtomEditor/atom/gpgkey | |||
sudo sh -c 'echo -e "[Atom]\nname=Atom Editor\nbaseurl=https://packagecloud.io/AtomEditor/atom/el/7/\$basearch\nenabled=1\ngpgcheck=0\nrepo_gpgcheck=1\ngpgkey=https://packagecloud.io/AtomEditor/atom/gpgkey" > /etc/yum.repos.d/atom.repo' | |||
</pre> | |||
Then install with dnf | |||
<pre> | |||
sudo dnf install atom | |||
</pre> | |||
Or install the beta version | |||
<pre> | |||
sudo dnf install atom-beta | |||
</pre> | |||
=== Official binaries === | === Official binaries === | ||
Line 16: | Line 37: | ||
<pre> | <pre> | ||
sudo dnf install $(curl -sL "https://api.github.com/repos/atom/atom/releases/latest" | grep "https.*atom.x86_64.rpm" | cut -d '"' -f 4) | |||
</pre> | </pre> | ||
Line 30: | Line 51: | ||
</pre> | </pre> | ||
=== Building from source === | === Building from source === | ||
There is an [https://github.com/atom/atom/blob/master/docs/build-instructions/linux.md official guide] to installing Atom from source code on Linux. | There is an [https://github.com/atom/atom/blob/master/docs/build-instructions/linux.md official guide] to installing Atom from source code on Linux. On a default installation of Fedora 34 this method does work. | ||
== AppImage == | == AppImage == | ||
Line 52: | Line 67: | ||
== External links == | == External links == | ||
* [https://ask.fedoraproject.org/en/questions/scope:all/sort:activity-desc/tags:atom/page:1/ Ask Fedora questions with the atom tag] | * [https://ask.fedoraproject.org/en/questions/scope:all/sort:activity-desc/tags:atom/page:1/ Ask Fedora questions with the atom tag] | ||
[[Category:Text editors]] |
Latest revision as of 01:43, 17 May 2021
Atom is an open-source (licensed under the MIT License), configurable yet beginner-friendly text editor developed by GitHub. It is built using web technologies (and written mostly in CoffeeScript, CSS and JavaScript) on top of the Electron framework. Admin users (that is users in the wheel
group, that are able to execute sudo
commands) or users with the root password can install Atom, while other users must use alternative methods of running Atom such as via AppImages.
Installation
Its development team provides Debian, RPM and tar (file extension: .tar.gz
) binaries for 64-bit Linux, but not for 32-bit systems. There are three main ways of installing Atom:
1. Add Atom's provided repositories
2. Using official binary releases from the Atom development team (suitable for 64-bit systems only).
3. By manually compiling its source code and installing the resulting RPM.
The recommended method is #1. This method allows for auto-updating and dependency resolution, and is the fastest.
Atom's Repositories
For up to date instructions check Atom's page here The instructions are copied below.
sudo rpm --import https://packagecloud.io/AtomEditor/atom/gpgkey sudo sh -c 'echo -e "[Atom]\nname=Atom Editor\nbaseurl=https://packagecloud.io/AtomEditor/atom/el/7/\$basearch\nenabled=1\ngpgcheck=0\nrepo_gpgcheck=1\ngpgkey=https://packagecloud.io/AtomEditor/atom/gpgkey" > /etc/yum.repos.d/atom.repo'
Then install with dnf
sudo dnf install atom
Or install the beta version
sudo dnf install atom-beta
Official binaries
To install Atom from the official RPM package provide by the Atom team (which is only suitable for 64-bit systems!) for the latest stable (as opposed to beta releases which are also packaged at RPMs) Atom release, run:
sudo dnf install $(curl -sL "https://api.github.com/repos/atom/atom/releases/latest" | grep "https.*atom.x86_64.rpm" | cut -d '"' -f 4)
While there is no official way to auto-update these binaries here is a ~/.bashrc
(also compatible with the Zsh shell's ~/.zshrc
file) snippet that will automatically check for available Atom updates and install them whenever one opens a terminal:
ATOM_INSTALLED_VERSION=$(rpm -qi atom | grep "Version" | cut -d ':' -f 2 | cut -d ' ' -f 2) ATOM_LATEST_VERSION=$(curl -sL "https://api.github.com/repos/atom/atom/releases/latest" | grep -E "https.*atom-amd64.tar.gz" | cut -d '"' -f 4 | cut -d '/' -f 8 | sed 's/v//g') if [[ $ATOM_INSTALLED_VERSION < $ATOM_LATEST_VERSION ]]; then sudo dnf install -y https://github.com/atom/atom/releases/download/v${ATOM_LATEST_VERSION}/atom.x86_64.rpm fi
Building from source
There is an official guide to installing Atom from source code on Linux. On a default installation of Fedora 34 this method does work.
AppImage
To run Atom using an AppImage one merely needs to download or build a suitable AppImage, mark it as executable and then run it. Fusion809 has written a shell script for building an AppImage locally and installing a desktop configuration file (to run this AppImage) and icon for the present user. To use it run (assuming git is installed):
git clone https://github.com/fusion809/atom-runner cd atom-runner ./main.sh