Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Cannot change to working directory «...»: file or directory not found
QtWS25 Last Chance

Cannot change to working directory «...»: file or directory not found

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
6 Posts 2 Posters 1.1k Views
  • 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
    alexanderzhirov
    wrote on last edited by alexanderzhirov
    #1

    Installed Lubuntu 20.04.02, installed Qt Creator 4.14.0 based on Qt 5.15.2. All settings are fine, compilers/assemblers/debuggers are configured. I am creating a project with terminal support. In system settings, x-terminal-emulator is installed with the -e parameter. Lubuntu itself has the qterminal terminal, the only one. I'm trying to put together a trivial project with the ability to enter data - the build is successful:

    #include <iostream>
    
    using namespace std;
    
    int main()
    {
        int a = 0;
        cout << "Enter value: " << endl;
        cin >> a;
        cout << "a = " << a << endl;
        return 0;
    }
    

    I am trying to run a project - I get an error in the application output:

    Cannot change to working directory «/home/user/Programming/build-test-Desktop_Qt_5_15_2_GCC_64bit-Debug»: file or directory not found
    

    1

    2

    3

    As I understand it, the problem is not new and I want to solve it without resorting to installing additional terminal emulators ... I ask for help from the knowledgeable.

    P.S. In other IDE's, everything is compiled and run in an embedded terminal.

    JonBJ 1 Reply Last reply
    0
    • A alexanderzhirov

      Installed Lubuntu 20.04.02, installed Qt Creator 4.14.0 based on Qt 5.15.2. All settings are fine, compilers/assemblers/debuggers are configured. I am creating a project with terminal support. In system settings, x-terminal-emulator is installed with the -e parameter. Lubuntu itself has the qterminal terminal, the only one. I'm trying to put together a trivial project with the ability to enter data - the build is successful:

      #include <iostream>
      
      using namespace std;
      
      int main()
      {
          int a = 0;
          cout << "Enter value: " << endl;
          cin >> a;
          cout << "a = " << a << endl;
          return 0;
      }
      

      I am trying to run a project - I get an error in the application output:

      Cannot change to working directory «/home/user/Programming/build-test-Desktop_Qt_5_15_2_GCC_64bit-Debug»: file or directory not found
      

      1

      2

      3

      As I understand it, the problem is not new and I want to solve it without resorting to installing additional terminal emulators ... I ask for help from the knowledgeable.

      P.S. In other IDE's, everything is compiled and run in an embedded terminal.

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

      @alexanderzhirov

      In system settings, x-terminal-emulator is installed with the -e parameter. Lubuntu itself has the qterminal terminal, the only one.

      Confirm how you have set to run qterminal -e? You are saying you have done this, aren't you?

      If you don't get a better answer (and I don't think you will!) I would:

      • Verify you can run qterminal as a command, and verify you can run qterminal -e ls or similar.

      • Temporarily replace qterminal -e from being the terminal command with something which prints exactly whatever it receives on the command line to a log file so we can see just what the full command line Creator is generating reads. I don't know why a problem at the executable level would cause "your directory not found", but let's see if it gets as far as your log.

      A 1 Reply Last reply
      0
      • JonBJ JonB

        @alexanderzhirov

        In system settings, x-terminal-emulator is installed with the -e parameter. Lubuntu itself has the qterminal terminal, the only one.

        Confirm how you have set to run qterminal -e? You are saying you have done this, aren't you?

        If you don't get a better answer (and I don't think you will!) I would:

        • Verify you can run qterminal as a command, and verify you can run qterminal -e ls or similar.

        • Temporarily replace qterminal -e from being the terminal command with something which prints exactly whatever it receives on the command line to a log file so we can see just what the full command line Creator is generating reads. I don't know why a problem at the executable level would cause "your directory not found", but let's see if it gets as far as your log.

        A Offline
        A Offline
        alexanderzhirov
        wrote on last edited by alexanderzhirov
        #3

        @JonB said in Cannot change to working directory «...»: file or directory not found:

        Confirm how you have set to run qterminal -e? You are saying you have done this, aren't you?

        Yes, I set qterminal directly.

        @JonB said in Cannot change to working directory «...»: file or directory not found:

        Verify you can run qterminal as a command, and verify you can run qterminal -e ls or similar.

        user@vb:~$ qterminal -e ls
        Properties constructor called
        TRANSLATIONS_DIR: Loading translation file "qterminal_ru_RU.qm" from dir /usr/share/qterminal/translations
        load success: true
        Icon theme "elementary" not found.
        QDir::exists: Empty or null file name
        QDir::exists: Empty or null file name
        Canot open file "/home/user/.config/qterminal.org/qterminal_bookmarks.xml"
        Trying to load translation file from dir "/usr/share/Lubuntu"
        Trying to load translation file from dir "/usr/local/share"
        Trying to load translation file from dir "/usr/share"
        Trying to load translation file from dir "/var/lib/snapd/desktop"
        Trying to load translation file from dir "/usr/share/qtermwidget5/translations"
        default KB_LAYOUT_DIR:  "/usr/share/qtermwidget5/kb-layouts"
        loadAllColorSchemes
        Shell program: "ls"
        ("ls")
        Properties destructor called
        user@vb:~$ qterminal -e /home/user/Programming/build-test-Desktop_Qt_5_15_2_GCC_64bit-Debug/test 
        Properties constructor called
        TRANSLATIONS_DIR: Loading translation file "qterminal_ru_RU.qm" from dir /usr/share/qterminal/translations
        load success: true
        Icon theme "elementary" not found.
        QDir::exists: Empty or null file name
        QDir::exists: Empty or null file name
        Canot open file "/home/user/.config/qterminal.org/qterminal_bookmarks.xml"
        Trying to load translation file from dir "/usr/share/Lubuntu"
        Trying to load translation file from dir "/usr/local/share"
        Trying to load translation file from dir "/usr/share"
        Trying to load translation file from dir "/var/lib/snapd/desktop"
        Trying to load translation file from dir "/usr/share/qtermwidget5/translations"
        default KB_LAYOUT_DIR:  "/usr/share/qtermwidget5/kb-layouts"
        loadAllColorSchemes
        Shell program: "/home/user/Programming/build-test-Desktop_Qt_5_15_2_GCC_64bit-Debug/test"
        ("/home/user/Programming/build-test-Desktop_Qt_5_15_2_GCC_64bit-Debug/test")
        

        My program requested data entry and executed successfully.

        Properties destructor called
        user@vb:~$
        

        @JonB said in Cannot change to working directory «...»: file or directory not found:

        Temporarily replace qterminal -e from being the terminal command with something which prints exactly whatever it receives on the command line to a log file so we can see just what the full command line Creator is generating reads. I don't know why a problem at the executable level would cause "your directory not found", but let's see if it gets as far as your log.

        I don't quite understand what you mean. But I can launch Qt Creator through the terminal and get the output of messages to the terminal when I run my program:

        user@vb:~$ qtcreator
        Properties constructor called
        TRANSLATIONS_DIR: Loading translation file "qterminal_ru_RU.qm" from dir /usr/share/qterminal/translations
        load success: true
        Icon theme "elementary" not found.
        QDir::exists: Empty or null file name
        QDir::exists: Empty or null file name
        Canot open file "/home/user/.config/qterminal.org/qterminal_bookmarks.xml"
        Trying to load translation file from dir "/usr/share/Lubuntu"
        Trying to load translation file from dir "/usr/local/share"
        Trying to load translation file from dir "/usr/share"
        Trying to load translation file from dir "/var/lib/snapd/desktop"
        Trying to load translation file from dir "/usr/share/qtermwidget5/translations"
        default KB_LAYOUT_DIR:  "/usr/share/qtermwidget5/kb-layouts"
        loadAllColorSchemes
        Shell program: "/opt/Qt/Tools/QtCreator/bin/../libexec/qtcreator/qtcreator_process_stub run /tmp/QtCreator.ZPtjNF/stub-socket Для закрытия данного окна нажмите <ВВОД>... /home/user/Programming/build-test-Desktop_Qt_5_15_2_GCC_64bit-Debug /tmp/QtCreator.kcxFmh 1130 /home/user/Programming/build-test-Desktop_Qt_5_15_2_GCC_64bit-Debug/test"
        ("/opt/Qt/Tools/QtCreator/bin/../libexec/qtcreator/qtcreator_process_stub", "run", "/tmp/QtCreator.ZPtjNF/stub-socket", "Для", "закрытия", "данного", "окна", "нажмите", "<ВВОД>...", "/home/user/Programming/build-test-Desktop_Qt_5_15_2_GCC_64bit-Debug", "/tmp/QtCreator.kcxFmh", "1130", "/home/user/Programming/build-test-Desktop_Qt_5_15_2_GCC_64bit-Debug/test")
        Invalid run control state transition from  "RunControlState::Starting"  to  "RunControlState::Stopped"
        Properties destructor called
        
        JonBJ 1 Reply Last reply
        0
        • A alexanderzhirov

          @JonB said in Cannot change to working directory «...»: file or directory not found:

          Confirm how you have set to run qterminal -e? You are saying you have done this, aren't you?

          Yes, I set qterminal directly.

          @JonB said in Cannot change to working directory «...»: file or directory not found:

          Verify you can run qterminal as a command, and verify you can run qterminal -e ls or similar.

          user@vb:~$ qterminal -e ls
          Properties constructor called
          TRANSLATIONS_DIR: Loading translation file "qterminal_ru_RU.qm" from dir /usr/share/qterminal/translations
          load success: true
          Icon theme "elementary" not found.
          QDir::exists: Empty or null file name
          QDir::exists: Empty or null file name
          Canot open file "/home/user/.config/qterminal.org/qterminal_bookmarks.xml"
          Trying to load translation file from dir "/usr/share/Lubuntu"
          Trying to load translation file from dir "/usr/local/share"
          Trying to load translation file from dir "/usr/share"
          Trying to load translation file from dir "/var/lib/snapd/desktop"
          Trying to load translation file from dir "/usr/share/qtermwidget5/translations"
          default KB_LAYOUT_DIR:  "/usr/share/qtermwidget5/kb-layouts"
          loadAllColorSchemes
          Shell program: "ls"
          ("ls")
          Properties destructor called
          user@vb:~$ qterminal -e /home/user/Programming/build-test-Desktop_Qt_5_15_2_GCC_64bit-Debug/test 
          Properties constructor called
          TRANSLATIONS_DIR: Loading translation file "qterminal_ru_RU.qm" from dir /usr/share/qterminal/translations
          load success: true
          Icon theme "elementary" not found.
          QDir::exists: Empty or null file name
          QDir::exists: Empty or null file name
          Canot open file "/home/user/.config/qterminal.org/qterminal_bookmarks.xml"
          Trying to load translation file from dir "/usr/share/Lubuntu"
          Trying to load translation file from dir "/usr/local/share"
          Trying to load translation file from dir "/usr/share"
          Trying to load translation file from dir "/var/lib/snapd/desktop"
          Trying to load translation file from dir "/usr/share/qtermwidget5/translations"
          default KB_LAYOUT_DIR:  "/usr/share/qtermwidget5/kb-layouts"
          loadAllColorSchemes
          Shell program: "/home/user/Programming/build-test-Desktop_Qt_5_15_2_GCC_64bit-Debug/test"
          ("/home/user/Programming/build-test-Desktop_Qt_5_15_2_GCC_64bit-Debug/test")
          

          My program requested data entry and executed successfully.

          Properties destructor called
          user@vb:~$
          

          @JonB said in Cannot change to working directory «...»: file or directory not found:

          Temporarily replace qterminal -e from being the terminal command with something which prints exactly whatever it receives on the command line to a log file so we can see just what the full command line Creator is generating reads. I don't know why a problem at the executable level would cause "your directory not found", but let's see if it gets as far as your log.

          I don't quite understand what you mean. But I can launch Qt Creator through the terminal and get the output of messages to the terminal when I run my program:

          user@vb:~$ qtcreator
          Properties constructor called
          TRANSLATIONS_DIR: Loading translation file "qterminal_ru_RU.qm" from dir /usr/share/qterminal/translations
          load success: true
          Icon theme "elementary" not found.
          QDir::exists: Empty or null file name
          QDir::exists: Empty or null file name
          Canot open file "/home/user/.config/qterminal.org/qterminal_bookmarks.xml"
          Trying to load translation file from dir "/usr/share/Lubuntu"
          Trying to load translation file from dir "/usr/local/share"
          Trying to load translation file from dir "/usr/share"
          Trying to load translation file from dir "/var/lib/snapd/desktop"
          Trying to load translation file from dir "/usr/share/qtermwidget5/translations"
          default KB_LAYOUT_DIR:  "/usr/share/qtermwidget5/kb-layouts"
          loadAllColorSchemes
          Shell program: "/opt/Qt/Tools/QtCreator/bin/../libexec/qtcreator/qtcreator_process_stub run /tmp/QtCreator.ZPtjNF/stub-socket Для закрытия данного окна нажмите <ВВОД>... /home/user/Programming/build-test-Desktop_Qt_5_15_2_GCC_64bit-Debug /tmp/QtCreator.kcxFmh 1130 /home/user/Programming/build-test-Desktop_Qt_5_15_2_GCC_64bit-Debug/test"
          ("/opt/Qt/Tools/QtCreator/bin/../libexec/qtcreator/qtcreator_process_stub", "run", "/tmp/QtCreator.ZPtjNF/stub-socket", "Для", "закрытия", "данного", "окна", "нажмите", "<ВВОД>...", "/home/user/Programming/build-test-Desktop_Qt_5_15_2_GCC_64bit-Debug", "/tmp/QtCreator.kcxFmh", "1130", "/home/user/Programming/build-test-Desktop_Qt_5_15_2_GCC_64bit-Debug/test")
          Invalid run control state transition from  "RunControlState::Starting"  to  "RunControlState::Stopped"
          Properties destructor called
          
          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #4

          @alexanderzhirov
          Yeah, the console output you have just pasted is doubtless the issue. It may have nothing to do with qterminal vs xterm, or anything else. I don't know why though. Ensure you can create that path, though I'm sure you can.

          Which then takes you all the way back to xterm after all via https://stackoverflow.com/questions/14010521/cannot-connect-creator-comm-socket-tmp-qt-temp-jh2103-stub-socket-no-such-file

          I think you're on your own figuring why qterminal is problematic....

          P.S.
          https://bugreports.qt.io/browse/QTCREATORBUG-6007 from 2011.

          Everybody ends up using /usr/bin/xterm -e :)

          A 1 Reply Last reply
          1
          • JonBJ JonB

            @alexanderzhirov
            Yeah, the console output you have just pasted is doubtless the issue. It may have nothing to do with qterminal vs xterm, or anything else. I don't know why though. Ensure you can create that path, though I'm sure you can.

            Which then takes you all the way back to xterm after all via https://stackoverflow.com/questions/14010521/cannot-connect-creator-comm-socket-tmp-qt-temp-jh2103-stub-socket-no-such-file

            I think you're on your own figuring why qterminal is problematic....

            P.S.
            https://bugreports.qt.io/browse/QTCREATORBUG-6007 from 2011.

            Everybody ends up using /usr/bin/xterm -e :)

            A Offline
            A Offline
            alexanderzhirov
            wrote on last edited by alexanderzhirov
            #5

            @JonB said in Cannot change to working directory «...»: file or directory not found:

            Everybody ends up using /usr/bin/xterm -e :)

            Yes, i know it:)

            1

            But need to understand why this does not work with QTerminal. On github, they believe that it has nothing to do with it.

            The question is still open.

            1 Reply Last reply
            0
            • A Offline
              A Offline
              alexanderzhirov
              wrote on last edited by
              #6

              Created a bug report.

              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