Linux path to chrome

User Data Directory

Contents

Introduction

The user data directory contains profile data such as history, bookmarks, and cookies, as well as other per-installation local state.

Each profile is a subdirectory (often Default ) within the user data directory.

Current Location

To determine the user data directory for a running Chrome instance:

  1. Navigate to chrome://version
  2. Look for the Profile Path field. This gives the path to the profile directory.
  3. The user data directory is the parent of the profile directory.
  • [Profile Path] C:\Users\Alice\AppData\Local\Google\Chrome\User Data\Default
  • [User Data Dir] C:\Users\Alice\AppData\Local\Google\Chrome\User Data

Default Location

The default location of the user data directory is computed by chrome::GetDefaultUserDataDirectory .

Generally it varies by

  • OS platform,
  • branding (Chrome vs. Chromium, based on is_chrome_branded in GN args), and
  • release channel (stable / beta / dev / canary).

Windows

The default location is in the local app data folder:

  • [Chrome] %LOCALAPPDATA%\Google\Chrome\User Data
  • [Chrome Beta] %LOCALAPPDATA%\Google\Chrome Beta\User Data
  • [Chrome Canary] %LOCALAPPDATA%\Google\Chrome SxS\User Data
  • [Chromium] %LOCALAPPDATA%\Chromium\User Data

(The canary channel suffix is determined using InstallConstants::install_suffix .)

Mac OS X

The default location is in the Application Support folder:

/Library/Application Support/Google/Chrome
[Chrome Beta]

/Library/Application Support/Google/Chrome Beta
[Chrome Canary]

/Library/Application Support/Google/Chrome Canary
[Chromium]

(The canary channel suffix is determined using the CrProductDirName key in the browser app’s Info.plist .)

Linux

The default location is in

/.config/google-chrome
[Chrome Beta]

/.config/google-chrome-beta
[Chrome Dev]

(The beta and dev channel suffixes are determined from $CHROME_VERSION_EXTRA , which is passed by the launch wrapper script.)

/.config portion of the default location can be overridden by $CHROME_CONFIG_HOME (since M61) or by $XDG_CONFIG_HOME .

Note that $XDG_CONFIG_HOME affects all applications conforming to the XDG Base Directory Spec, while $CHROME_CONFIG_HOME is specific to Chrome and Chromium.

Chrome OS

The default location is: /home/chronos

Android

The default location comes from Context.getDir and is specific to the app.

The default location is inside the application support directory in the app sandbox.

  • [Chrome] Library/Application Support/Google/Chrome
  • [Chromium] Library/Application Support/Chromium

Overriding the User Data Directory

Command Line

On most platforms, the user data directory can be overridden by passing the —user-data-dir command-line flag to the Chrome binary.

The override happens in chrome/app/chrome_main_delegate.cc . Platforms not building with the file may not have implemented the override. Overriding the user data directory via the command line is not supported on iOS.

  • [Windows] chrome.exe —user-data-dir=c:\foo
  • [Linux] google-chrome —user-data-dir=/path/to/foo

Environment (Linux)

On Linux, the user data directory can also be overridden with the $CHROME_USER_DATA_DIR environment variable.

The —user-data-dir flag takes precedence if both are present.

Chrome Remote Desktop sessions (Linux)

A single Chrome instance cannot show windows on multiple X displays, and two running Chrome instances cannot share the same user data directory. Therefore, it’s desirable for Chrome to have a separate user data directory when running inside a Chrome Remote Desktop (CRD) virtual session on a Linux host.

By default, CRD achieves this by setting $CHROME_USER_DATA_DIR in the session. Unfortunately this means that inside the session we don’t get separate defaults for different channels (Stable, Beta, Dev) or for Chrome vs. Chromium. This can lead to profile version errors (“Your profile can not be used because it is from a newer version of Google Chrome”).

Since M61, this can be solved by setting $CHROME_CONFIG_HOME instead of $CHROME_USER_DATA_DIR . Specifically, put the following in

Then restart the host by running: /etc/init.d/chrome-remote-desktop restart

Writing an AppleScript wrapper (Mac OS X)

On Mac OS X, you can create an application that runs Chrome with a custom —user-data-dir :

Читайте также:  Windows system diagnostics utility

