You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.
Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
Every time you run atom, it returns an error message (it's the cinnamon thing from the last update)
Steps to Reproduce
unset DESKTOP_SESSION
run atom (namely /usr/bin/atom)
Expected behavior:
Atom opens
Actual behavior:
returns "expr: syntax error: missing argument after ‘8’"
Atom opens
Reproduces how often:
Always
Versions
Atom : 1.60.0
Electron: 9.4.4
Chrome : 83.0.4103.122
Node : 12.14.1
OS: Ubuntu on WSL (it's normal to run without a desktop)
Additional Information
Can be fixed trivially by changing lines 172-174 to check that DESKTOP_SESSION is indeed set. E.g.:
if [[ -v DESKTOP_SESSION ]]; then
if [[ "$(expr substr $(printenv | grep "DESKTOP_SESSION=") 17 8)" == "cinnamon" ]]; then
cp "resources/linux/desktopenviroment/cinnamon/atom.nemo_action" "/usr/share/nemo/actions/atom.nemo_action"
fi
fi
The text was updated successfully, but these errors were encountered:
Same issue experienced on "pure" Ubuntu (i.e. not running under WSL).
DESKTOP_SESSION=ubuntu
Error message isn't generated consistently. I suspect it is being generated when I use sudo atom --no-sandbox ...
This seems to be an issue with quoting on line 172 of the atom shell script, which is installed as /usr/bin/atom.
if [[ "$(expr substr $(printenv | grep "DESKTOP_SESSION=") 17 8) == "cinnamon" ]]; then
cp "resources/linux/desktopenviroment/cinnamon/atom.nemo_action" "/usr/share/nemo/actions/atom.nemo_action"
fi
When printenv | grep "DESKTOP_SESSION=" is an empty string, because it is unquoted, it disappears from the argument list of expr substr, which requires three arguments.
This is fixed by quoting the inner $() expression like so.
if [[ "$(expr substr "$(printenv | grep "DESKTOP_SESSION=")" 17 8)" == "cinnamon" ]]; then
cp "resources/linux/desktopenviroment/cinnamon/atom.nemo_action" "/usr/share/nemo/actions/atom.nemo_action"
fi
Oops, missed that this was already mentioned.
ptous
added a commit
to ptous/atom
that referenced
this issue
Apr 11, 2022
Prerequisites
Description
Every time you run atom, it returns an error message (it's the cinnamon thing from the last update)
Steps to Reproduce
Expected behavior:
Atom opens
Actual behavior:
returns "expr: syntax error: missing argument after ‘8’"
Atom opens
Reproduces how often:
Always
Versions
Atom : 1.60.0
Electron: 9.4.4
Chrome : 83.0.4103.122
Node : 12.14.1
OS: Ubuntu on WSL (it's normal to run without a desktop)
Additional Information
Can be fixed trivially by changing lines 172-174 to check that DESKTOP_SESSION is indeed set. E.g.:
if [[ -v DESKTOP_SESSION ]]; then
if [[ "$(expr substr $(printenv | grep "DESKTOP_SESSION=") 17 8)" == "cinnamon" ]]; then
cp "resources/linux/desktopenviroment/cinnamon/atom.nemo_action" "/usr/share/nemo/actions/atom.nemo_action"
fi
fi
The text was updated successfully, but these errors were encountered: