Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Executable from sh file
Qt 6.11 is out! See what's new in the release blog

Executable from sh file

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
11 Posts 3 Posters 1.6k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Axel SpoerlA Offline
    Axel SpoerlA Offline
    Axel Spoerl
    Moderators
    wrote on last edited by
    #2

    When you post code, please use the </> code formatting tags to make it easier to read for everybody.
    Furthermore, after reading your post 3 times, I dont understand

    • the headline: What is an "Executable from sh file" ?
    • the question: What do you mean by "for each App from terminal" ?

    Software Engineer
    The Qt Company, Oslo

    J 1 Reply Last reply
    0
    • Axel SpoerlA Axel Spoerl

      When you post code, please use the </> code formatting tags to make it easier to read for everybody.
      Furthermore, after reading your post 3 times, I dont understand

      • the headline: What is an "Executable from sh file" ?
      • the question: What do you mean by "for each App from terminal" ?
      J Offline
      J Offline
      JacobNovitsky
      wrote on last edited by
      #3

      @Axel-Spoerl oh, my apologies, when I see request to put code to code tags, I understand it literally and never recognize terminal command as code.
      Next time, if not forget, gonna put it to <> as you requested

      I meant this qt.png

      1 Reply Last reply
      0
      • Axel SpoerlA Offline
        Axel SpoerlA Offline
        Axel Spoerl
        Moderators
        wrote on last edited by
        #4

        Thanks.
        What is it that you actually want to do? Run your application in a terminal from Qt Creator?
        In that case, clicking the "Run in terminal" checkbox is enough.
        Otherwise: what is open_terminal.sh? Please post the content.

        Software Engineer
        The Qt Company, Oslo

        J 1 Reply Last reply
        0
        • Axel SpoerlA Axel Spoerl

          Thanks.
          What is it that you actually want to do? Run your application in a terminal from Qt Creator?
          In that case, clicking the "Run in terminal" checkbox is enough.
          Otherwise: what is open_terminal.sh? Please post the content.

          J Offline
          J Offline
          JacobNovitsky
          wrote on last edited by
          #5

          @Axel-Spoerl
          I want to open terminal called by Qt Creator on predefined xy and wh

          gnome-terminal --geometry=80x24+100+100 -- bash -c "/home/j/M-Debug/M; exec bash"
          
          JonBJ 1 Reply Last reply
          0
          • J JacobNovitsky

            @Axel-Spoerl
            I want to open terminal called by Qt Creator on predefined xy and wh

            gnome-terminal --geometry=80x24+100+100 -- bash -c "/home/j/M-Debug/M; exec bash"
            
            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by JonB
            #6

            @JacobNovitsky
            And what happens if that is what you have in your open_terminal.sh as you show it?

            I don't understand your bash -c "/home/j/M-Debug/M; exec bash" part? What is it supposed to do and does what you have really work?

            /home/j/M-Debug/M: is this really some executable? If not this is not a legal shell command.

            exec bash: what are you trying to do here? Creator is supposed presumably to use this to create a terminal in which you can run the actual executable your project is producing. I can only guess it puts your executable at the end of this command, perhaps preceded by some option or perhaps you are supposed to put that in or deal with it yourself. I am not convinced your script is dealing with that correctly. Find out what exact command Creator produces with your script and your executable. If you can't find that write a one-line script to use as your command which simply prints/sends to file precisely how it is being invoked (all command-line arguments) so then you will know.

            J 1 Reply Last reply
            0
            • JonBJ JonB

              @JacobNovitsky
              And what happens if that is what you have in your open_terminal.sh as you show it?

              I don't understand your bash -c "/home/j/M-Debug/M; exec bash" part? What is it supposed to do and does what you have really work?

              /home/j/M-Debug/M: is this really some executable? If not this is not a legal shell command.

              exec bash: what are you trying to do here? Creator is supposed presumably to use this to create a terminal in which you can run the actual executable your project is producing. I can only guess it puts your executable at the end of this command, perhaps preceded by some option or perhaps you are supposed to put that in or deal with it yourself. I am not convinced your script is dealing with that correctly. Find out what exact command Creator produces with your script and your executable. If you can't find that write a one-line script to use as your command which simply prints/sends to file precisely how it is being invoked (all command-line arguments) so then you will know.

              J Offline
              J Offline
              JacobNovitsky
              wrote on last edited by JacobNovitsky
              #7

              @JonB it opens my app with Qt Terminal in predefined xy wh
              It works well, but I want to be able to change this setting not manually in Qt Creator settings, but in automated way
              cheers

              this is pass to .o files and app executable itself, files made by Qt Creator
              build directory
              /home/j/M-Debug/M
              where M is AppName

              JonBJ J 2 Replies Last reply
              0
              • J JacobNovitsky

                @JonB it opens my app with Qt Terminal in predefined xy wh
                It works well, but I want to be able to change this setting not manually in Qt Creator settings, but in automated way
                cheers

                this is pass to .o files and app executable itself, files made by Qt Creator
                build directory
                /home/j/M-Debug/M
                where M is AppName

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by
                #8

                @JacobNovitsky said in Executable from sh file:

                but I want to be able to change this setting not manually but in automated way

                I do not know what that means/what you have in mind.

                1 Reply Last reply
                0
                • J JacobNovitsky

                  @JonB it opens my app with Qt Terminal in predefined xy wh
                  It works well, but I want to be able to change this setting not manually in Qt Creator settings, but in automated way
                  cheers

                  this is pass to .o files and app executable itself, files made by Qt Creator
                  build directory
                  /home/j/M-Debug/M
                  where M is AppName

                  J Offline
                  J Offline
                  JacobNovitsky
                  wrote on last edited by
                  #9

                  @JacobNovitsky
                  in terminal: qtcreator appName setExecutable -> path to open_terminal.sh

                  JonBJ 1 Reply Last reply
                  0
                  • J JacobNovitsky

                    @JacobNovitsky
                    in terminal: qtcreator appName setExecutable -> path to open_terminal.sh

                    JonBJ Offline
                    JonBJ Offline
                    JonB
                    wrote on last edited by
                    #10

                    @JacobNovitsky
                    I think you are saying you want to pass the name/path of your current executable as a Command line argument to the script (and change the script to pick that up from its command line arguments). And you probably would like that name/path to come from a "variable" which Creator has set up for you when you configure your project.

                    I don't know how you do that in this place to get it from a "Creator variable". I see the Command line arguments has a drop-down to the right. What does that offer you?

                    1 Reply Last reply
                    0
                    • J Offline
                      J Offline
                      JacobNovitsky
                      wrote on last edited by
                      #11

                      Screenshot from 2025-10-08 09-53-52.png

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved