Permanently change the default browser on Garuda Raptor

Hello Garuda World.
I'm asking again because the old way is not working anymore.

I want to change my default browser once and for all to opera, but every time I open a new terminal session it resets to old default (firedragon). I type echo $BROWSER and the answer is firedragon.
Yeah on the GUI it's there "opera". I uninstalled firedragon but it still is the default browser.
I recently installed conda, and I want to type "jupyter notebook" and it be opened on opera.

I don't have a file called ~/.profile

mimeapps.list
[Default Applications]
x-scheme-handler/https=opera.desktop;
x-scheme-handler/mailto=opera.desktop;

When I type set -gx BROWSER opera it works fine (jupyter opens on opera) but then I open a new terminal session and the $BROWSER is firedragon.
Thanks in advance

Let's take a look at your garuda-inxi so we can see, for example, what desktop environment or window manager is in use.

3 Likes

garuda-inxi please.

also check your .bashrc

From my experience the browser and mail and whatnot environment variables are totally useless. The only one that gets used once in a while is $EDITOR

garuda-inxi

System:
  Kernel: 6.2.9-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.2.1
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=22d9b110-bf49-437b-9965-577ad80f53bc rw [email protected]
    quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
    resume=UUID=24cb57ed-7412-4adc-ab85-54a5fa9928c6 loglevel=3 ibt=off
  Desktop: KDE Plasma v: 5.27.3 tk: Qt v: 5.15.8 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Portable System: Dell product: Inspiron 7520 v: A14
    serial: <superuser required> Chassis: type: 8 v: A14
    serial: <superuser required>
  Mobo: Dell model: 0PXH02 v: A00 serial: <superuser required> UEFI: Dell
    v: A14 date: 05/17/2018
Battery:
  ID-1: BAT1 charge: 54.9 Wh (100.0%) condition: 54.9/57.7 Wh (95.1%)
    volts: 12.5 min: 11.1 model: SDI DELL 5CGM4A76 type: Unknown
    serial: <filter> status: full
CPU:
  Info: model: Intel Core i7-3632QM bits: 64 type: MT MCP arch: Ivy Bridge
    gen: core 3 level: v2 built: 2012-15 process: Intel 22nm family: 6
    model-id: 0x3A (58) stepping: 9 microcode: 0x21
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
    L3: 6 MiB desc: 1x6 MiB
  Speed (MHz): avg: 1448 high: 3200 min/max: 1200/3200 scaling:
    driver: intel_cpufreq governor: schedutil cores: 1: 3200 2: 1200 3: 1197
    4: 1200 5: 1197 6: 1197 7: 1197 8: 1197 bogomips: 35117
  Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities: <filter>
Graphics:
  Device-1: Intel 3rd Gen Core processor Graphics vendor: Dell driver: i915
    v: kernel arch: Gen-7 process: Intel 22nm built: 2012-13 ports:
    active: LVDS-1 empty: DP-1,HDMI-A-1,VGA-1 bus-ID: 00:02.0
    chip-ID: 8086:0166 class-ID: 0300
  Device-2: AMD Chelsea LP [Radeon HD 7730M] vendor: Dell driver: radeon
    v: kernel alternate: amdgpu arch: GCN-1 code: Southern Islands
    process: TSMC 28nm built: 2011-20 pcie: gen: 2 speed: 5 GT/s lanes: 4
    link-max: lanes: 16 bus-ID: 01:00.0 chip-ID: 1002:682f class-ID: 0300
    temp: 52.0 C
  Device-3: Microdia Laptop_Integrated_Webcam_HD type: USB driver: uvcvideo
    bus-ID: 2-1.5:3 chip-ID: 0c45:644a class-ID: 0e02
  Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.1
    compositor: kwin_x11 driver: X: loaded: modesetting,radeon
    alternate: fbdev,intel,vesa dri: crocus gpu: i915 display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: LVDS-1 model: Seiko Epson 0x5448 built: 2011 res: 1920x1080
    hz: 60 dpi: 142 gamma: 1.2 size: 344x194mm (13.54x7.64") diag: 395mm (15.5")
    ratio: 16:9 modes: 1920x1080
  API: OpenGL v: 4.2 Mesa 23.0.1 renderer: Mesa Intel HD Graphics 4000 (IVB
    GT2) direct-render: Yes
