First some background: I already succeeded to play with CEF on windows.
Now that I need to port my project on linux, I faced a looooot of issues (never really tried linux until few weeks for this project ^^). I'm sorry by advance if the problem come from my limited knowledge on this plateform
My project is a gtk+ gui application that I build with code::blocks.
I successfully linked cef on it and I was really happy to see the method CefInitialize returning true .
However, I saw no browser in my window.
By looking at the debug.log, I have this error:
[0624/143514:ERROR:browser_main_loop.cc(217)] Running without the SUID sandbox! See https://chromium.googlesource.com/chrom ... lopment.md for more information on developing with the sandbox on.
Tried to have a look on the page, on some other on the internet but... still not working.
- Code: Select all
void Cef_Client_App::OnBeforeCommandLineProcessing(const CefString& process_type, CefRefPtr< CefCommandLine > command_line)
{
command_line->AppendSwitch("no-sandbox");
command_line->AppendSwitch("disable-setuid-sandbox");
}
No effect
Adding --no-sandbox as argument when the app is debugged: No effect
The last thing I tried was: I have cefsimple and cefclient working well, no error like this. So I looked in the makelists files and saw SET_LINUX_SUID_PERMISSIONS.
I magically found something on the internet:
- Code: Select all
macro(SET_LINUX_SUID_PERMISSIONS target executable)
add_custom_command(
TARGET ${target}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E echo ""
COMMAND ${CMAKE_COMMAND} -E echo "*** Run the following command manually to set SUID permissions ***"
COMMAND ${CMAKE_COMMAND} -E echo "EXE=\"${executable}\" && sudo -- chown root:root $EXE && sudo -- chmod 4755 $EXE"
COMMAND ${CMAKE_COMMAND} -E echo ""
VERBATIM
)
endmacro()
But I don't understand exactly this command (don't know anyway if it's still used).
So I tried to use chmod (on both my app and chrome-sandbox) with 4755
But still the error message.
On the chromium help page they say to use build/update-linux-sandbox.sh, but I don't see this file.
Is there something I missed or I did wrong ?
Also, does the end user (not on my dev machine) will need to set something like this ?
Many thanks,