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. sudo -S
Forum Updated to NodeBB v4.3 + New Features

sudo -S

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 217 Views 3 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.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1
       -S, --stdin
                   Write the prompt to the standard error and read the
                   password from the standard input instead of using the
                   terminal device.
    

    How to write the above (c++) including "standard input"?

    Can I use (read from) lineEdit as "standard input" ?
    I am trying to bypass user need to input password..

    kshegunovK 1 Reply Last reply
    0
    • A Anonymous_Banned275
         -S, --stdin
                     Write the prompt to the standard error and read the
                     password from the standard input instead of using the
                     terminal device.
      

      How to write the above (c++) including "standard input"?

      Can I use (read from) lineEdit as "standard input" ?
      I am trying to bypass user need to input password..

      kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by kshegunov
      #2

      @AnneRanch said in sudo -S:

      How to write the above (c++) including "standard input"?

      I don't follow.
      Also quotations are not used, these are very real objects, not just terms:
      https://en.wikipedia.org/wiki/Standard_streams

      Can I use (read from) lineEdit as "standard input" ?

      No. You can read/write the standard input/output with Qt by attaching to the corresponding C++ handle (set up by the runtime).

      QTextStream in(stdin);     //< Standard input
      QTextStream out(stdout);   //< Standard output
      QTextStream err(stderr);   //< Standard error
      

      Read and abide by the Qt Code of Conduct

      Axel SpoerlA 1 Reply Last reply
      0
      • kshegunovK kshegunov

        @AnneRanch said in sudo -S:

        How to write the above (c++) including "standard input"?

        I don't follow.
        Also quotations are not used, these are very real objects, not just terms:
        https://en.wikipedia.org/wiki/Standard_streams

        Can I use (read from) lineEdit as "standard input" ?

        No. You can read/write the standard input/output with Qt by attaching to the corresponding C++ handle (set up by the runtime).

        QTextStream in(stdin);     //< Standard input
        QTextStream out(stdout);   //< Standard output
        QTextStream err(stderr);   //< Standard error
        
        Axel SpoerlA Online
        Axel SpoerlA Online
        Axel Spoerl
        Moderators
        wrote on last edited by
        #3

        I don’t know, Anne, how often we have told you: Don’t spam this forum by asking th same question multiple times, while ignoring helpful answers in other posts. You were told here, to use /etc/sudoers to prevent the password interaction. If you choose to ignore advice, that’s fine. Just don’t ask the same question again.

        Software Engineer
        The Qt Company, Oslo

        1 Reply Last reply
        2

        • Login

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