Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [solved] QProcess with gnome-terminal
Forum Updated to NodeBB v4.3 + New Features

[solved] QProcess with gnome-terminal

Scheduled Pinned Locked Moved General and Desktop
10 Posts 4 Posters 7.8k Views 1 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.
  • W Offline
    W Offline
    wernsen
    wrote on last edited by
    #1

    Hello Comunity,

    this is my first post here. I have some problems with the gnome-terminal while using the qprocess.

    @ QString program = "gnome-terminal";
    QStringList arguments;
    arguments << "bash --rcfile /opt/.bashrc-OpenFOAM";

    QProcess *proc = new QProcess(this);
    proc->start(program, arguments);@
    

    The terminal starts but the rcfile does not load. Is there something I am doing wrong?

    Thanks for the help.
    Martin

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mlong
      wrote on last edited by
      #2

      Welcome to the forum!

      Does using @ arguments << "bash" << "--rcfile" << "/opt/.bashrc-OpenFOAM"; @ make a difference?

      Software Engineer
      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

      1 Reply Last reply
      0
      • W Offline
        W Offline
        wernsen
        wrote on last edited by
        #3

        thanks for the fast reply but unfortunately it isnt working.

        "problems while reading arguments"

        1 Reply Last reply
        0
        • W Offline
          W Offline
          wernsen
          wrote on last edited by
          #4

          nobody any advice? I need/want this :(

          1 Reply Last reply
          0
          • L Offline
            L Offline
            lgeyer
            wrote on last edited by
            #5

            [quote author="wernsen" date="1314818174"]"problems while reading arguments" [/quote]

            Is this Qt, gnome-terminal or bash output?

            1 Reply Last reply
            0
            • R Offline
              R Offline
              Richard Neal
              wrote on last edited by
              #6

              Try:
              @arguments << "-x" << "bash" << "--rcfile" << "/opt/.bashrc-OpenFOAM";@

              Note: I would try on a command line first to ensure the gnome-terminal syntax is correct and works appropriately.

              For every positive is a negative and every negative is a positive.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mlong
                wrote on last edited by
                #7

                Also, this set of arguments assumes that gnome-terminal and bash are both in your path. Depending on your situation, you might want to use fully qualified paths.

                Software Engineer
                My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

                1 Reply Last reply
                0
                • W Offline
                  W Offline
                  wernsen
                  wrote on last edited by
                  #8

                  yes it seams to work!! :)

                  1 Reply Last reply
                  0
                  • W Offline
                    W Offline
                    wernsen
                    wrote on last edited by
                    #9

                    THANK YOU!

                    continuing coding

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      mlong
                      wrote on last edited by
                      #10

                      Be sure and update the thread title to add [Solved]. Thanks!

                      Software Engineer
                      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

                      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