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. Shutdown remotly linux by qt app
Forum Updated to NodeBB v4.3 + New Features

Shutdown remotly linux by qt app

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 4 Posters 690 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.
  • D Offline
    D Offline
    Damian7546
    wrote on last edited by
    #1

    Hi,
    Like in topic. How shutdown remotly linux by qt app ? In my private network I have a linux Debian accesed from IP/SSH.

    jsulmJ 1 Reply Last reply
    0
    • D Damian7546

      Hi,
      Like in topic. How shutdown remotly linux by qt app ? In my private network I have a linux Debian accesed from IP/SSH.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Damian7546 You can execute following command:

      shutdown -h now
      

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      D 1 Reply Last reply
      3
      • D Damian7546 has marked this topic as solved on
      • jsulmJ jsulm

        @Damian7546 You can execute following command:

        shutdown -h now
        
        D Offline
        D Offline
        Damian7546
        wrote on last edited by
        #3

        @jsulm But how execute this command on remote machine from local machine with qt app?

        JonBJ 1 Reply Last reply
        0
        • D Damian7546

          @jsulm But how execute this command on remote machine from local machine with qt app?

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

          @Damian7546
          Unless you are using QtRemoteObjects I don't think that is a Qt-related question. If you mean you can execute commands on the remote from the local via ssh then Qt's QProcess allows (local) OS commands to be run.

          D 1 Reply Last reply
          1
          • JonBJ JonB

            @Damian7546
            Unless you are using QtRemoteObjects I don't think that is a Qt-related question. If you mean you can execute commands on the remote from the local via ssh then Qt's QProcess allows (local) OS commands to be run.

            D Offline
            D Offline
            Damian7546
            wrote on last edited by
            #5

            @JonB I feel we don't understand each other.
            I have a computer with ip address 192.168.1.50 with qt app. In this app I need write code which one will be shutdown the computer with Linux with ip addres: 192.168.1.51 ? It is possible ?How do this ?

            SGaistS 1 Reply Last reply
            0
            • D Damian7546

              @JonB I feel we don't understand each other.
              I have a computer with ip address 192.168.1.50 with qt app. In this app I need write code which one will be shutdown the computer with Linux with ip addres: 192.168.1.51 ? It is possible ?How do this ?

              SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Damian7546 Hi,

              The most simple would be to use QProcess and use ssh to execute the command on the remote node.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              JonBJ 1 Reply Last reply
              1
              • SGaistS SGaist

                @Damian7546 Hi,

                The most simple would be to use QProcess and use ssh to execute the command on the remote node.

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

                @SGaist said in Shutdown remotly linux by qt app:

                @Damian7546 Hi,

                The most simple would be to use QProcess and use ssh to execute the command on the remote node.

                Which is 100% what I said :)

                @Damian7546
                If you mean you can go into a shell and use ssh to invoke the shutdown command for a remote machine then you can do that from a Qt program via QProcess.

                If you mean anything else please clarify what you expect to do,.

                1 Reply Last reply
                1

                • Login

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