Important: Please read the Qt Code of Conduct -

Qt Creator 3.5.1 stdin for command line with Deploy to Remote Linux Host

  • Hi

    [](link url)

    I am using the Remote Deploy feature of Qt Creator to launch my simple command line application on an embedded Linux target board. My application can get from the user inputs using stdin
    It crosscompiles, transfers to the board, and launches and the 'Application Output' window near the bottom of Qt Creator, but I cannot type anywhere and provide stdin to the application running remotely through Qt Creator.

    How can I accomplish this within Qt Creator? Can I somehow manipulate the deploy 'arguments' to connect a device to provide stdin to my command line app?

    I tried a solution from different forum
    [](link url)

    "I found out that there is no way to provide stdin to an app launched by qt creator from within the IDE.
    I did try a few things and it looks like a named pipe works just fine. Luckily it’s included with Busybox so it’s on my board.
    To use it you launch the app remotely from Qt Creator using the ‘Alternate executable on device’ option under ‘run settings’ and pipe the last line of the named pipe to your c++ program expecting stdin. So your ‘Alternate executable on device looks like:"

    tail -f mypipe | /home/prog//test

    this is not working for Qt creator 3.5.1 based on qt 5.5.1
    when running , getting back

    Process tail -f mypipe | /home/prog//test created; pid = 3331
    Cannot executable tail -f mypipe | /home/prog//test: No such file or directory

    • I can run the program using SSH with out any problem ( all is valid on target)
    • tried different syntax with same result: '', path in directory field at QT creator, arguments in arguments field at QT creator
    • it look like QT creator can only handle the syntax using only the exe

    any suggestions?

  • @Snat
    Solve it using different approch
    Using argv to send either cin or pathway to fifo file.
    Then using ssh remotly with echo command > myfifofile.
    My code do the rest
    Reading from file or cin

    Hope this help

Log in to reply