Linux set default browser

Set Your Favorite Browser as Default through Ubuntu Command Line

We might have multiple web browsers installed on our Ubuntu which we might want to use for different browsing preferences. However, there is always a favorite web browser that we want to use 90 percent of the times for regular Internet use. It is best to have that browser set as the default web browser for your Ubuntu system. This default browser is the one that will open links that you click from any UI application, and this is the one that will open when you enter x-www-browser in your Ubuntu command line.

Setting the default web browser through the Ubuntu UI is very simple. All you need to do is open the Settings utility, move to the Details tab, click on the Default Applications and then select your preferred web browser through the Web drop-down.

This article, however, explains how to achieve the same purpose through the Ubuntu command line. It explains how we can use the update-alternatives utility to update one of the installed browsers as the default one. It is good to learn this trick as we do not always have the UI available. For example, a server administrator or a remote user can easily access the command line and make configurations to the target machine.

We have run the commands and procedures mentioned in this article on a Ubuntu 18.04 LTS system. We are using the Terminal application for using Ubuntu command line. You can open it through the system Dash or the Ctrl+alt+T shortcut.

How to set default Browser on the shell?

Open your Terminal applications and enter the following command as sudo:

Please note that only an authorized user on Ubuntu can install, remove, update and configure applications.

This command lists all the available web browsers on your system.

The ‘*’ symbol before the selection number indicated the currently set default web browser.

Simply enter the selection number against a web browser option and hit Enter to set a new default alternative.

By default, this list contains web browsers from the /usr/bin directory. If your web browsers are located somewhere else, for example in /snap/bin, you can add it to the alternatives list by running the following command:

Advertisement

In our case, our Chromium web browser was installed in the /snap/bin folder. Through the above command, we could not only set it as our default browser but also dd it to the update-alternatives list for later use.

Hopefully, through the simple commands described in this article, you will be able to easily set a new default web-browser for your Ubuntu system.

Karim Buzdar

About the Author: Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. You can reach Karim on LinkedIn

Источник

How to Change Default Web Browser and Email Client in Ubuntu

Ubuntu ships with a slate of default apps handily pre-installed, including Mozilla’s hugely popular Firefox web browser and Thunderbird e-mail client.

While both of these have their fans neither app is — shock — to everyone’s tastes or needs. We often get e-mails or tweets from people asking us how they can change the default browser in Ubuntu or set a different mail client as the handler for mail links, etc.

Читайте также:  Не удалось обновить конфигурацию загрузки компьютера при установке windows

We’re not just talking about installing a different bit of software here but also how you set it as the system handler for a given file, link or content type.

It is super easy to change a whole slate of default application including web, e-mail, text editing, music and videos players, in Ubuntu. The settings panel where you can make these changes isn’t known to everyone, so we’ll take a quick look.

How to Change the Default Browser in Ubuntu

Mozilla Firefox is a solid, open-source and reliable window on the world wide web but it’s not everyone’s browser of choice. And that’s fine.

To use a different default browser in Ubuntu you will first, rather obviously, need to install a new one. How you do this depends on the one you want:

Open-source web browsers, like Epiphany, Chromium and IceWeasel, are available to install from the Ubuntu Software Center.

Major web-browsers, like Google Chrome, Opera and Vivaldi, must be downloaded from each project’s official website.

Whichever browser you choose, and however you choose to install it, once you have done so you can continue on.

To change the default browser for opening web links click on in other applications, e.g., instant messengers, Twitter clients, e-mail, etc, you need to use the Ubuntu System Settings tool.

You can launch System Settings a number of ways. One of the fastest is to the click the Cog icon in the far-right hand corner (far left on RTL systems) and select the ‘System Settings’ menu shortcut.

  1. Open ‘System Settings’
  2. Select the ‘Details’ item
  3. Select ‘Default Applications’ in the sidebar
  4. Change the ‘Web’ entry from ‘Firefox’ to your preferred choice

How To Change the Default Mail Client in Ubuntu

Ubuntu ships with Thunderbird as the default mail application. This means the app will open automatically when you click on an email address or a mailto link in most web-browsers, PDFs, instant messengers, and so on.

This convenience is super handy if you use Thunderbird, of course. But a lot of us don’t; we may use a lightweight client like Geary, GNOME stalwart Evolution, or rely on a web-mail service like Gmail or Outlook.

To change the default mail client in Ubuntu from Thunderbird to another application open System Settings > Details > Default Applications. Click the drop-down menu next to ‘Mail’ and choose your preferred client from the list.

To set Gmail as the default mail client in Ubuntu you must first install the ‘gnome-gmail’ package by hitting the button below. Once installed open System Settings > Details > Default Applications. Click the drop-down menu next to ‘Mail’ and choose ‘Gmail’ from the list.

Going Further

The same steps listed above can be used to make your favourite music player open when double clicking on a music file, have an application like VLC handle your .avi and .mp4 files, and so on.

Home » How To » How to Change Default Web Browser and Email Client in Ubuntu

Источник

How to set the default browser on Debian trough the command line

When you click a link to open any website, it will open in a default browser set by the operating system. Most Linux distributions ships with a Mozilla Firefox browser installed and set by default. So if you have never changed the default settings, then all your links or URLs will always be open in the Mozilla Firefox. However, if you do not like your default browser, there is a way to change it. Linux OS allows you to change your default browser for opening the links to websites. First, you will need to install a new browser before setting it as a default one.

It is very easy to change a default web browser from a graphical user interface. All you have to do is to open the Settings application, navigate to the Details tab, select the Default Applications tab, and then pick your preferred choice of browser from the drop-down menu.

Читайте также:  Windows hosts file program

However, in this article, we will explain how you can set the default browser on a Debian OS using the command line. We will use the update-alternatives utility to update one of the installed browsers as a default. It can be very helpful for the users that are accessing remotely and have only the command line access.

We have used Debian 10 OS for describing the procedure mentioned in this article.

How to set default Browser with the command line?

To open the command line or Terminal application in a Debian 10 OS, go to the Activities tab on the top left corner of your desktop. Then in the search bar, type terminal. when the Terminal icon appears, click on it to open.

Now in the Terminal, execute the following command as sudo:

You will see output similar to below. From the output, you can see the list of installed browsers in your system. The (*) symbol before the selection numbers indicates the current default browser.

To change the default browser, select a number against a web browser and press Enter to set it as a new default option.

The above list by default contains browsers from the /usr/bin directory. However, if browsers are located at some other location, they can be added to the alternatives list.

For instance, you have a chromium-browser located at /snap/bin instead of /usr/bin directory. Using the below command, you can set it as a default browser and also add it to the update-alternatives list for future use.

That is all there is to it! I hope it will be helpful whenever you need to set a default browser in your system using the command line.

Karim Buzdar

About the Author: Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. You can reach Karim on LinkedIn

Источник

Ubuntu Documentation

Firefox

Firefox is the default web browser in Ubuntu. It is a lightweight web browser based on Mozilla and offers the following features:

  • Tabbed Browsing — open multiple pages within the same window
  • Pop-Up Blocking — blocks pop-up advertising windows

