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

Clash 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.
ubuntu autostart
add a comment |Â
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.
ubuntu autostart
add a comment |Â
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.
ubuntu autostart
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.
ubuntu autostart
edited May 16 at 10:06
asked May 16 at 9:21
Hasani
507
507
add a comment |Â
add a comment |Â
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.
LOGSfolder is beside theSRCfolder insideChatScript-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-masterfolder has some folders likeSRCandLOGS. And inside theSRCis my executable filemyapp. I can runmyappfrom inside the SRC` folder, but your suggestion didn't work
â Hasani
May 16 at 9:55
 |Â
show 8 more comments
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.
LOGSfolder is beside theSRCfolder insideChatScript-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-masterfolder has some folders likeSRCandLOGS. And inside theSRCis my executable filemyapp. I can runmyappfrom inside the SRC` folder, but your suggestion didn't work
â Hasani
May 16 at 9:55
 |Â
show 8 more comments
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.
LOGSfolder is beside theSRCfolder insideChatScript-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-masterfolder has some folders likeSRCandLOGS. And inside theSRCis my executable filemyapp. I can runmyappfrom inside the SRC` folder, but your suggestion didn't work
â Hasani
May 16 at 9:55
 |Â
show 8 more comments
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.
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.
answered May 16 at 9:24
Kusalananda
102k13199315
102k13199315
LOGSfolder is beside theSRCfolder insideChatScript-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-masterfolder has some folders likeSRCandLOGS. And inside theSRCis my executable filemyapp. I can runmyappfrom inside the SRC` folder, but your suggestion didn't work
â Hasani
May 16 at 9:55
 |Â
show 8 more comments
LOGSfolder is beside theSRCfolder insideChatScript-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-masterfolder has some folders likeSRCandLOGS. And inside theSRCis my executable filemyapp. I can runmyappfrom 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
 |Â
show 8 more comments
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password