Open Applications > Utilities > Script Editor.

Modify as needed for your installation path, Chrome versus Chromium, and desired user data directory.

Save the script in your Applications directory with the file format “Application”.

Close the Script Editor, find your newly created application, and run it. This opens a Chrome instance pointing to your new profile.

If you want, you can give this application the same icon as Chrome:

  1. Select the Google Chrome application and choose File > Get Info.
  2. Select the icon at the top left of the info dialog. You will see a blue highlight around the icon.
  3. Press ⌘C to copy the icon.
  4. Open the info dialog for the new application and select the icon in the top left.
  5. Press ⌘V to paste the copied icon.

User Cache Directory

On Windows and ChromeOS, the user cache dir is the same as the profile dir. (The profile dir is inside the user data dir.)

On Mac OS X and iOS, the user cache dir is derived from the profile dir as follows:

  1. If Library/Application Support is an ancestor of the profile dir, the user cache dir is Library/Caches plus the relative path from Application Support to the profile dir.
  2. Otherwise, the user cache dir is the same as the profile dir.

Example (Mac OS X):

/Library/Application Support/Google/Chrome
[profile dir]

/Library/Application Support/Google/Chrome/Default
[user cache dir]

On Linux, the user cache dir is derived from the profile dir as follows:

    Determine the system config dir. This is

/.config , unless overridden by $XDG_CONFIG_HOME . (This step ignores $CHROME_CONFIG_HOME .)
Determine the system cache dir. This is

/.cache , unless overridden by $XDG_CACHE_HOME .

  • If the system config dir is an ancestor of the profile dir, the user cache dir is the system cache dir plus the relative path from the system config dir to the profile dir.
  • Otherwise, the user cache dir is the same as the profile dir.
  • /.config/google-chrome
    [profile dir]

    /.config/google-chrome/Default
    [user cache dir]

    Источник

    Установка Chrome в Ubuntu 20.04

    Google Chrome или Chrome — это бесплатный веб-браузер, разработанный компанией Google на основе движка Webkit. По состоянию на 2020 год Google Chrome используют около 69% пользователей интернета, а это на 9% больше чем в 2018 году. И этот браузер переведён на 52 языка мира. Google Chrome доступен для Linux, Android, IOS, Windows и операционной системы MacOS.

    Но Google Chrome больше, чем просто веб-браузер, поскольку он сочетает в себе современный браузер, встроенные приложения Chromium, красивый дизайн, встроенный переводчик и всё для того, чтобы помочь пользователям просматривать веб-страницы немного быстрее, проще и безопаснее, чем когда-либо прежде. Кроме того, у браузера есть версия с открытым исходным кодом. В этой статье мы рассмотрим, как установить Chrome в Ubuntu 20.04.

    Интересной особенностью Chrome является возможность выполнять поиск прямо из строки браузера, просто начните вводить запрос, и вы сразу получите подсказки, или даже ссылки на нужные вам сайты. На главной странице отображаются миниатюры наиболее часто посещаемых сайтов. Эта функция позволяет открыть любимые сайты намного быстрее. В этой статье мы будем рассматривать самую свежую на данный момент версию браузера. Для стабильной версии это 83, а для не стабильной — 85.

    Установка Google Chrome в Ubuntu 20.04

    Установить Google Chrome можно не только в Ubuntu 20.04, но и в предыдущих версиях, в том числе и в Ubuntu 16.04, а также в Linux Mint и Debian. Кроме того, сам установочный пакет добавляет в систему репозитории Chrome, поэтому вы всегда будете получать обновления браузера при обновлении системы. Для установки откройте терминал с помощью сочетания клавиш Ctrl+Alt+T и выполните команды:

    Установка стабильной версии Chrome в Ubuntu 64 бит:

    sudo dpkg -i —force-depends google-chrome-stable_current_amd64.deb

    Для установки нестабильной, но более новой версии надо заменить слово stable на слово unstable:

    Читайте также:  Adb mac os install

    sudo dpkg -i —force-depends google-chrome-unstable_current_amd64.deb

    Установка Chrome в Ubuntu 18.04 32 бит, выполняется не так просто. Поскольку компания Google прекратила поддержку 32 битных систем в своем браузере, вы не можете установить самую новую 83 версию, зато можете скачать стабильную 48 из архивов:

    Если вы хотите самую новую версию для 32 битной системы, то вам придется установить Chromium. В случае, если dpkg сообщает о невозможности удовлетворить зависимости, выполните такую команду:

    sudo apt-get install -f

    Также вы можете попытаться вручную установить зависимости chrome:

    sudo apt-get install libxss1 libgconf2-4 libappindicator1 libindicator7

    Установка браузера завершена. Для его запуска просто выполните:

    Кроме того, вы можете найти программу в главном меню системы:

    При первом запуске браузер спросит можно ли отправлять данные в Google, а также предложит сделать Chrome браузером по умолчанию.

    Вот и всё. Надеюсь эта статья пролила ясность на установку Google Chrome Ubuntu 18.04.

    Источник

    How do I open a file with Chrome from the command line?

    I would like to open a file (index.html) in the current directory with Google Chrome or Chromium from a bash terminal (I’m using Linux Mint 15). What is the command? I’ve tried the intuitive approaches and have done a few stack and google searches to no avail, oddly overlooked (perhaps painfully obvious). Thanks in advance.

    17 Answers 17

    Just type in the program name followed by the file:

    if it’s an .html file it should open in your default browser

    From the bash shell (on Windows), you can use:

    and to open a folder:

    explorer «C:\Program Files\Git»

    Added for reference, since my search landed here, too.

    Doing some search for chromium you could do it like chromium-browser path|file .

    For Mac i’m using

    This solution has always worked for me — open -a «google\ chrome.app» index.html — where «google\ chrome.app» is the name/location of chrome on your system.

    If Chrome is your default browser, simply — open index.html

    If Chrome is your main browser, just use

    It looks like Chrome is not in your $PATH the way it should be. Easy solution would probably be to uninstall and reinstall Chrome, which should put it in your $PATH. Then

    should work for you.

    You can open a file using below terminal commands (Linux)

    1. Open in New Tab google-chrome
    2. Open in New Window google-chrome —new-window
    3. Open in Incognito mode google-chrome —incognito (—incongnito-mode)

    For MacOS, with absolute path (if your Chrome is installed in the /Applications folder) in bash CLI use:

    So, if you want to open the CNN webpage:

    With Chrome not the default browser, this worked for me under Windows 10:

    • A way to convert the unqualified filename into a fully qualified filename;
    • A way to convert backslashes to forward slashes;
    • A way to prefix the » file:// » onto the URL;
    • To identify the specific directory in which you find chrome.exe ;
    • Decide on whether you want to keep the switch to force a new window;
    • And other command line options as pertinent.

    These should be reasonably doable in a .bat or .cmd file, using FOR commands and the text-replacing features of the SET command; or do all that in a .vbs or .ps1 script which could be called from the batch file, etc.

    Источник

    Установка Google Chrome в Linux

    Одним из самых популярных браузеров в мире считается Google Chrome. Далеко не все пользователи довольны его работой из-за большого потребления системных ресурсов и не для всех удобной системой управления вкладками. Однако сегодня мы бы не хотели обсуждать достоинства и недостатки этого веб-обозревателя, а поговорим о процедуре его инсталляции в операционные системы на базе ядра Linux. Как известно, выполнение этой задачи значительно отличается от той же платформы Windows, поэтому и требует детального рассмотрения.

    Устанавливаем Google Chrome в Linux

    Далее мы предлагаем ознакомиться с двумя различными методами установки рассматриваемого браузера. Каждый будет наиболее подходящим в определенной ситуации, поскольку у вас имеется возможность выбрать сборку и версию самостоятельно, а потом уже добавлять все компоненты в саму ОС. Практически на всех дистрибутивах Линукс этот процесс осуществляется одинаково, разве что в одном из способов придется выбрать совместимый формат пакета, из-за чего мы предлагаем вам руководство, основанное на последней версии Ubuntu.

    Читайте также:  Windows system32 taskkills exe

    Способ 1: Установка пакета с официального сайта

    На официальном сайте Google для скачивания доступны специальные версии браузера, написанные под дистрибутивы Linux. Вам нужно только загрузить пакет на компьютер и провести дальнейшую инсталляцию. Пошагово эта задача выглядит так:

      Перейдите по указанной выше ссылке на страницу загрузки Google Chrome и нажмите на кнопку «Скачать Chrome».

    Выберите формат пакета для загрузки. В скобках указаны подходящие версии операционных систем, поэтому с этим сложностей возникнуть не должно. После этого щелкните на «Принять условия и установить».

    Теперь вы можете запустить скачанный DEB или RPM-пакет через стандартное средство ОС и кликнуть на кнопку «Установить». По завершении инсталляции запускайте браузер и приступайте к работе с ним.

    Детально ознакомиться с методами установки DEB или RPM-пакетов вы можете в других наших статьях, перейдя по указанным ниже ссылкам.

    Подробнее: Установка RPM-пакетов / DEB-пакетов в Ubuntu

    Способ 2: Терминал

    Не всегда у пользователя имеется доступ к браузеру или получается найти подходящий пакет. В таком случае на помощь приходит стандартная консоль, через которую можно загрузить и установить любое приложение на свой дистрибутив, включая рассматриваемый веб-обозреватель.

      Для начала запустите «Терминал» любым удобным образом.

    Загрузите пакет нужного формата из официального сайта, задействовав команду sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb , где .deb, может меняться на .rpm , соответственно.

    Введите пароль от своей учетной записи для активации прав суперпользователя. Символы при наборе никогда не отображаются, обязательно учитывайте это.

    Ожидайте завершения загрузки всех необходимых файлов.

    Установите пакет в систему с помощью команды sudo dpkg -i —force-depends google-chrome-stable_current_amd64.deb .

    Вы могли заметить, что в ссылке содержится только приставка amd64, а это значит, что скачиваемые версии совместимы только с 64-разрядными операционными системами. Такая ситуация сложилась из-за того, что Google перестали выпускать 32-битные версии после сборки 48.0.2564. Если вы хотите получить именно ее, нужно будет проводить немного другие действия:

      Потребуется загрузить все файлы из пользовательского репозитория, а делается это через команду wget http://bbgentoo.ilb.ru/distfiles/google-chrome-stable_48.0.2564.116-1_i386.deb .

    При получении ошибки о неудовлетворении зависимостей пропишите команду sudo apt-get install -f и все будет работать нормально.

    Альтернативный вариант — вручную проставьте зависимости через sudo apt-get install libxss1 libgconf2-4 libappindicator1 libindicator7 .

    После этого подтвердите добавление новых файлов, выбрав соответствующий вариант ответа.

    Запускается браузер с помощью команды google-chrome .

    Откроется стартовая страница, с которой начинается взаимодействие с веб-обозревателем.

    Инсталляция разных версий Chrome

    Отдельно бы хотелось выделить возможность установки разных версий Google Chrome рядом или выбора стабильной, бета или сборки для разработчика. Все действия все так же выполняются через «Терминал».

      Загрузите специальные ключи для библиотек, введя wget -q -O — https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add — .

    Далее скачайте необходимые файлы с официального сайта — sudo sh -c ‘echo «deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main» >> /etc/apt/sources.list.d/google-chrome.list’ .

    Обновите системные библиотеки — sudo apt-get update .

    Запустите процесс установки необходимой версии — sudo apt-get install google-chrome-stable , где google-chrome-stable может быть заменено на google-chrome-beta или google-chrome-unstable .

    В Гугл Хром уже встроена свежая версия Adobe Flash Player, но не у всех пользователей Linux она работает корректно. Мы предлагаем вам ознакомиться с другой статьей на нашем сайте, где вы найдете детальное руководство по добавлению плагина в саму систему и браузер.

    Как видите, приведенные выше способы разные и позволяют выполнить установку Google Chrome в Linux, основываясь на своих предпочтениях и возможностях дистрибутива. Мы настоятельно советуем ознакомиться с каждым вариантом, а потом уже выбрать наиболее подходящий для себя и следовать инструкциям.

    Помимо этой статьи, на сайте еще 12315 инструкций.
    Добавьте сайт Lumpics.ru в закладки (CTRL+D) и мы точно еще пригодимся вам.

    Отблагодарите автора, поделитесь статьей в социальных сетях.

    Источник

    Оцените статью