Search Bar — perform searches on a large number of sites without extra software

  • Standards Support — strongly adheres to web standards
  • Look-and-Feel Customisation — supports themes and addons
  • Chromium

    Chromium is the open-source version of Chrome. Chromium is available from the Universe repository, as package name chromium-browser. To install it, open the Terminal and enter sudo apt-get install chromium-browser.

    Chrome

    Chrome is Google’s web browser that is meant to be simple, extensible and fast. As well, you can use extensions like in Firefox.
    Please be advised if you have a bug in Chrome, because it is not provided by a supported Ubuntu repository, the Ubuntu project is unable to provide support or a fix. One would have to seek support from Google directly. If you want Ubuntu support you may want to use Chromium.

    Konqueror

    Konqueror is KDE’s advanced file manager, web browser and document viewer. Konqueror is an open source web browser that supports the current web standards.

    Opera

    Opera is a web browser developed by Opera Software.

    Please be advised if you have a bug in Opera, because it is not provided by a supported Ubuntu repository, the Ubuntu project is unable to provide support or a fix. One would have to seek support from Opera directly.

    Dillo

    Dillo is a lightweight and fast Internet browser. It does not have as many features as some of the other browsers listed here but it is well-suited for older computers that do not have enough speed or memory to run a full-featured browser.

    Epiphany

    Epiphany is a simple yet powerful web browser developed by the GNOME community. Its principles are simplicity and standards compliance. Simplicity is achieved by a well designed user interface which closely integrates with the GNOME desktop. Standards compliance is achieved on the HTML side by using the WebKit rendering engine; and on the user interface side by closely following the GNOME Human Interface Guidelines (HIG).

    Lynx is a character-based web browser that can be run inside a terminal or on the console.

    Links is a browser that may be be run in either text mode, or graphical mode.

    ELinks is an advanced text-mode browser.

    Midori

    Midori is a fast, lightweight graphical web browser based on Web Kit. Often used with the Xfce desktop environment.

    Ubuntu Web Browser

    Ubuntu Web Browser is a lightweight web browser tailored for Ubuntu, based on the Oxide browser engine and using the Ubuntu UI components. It is the default web browser for Ubuntu Phone OS. It is also included by default in the recent Ubuntu desktop releases.

    Setting Default Browser

    In the command line, type sudo update-alternatives --config x-www-browser

    A list of installed browsers will be displayed with a different number next to each browser. Type the number corresponding to the browser of your choice.

    WebBrowsers (последним исправлял пользователь pavakatubuntu 2015-10-05 14:27:00)

    The material on this wiki is available under a free license, see Copyright / License for details
    You can contribute to this wiki, see Wiki Guide for details

    Источник

    How to open default browser from command line Linux

    Checking default web browser:

    To set, change or view the default browser through a terminal or user interface is simple yet straightforward.
    Write out the below-given command to know the default browser of your Linux system.

    You can look into the list of other default applications, including your default browser. For performing this, there are two methods, In the first method, you can use the below-given command, and it will redirect you to the Default Application windows.

    Searching “Default Applications” in the activities is considered as the second method.

    The highlighted web browser in the “Web” option is already picked as the default web browser.

    You can also check out the list of other available alternatives for browsing the web on your system.

    The output declares that “Google Chrome” also exists as a web browser on our Ubuntu.

    Opening default web browser from the command line:

    Now, we will try to open the google instance in the default web browser, which is “firefox” in our case. Utilize the below-given command in your terminal if you want to do so.

    Here, you can see terminal command execution successfully open a google instance in our default web browser.

    Changing default web browser:

    For setting any other browser as the default one, you have to execute the “xdg” settings command with the browser name at the end. We will set “Google Chrome” as the default browser on our Linux system in the following example.

    Again, open any web instance by specifying its URL in the “xdg” open command. Furthermore, we have chosen “Google” for the testing.

    The output states that we are successful in setting “Google Chrome” as your default browser.

    Conclusion:

    As Linux users, we all have various installed web browsers, which we use according to our web preferences. Still, there exists a possibility of 90% using a single web browser for browsing activities which turns to be our default web browser. In this article, we have seen opening the default browser for any web instance from the command line. Furthermore, the procedure of viewing and setting any other alternatives to your default browser is also provided.

    About the author

    Talha Saif Malik

    Talha is a contributor at Linux Hint with a vision to bring value and do useful things for the world. He loves to read, write and speak about Linux, Data, Computers and Technology.

    Источник

    Читайте также:  Windows media player контекстное меню
    Оцените статью