Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Instructions for building and launching the Atom text editor on Fedora 20.

Using Atom on Fedora 20

This guide walks you through the steps of building and launching the Atom text editor on Fedora 20.

Building Atom

  1. Install prerequisite packages

    $ sudo yum -y install node npm libgnome-keyring-devel
  2. Install Chrome (needed for libudev.so.0)

    $ sudo sh -c 'cat > /etc/yum.repos.d/google-chrome.repo <<EOS
    [google-chrome]
    name=google-chrome
    baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
    enabled=1
    gpgcheck=1
    gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub
    EOS'
     sudo yum -y install google-chrome-stable
  3. Upgrade npm locally (Fedora packages 1.3.6, but version 1.4 is required)

    $ cd ~
      npm install npm
  4. Ensure the local npm bin location is on your PATH

    $ export PATH="$HOME/node_modules/.bin:$PATH"
  5. Open a new terminal window to reset the path to npm

    $ npm --version
    # 1.4.10
  6. Uninstall gyp package (which also removes npm and node-gyp) to avoid gyp / node-gyp conflicts

    $ sudo yum -y remove gyp
    Note
    For more information about this problem, see issue #2029.
  7. Clone the Atom repository and switch to it

    $ git clone https://github.com/atom/atom
      cd atom
  8. Build Atom (writes to build and /tmp/atom-build)

    $ ./script/build
    Note
    Disregard any compiler or npm warnings.
  9. Make the atom binary executable

    $ chmod +x /tmp/atom-build/Atom/atom
  10. (Optional) Reinstall the node-gyp package (if needed for system operations)

    $ sudo yum -y install node-gyp

Launching Atom

$ LD_LIBRARY_PATH=/opt/google/chrome ./atom.sh

Relocating the Atom installation

If you want to relocate the Atom installation outside of the /tmp directory, run the following commands:

$ mkdir -p ~/apps/atom/share
  mv /tmp/atom-build/Atom ~/apps/atom/share/atom
  cp atom.sh ~/apps/atom/share/

Now you can run Atom using the following command:

$ LD_LIBRARY_PATH=/opt/google/chrome ~/apps/atom/share/atom.sh

Write code!

@caarlos0

This comment has been minimized.

Show comment
Hide comment
@caarlos0

caarlos0 May 8, 2014

Cool!

Also, in case you ever want a desktop file:

/usr/share/applications/atom.desktop

[Desktop Entry]
Type=Application
Name=Atom
Comment=AEHOOOO
Icon=/opt/Atom/resources/app/resources/atom.png
Exec=/opt/Atom/atom.sh
Terminal=false
Categories=Development;

caarlos0 commented May 8, 2014

Cool!

Also, in case you ever want a desktop file:

/usr/share/applications/atom.desktop

[Desktop Entry]
Type=Application
Name=Atom
Comment=AEHOOOO
Icon=/opt/Atom/resources/app/resources/atom.png
Exec=/opt/Atom/atom.sh
Terminal=false
Categories=Development;
@ripper2hl

This comment has been minimized.

Show comment
Hide comment
@ripper2hl

ripper2hl May 9, 2014

Muchas gracias, me funciono a la primera, menos el icono

Muchas gracias, me funciono a la primera, menos el icono

@pauliuszaleckas

This comment has been minimized.

Show comment
Hide comment
@pauliuszaleckas

pauliuszaleckas May 12, 2014

No need to install chrome. systemd-libs provides libudev.so.1. All you need to do is:

sudo ln -sf /usr/lib64/libudev.so.1 /usr/lib64/libudev.so.0

And to install atom system-wide:

sudo ./script/grunt install

No need to install chrome. systemd-libs provides libudev.so.1. All you need to do is:

sudo ln -sf /usr/lib64/libudev.so.1 /usr/lib64/libudev.so.0

And to install atom system-wide:

sudo ./script/grunt install
@ceeeKay

This comment has been minimized.

Show comment
Hide comment
@ceeeKay

ceeeKay May 12, 2014

I had to do

  $ sudo npm install npm -g

to get npm globally upgraded to 1.4.x

and when I removed gyp it removed gyp, npm, and node-gyp, which meant when I ran script/build I got an error about npm not being found.

also I've been using nvm to a pretty decent level of success until I had into a firewall issue that blocked my progress; info at atom/atom#1814 (comment)

ceeeKay commented May 12, 2014

I had to do

  $ sudo npm install npm -g

to get npm globally upgraded to 1.4.x

and when I removed gyp it removed gyp, npm, and node-gyp, which meant when I ran script/build I got an error about npm not being found.

also I've been using nvm to a pretty decent level of success until I had into a firewall issue that blocked my progress; info at atom/atom#1814 (comment)

@mrkz

This comment has been minimized.

Show comment
Hide comment
@mrkz

mrkz Jun 12, 2014

Thanks for the walkthrough!
(and to caarlos0 for the desktop file!)

mrkz commented Jun 12, 2014

Thanks for the walkthrough!
(and to caarlos0 for the desktop file!)

@lucascarvalho

This comment has been minimized.

Show comment
Hide comment

Thanks!

@benfairless

This comment has been minimized.

Show comment
Hide comment
@benfairless

benfairless Sep 1, 2014

Thanks for the man. Still works perfectly!

Thanks for the man. Still works perfectly!

@c-zakkaroff

This comment has been minimized.

Show comment
Hide comment
@c-zakkaroff

c-zakkaroff Sep 19, 2014

Many many thanks!

Many many thanks!

@alanorth

This comment has been minimized.

Show comment
Hide comment
@alanorth

alanorth Oct 13, 2014

Just did this on Fedora 20:

sudo yum install npm
git clone https://github.com/atom/atom
cd atom
git checkout v0.136.0
npm install npm
export PATH=node_modules/.bin:$PATH
sudo yum -y remove gyp
npm --version
2.1.3
./script/build
sudo mkdir -p /opt/atom
sudo chown aorth:aorth /opt/atom
script/grunt install --install-dir /opt/atom
cp /opt/atom/share/applications/Atom.desktop ~/.local/share/applications/

Pretty easy these days.

Just did this on Fedora 20:

sudo yum install npm
git clone https://github.com/atom/atom
cd atom
git checkout v0.136.0
npm install npm
export PATH=node_modules/.bin:$PATH
sudo yum -y remove gyp
npm --version
2.1.3
./script/build
sudo mkdir -p /opt/atom
sudo chown aorth:aorth /opt/atom
script/grunt install --install-dir /opt/atom
cp /opt/atom/share/applications/Atom.desktop ~/.local/share/applications/

Pretty easy these days.

@jsnjack

This comment has been minimized.

Show comment
Hide comment
@jsnjack

jsnjack Oct 17, 2014

There is a way to use atom from official *.deb package in fedora:

  • Download official *.deb package
  • unpack it with command
ar p atom-amd64.deb data.tar.gz | tar zx
  • launch atom editor
./usr/bin/atom

jsnjack commented Oct 17, 2014

There is a way to use atom from official *.deb package in fedora:

  • Download official *.deb package
  • unpack it with command
ar p atom-amd64.deb data.tar.gz | tar zx
  • launch atom editor
./usr/bin/atom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment