- Arch Linux
- #1 2015-04-20 11:01:06
- Chromium as root
- #2 2015-04-20 11:20:19
- Re: Chromium as root
- #3 2015-04-20 11:23:36
- Re: Chromium as root
- #4 2015-04-20 12:04:31
- Re: Chromium as root
- #5 2015-04-20 12:39:26
- Re: Chromium as root
- Как запустить Google Chrome от имени root в Linux
- How to Run Google Chromium Browser in Kali Linux as Root User [Fixed] 2021
- Why Chromium Browser Not Working in Kali Linux?
- How to Run Google Chromium Browser in Kali Linux as Root User
- Using Terminal – Method 1
- Editing default-flags file in chromium.d – Method 2
- Replacing default-flags – Method 3
- Watch How to Fix Chromium not working in Kali Linux problem
- How to run google chrome as root in linux
- 8 Answers 8
- Chromium
- Contents
- Installation
- Configuration
- Default applications
- Certificates
- Making flags persistent
- Force GPU acceleration
- Hardware video acceleration
- Tips and tricks
- PDF viewer plugin
- Flash Player plugin
- Native Wayland support
- Tips and tricks
- Browsing experience
- chrome:// URLs
- Chromium task manager
- Chromium overrides/overwrites Preferences file
- Search engines
- Tmpfs
- Launch a new browser instance
- Directly open *.torrent files and magnet links with a torrent client
- Touch Scrolling on touchscreen devices
- Reduce memory usage
- User Agent
- DOM Distiller
- Forcing specific GPU
- Import bookmarks from Firefox
- Enabling native notifications
- U2F authentication
- Dark mode
- Profile maintenance
- Security
- Disable JIT
- WebRTC
- SSL certificates
- Canvas Fingerprinting
- Privacy extensions
- Do Not Track
- Force a password store
- Troubleshooting
- Fonts
- Tab font size is too large
- WebGL
- Incorrect HiDPI rendering
- Password prompt on every start with GNOME Keyring
- Chromecasts in the network are not discovered
- Everything is syncing except for password
- Losing cookies and passwords when switching between desktop environments
- Hang on startup when Google Sync enabled
- Chromium asks to be set as the default browser every time it starts
- «This browser or app may not be secure» error logging in to Google
- Chromium stuck at 60fps when using a 144Hz + 60Hz monitor
- Chromium low scroll speed
Arch Linux
You are not logged in.
#1 2015-04-20 11:01:06
Chromium as root
I need to run chromium as root. After the latest update (42.0.2311.90) I cannot do it.
The error is this:
I have tried putting the
and none of these work. I always get the same error response that I linked.
Another thing that is weird, is that when I run it from command line and keep it running, and doing a
I don’t understand why i get the user-data-dir to be pointing at /home/user/ when I run it as root.
Last edited by stukov (2015-04-20 11:02:39)
#2 2015-04-20 11:20:19
Re: Chromium as root
I need to run chromium as root
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. — Trilby
#3 2015-04-20 11:23:36
Re: Chromium as root
I forgot to get permission from you.
Sorry mate.
#4 2015-04-20 12:04:31
Re: Chromium as root
Welcome to the Arch forums!
Wanting to run something like a web browser as root is very unusual, so the link Alad posted is more than an intermediately appropriate answer to your question.
Consequently, telling us a little more about why you seek to run chromium as root would be appreciated.
EDIT
But to give at least some useful information:
I don’t know the inner workings of Chrome/chromium, but if it really does what it appears to be doing, it will always fail if run as root.
Last edited by ayekat (2015-04-20 12:07:40)
#5 2015-04-20 12:39:26
Re: Chromium as root
I don’t know the inner workings of Chrome/chromium, but if it really does what it appears to be doing, it will always fail if run as root.
I was affraid of that but I was thinking there would exist some simple bypass to that, that would be as simple as «chromium —user-data-dir».
The fact that it is very unusual does not justify the way Alad responded. Your response is indeed polite, his was quarrelsome, and this is why I am going to explain this to you.
I run everything at my desktop as root, as I am a network engineer, a network driver developer and tester for Linux and BSD.
I need to use raw sockets all the time and I also need to use internally developed chrome plugins that need to be run with elevated privileges through chrome. Yes, I can use sudo and yes I know what linux can offer regarding privilege elevation. However, errors regarding privileges at my programs may not have a direct visible error message and that might lead to huge work-hours loss.
This is the reason that I want to run as root, I have been doing this for the last 10+ years, I know that this represents a security vulnerability and I have accepted the risk. I don’t need any more lectures about it, I have discussed about this alot and I am not interested in other people opinions about that, although I respect them. I don’t propagandize why I believe it’s an unecessary overhead for developers, network engineers and/or other professions to run their applications as non root. I expect the same behavior about other people that I ask for their help. It is really simple to just *NOT* reply to a forum post instead of saying something like «don’t do that (implying ‘don’t do that because I don’t and no-one else does’)» and providing **ZERO** contribution to what the OP (me) is actually asking.
I would really appreciate to get an answer from someone that indeed cares to help me solve my problem.
Last edited by stukov (2015-04-20 12:42:17)
Источник
Как запустить Google Chrome от имени root в Linux
Когда я хочу запустить Google Chrome от имени пользователя root, появляется сообщение об ошибке с таким названием:
Google Chrome не может быть запущен от имени пользователя root
и тело сообщения:
для запуска с правами root вы должны указать альтернативный —user-data-dir для хранения информации профиля.
Может кто-нибудь помочь мне?
Чтобы запустить Google Chrome от имени пользователя root, выполните следующие действия.
Откройте google-chrome в вашем любимом редакторе (заменив $EDITOR на ваш любимый):
Добавьте —user-data-dir в самый конец файла.
мой файл выглядит так:
Сохраните и закройте редактор.
все готово Наслаждайся этим 🙂
если вы хотите посмотреть видеоурок, вы можете проверить мой блог:
Теперь вы не можете запускать google-chrome от имени пользователя root в обновленных версиях, чтобы запустить Google Chrome от имени обычного пользователя (при входе в систему как Root)
откройте терминал и наберите:
adduser -u chromeuser ИЛИ useradd -m chromeuser
Для запуска Google Chrome используйте команду:
gksu -u chromeuser google-chrome ИЛИ sux chromeuser google-chrome
Если вы не хотите запускать его из терминала, добавьте chrome на панель задач, а затем щелкните его правой кнопкой мыши, выберите «Свойства» и добавьте указанную выше команду в параметр команды.
Для тех, кто может по-прежнему гуглить в декабре 2016 года — 64-битная версия Google Chrome 54.0.2840.90 под XFCE и Debian 8.5:
Случай 1: Chrome вообще не
запускается В моей настройке, просто запустив терминал, google-chrome-stable я сразу же получил ошибку в терминале illegal instruction . Без рамок, без гашения экрана, без черных окон. Просто грубая ошибка консоли. Эта ошибка исчезает при использовании параметра —no-sandbox командной строки.
Случай 2: Chrome по-прежнему отказывается открываться даже с параметром —no-sandbox.
Это был не мой случай, так как —no-sandbox было достаточно, но если вы испытываете такое поведение, вы можете попытаться отключить все при вызове chrome, например:
Затем вы можете пошагово включить опции, чтобы определить, какой из них ломается.
PS: Все флаги / аргументы CLI можно найти здесь .
Случай 3: Please start Google Chrome as a normal user.To run as root you must specify an alternate —user-data-dir for storage of profile information появляется сообщение .
Решение, которое сработало для меня: перейдите /opt/google/chrome и откройте файл, google-chrome который на самом деле является скриптом bash.
В конце сценария найдите часть
И измените остальную часть следующим образом:
Сохранить и запустить google-chrome-stable —no-sandbox .
Я встал и занялся серфингом.
Для более сложного решения я лично применил своего рода проверку пользователя, чтобы избежать возможных помех при работе Chrome как обычного пользователя:
Другой
обходной путь : Вы не можете изменить файл google-chrome, как указано выше, и вы можете либо следовать рекомендации @tzafar для создания нового пользователя, либо запускать chrome с использованием существующей учетной записи обычного пользователя: gksu -u user google-chrome-stable (это сработало, но некоторые сообщения об ошибках, полученные в Терминал).
Источник
How to Run Google Chromium Browser in Kali Linux as Root User [Fixed] 2021
Fix Chromium Browser not working in Kali Linux: Are you facing any issue to Run Google Chromium Browser in Kali Linux as Root User? Here is the tutorial to fix the problem while opening the Google Chromium Browser in Kali Linux 2020. If Google Chromium Browser not working in Kali Linux , then this tutorial is for you. We’ve given 3 different methods to solve this issue. You can try any one of the given methods to Run Chromium Browser in Kali Linux as root user.
Jump to Content
Why Chromium Browser Not Working in Kali Linux?
Do you know this? By default chromium won’t launch on Kali Linux, this is due to chromium running as the root user. Kali Linux won’t start Chromium Browser as Root. You have to start/open Chromium browser as Non-root user. Only a low-privileged user account can open/run chromium browser.
How to Run Google Chromium Browser in Kali Linux as Root User
To run Chromium Browser in Kali Linux, you must run it as another user. But there are some solutions to run Chromium Browser in Kali Linux as root user. Today in this video, we will teach you how to open chromium-browser in Kali Linux as root.
If you have not installed Chromium Browser yet, you can download it now
Using Terminal – Method 1
Note: Check leafpad installed in your system or not
- Step 1: Open Terminal
- Step 2: Type cd /etc/chromium.d
- Step 3: Type leafpad default-flags & Press Enter.
- Step 4: add the following code at the end of the script
Editing default-flags file in chromium.d – Method 2
- Step 1: Go to /etc/chromium.d
- Step 2: Open default-flags
- Step 3: add the above-given code at the end of the script
- Step 4: Save it.
Replacing default-flags – Method 3
- Step 1: Download “default-flags.Zip” file
- Step 2: Extract the downloaded file.
- Step 3: Copy the extracted file to the directory location ” /etc/chromium.d/ ” and replace the existed file.
Now you can successfully run chromium without any error.
Watch How to Fix Chromium not working in Kali Linux problem
That all for today folks. Let us know any other methods to solve this issue through below comment box. If Chromium Browser not opening in Kali Linux, watch above given video. Share and Subscribe our After Linux YouTube channel to get more Linux Tutorials.
Well if u want to run chromium as root and also dont want an error message like “running –no-sandbox……” then remove all the code in ur default-flags file and paste the code given below in your default-flags file :
# A set of command line flags that we want to set by default.
# Do not hide any extensions in the about:extensions dialog
export CHROMIUM_FLAGS=”$CHROMIUM_FLAGS –show-component-extension-options”
# Enable GPU rasterization.
export CHROMIUM_FLAGS=”$CHROMIUM_FLAGS –enable-gpu-rasterization”
# Don’t use the GPU blacklist (bug #802933)
export CHROMIUM_FLAGS=”$CHROMIUM_FLAGS –ignore-gpu-blacklist”
# Don’t display any warnings about not being the default browser
export CHROMIUM_FLAGS=”$CHROMIUM_FLAGS –no-default-browser-check”
# Disable pinging
export CHROMIUM_FLAGS=”$CHROMIUM_FLAGS –disable-pings”
# Disable the builtin media router (bug #833477)
export CHROMIUM_FLAGS=”$CHROMIUM_FLAGS –media-router=0″
#Run as root Kali
export CHROMIUM_FLAGS=”$CHROMIUM_FLAGS –password-store=detect –test-type –no-sandbox –user-data-dir”
#I have just added “–test-type” in the last line
Источник
How to run google chrome as root in linux
when I want to run google chrome as root, an error message with this title appears:
Google chrome can not be run as root
and the body of message is:
to run as root, you must specify an alternate —user-data-dir for storage of profile information.
can anyone help me?
8 Answers 8
To run google chrome as root, follow these steps:
Open google-chrome in your favorite editor (replacing $EDITOR with your favorite):
Add —user-data-dir at the very end of the file.
my file looks like this:
Save and close the editor.
you’re done. Enjoy it 🙂
if you want to see video tutorial, you can check my blog post:
Now you cannot run google-chrome as root user on updated versions, To run Google Chrome as standard user (while Logged in as Root)
open terminal and type:
adduser -u chromeuser OR useradd -m chromeuser
To run google chrome use command:
gksu -u chromeuser google-chrome OR sux chromeuser google-chrome
If you don’t want to run it from Terminal then add chrome in taskbar and then right-click on it, select properties and add the above command in the command parameter.
For those who may be still googling at Dec 2016 — Google Chrome Version 54.0.2840.90 64bit under XFCE and Debian 8.5:
Case 1: Chrome not starting at all
In my setup just by running in terminal google-chrome-stable i was getting immediately an error in terminal illegal instruction . No frames, no screen blanking , no black windows. Just a rude console error. This error goes away by using the —no-sandbox command line option.
Case 2: Chrome still refuses to open even with —no-sandbox option
That was not my case since —no-sandbox was enough, but if you experience such behavior you could try to disable everything when calling chrome, like:
Then you can step by step enable options till to identify which one breaks.
PS: All CLI flags/args can be found here.
Case 3: Message Please start Google Chrome as a normal user.To run as root you must specify an alternate —user-data-dir for storage of profile information appears.
Solution that worked for me : Go to /opt/google/chrome and open file google-chrome which is actually a bash script.
At the end of the script find the part
And change the else part like this:
Save, and run google-chrome-stable —no-sandbox .
I got up and surfing.
For a more sophisticated solution i personally applied a kind of user check to avoid possible disturbance running chrome as normal user :
Another Workaround:
You can not modify the google-chrome file as indicated above, and you can either follow recomendation of @tzafar for creating a new user or to launch chrome using an existing normal user account : gksu -u user google-chrome-stable (this worked but some error messages received in terminal).
Источник
Chromium
Chromium is an open-source graphical web browser based on the Blink rendering engine. It is the basis for the proprietary Google Chrome browser.
See this page for an explanation of the differences between Chromium and Google Chrome. Additionally:
- Sync is unavailable in Chromium 89+ (2021-03-02) [1]
Consider switching to xbrowsersync for bookmarks syncing as long term solution.
See List of applications/Internet#Blink-based for other browsers based on Chromium.
Contents
Installation
There are several packages available to install Chromium with:
Google Chrome packages:
Configuration
Default applications
To set Chromium as the default browser and to change which applications Chromium launches when opening downloaded files, see default applications.
Certificates
Chromium uses Network Security Services for certificate management. Certificates can be managed in chrome://settings/certificates .
Making flags persistent
You can put your flags in a chromium-flags.conf file under $HOME/.config/ (or under $XDG_CONFIG_HOME if you have configured that environment variable).
No special syntax is used; flags are defined as if they were written in a terminal.
- The arguments are split on whitespace and shell quoting rules apply, but no further parsing is performed.
- In case of improper quoting anywhere in the file, a fatal error is raised.
- Flags can be placed in separate lines for readability, but this is not required.
- Lines starting with a hash symbol (#) are skipped. (This is only supported by the chromium launcher script and will not work when using chrome-flags.conf with the google-chromeAUR package.)
Below is an example chromium-flags.conf file that defines the flags —start-maximized —incognito :
Force GPU acceleration
By default Chromium on Linux does not use any GPU acceleration. To force GPU acceleration, append the following flags to persistent configuration:
Additionally the flag —disable-gpu-driver-bug-workarounds may need to be passed to prevent GPU workaround from being used. Flags in chrome://gpu should state «Hardware accelerated» when configured and available.
—enable-native-gpu-memory-buffers is broken since mesa 20.1.1 [2]
Hardware video acceleration
To enable VA-API support in Chromium:
- Install the correct VA-API driver for your video card and verify VA-API has been enabled and working correctly, see Hardware video acceleration. For proprietary NVIDIA support, installing libva-vdpau-driver-chromiumAUR or libva-vdpau-driver-vp9-gitAUR is required.
- Set the option —enable-features=VaapiVideoDecoder . If you are on X11, set —disable-features=UseOzonePlatform as well. This is enough when using ANGLE GL renderer and libva-intel-driver .
- When using ANGLE, Chromium forces the older i965 driver and fails when intel-media-driver is used. As a workaround, configure VA-API manually. See [4] for details.
- To use the system GL renderer on Xorg, use either —use-gl=egl or —use-gl=desktop . On XWayland, use the —use-gl=egl flag (Currently exhibits choppiness FS#67035 on some systems).
Tips and tricks
To check if it’s working play a video which is using a codec supported by your VA-API driver (vainfo tells you which codecs are supported, but Chromium will only support VP9 and h264):
- Open the DevTools by pressing Ctrl+Shift+I or on the Inspect button of the context (right-click) menu
- Add the Media inspection tab: Hamburger menu > More tools > Media
- In the newly opened Media tab, look at the hardware decoder state of the video decoder
Test on a large enough video. Starting with version 86, Chromium on desktop will only accelerate videos larger than 720p.
To reduce CPU usage while watching YouTube where VP8/VP9 hardware decoding is not available use the h264ify or enhanced-h264ify extension.
On some systems (especially on XWayland) you might need to #Force GPU acceleration. Only —ignore-gpu-blocklist is enough for our purposes.
This article or section needs expansion.
You might need to disable the Skia renderer, as it is currently not compatible with video decode acceleration: —disable-features=UseSkiaRenderer
PDF viewer plugin
Chromium and Google Chrome are bundled with the Chromium PDF Viewer plugin. If you do not want to use this plugin, check Open PDFs using a different application in chrome://settings/content/pdfDocuments .
Flash Player plugin
Support for Flash Player was removed in Chromium 88.[5]
Native Wayland support
Since version 87, native Wayland support in Chromium can be enabled with the following flags [6]:
See #Making flags persistent for a permanent configuration.
Tips and tricks
The following tips and tricks should work for both Chromium and Chrome unless explicitly stated.
Browsing experience
chrome:// URLs
A number of tweaks can be accessed via Chrome URLs. See chrome://chrome-urls for a complete list.
- chrome://flags — access experimental features such as WebGL and rendering webpages with GPU, etc.
- chrome://extensions — view, enable and disable the currently used Chromium extensions.
- chrome://gpu — status of different GPU options.
- chrome://sandbox — indicate sandbox status.
- chrome://version — display version and switches used to invoke the active /usr/bin/chromium .
An automatically updated, complete listing of Chromium switches (command line parameters) is available here.
Chromium task manager
Shift+ESC can be used to bring up the browser task manager wherein memory, CPU, and network usage can be viewed.
Chromium overrides/overwrites Preferences file
If you enabled syncing with a Google Account, then Chromium will override any direct edits to the Preferences file found under
/.config/chromium/Default/Preferences . To work around this, start Chromium with the —disable-sync-preferences switch:
If Chromium is started in the background when you login in to your desktop environment, make sure the command your desktop environment uses is:
Search engines
Make sites like wiki.archlinux.org and wikipedia.org easily searchable by first executing a search on those pages, then going to Settings > Search and click the Manage search engines.. button. From there, «Edit» the Wikipedia entry and change its keyword to w (or some other shortcut you prefer). Now searching Wikipedia for «Arch Linux» from the address bar is done simply by entering «w arch linux«.
Tmpfs
Cache in tmpfs
To limit Chromium from writing its cache to a physical disk, one can define an alternative location via the —disk-cache-dir flag:
Cache should be considered temporary and will not be saved after a reboot or hard lock. Another option is to setup the space in /etc/fstab :
Profile in tmpfs
Relocate the browser profile to a tmpfs filesystem, including /tmp , or /dev/shm for improvements in application response as the entire profile is now stored in RAM.
Use an active profile management tool such as profile-sync-daemon for maximal reliability and ease of use. It symlinks or bind mounts and syncs the browser profile directories to RAM. For more, see Profile-sync-daemon.
Launch a new browser instance
When you launch the browser, it first checks if another instance using the same data directory is already running. If there is one, the new window is associated with the old instance. If you want to launch an independent instance of the browser, you must specify separate directory using the —user-data-dir parameter:
Directly open *.torrent files and magnet links with a torrent client
By default, Chromium downloads *.torrent files directly and you need to click the notification from the bottom-left corner of the screen in order for the file to be opened with your default torrent client. This can be avoided with the following method:
- Download a *.torrent file.
- Right-click the notification displayed at the bottom-left corner of the screen.
- Check the «Always Open Files of This Type» checkbox.
See xdg-open to change the default assocation.
Touch Scrolling on touchscreen devices
You may need to specify which touch device to use. Find your touchscreen device with xinput list then launch Chromium with the —touch-devices=x parameter, where «x» is the id of your device.
Reduce memory usage
By default, Chromium uses a separate OS process for each instance of a visited web site. [7] However, you can specify command-line switches when starting Chromium to modify this behaviour.
For example, to share one process for all instances of a website:
To use a single process model:
In addition, you can suspend or store inactive Tabs with extensions such as Tab Suspender and OneTab.
User Agent
The User Agent can be arbitrarily modified at the start of Chromium’s base instance via its —user-agent=»[string]» parameter.
DOM Distiller
Chromium has a similar reader mode to Firefox. In this case it’s called DOM Distiller, which is an open source project. It is disabled by default, but can be enabled using the chrome://flags/#enable-reader-mode flag, which you can also make persistent. Not only does DOM Distiller provide a better reading experience by distilling the content of the page, it also simplifies pages for print. Even though the latter checkbox option has been removed from the print dialog, you can still print the distilled page, which basically has the same effect.
After enabling the flag, you will find a new «Toggle reader mode» menu item and corresponding icon in the address bar when Chromium thinks the website you are visiting could do with some distilling.
Forcing specific GPU
In multi-GPU systems, Chromium automatically detects which GPU should be used for rendering (discrete or integrated). This works 99% of the time, except when it does not — if a unavailable GPU is picked (for example, discrete graphics on VFIO GPU passthrough-enabled systems), chrome://gpu will complain about not being able to initialize the GPU process. On the same page below Driver Information there will be multiple GPUs shown (GPU0, GPU1, . ). There is no way to switch between them in a user-friendly way, but you can read the device/vendor IDs present there and configure Chromium to use a specific GPU with flags:
. where 0x8086 and 0x1912 is replaced by the IDs of the GPU you want to use (as shown on the chrome://gpu page).
Import bookmarks from Firefox
To ease the transition, you can import bookmarks from Firefox into Chromium.
Navigate Chromium to chrome://settings/importData
If Firefox is already installed on your computer, you can directly import bookmarks as well as many other things from Firefox.
Make sure Mozilla Firefox is selected. Optionally, you can uncheck some unwanted items here. Click the Import and then Done. You are done with it.
If you import bookmarks from another PC, you have to export bookmarks from Firefox first.
Ctrl + Shift + O > Import and Backup > Export Bookmarks To HTML in Firefox
The procedure is pretty much the same. You need to go to chrome://settings/importData . However, this time, in the From drop-down menu, select Bookmarks HTML File and click the Choose File button and upload the desired bookmark file.
Enabling native notifications
Go to chrome://flags#enable-system-notifications and select Enabled.
U2F authentication
Install libfido2 library. This provides the udev rules required to enable access to the U2F key as a user. U2F keys are by default only accessible by root, and without these rules Chromium will give an error.
Dark mode
To enable dark mode (used in prefers-color-scheme in CSS, JavaScript, Settings and Dev-Tools) and enable the dark theme (normally used for incognito mode) append the following flag to persistent configuration:
Dark mode by system preference
This Chromium issue aims to bring dark mode based on GTK theme selection into Chromium.
In the future, all that will be required to properly use system preference, is setting Designs to GTK in chrome://settings/appearance .
Profile maintenance
Chromium uses SQLite databases to manage history and the like. Sqlite databases become fragmented over time and empty spaces appear all around. But, since there are no managing processes checking and optimizing the database, these factors eventually result in a performance hit. A good way to improve startup and some other bookmarks- and history-related tasks is to defragment and trim unused space from these databases.
Security
Disable JIT
At the cost of reduced performance, you can disable just-in-time compilation of JavaScript to native code, which is responsible for roughtly half of the security vulnerabilities in the JS engine, by passing —js-flags=—jitless in $HOME/.config/chromium-flags.conf .
WebRTC
WebRTC is a communication protocol that relies on JavaScript that can leak one’s actual IP address and hardware hash from behind a VPN. While some software may prevent the leaking scripts from running, it’s probably a good idea to block this protocol directly as well, just to be safe. As of October 2016, there is no way to disable WebRTC on Chromium on desktop, there are extensions available to disable local IP address leak, one is this extension.
One can test WebRTC via this page.
SSL certificates
Chromium does not have an SSL certificate manager. It relies on the NSS Shared DB
/.pki/nssdb . In order to add SSL certificates to the database, users will have to use the shell.
Adding CAcert certificates for self-signed certificates
Grab the CAcerts and create an nssdb , if one does not already exist. To do this, first install the nss package, then complete these steps:
Now users may manually import a self-signed certificate.
Example 1: Using a shell script to isolate the certificate from TomatoUSB
Below is a simple script that will extract and add a certificate to the user’s nssdb :
Syntax is advertised in the commented lines.
Example 2: Using Firefox to isolate the certificate from TomatoUSB
The firefox browser can be used to save the certificate to a file for manual import into the database.
- Browse to the target URL.
- Upon seeing the «This Connection is Untrusted» warning screen, click: I understand the Risks > Add Exception.
- Click: View > Details > Export and save the certificate to a temporary location ( /tmp/easy.pem in this example).
Now import the certificate for use in Chromium:
Canvas Fingerprinting
Canvas fingerprinting is a technique that allows websites to identify users by detecting differences when rendering to an HTML5 canvas. This information can be made inaccessible by using the —disable-reading-from-canvas flag.
To confirm this is working run this test and make sure «hash of canvas fingerprint» is reported as undetermined in the full results.
Privacy extensions
Do Not Track
To enable Do Not Track, visit chrome://settings , scroll down to Advanced and under Privacy and security, check Send a «Do Not Track» request with your browsing traffic.
Force a password store
Chromium uses a password store to store your passwords and the Chromium Safe Storage key, which is used to encrypt cookie values. [11]
By default Chromium auto-detects which password store to use, which can lead to you apparently losing your passwords and cookies when switching to another desktop environment or window manager.
You can force Chromium to use a specific password store by launching it with the —password-store flag with one of following the values [12]:
- gnome , uses Gnome Keyring
- kwallet5 , uses KDE Wallet
- basic , saves the passwords and the cookies’ encryption key as plain text in the file Login Data
- detect , the default auto-detect behavior
For example, to force Chromium to use Gnome Keyring in another desktop or WM use —password-store=gnome , see #Making flags persistent for making it permanent.
When using a password store of another desktop environment you probably also want to unlock it automatically see: GNOME/Keyring#Using the keyring outside of GNOME [broken link: invalid section] and KDE Wallet#Unlock KDE Wallet automatically on login.
Troubleshooting
Fonts
Tab font size is too large
Chromium will use the GTK settings as described in GTK#Configuration. When configured, Chromium will use the gtk-font-name setting for tabs (which may mismatch window font size). To override these settings, use —force-device-scale-factor=1.0 .
WebGL
There is the possibility that your graphics card has been blacklisted by Chromium. See #Force GPU acceleration.
If you are using Chromium with Bumblebee, WebGL might crash due to GPU sandboxing. In this case, you can disable GPU sandboxing with optirun chromium —disable-gpu-sandbox .
Visit chrome://gpu/ for debugging information about WebGL support.
Chromium can save incorrect data about your GPU in your user profile (e.g. if you use switch between an Nvidia card using Optimus and Intel, it will show the Nvidia card in chrome://gpu even when you are not using it or primusrun/optirun). Running using a different user directory, e.g, chromium —user-data-dir=$(mktemp -d) may solve this issue. For a persistent solution you can reset the GPU information by deleting
Incorrect HiDPI rendering
Chromium will automatically scale for a HiDPI display, however, this may cause an incorrect rendered GUI.
The flag —force-device-scale-factor=1 may be used to overrule the automatic scaling factor.
When native Wayland support is enabled, Chromium will automatically scale based on the configured scale of each monitor.
Password prompt on every start with GNOME Keyring
Chromecasts in the network are not discovered
You will need to enable the Media Router Component Extension in chrome://flags/#load-media-router-component-extension .
Everything is syncing except for password
If synchronization is not working for password only (you can check it on chrome://sync-internals/ ) delete profile login data:
Losing cookies and passwords when switching between desktop environments
If you see the message Failed to decrypt token for service AccountId-* in the terminal when you start Chromium, it might try to use the wrong password storage backend. This might happen when you switch between Desktop Environments.
Hang on startup when Google Sync enabled
Try launching Chrome with —password-store=basic or another appropriate password store.
Chromium asks to be set as the default browser every time it starts
If you are using KDE and have once set Firefox as the default browser (by clicking the button inside Firefox), you might find Chromium asks to be set as the default browser every time it starts, even if you click the «set as default» button.
Chromium checks for this status by running xdg-settings check default-web-browser chromium.desktop . If the output is «no», it is not considering itself to be the default browser. The script xdg-settings checks for the following MIME associations and expect all of them to be chromium.desktop :
To fix it, go to System settings > Applications > Default applications > Web browser and choose Chromium. Then, set the MIME association for text/html :
«This browser or app may not be secure» error logging in to Google
As of 2020.04.20 if you run chromium with —remote-debugging-port=9222 flag for web development, you cannot log in to your Google account. Temporarily disable this flag to login and then you can enable it back.
Chromium stuck at 60fps when using a 144Hz + 60Hz monitor
There is a suitable workaround for this issue, append the following flags to persistent configuration:
This should make Chromium run at 144fps when used on your 144hz display, assuming your compositor is refreshing at 144fps. Keep in mind it might be a little choppy FS#67035, but this is way better than it being stuck at 60fps.
Chromium low scroll speed
Mouse whell scrolling in chromium and electron based applications may be too slow for daily usage. Here are some solutions.
Libinput#Mouse wheel scrolling speed scaling injects libinput_event_pointer_get_axis_value function in libinput and provides an interface to change scale factor. This is not a application level injection, so an addition script for application specific scale factor tuning is needed. Note that scroll on chromium’s small height developer tools may be too fast when scale factor is large enough.
IMWheel increases scroll distance by replaying X wheel button event for multiple times. However, chromium assumes the real scroll and the replayed ones as two events. There is a small but noticeable delay tween them, so one mouse wheel scroll leads to twice page jumps. Also, touchpad scroll needs addition care.
Linux Scroll Speed Fix and SmoothScroll are two chromium extensions with suppport for scroll distance modification. Upon wheel scroll in a web page, the closest scrollable ancestor of current focused node will be found, then a scroll method with given pixel distance will be called on it, even if it has been scrolled to bottom. So once you scroll into a text editor or any scrollable element, you can never scroll out of it, except moving mouse. Also, extension based methods can not be used outside chromium.
Источник