Audio:
  Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Dell
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:1e20
    class-ID: 0403
  API: ALSA v: k6.2.9-zen1-1-zen status: kernel-api with: aoss
    type: oss-emulator tools: N/A
  Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
  Server-2: PipeWire v: 0.3.67 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Dell driver: r8169 v: kernel pcie: speed: Unknown lanes: 63
    link-max: gen: 6 speed: 64 GT/s port: 2000 bus-ID: 07:00.0
    chip-ID: 10ec:8168 class-ID: 0200
  IF: enp7s0 state: down mac: <filter>
  Device-2: Intel Centrino Wireless-N 2230 driver: iwlwifi v: kernel pcie:
    gen: 1 speed: 2.5 GT/s lanes: 1 bus-ID: 08:00.0 chip-ID: 8086:0887
    class-ID: 0280
  IF: wlp8s0 state: up mac: <filter>
Bluetooth:
  Device-1: Intel Centrino Bluetooth Wireless Transceiver type: USB
    driver: btusb v: 0.8 bus-ID: 1-1.5:3 chip-ID: 8087:07da class-ID: e001
  Report: bt-adapter ID: hci0 rfk-id: 0 state: down
    bt-service: enabled,running rfk-block: hardware: no software: yes
    address: <filter>
RAID:
  Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci
    v: 3.0 port: 4060 bus-ID: 00:1f.2 chip-ID: 8086:282a rev: N/A class-ID: 0104
Drives:
  Local Storage: total: 1.85 TiB used: 1.55 TiB (83.8%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 860 EVO 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: 4B6Q scheme: GPT
  ID-2: /dev/sdb maj-min: 8:16 vendor: Samsung model: SSD PM830 mSATA 32GB
    size: 29.82 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: 3D1Q scheme: GPT
  ID-3: /dev/sdc maj-min: 8:32 vendor: Samsung model: ST1000LM024 HN-M101MBB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 3.0 Gb/s
    type: HDD rpm: 5400 serial: <filter> rev: 0004 scheme: GPT
Partition:
  ID-1: / raw-size: 175 GiB size: 175 GiB (100.00%) used: 82.65 GiB (47.2%)
    fs: btrfs dev: /dev/sda8 maj-min: 8:8
  ID-2: /boot/efi raw-size: 1024 MiB size: 1022 MiB (99.80%)
    used: 608 KiB (0.1%) fs: vfat dev: /dev/sda7 maj-min: 8:7
  ID-3: /home raw-size: 175 GiB size: 175 GiB (100.00%)
    used: 82.65 GiB (47.2%) fs: btrfs dev: /dev/sda8 maj-min: 8:8
  ID-4: /var/log raw-size: 175 GiB size: 175 GiB (100.00%)
    used: 82.65 GiB (47.2%) fs: btrfs dev: /dev/sda8 maj-min: 8:8
  ID-5: /var/tmp raw-size: 175 GiB size: 175 GiB (100.00%)
    used: 82.65 GiB (47.2%) fs: btrfs dev: /dev/sda8 maj-min: 8:8
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 15.49 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
  ID-2: swap-2 type: partition size: 4 GiB used: 0 KiB (0.0%) priority: -2
    dev: /dev/sda6 maj-min: 8:6
Sensors:
  System Temperatures: cpu: 57.0 C mobo: 46.0 C gpu: radeon temp: 51.0 C
  Fan Speeds (RPM): cpu: 4500
Info:
  Processes: 285 Uptime: 4h 44m wakeups: 1 Memory: 15.49 GiB
  used: 4.47 GiB (28.8%) Init: systemd v: 253 default: graphical
  tool: systemctl Compilers: gcc: 12.2.1 clang: 15.0.7 Packages: pm: pacman
  pkgs: 1734 libs: 464 tools: octopi,pamac,paru,yay Shell: fish v: 3.6.1
  default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.26
Garuda (2.6.16-1):
  System install date:     2023-03-10
  Last full system update: 2023-04-05
  Is partially upgraded:   No
  Relevant software:       snapper NetworkManager dracut
  Windows dual boot:       Probably (Run as root to verify)
  Failed units:

bashrc

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

# Load starship prompt if starship is installed
if  [ -x /usr/bin/starship ]; then
    __main() {
        local major="${BASH_VERSINFO[0]}"
        local minor="${BASH_VERSINFO[1]}"

        if ((major > 4)) || { ((major == 4)) && ((minor >= 1)); }; then
            source <("/usr/bin/starship" init bash --print-full-init)
        else
            source /dev/stdin <<<"$("/usr/bin/starship" init bash --print-full-init)"
        fi
    }
    __main
    unset -f __main
fi

# Advanced command-not-found hook
source /usr/share/doc/find-the-command/ftc.bash

# Aliases
alias dir='dir --color=auto'
alias egrep='grep -E --color=auto'
alias fgrep='grep -F --color=auto'
alias fixpacman="sudo rm /var/lib/pacman/db.lck"
alias grep='grep --color=auto'
alias grubup="sudo update-grub"
alias hw='hwinfo --short'
alias psmem10='ps auxf | sort -nr -k 4 | head -10'
alias psmem='ps auxf | sort -nr -k 4'
alias rmpkg="sudo pacman -Rdd"
alias tarnow='tar -acf '
alias untar='tar -zxvf '
alias upd='/usr/bin/update'
alias vdir='vdir --color=auto'
alias wget='wget -c '

# Help people new to Arch
alias apt-get='man pacman'
alias apt='man pacman'
alias helpme='cht.sh --shell'
alias please='sudo'
alias tb='nc termbin.com 9999'

# Cleanup orphaned packages
alias cleanup='sudo pacman -Rns `pacman -Qtdq`'

# Get the error messages from journalctl
alias jctl="journalctl -p 3 -xb"

# Recent installed packages
alias rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl"

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/opt/anaconda/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/opt/anaconda/etc/profile.d/conda.sh" ]; then
        . "/opt/anaconda/etc/profile.d/conda.sh"
    else
        export PATH="/opt/anaconda/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<
1 Like

Thanks, but it didn't work, I even restarted my PC...

This is the right idea, but you need to add more associations. Try this:

micro ~/.config/mimeapps.list
[Default Applications]
x-scheme-handler/http=opera.desktop
text/html=opera.desktop
text/xml=opera.desktop
application/xhtml_xml=opera.desktop
image/webp=opera.desktop
x-scheme-handler/https=opera.desktop
x-scheme-handler/ftp=opera.desktop

[Added Associations]
text/html=opera.desktop;
text/xml=opera.desktop;
application/xhtml_xml=opera.desktop;
image/webp=opera.desktop;
x-scheme-handler/https=opera.desktop;
x-scheme-handler/ftp=opera.desktop;

Still didn't work
Attention: I don't know whether the order of lines or of my added semicolons make any difference at all. I put a semicolon at the end of each line.

My whole file now.

kate ~/.config/mimeapps.list
[Added Associations]
application/epub+zip=thorium.desktop;okularApplication_epub.desktop;org.kde.ark.desktop;
application/pdf=okularApplication_pdf.desktop;foxitreader.desktop;libreoffice-draw.desktop;org.kde.karbon.desktop;krita_pdf.desktop;firefox.desktop;chromium.desktop;gimp.desktop;org.inkscape.Inkscape.desktop;wine-extension-pdf.desktop;
inode/directory=org.kde.dolphin.desktop;
text/x-c++src=code.desktop;org.kde.kate.desktop;org.kde.kwrite.desktop;libreoffice-writer.desktop;okularApplication_txt.desktop;micro.desktop;vim.desktop;wine-extension-txt.desktop;org.kde.calligrawords_ascii.desktop;
video/mp4=smplayer.desktop;fr.handbrake.ghb.desktop;org.kde.dragonplayer.desktop;smplayer_enqueue.desktop;mplayer.desktop;vlc.desktop;mpv.desktop;
video/x-ms-wmv=smplayer.desktop;fr.handbrake.ghb.desktop;org.strawberrymusicplayer.strawberry.desktop;org.kde.dragonplayer.desktop;mpv.desktop;vlc.desktop;smplayer_enqueue.desktop;mplayer.desktop;
x-scheme-handler/geo=qwant-maps-geo-handler.desktop;
x-scheme-handler/http=opera.desktop;
x-scheme-handler/https=opera.desktop;
x-scheme-handler/mailto=opera.desktop;
x-scheme-handler/tel=org.kde.kdeconnect.handler.desktop;
text/html=opera.desktop;
text/xml=opera.desktop;
application/xhtml_xml=opera.desktop;
image/webp=opera.desktop;
x-scheme-handler/ftp=opera.desktop;


[Default Applications]
application/epub+zip=thorium.desktop;
application/pdf=okularApplication_pdf.desktop;
inode/directory=org.kde.dolphin.desktop;
text/html=opera.desktop;
text/x-c++src=code.desktop;
video/mp4=smplayer.desktop;
video/x-ms-wmv=smplayer.desktop;
x-scheme-handler/geo=qwant-maps-geo-handler.desktop;
x-scheme-handler/http=opera.desktop;
x-scheme-handler/https=opera.desktop;
x-scheme-handler/mailto=opera.desktop;
x-scheme-handler/opds=thorium.desktop;
x-scheme-handler/tel=org.kde.kdeconnect.handler.desktop;
x-scheme-handler/thorium=thorium.desktop;
text/xml=opera.desktop;
application/xhtml_xml=opera.desktop;
image/webp=opera.desktop;
x-scheme-handler/ftp=opera.desktop;

Try taking those out.

Forget it, I did a work around here and it worked for conda as I intended. Thanks for the help.

~/.config/fish/config.fish
set -gx BROWSER "opera"

~/.bashrc
BROWSER="opera"

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.