I am sending
std::string cmdStr = "setxkbmap us";
int res = system( cmdStr.c_str() );
and the result is
res: 65280
What can be the problem?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That value indicates that the child process exited normally with a value of 255.
This could happen if:
/bin/shcouldn’t findsetxkbmap. (note: I might be wrong on this one. On my PC,/bin/shreturns 127 in that case.)setxkbmapcouldn’t open the X server at$DISPLAY, including if DISPLAY is unsetI’m sure that there are many other possibilities. Check stdout for error messages.
When interpreting the return value from
systemon Linux, do this: