![]() To capture a screenshot of a page, use the -screenshot flag: chrome -headless -disable-gpu -screenshot Ĭhrome -headless -disable-gpu -screenshot -window-size = 1280,1696 Ĭhrome -headless -disable-gpu -screenshot -window-size = 412,732 The -print-to-pdf flag creates a PDF of the page: chrome -headless -disable-gpu -print-to-pdf # Taking screenshots The -dump-dom flag prints to stdout: chrome -headless -disable-gpu -dump-dom # Create a PDF There are some useful command line flags to perform common tasks. In some cases, you may not need to programmatically script Headless Chrome. If you're on the stable channel of Chrome and cannot get the Beta, I recommend using chrome-canary: alias chrome = "/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"Īlias chrome-canary = "/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary"Īlias chromium = "/Applications/Chromium.app/Contents/MacOS/Chromium"ĭownload Chrome Canary here. Since I'm on Mac, I created convenient aliases for each version of Chrome that I have installed. The exact location will vary from platform to platform. See /737678.Ĭhrome should point to your installation of Chrome. The left over files can take some space, if you don't plan on installing the Chrome browser again soon then you can issue the second command too which will take care of the left over files and will delete it from the system doing a clean uninstall.Note: Right now, you'll also want to include the -disable-gpu flag if you're running on Windows. The first command will do the uninstallation of Google Chrome but will leave some configuration related files on your system. Sudo apt-get purge google-chrome-stable sudo apt-get autoremove To uninstall Google Chrome from your Ubuntu machine just enter 2 commands in the Terminal: Uninstall Google Chrome from Ubuntu 16.04 Right click on it and select the "Lock to Launcher" option. To do this, when you the browser is launched from the Terminal, you should be able to see the Chrome logo in the Unity bar. If you plan to use Chrome frequently then you should also consider adding the shortcut for it in the Unity bar (side menu bar). ![]() To launch Chrome browser, use the command: google-chrome You browser should like the image below.The downloaded file will be around 56 MB and will install itself once the second command is issued. Sudo apt-get update sudo apt-get install google-chrome-stable You Terminal should something like the image below. Now, to install the Chrome browser enter the below 2 commands in the terminal:.Sudo sh -c 'echo "deb stable main" > /etc/apt//google.list'This won't give you any return response but that is okay. Now setup the repository with the below command:.You should get a response "OK" as shown in the image. To do this, in the Terminal paste this and enter: You can use the "Search Your Computer" feature present in the left top corner to launch the Terminal or you can just use the combination "Ctrl+Alt+T". The Overview section will show you the basic details of your system which will also include the details about the bit version of your PC. To check if your system is 64 bit or not, click on the Power button at the top right corner and go to "About This Computer". Before we proceed, you need to know that Google Chrome can be installed only on 64-bit computers. Just follow a few simple steps mentioned below and before you know it Google Chrome browser will be open on your system ready to serve. Don't fret though, you don't need to know any technical terms or coding to do this. It is just that this cannot be done from the Ubuntu Software Center and rather has to be done by downloading the installer locally and then installing it, all this will command line. Google Chrome is a freeware and can easily be downloaded and installed on a Ubuntu machine.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |