Atom Editor Opens In Background By DefaultRunning programs in the background from terminalWhy is sudo bash different from regular bashWhy can I only launch scripts via terminal?How to run perl script in backgroundAtom editor not showing up in 'Other Applications' list in Nautilus Open Withcrontab xinput returns empty resultsHow to emulate a remote host shell environment on my ubuntu 16.04 LTS workstationDisown, background, dump to null scriptUdev rule not executing on usb insertion, should run script in background

Copying files: Does Windows write to disk if files are identical

Is there an unambiguous name for the social/political theory "liberalism" without "leftist"?

Should I use muryou or tada 無料 or 只?

Is encrypted e-mail sent over TLS 1.3 a form of "forward secrecy" (similar to something like Signal)?

Flatten an array

Would fantasy dwarves be able to invent and/or manufacture the radio?

Is 写真 an onomatopoeia?

You see a boat filled with people

Are commoners actually this squishy?

Which audio encoders in FFmpeg support 8 kHz?

Python: write 2**n - 1 as a recursive function

529 accounts for multiple kids

should I include offer letter from a different institution in my application for a faculty position

RX vs TX operation in Software UART

How to delete music as it's being played

What can I wear to avoid getting frisked and crotch searched by TSA at the airport?

Can I reproduce this in Latex

Articles at the beginning of sentences in scientific writing

Showing a homeless person that you care about their well-being

Why didn't Petunia know that Harry wasn't supposed to use magic out of school?

Are homeless people protected by antidiscrimination laws?

How can I solve the Ramanujan problem by using Wolfram language?

Wood glue versus epoxy for doweling stripped screw holes

Why do the Romance languages use definite articles, when Latin doesn't?



Atom Editor Opens In Background By Default


Running programs in the background from terminalWhy is sudo bash different from regular bashWhy can I only launch scripts via terminal?How to run perl script in backgroundAtom editor not showing up in 'Other Applications' list in Nautilus Open Withcrontab xinput returns empty resultsHow to emulate a remote host shell environment on my ubuntu 16.04 LTS workstationDisown, background, dump to null scriptUdev rule not executing on usb insertion, should run script in background






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









1

















This isn't a problem, more a question of curiosity. When I open Atom editor from the command line using atom it opens in the background. (So I'm returned to the command prompt right away in the terminal.) Typically, if I open an application on the command line using applicationname it would be in the foreground. If I wanted to run it in the background, which I usually do, I'd provide applicationname & instead.



Why don't I have to do atom &?



Like I said, this isn't a problem since I usually want to continue working in the same directory, but I'm curious as to the why.



$ file $(which atom)
/usr/bin/atom: Bourne-Again shell script, ASCII text executable/usr/bin/atom: Bourne-Again shell script, ASCII text executable









