The readme mentions that packges are installed to ~/.atom/packages. What am I supposed to do if I am an administrator who wants to install packages system-wide, so that they end up in /usr (possibly /usr/share/atom/resources/app.asar) rather than /home?
Reason for asking:
I would like to provide an AppImage that comes with some packages bundled out-of-the-box.
How does /usr/share/atom/resources/app.asar get built (edit: seemingly by https://github.com/atom/atom/blob/master/build/tasks/generate-asar-task.coffee) and how can I install additional packages there?
The following is not quite working yet:
sudo apt-get update
sudo apt-get -y install npm nodejs-legacy
npm install asar
wget -c https://atom.io/download/deb
dpkg -x deb .
./node_modules/asar/bin/asar extract ./usr/share/atom/resources/app.asar extracted
# *** WHICH npm/apm COMMAND TO RUN INSTEAD OF THE FOLLOWING ***
# IN ORDER TO INSTALL PACKAGES HERE???
cp -r /home/me/.atom/packages/* extracted/node_modules/
# Replace symlinked stuff with the originals
rsync extracted/ extracted_fixed -a --copy-links -v
# Make JSON editable
python -m json.tool extracted/package.json > extracted_fixed/package.json
# Edit extracted_fixed/package.json, e.g. delete the "Welcome" package
# *** HOW DO I GET THE ADDITIONAL PACKAGES IN HERE? ***
./node_modules/asar/bin/asar pack extracted_fixed/ ./usr/share/atom/resources/app.asar
# ./usr/bin/atom sets things like $ATOM_HOME, so we don't run it
rm -rf $HOME/atomtest
mkdir -p $HOME/atomtest
ATOM_HOME=$HOME/atomtest ./usr/share/atom/atom
Bundling community packages inside a custom generated app.asar would be very confusing from a support perspective (for instance, one of your users reports a bug on the Atom repositories or posts a question on Discuss). I do think that having a story for installing community packages machine-wide is a useful thing to have on the other hand, even though it isn't something we've considered previously.
I am not necessarily looking to install community packages inside a custom generated app.asar, it would be equally sufficient to be able to have some location at a path relative to the atom executable (e.g., in /usr if atom is installed there) in addition to ~/.atom/packages as an install location for apm. Invoking sudo apm --system-wide or something along these lines could then use the aforementioned location.
I'd like to have this feature as well.
We use a custom Ubuntu live image. It's created using a script that extracts the original .iso, chroots into the filesystem and adds and removes packages and configuration files. One of the applications it installs is Atom. We'd like the script to also install a number of atom packages that should be available to all (future) user accounts, so that our users have all required packages available from the start.
@tjallingran Your concrete use case can trivially be solved by leveraging /etc/skel functionality.
Would be interested by this feature in a wondows environment also. Why ? Because we use roaming profile and each time a user logs in, 300MB gets copied over the network to load Atom packages. Much too long indeed.
Installing system wide would be great. I Installed Atom system wide with a zip and a script. Packages is the next step.
Thanks very much for the feedback. While we understand that this would be useful in some scenarios, it isn't something that we are planning to work on implementing or are willing to maintain at this time. Because of this, we won't be accepting any pull requests to implement this feature.
Thanks again for the interest and the time taken to make us aware of everyone's use case.