How to trick a command into thinking there is no X server running

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I have this program that can run with both a text user interface and a graphical user interface.



It lacks any command line switch to force or the other, rather I guess it somehow autodetects whether we are in X or not (e.g. if I run it from a virtual terminal it enters its text mode, and if I run it from an X terminal emulator it opens a separate graphical window)



I'd like to force it into text mode and have it run inside the X terminal. How would I go about doing it?










share|improve this question

























    up vote
    1
    down vote

    favorite












    I have this program that can run with both a text user interface and a graphical user interface.



    It lacks any command line switch to force or the other, rather I guess it somehow autodetects whether we are in X or not (e.g. if I run it from a virtual terminal it enters its text mode, and if I run it from an X terminal emulator it opens a separate graphical window)



    I'd like to force it into text mode and have it run inside the X terminal. How would I go about doing it?










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I have this program that can run with both a text user interface and a graphical user interface.



      It lacks any command line switch to force or the other, rather I guess it somehow autodetects whether we are in X or not (e.g. if I run it from a virtual terminal it enters its text mode, and if I run it from an X terminal emulator it opens a separate graphical window)



      I'd like to force it into text mode and have it run inside the X terminal. How would I go about doing it?










      share|improve this question













      I have this program that can run with both a text user interface and a graphical user interface.



      It lacks any command line switch to force or the other, rather I guess it somehow autodetects whether we are in X or not (e.g. if I run it from a virtual terminal it enters its text mode, and if I run it from an X terminal emulator it opens a separate graphical window)



      I'd like to force it into text mode and have it run inside the X terminal. How would I go about doing it?







      x11






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 34 mins ago









      Luka Aleksić

      83




      83




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          Usually just



          unset DISPLAY


          in command-line of the terminal. Some applications are smarter than that, and actually check permissions and type of the console versus pseudoterminal.






          share|improve this answer




















          • Thanks. It worked.
            – Luka Aleksić
            25 mins ago










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          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',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476883%2fhow-to-trick-a-command-into-thinking-there-is-no-x-server-running%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote



          accepted










          Usually just



          unset DISPLAY


          in command-line of the terminal. Some applications are smarter than that, and actually check permissions and type of the console versus pseudoterminal.






          share|improve this answer




















          • Thanks. It worked.
            – Luka Aleksić
            25 mins ago














          up vote
          2
          down vote



          accepted










          Usually just



          unset DISPLAY


          in command-line of the terminal. Some applications are smarter than that, and actually check permissions and type of the console versus pseudoterminal.






          share|improve this answer




















          • Thanks. It worked.
            – Luka Aleksić
            25 mins ago












          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          Usually just



          unset DISPLAY


          in command-line of the terminal. Some applications are smarter than that, and actually check permissions and type of the console versus pseudoterminal.






          share|improve this answer












          Usually just



          unset DISPLAY


          in command-line of the terminal. Some applications are smarter than that, and actually check permissions and type of the console versus pseudoterminal.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 28 mins ago









          Thomas Dickey

          50.6k588160




          50.6k588160











          • Thanks. It worked.
            – Luka Aleksić
            25 mins ago
















          • Thanks. It worked.
            – Luka Aleksić
            25 mins ago















          Thanks. It worked.
          – Luka Aleksić
          25 mins ago




          Thanks. It worked.
          – Luka Aleksić
          25 mins ago

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476883%2fhow-to-trick-a-command-into-thinking-there-is-no-x-server-running%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          White Anglo-Saxon Protestant

          BuddyTV

          Conflict (narrative)