I get error when I want to execute my program from /home

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I have compiled my code in this path : /home/m/ChatScript-master/SRC and created executable file myapp .



I can run it from inside the SRC folder like ./myapp. But when I try /home/m/ChatScript-master/SRC/myapp from my /home/m it gives me:



 in cs_init.txt at 0: 
Error opening utf8writeappend file LOGS/startlog.txt: No such file or directory


Why do I get this error message?



My main problem is that, I want to build a kiosk like system and want to add my executable file inside : /home/m/.config/openbox/autostart like this:



$ cat /home/m/.config/openbox/autostart 
echo 7 > /tmp/yy
/home/m/ChatScript-master/SRC/myapp &
echo 8 > /tmp/yy2


But it doesn't work!
I could do it already with other programs, but this program gives me this error!



NOTE: There are some folders inside ChatScript-master directory like SRC and LOGS and my executable file is inside SRC folder.







share|improve this question

























    up vote
    0
    down vote

    favorite












    I have compiled my code in this path : /home/m/ChatScript-master/SRC and created executable file myapp .



    I can run it from inside the SRC folder like ./myapp. But when I try /home/m/ChatScript-master/SRC/myapp from my /home/m it gives me:



     in cs_init.txt at 0: 
    Error opening utf8writeappend file LOGS/startlog.txt: No such file or directory


    Why do I get this error message?



    My main problem is that, I want to build a kiosk like system and want to add my executable file inside : /home/m/.config/openbox/autostart like this:



    $ cat /home/m/.config/openbox/autostart 
    echo 7 > /tmp/yy
    /home/m/ChatScript-master/SRC/myapp &
    echo 8 > /tmp/yy2


    But it doesn't work!
    I could do it already with other programs, but this program gives me this error!



    NOTE: There are some folders inside ChatScript-master directory like SRC and LOGS and my executable file is inside SRC folder.







    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have compiled my code in this path : /home/m/ChatScript-master/SRC and created executable file myapp .



      I can run it from inside the SRC folder like ./myapp. But when I try /home/m/ChatScript-master/SRC/myapp from my /home/m it gives me:



       in cs_init.txt at 0: 
      Error opening utf8writeappend file LOGS/startlog.txt: No such file or directory


      Why do I get this error message?



      My main problem is that, I want to build a kiosk like system and want to add my executable file inside : /home/m/.config/openbox/autostart like this:



      $ cat /home/m/.config/openbox/autostart 
      echo 7 > /tmp/yy
      /home/m/ChatScript-master/SRC/myapp &
      echo 8 > /tmp/yy2


      But it doesn't work!
      I could do it already with other programs, but this program gives me this error!



      NOTE: There are some folders inside ChatScript-master directory like SRC and LOGS and my executable file is inside SRC folder.







      share|improve this question













      I have compiled my code in this path : /home/m/ChatScript-master/SRC and created executable file myapp .



      I can run it from inside the SRC folder like ./myapp. But when I try /home/m/ChatScript-master/SRC/myapp from my /home/m it gives me:



       in cs_init.txt at 0: 
      Error opening utf8writeappend file LOGS/startlog.txt: No such file or directory


      Why do I get this error message?



      My main problem is that, I want to build a kiosk like system and want to add my executable file inside : /home/m/.config/openbox/autostart like this:



      $ cat /home/m/.config/openbox/autostart 
      echo 7 > /tmp/yy
      /home/m/ChatScript-master/SRC/myapp &
      echo 8 > /tmp/yy2


      But it doesn't work!
      I could do it already with other programs, but this program gives me this error!



      NOTE: There are some folders inside ChatScript-master directory like SRC and LOGS and my executable file is inside SRC folder.









      share|improve this question












      share|improve this question




      share|improve this question








      edited May 16 at 10:06
























      asked May 16 at 9:21









      Hasani

      507




      507




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          Your program uses a relative path from the current working directory to access LOGS/startlog.txt. If there is no LOGS directory in the current directory, the application fails.



          To correct this, make sure that the application uses an absolute path for accessing the file, or change the working directory as you start the application:



          ( cd /home/m/ChatScript-master/SRC && ./myapp ) &


          ... assuming /home/m/ChatScript-master/SRC contains the needed LOGS directory.






          share|improve this answer





















          • LOGS folder is beside the SRC folder inside ChatScript-master
            – Hasani
            May 16 at 9:32










          • @Hasani Well then the current working directory probably needs to be /home/m/ChatScript-master.
            – Kusalananda
            May 16 at 9:36










          • @Hasani Or, the application changes its own working directory. It's hard for me to know. Does my suggestion work at all?
            – Kusalananda
            May 16 at 9:51










          • No, unfortunately it didn't work :(
            – Hasani
            May 16 at 9:53










          • ChatScript-master folder has some folders like SRC and LOGS. And inside the SRC is my executable file myapp. I can run myapp from inside the SRC` folder, but your suggestion didn't work
            – Hasani
            May 16 at 9:55










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f444122%2fi-get-error-when-i-want-to-execute-my-program-from-home%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote



          accepted










          Your program uses a relative path from the current working directory to access LOGS/startlog.txt. If there is no LOGS directory in the current directory, the application fails.



          To correct this, make sure that the application uses an absolute path for accessing the file, or change the working directory as you start the application:



          ( cd /home/m/ChatScript-master/SRC && ./myapp ) &


          ... assuming /home/m/ChatScript-master/SRC contains the needed LOGS directory.






          share|improve this answer





















          • LOGS folder is beside the SRC folder inside ChatScript-master
            – Hasani
            May 16 at 9:32










          • @Hasani Well then the current working directory probably needs to be /home/m/ChatScript-master.
            – Kusalananda
            May 16 at 9:36










          • @Hasani Or, the application changes its own working directory. It's hard for me to know. Does my suggestion work at all?
            – Kusalananda
            May 16 at 9:51










          • No, unfortunately it didn't work :(
            – Hasani
            May 16 at 9:53










          • ChatScript-master folder has some folders like SRC and LOGS. And inside the SRC is my executable file myapp. I can run myapp from inside the SRC` folder, but your suggestion didn't work
            – Hasani
            May 16 at 9:55














          up vote
          3
          down vote



          accepted










          Your program uses a relative path from the current working directory to access LOGS/startlog.txt. If there is no LOGS directory in the current directory, the application fails.



          To correct this, make sure that the application uses an absolute path for accessing the file, or change the working directory as you start the application:



          ( cd /home/m/ChatScript-master/SRC && ./myapp ) &


          ... assuming /home/m/ChatScript-master/SRC contains the needed LOGS directory.






          share|improve this answer





















          • LOGS folder is beside the SRC folder inside ChatScript-master
            – Hasani
            May 16 at 9:32










          • @Hasani Well then the current working directory probably needs to be /home/m/ChatScript-master.
            – Kusalananda
            May 16 at 9:36










          • @Hasani Or, the application changes its own working directory. It's hard for me to know. Does my suggestion work at all?
            – Kusalananda
            May 16 at 9:51










          • No, unfortunately it didn't work :(
            – Hasani
            May 16 at 9:53










          • ChatScript-master folder has some folders like SRC and LOGS. And inside the SRC is my executable file myapp. I can run myapp from inside the SRC` folder, but your suggestion didn't work
            – Hasani
            May 16 at 9:55












          up vote
          3
          down vote



          accepted







          up vote
          3
          down vote



          accepted






          Your program uses a relative path from the current working directory to access LOGS/startlog.txt. If there is no LOGS directory in the current directory, the application fails.



          To correct this, make sure that the application uses an absolute path for accessing the file, or change the working directory as you start the application:



          ( cd /home/m/ChatScript-master/SRC && ./myapp ) &


          ... assuming /home/m/ChatScript-master/SRC contains the needed LOGS directory.






          share|improve this answer













          Your program uses a relative path from the current working directory to access LOGS/startlog.txt. If there is no LOGS directory in the current directory, the application fails.



          To correct this, make sure that the application uses an absolute path for accessing the file, or change the working directory as you start the application:



          ( cd /home/m/ChatScript-master/SRC && ./myapp ) &


          ... assuming /home/m/ChatScript-master/SRC contains the needed LOGS directory.







          share|improve this answer













          share|improve this answer



          share|improve this answer











          answered May 16 at 9:24









          Kusalananda

          102k13199315




          102k13199315











          • LOGS folder is beside the SRC folder inside ChatScript-master
            – Hasani
            May 16 at 9:32










          • @Hasani Well then the current working directory probably needs to be /home/m/ChatScript-master.
            – Kusalananda
            May 16 at 9:36










          • @Hasani Or, the application changes its own working directory. It's hard for me to know. Does my suggestion work at all?
            – Kusalananda
            May 16 at 9:51










          • No, unfortunately it didn't work :(
            – Hasani
            May 16 at 9:53










          • ChatScript-master folder has some folders like SRC and LOGS. And inside the SRC is my executable file myapp. I can run myapp from inside the SRC` folder, but your suggestion didn't work
            – Hasani
            May 16 at 9:55
















          • LOGS folder is beside the SRC folder inside ChatScript-master
            – Hasani
            May 16 at 9:32










          • @Hasani Well then the current working directory probably needs to be /home/m/ChatScript-master.
            – Kusalananda
            May 16 at 9:36










          • @Hasani Or, the application changes its own working directory. It's hard for me to know. Does my suggestion work at all?
            – Kusalananda
            May 16 at 9:51










          • No, unfortunately it didn't work :(
            – Hasani
            May 16 at 9:53










          • ChatScript-master folder has some folders like SRC and LOGS. And inside the SRC is my executable file myapp. I can run myapp from inside the SRC` folder, but your suggestion didn't work
            – Hasani
            May 16 at 9:55















          LOGS folder is beside the SRC folder inside ChatScript-master
          – Hasani
          May 16 at 9:32




          LOGS folder is beside the SRC folder inside ChatScript-master
          – Hasani
          May 16 at 9:32












          @Hasani Well then the current working directory probably needs to be /home/m/ChatScript-master.
          – Kusalananda
          May 16 at 9:36




          @Hasani Well then the current working directory probably needs to be /home/m/ChatScript-master.
          – Kusalananda
          May 16 at 9:36












          @Hasani Or, the application changes its own working directory. It's hard for me to know. Does my suggestion work at all?
          – Kusalananda
          May 16 at 9:51




          @Hasani Or, the application changes its own working directory. It's hard for me to know. Does my suggestion work at all?
          – Kusalananda
          May 16 at 9:51












          No, unfortunately it didn't work :(
          – Hasani
          May 16 at 9:53




          No, unfortunately it didn't work :(
          – Hasani
          May 16 at 9:53












          ChatScript-master folder has some folders like SRC and LOGS. And inside the SRC is my executable file myapp. I can run myapp from inside the SRC` folder, but your suggestion didn't work
          – Hasani
          May 16 at 9:55




          ChatScript-master folder has some folders like SRC and LOGS. And inside the SRC is my executable file myapp. I can run myapp from inside the SRC` folder, but your suggestion didn't work
          – Hasani
          May 16 at 9:55












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f444122%2fi-get-error-when-i-want-to-execute-my-program-from-home%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay