open previous window from command line? #6464
Comments
Had a quick discussion with @maxbrunsfeld with this a couple of days back but didn't really have time to go about doing it. This would be great 😄. |
I assume you mean adding a command-line option, not changing what it does If the code is in javascript I'll look into the PR. Is it? On Tue, Apr 21, 2015 at 6:57 PM, Wliu notifications@github.com wrote:
|
The Atom script is a shell script: https://github.com/atom/atom/master/atom.sh. |
That link is a 404 and the only atom.sh I could find was I only care about linux myself. On Tue, Apr 21, 2015 at 7:08 PM, Wliu notifications@github.com wrote:
|
Ugh why did I try reformatting the URL... |
That looks like an easy PR, even for me. Does anyone have a preference on On Tue, Apr 21, 2015 at 7:13 PM, Mark Hahn mark@hahnca.com wrote:
|
|
I really want it to be quick and easy. Typing |
But that makes so much sense. 💯 As for an explicit flag perhaps On another note; to my (possibly warped mind) |
I still like -o for --old-windows. It is a good complement to -n for --new-window. Here it is in context...
|
Based on my experience looking at #6466, I think you can achieve the behavior you desire by running /usr/share/atom/atom instead of /usr/bin/atom. |
That would be great. Unfortunately
What is really weird is that something is causing the bash command line to show some of the error in a second prompt. I didn't know this was even possible. Is it possible that script only works when there is a desktop? |
Yeah, that's possible. In any case, that binary is what the |
On Wed, Apr 22, 2015 at 1:22 PM, Max Brunsfeld notifications@github.com
|
Looks like your DISPLAY environment variable isn't set in your shell, but is set when running /usr/bin/atom. Do either of these work:
or:
|
Unfortunately they are giving the same error. What do you make of the I don't see how this could be the same script run by the Atom command. On Wed, Apr 22, 2015 at 2:27 PM, Dean Brettle notifications@github.com
|
Ah, that is the gnome-keyring. I've had trouble with that before. Now I just need to remember how I fixed it then. There was some variable that overrode it. |
I'm not sure what the nssdb error is but I got the same error when I tried running /usr/share/atom/atom without the DISPLAY env var set. With it set, both the gtk error and the nssdb error went away and the atom window opened. Please post the output from:
You can also try this:
|
First, the results of ...
|
I made the two mods and ran the local copy. I got pretty much the same results ...
Thanks for all the trouble. I would be happy to let you ssh into my machine, if you want. |
I suspect you have a more general X-Windows configuration problem since it looks like you can't open display :0. The only thing I don't understand is why running "atom" works. Perhaps it is an alias or isn't actually /usr/bin/atom? What do you get for:
and what happens when you run:
? Can you confirm that you can run other X programs from shell where you are trying to launch atom? |
When I enter
Yes, I also have run xterm, SmartGit and the unity desktop. I have been using Atom and SmartGit in X windows for almost all of my development for weeks.
As I mentioned, I suspect some keyring problem, at least with the first error message. In the past I had to add some env var to fix the keyring. Maybe one script can see the var and another cannot. Unfortunately I can't find the old forum posts for that fix. I'll keep looking. |
What Linux distribution/release are you running? Is SELinux enabled? If so, you could try turning it off temporarily to see if it's the cause. Use FWIW, I'm mystified as to how you are able to run any X programs without having the DISPLAY environment variable set. |
I'm using ubuntu 12.04.5 inside a chroot using crouton on a chromebook pixel. You can run different chroots. I used to use unity desktop but I switched to a stripped chroot that only has xiwi.
It is not installed.
I changed the owner/group and that fixed my first error. Progress! I'm left with ...
Edit: Fixed version ubuntu 12.04.5. |
Damn, I am so sorry to have wasted your time. I had forgotten that in the beginning I made an alias for Now I'll try re-opening the multiple windows. |
After 24 hrs of wasting everyone's time I can verify that Thank you @brettle. Without your persistence I would never have figured this out. |
Maybe, but I think a command-line option would still prove very useful and would be a lot more useable than remembering to launch from |
You may be right, but I personally have no problem since I'll be using an alias to a script that makes the |
Yay! Glad you figured it out. @mnquintana, I agree that a command line option would be useful. |
@mnquintana A command line option would be strange to me the more I think about it. |
@mehcode Ah, I forgot about that option – yeah, I like that one a lot better. |
@mark-hahn @mehcode I think this should happen. /cc @atom/non-github-maintainers @atom/core |
Definitely 👍 from me |
As I said, a simple script will do it. You already have to install atom and a bunch of packages. Adding the script is easy. |
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks! |
Would it be hard for me to do a PR to add a command-line option to open atom with the previous windows? I know my use-case is rare but I open X11 windows from the command-line and I have no desktop at all.
I know this isn't going to happen but logically using
atom
would open previous windows andatom .
would open the working directory.The text was updated successfully, but these errors were encountered: