Keeping the browser in one Workspace

Message
Author
User avatar
CaptainKirk
Posts: 40
Joined: Thu Jul 27, 2006 12:38 am

Keeping the browser in one Workspace

#1 Post by CaptainKirk »

I like to have several separate workspaces, one for emails (Thunderbird), one for browser (Firefox or Chrome), one for file manager (Thunar), one for Office apps (LibreOffice) rtc, etc. So Thunderbird and Firefox start off in separate Workspaces, but if I click on a web link in an email message in Thunderbird, the link gets opened in Firefox which now appears in the same workspace as Thunderbird. Is there any way to prevent this happening, and keep the browser in its own workspace?

Code: Select all

System:
  Kernel: 6.1.0-13-amd64 [6.1.55-1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1.0-13-amd64 root=UUID=<filter> ro quiet splash
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.36 info: xfce4-panel wm: xfwm v: 4.18.0 vt: 8
    dm: LightDM v: 1.26.0 Distro: MX-23.1_x64 Libretto June 15  2023 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Desktop Mobo: ASUSTeK model: A88XM-A v: Rev X.0x serial: <superuser required>
    BIOS: American Megatrends v: 1301 date: 04/01/2014
CPU:
  Info: model: AMD A6-5400K APU with Radeon HD Graphics bits: 64 type: MT MCP arch: Piledriver
    level: v2 built: 2012-13 process: GF 32nm family: 0x15 (21) model-id: 0x10 (16) stepping: 1
    microcode: 0x6001119
  Topology: cpus: 1x cores: 2 smt: enabled cache: L1: 96 KiB desc: d-2x16 KiB; i-1x64 KiB
    L2: 1024 KiB desc: 1x1024 KiB
  Speed (MHz): avg: 1407 min/max: 1400/3600 boost: enabled scaling: driver: acpi-cpufreq
    governor: ondemand cores: 1: 1407 2: 1407 bogomips: 14471
  Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed mitigation: untrained return thunk; SMT vulnerable
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines, STIBP: disabled, RSB filling, PBRSB-eIBRS: Not
    affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Trinity 2 [Radeon HD 7540D] vendor: ASUSTeK driver: radeon v: kernel
    alternate: amdgpu arch: TeraScale-3 code: Northern Islands process: TSMC 32nm built: 2010-13
    ports: active: HDMI-A-1 empty: DVI-D-1,VGA-1 bus-ID: 00:01.0 chip-ID: 1002:9991 class-ID: 0300
  Device-2: Microsoft LifeCam HD-3000 type: USB driver: snd-usb-audio,uvcvideo bus-ID: 5-2:2
    chip-ID: 045e:0779 class-ID: 0102
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.18.0 driver: X: loaded: radeon
    unloaded: fbdev,modesetting,vesa dri: r600 gpu: radeon display-ID: :1.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: HDMI-A-1 mapped: HDMI-0 model: LG (GoldStar) 23MP65 built: 2014 res: 1920x1080
    hz: 60 dpi: 96 gamma: 1.2 size: 510x290mm (20.08x11.42") diag: 587mm (23.1") ratio: 16:9 modes:
    max: 1920x1080 min: 640x480
  API: OpenGL v: 4.5 Mesa 22.3.6 renderer: AMD ARUBA (DRM 2.50.0 / 6.1.0-13-amd64 LLVM 15.0.6)
    direct-render: Yes
Audio:
  Device-1: AMD Trinity HDMI Audio vendor: ASUSTeK driver: snd_hda_intel bus-ID: 5-2:2 v: kernel
    chip-ID: 045e:0779 bus-ID: 00:01.1 class-ID: 0102 chip-ID: 1002:9902 class-ID: 0403
  Device-2: AMD FCH Azalia vendor: ASUSTeK AM1I-A driver: snd_hda_intel v: kernel bus-ID: 00:14.2
    chip-ID: 1022:780d class-ID: 0403
  Device-3: Microsoft LifeCam HD-3000 type: USB driver: snd-usb-audio,uvcvideo
  API: ALSA v: k6.1.0-13-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 0.3.65 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: ASUSTeK H81M-C
    driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: d000 bus-ID: 04:00.0
    chip-ID: 10ec:8168 class-ID: 0200
  IF: eth0 state: up speed: 100 Mbps duplex: full mac: <filter>
Bluetooth:
  Device-1: Cambridge Silicon Radio Bluetooth Dongle (HCI mode) type: USB driver: btusb v: 0.8
    bus-ID: 3-1:2 chip-ID: 0a12:0001 class-ID: e001
  Report: hciconfig ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 1.2 lmp-v: 2.1
    sub-v: 12e7 hci-v: 2.1 rev: 12e7
  Info: acl-mtu: 310:10 sco-mtu: 64:8 link-policy: rswitch hold sniff park
    link-mode: peripheral accept service-classes: rendering, capturing, object transfer, audio,
    telephony
Drives:
  Local Storage: total: 3.31 TiB used: 661.48 GiB (19.5%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Netac model: NVMe SSD 500GB size: 465.76 GiB
    block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: T0417A3 temp: 39.9 C scheme: MBR
  ID-2: /dev/sda maj-min: 8:0 vendor: Hitachi model: HDT721064SLA360 size: 596.17 GiB block-size:
    physical: 512 B logical: 512 B speed: 3.0 Gb/s type: HDD rpm: 7200 serial: <filter> rev: A31B
    scheme: MBR
  ID-3: /dev/sdb maj-min: 8:16 vendor: Western Digital model: WD20EZRZ-00Z5HB0 size: 1.82 TiB
    block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter>
    rev: 0A80 scheme: MBR
  ID-4: /dev/sdc maj-min: 8:32 vendor: SanDisk model: SDSSDH3250G size: 232.89 GiB block-size:
    physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 70RL scheme: MBR
  ID-5: /dev/sdd maj-min: 8:48 vendor: Maxtor model: STM3250820A size: 232.89 GiB block-size:
    physical: 512 B logical: 512 B speed: <unknown> type: N/A serial: <filter> rev: E scheme: MBR
Partition:
  ID-1: / raw-size: 59.73 GiB size: 58.49 GiB (97.93%) used: 41.07 GiB (70.2%) fs: ext4
    dev: /dev/sdc1 maj-min: 8:33
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 3 GiB used: 0 KiB (0.0%) priority: -2 file: /swapfile
Sensors:
  System Temperatures: cpu: 17.6 C mobo: N/A gpu: radeon temp: 7.0 C
  Fan Speeds (RPM): N/A
Repos:
  Packages: pm: dpkg pkgs: 2298 libs: 1209 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0 pm: flatpak pkgs: 0
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/enpass.list
    1: deb https://apt.enpass.io/ stable main
  Active apt repos in: /etc/apt/sources.list.d/google-chrome.list
    1: deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb http://mxlinux.mirrors.uk2.net/packages/mx/repo/ bookworm main non-free
  Active apt repos in: /etc/apt/sources.list.d/opera-stable.list
    1: deb https://deb.opera.com/opera-stable/ stable non-free
  Active apt repos in: /etc/apt/sources.list.d/skype-stable.list
    1: deb [arch=amd64] https://repo.skype.com/deb stable main
Info:
  Processes: 323 Uptime: 2h 47m wakeups: 1 Memory: 6.96 GiB used: 4.48 GiB (64.4%) Init: SysVinit
  v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
  Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: BIOS (legacy, CSM, MBR)
Chris
ASUS A88XM-Av; Dual core AMD A6-5400K APU, Radeon HD Graphics; 8 Gb RAM; 250 Gb, 320 Gb, 2 Tb, 650 Gb HDD; 250 Gb SSD
MX23.2

User avatar
towwire
Posts: 681
Joined: Fri Oct 15, 2010 12:15 pm

Re: Keeping the browser in one Workspace

#2 Post by towwire »

You can do it, here is an example.

You need to make a launcher for each program that runs a script. The launcher command will look like this for my Claws Mail:

Code: Select all

/home/towwire/exc-scripts/claws_mail.sh
The scrip (claws_mail.sh) is this.

Code: Select all


#!/bin/bash

/usr/bin/claws-mail &

sleep 1  # Feel free to experiment with the value.

/usr/bin/wmctrl -r 'towwire - Claws Mail 4.1.1' -t 1

exit 0
The wmctrl command places the program by its window name to the workspace you want. This is on workspace #2

wmctrl - Linux man page https://linux.die.net/man/1/wmctrl

or

https://www.linuxjournal.com/magazine/h ... op-wmctrl

I have a folder where I place all the scripts I run.
It is easier to fight for one's principles then to live up to them.

User avatar
CharlesV
Global Moderator
Posts: 7119
Joined: Sun Jul 07, 2019 5:11 pm

Re: Keeping the browser in one Workspace

#3 Post by CharlesV »

@towwire Excellent answer! Thank you for that!
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
CaptainKirk
Posts: 40
Joined: Thu Jul 27, 2006 12:38 am

Re: Keeping the browser in one Workspace

#4 Post by CaptainKirk »

Thank you for this useful hint. I shall try it out shortly
Chris
ASUS A88XM-Av; Dual core AMD A6-5400K APU, Radeon HD Graphics; 8 Gb RAM; 250 Gb, 320 Gb, 2 Tb, 650 Gb HDD; 250 Gb SSD
MX23.2

seriousness
Posts: 92
Joined: Wed Mar 30, 2022 4:15 am

Re: Keeping the browser in one Workspace

#5 Post by seriousness »

XFCE has a setting for this.

In "Window Manager Tweaks" --> "Focus", select "Switch to window's workspace".

Post Reply

Return to “XFCE Desktop Environment”