share|improve this question


































    1

















    This isn't a problem, more a question of curiosity. When I open Atom editor from the command line using atom it opens in the background. (So I'm returned to the command prompt right away in the terminal.) Typically, if I open an application on the command line using applicationname it would be in the foreground. If I wanted to run it in the background, which I usually do, I'd provide applicationname & instead.



    Why don't I have to do atom &?



    Like I said, this isn't a problem since I usually want to continue working in the same directory, but I'm curious as to the why.



    $ file $(which atom)
    /usr/bin/atom: Bourne-Again shell script, ASCII text executable/usr/bin/atom: Bourne-Again shell script, ASCII text executable









    share|improve this question






























      1












      1








      1








      This isn't a problem, more a question of curiosity. When I open Atom editor from the command line using atom it opens in the background. (So I'm returned to the command prompt right away in the terminal.) Typically, if I open an application on the command line using applicationname it would be in the foreground. If I wanted to run it in the background, which I usually do, I'd provide applicationname & instead.



      Why don't I have to do atom &?



      Like I said, this isn't a problem since I usually want to continue working in the same directory, but I'm curious as to the why.



      $ file $(which atom)
      /usr/bin/atom: Bourne-Again shell script, ASCII text executable/usr/bin/atom: Bourne-Again shell script, ASCII text executable









      share|improve this question

















      This isn't a problem, more a question of curiosity. When I open Atom editor from the command line using atom it opens in the background. (So I'm returned to the command prompt right away in the terminal.) Typically, if I open an application on the command line using applicationname it would be in the foreground. If I wanted to run it in the background, which I usually do, I'd provide applicationname & instead.



      Why don't I have to do atom &?



      Like I said, this isn't a problem since I usually want to continue working in the same directory, but I'm curious as to the why.



      $ file $(which atom)
      /usr/bin/atom: Bourne-Again shell script, ASCII text executable/usr/bin/atom: Bourne-Again shell script, ASCII text executable






      command-line scripts process atom






      share|improve this question
















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 29 at 7:07









      dessert

      29.3k7 gold badges88 silver badges121 bronze badges




      29.3k7 gold badges88 silver badges121 bronze badges










      asked May 16 at 13:27









      partial_maskpartial_mask

      556 bronze badges




      556 bronze badges























          1 Answer
          1






          active

          oldest

          votes


















          1


















          You don’t have to start atom in the background because this command doesn’t start the atom process directly, but rather just a starter script. The /usr/bin/atom script evaluates CLI options and sets a bunch of variables before starting the real atom process in a background subshell, see line 180 et seq. (comments mine):



          # start a subshell in the background (note “&” below!)
          (
          # start the Atom process with the current script’s PID redirecting its output to nohup.out
          nohup "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$ATOM_HOME/nohup.out" 2>&1
          # in case of any error, print the output and exit
          if [ $? -ne 0 ]; then
          cat "$ATOM_HOME/nohup.out"
          exit $?
          fi
          ) &


          Let’s see which file is the real atom executable started here:




          • it starts $ATOM_PATH, which is set on line 163:



            ATOM_PATH="$USR_DIRECTORY/share/atom/atom"



          • $USR_DIRECTORY is set on line 150:



            USR_DIRECTORY=$(readlink -f $(dirname $SCRIPT)/..)


            This equals:



            USR_DIRECTORY=$(readlink -f $(dirname /usr/bin/atom)/..) # equals
            USR_DIRECTORY=$(readlink -f /usr/bin/..) # equals
            USR_DIRECTORY=$(readlink -f /usr) # equals
            USR_DIRECTORY=/usr


          Now we have the full path to the atom executable: /usr/share/atom/atom. The output of file confirms that:



          $ file /usr/share/atom/atom
          /usr/share/atom/atom: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/l, for GNU/Linux 2.6.32, stripped





          share|improve this answer



























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );














            draft saved

            draft discarded
















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1143756%2fatom-editor-opens-in-background-by-default%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown


























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1


















            You don’t have to start atom in the background because this command doesn’t start the atom process directly, but rather just a starter script. The /usr/bin/atom script evaluates CLI options and sets a bunch of variables before starting the real atom process in a background subshell, see line 180 et seq. (comments mine):



            # start a subshell in the background (note “&” below!)
            (
            # start the Atom process with the current script’s PID redirecting its output to nohup.out
            nohup "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$ATOM_HOME/nohup.out" 2>&1
            # in case of any error, print the output and exit
            if [ $? -ne 0 ]; then
            cat "$ATOM_HOME/nohup.out"
            exit $?
            fi
            ) &


            Let’s see which file is the real atom executable started here:




            • it starts $ATOM_PATH, which is set on line 163:



              ATOM_PATH="$USR_DIRECTORY/share/atom/atom"



            • $USR_DIRECTORY is set on line 150:



              USR_DIRECTORY=$(readlink -f $(dirname $SCRIPT)/..)


              This equals:



              USR_DIRECTORY=$(readlink -f $(dirname /usr/bin/atom)/..) # equals
              USR_DIRECTORY=$(readlink -f /usr/bin/..) # equals
              USR_DIRECTORY=$(readlink -f /usr) # equals
              USR_DIRECTORY=/usr


            Now we have the full path to the atom executable: /usr/share/atom/atom. The output of file confirms that:



            $ file /usr/share/atom/atom
            /usr/share/atom/atom: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/l, for GNU/Linux 2.6.32, stripped





            share|improve this answer






























              1


















              You don’t have to start atom in the background because this command doesn’t start the atom process directly, but rather just a starter script. The /usr/bin/atom script evaluates CLI options and sets a bunch of variables before starting the real atom process in a background subshell, see line 180 et seq. (comments mine):



              # start a subshell in the background (note “&” below!)
              (
              # start the Atom process with the current script’s PID redirecting its output to nohup.out
              nohup "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$ATOM_HOME/nohup.out" 2>&1
              # in case of any error, print the output and exit
              if [ $? -ne 0 ]; then
              cat "$ATOM_HOME/nohup.out"
              exit $?
              fi
              ) &


              Let’s see which file is the real atom executable started here:




              • it starts $ATOM_PATH, which is set on line 163:



                ATOM_PATH="$USR_DIRECTORY/share/atom/atom"



              • $USR_DIRECTORY is set on line 150:



                USR_DIRECTORY=$(readlink -f $(dirname $SCRIPT)/..)


                This equals:



                USR_DIRECTORY=$(readlink -f $(dirname /usr/bin/atom)/..) # equals
                USR_DIRECTORY=$(readlink -f /usr/bin/..) # equals
                USR_DIRECTORY=$(readlink -f /usr) # equals
                USR_DIRECTORY=/usr


              Now we have the full path to the atom executable: /usr/share/atom/atom. The output of file confirms that:



              $ file /usr/share/atom/atom
              /usr/share/atom/atom: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/l, for GNU/Linux 2.6.32, stripped





              share|improve this answer




























                1














                1










                1









                You don’t have to start atom in the background because this command doesn’t start the atom process directly, but rather just a starter script. The /usr/bin/atom script evaluates CLI options and sets a bunch of variables before starting the real atom process in a background subshell, see line 180 et seq. (comments mine):



                # start a subshell in the background (note “&” below!)
                (
                # start the Atom process with the current script’s PID redirecting its output to nohup.out
                nohup "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$ATOM_HOME/nohup.out" 2>&1
                # in case of any error, print the output and exit
                if [ $? -ne 0 ]; then
                cat "$ATOM_HOME/nohup.out"
                exit $?
                fi
                ) &


                Let’s see which file is the real atom executable started here:




                • it starts $ATOM_PATH, which is set on line 163:



                  ATOM_PATH="$USR_DIRECTORY/share/atom/atom"



                • $USR_DIRECTORY is set on line 150:



                  USR_DIRECTORY=$(readlink -f $(dirname $SCRIPT)/..)


                  This equals:



                  USR_DIRECTORY=$(readlink -f $(dirname /usr/bin/atom)/..) # equals
                  USR_DIRECTORY=$(readlink -f /usr/bin/..) # equals
                  USR_DIRECTORY=$(readlink -f /usr) # equals
                  USR_DIRECTORY=/usr


                Now we have the full path to the atom executable: /usr/share/atom/atom. The output of file confirms that:



                $ file /usr/share/atom/atom
                /usr/share/atom/atom: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/l, for GNU/Linux 2.6.32, stripped





                share|improve this answer














                You don’t have to start atom in the background because this command doesn’t start the atom process directly, but rather just a starter script. The /usr/bin/atom script evaluates CLI options and sets a bunch of variables before starting the real atom process in a background subshell, see line 180 et seq. (comments mine):



                # start a subshell in the background (note “&” below!)
                (
                # start the Atom process with the current script’s PID redirecting its output to nohup.out
                nohup "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$ATOM_HOME/nohup.out" 2>&1
                # in case of any error, print the output and exit
                if [ $? -ne 0 ]; then
                cat "$ATOM_HOME/nohup.out"
                exit $?
                fi
                ) &


                Let’s see which file is the real atom executable started here:




                • it starts $ATOM_PATH, which is set on line 163:



                  ATOM_PATH="$USR_DIRECTORY/share/atom/atom"



                • $USR_DIRECTORY is set on line 150:



                  USR_DIRECTORY=$(readlink -f $(dirname $SCRIPT)/..)


                  This equals:



                  USR_DIRECTORY=$(readlink -f $(dirname /usr/bin/atom)/..) # equals
                  USR_DIRECTORY=$(readlink -f /usr/bin/..) # equals
                  USR_DIRECTORY=$(readlink -f /usr) # equals
                  USR_DIRECTORY=/usr


                Now we have the full path to the atom executable: /usr/share/atom/atom. The output of file confirms that:



                $ file /usr/share/atom/atom
                /usr/share/atom/atom: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/l, for GNU/Linux 2.6.32, stripped






                share|improve this answer













                share|improve this answer




                share|improve this answer










                answered May 29 at 7:06









                dessertdessert

                29.3k7 gold badges88 silver badges121 bronze badges




                29.3k7 gold badges88 silver badges121 bronze badges































                    draft saved

                    draft discarded















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1143756%2fatom-editor-opens-in-background-by-default%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown









                    Popular posts from this blog

                    Tamil (spriik) Luke uk diar | Nawigatjuun

                    Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

                    Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?