{"id":60,"date":"2013-02-26T15:18:56","date_gmt":"2013-02-26T15:18:56","guid":{"rendered":"http:\/\/xilexio.org\/?p=60"},"modified":"2013-09-02T11:27:51","modified_gmt":"2013-09-02T11:27:51","slug":"standalone-chrome-on-linux-without-root","status":"publish","type":"post","link":"https:\/\/xilexio.eu.org\/?p=60","title":{"rendered":"Standalone Chrome on linux without root"},"content":{"rendered":"<p>I had a problem &#8211; I had Chromium 21 installed on a PLD Linux system I was using. It was pretty unstable and crashed often, especially when using <a title=\"Pig Toolbox\" href=\"https:\/\/chrome.google.com\/webstore\/detail\/pig-toolbox-super-gesture\/oiplkfaidhjklglajdpfehoagkmlcakh?hl=en\" target=\"_blank\">Pig Toolbox<\/a>\u00a0plugin with it. I decided to get my own version directly from <a title=\"Google Chrome\" href=\"https:\/\/www.google.com\/intl\/en\/chrome\/browser\/\" target=\"_blank\">Google<\/a>, but there was a problem: I didn&#8217;t have root rights to install it. I will describe how I resolved this problem.<\/p>\n<p>First, I downloaded a .deb x64 package from Google Chrome download site and extracted it with command:<\/p>\n<pre class=\"snippet-code\">dpkg -x google-chrome-stable_current_amd64.deb chrome<\/pre>\n<p>Extracted folder &#8220;chrome&#8221; had 3 folders: etc, opt and usr. Interesting stuff &#8211; binary files &#8211; are in opt\/google\/chrome. In a perfect world, we could just move opt\/google\/chrome anywhere and run Chrome with .\/chrome command inside that directory. But, I got following error:<\/p>\n<pre class=\"snippet-code\">.\/chrome: error while loading shared libraries: libudev.so.0: cannot open shared object file: No such file or directory<\/pre>\n<p>I used pretty dirty way to resolve that problem. I just made a symlink libudev.so.0\u00a0in chrome&#8217;s directory pointing at libudev library that was already installed in the system:<\/p>\n<pre class=\"snippet-code\">ln -s \/usr\/lib64\/libudev.so libudev.so.0<\/pre>\n<p>In your case, you&#8217;ll probably want to do a similar thing for any libraries chrome can&#8217;t find, but you have them installed in your system (of course everything might crash if library version isn&#8217;t supported by Chrome). You might have to download some missing libraries too and put a symlink to them in Chrome&#8217;s folder. After getting rid of library problems, I got following error:<\/p>\n<pre class=\"snippet-code\">[3880:3880:0226\/160426:FATAL:zygote_host_impl_linux.cc(125)] The SUID sandbox helper binary is missing: \/opt\/google\/chrome\/chrome-sandbox Aborting now.<\/pre>\n<p>As I read on forums later, It turns out that Google Chrome&#8217;s sandbox is implemented in a pretty bad way &#8211; it even has hardcoded paths in it. Essentially, that means that standalone Chrome won&#8217;t \u00a0run with sandbox. Fortunately, one can resolve this by using &#8211;no-sandbox option:<\/p>\n<pre class=\"snippet-code\">.\/chrome --no-sandbox<\/pre>\n<p>Now it runs perfectly. To complete everything, I made a script for myself (below) to run Chrome and binded a key for it. I moved my Chrome to ~\/bin\/chrome, so modify the path as you wish. I recommend putting absolute path here, so that the script will run from anywhere.<\/p>\n<pre class=\"snippet-code\">#!\/bin\/bash\r\ncd ~\/bin\/chrome\r\n.\/chrome --no-sandbox --disk-cache-size=50000000 --allow-outdated-plugins<\/pre>\n<p>&#8211;disk-cache-size is an options that limits cache size in bytes (50MB above). Chrome can use quite a bit of cache &#8211; in my case over 0.5GB. I used &#8211;allow-outdated-plugins for old flash\/java plugins installed on my system to work.<\/p>\n<p>Warning: not using a sandbox is a security vunerability. Don&#8217;t use it if security is important in your environment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had a problem &#8211; I had Chromium 21 installed on a PLD Linux system I was using. It was pretty unstable and crashed often, especially when using Pig Toolbox\u00a0plugin with it. I decided to get my own version directly from Google, but there was a problem: I didn&#8217;t have root rights to install it. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[10,11],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/xilexio.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/60"}],"collection":[{"href":"https:\/\/xilexio.eu.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xilexio.eu.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xilexio.eu.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xilexio.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=60"}],"version-history":[{"count":0,"href":"https:\/\/xilexio.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/60\/revisions"}],"wp:attachment":[{"href":"https:\/\/xilexio.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=60"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xilexio.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=60"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xilexio.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=60"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}