GeoGebra Discovery Crashes showing a problem with Java https://askubuntu.com/questions/1560507/geogebra-discovery-crashes-showing-a-problem-with-java

GeoGebra Discovery Crashes showing a problem with Java. How can I fix this?

**C  [libjavagiac640.7571557872437044.so+0x2d0b70]  giac::get_realtime()+0x0**
problem area
#
# Core dump will be written. Default location: core.14652 (may not exist)
#
# An error report file with more information is saved as:
# /home/shivdutt/hs_err_pid14652.log
If you would like to submit a bug report, please visit:
#   https://bugs.launchpad.net/ubuntu/+source/openjdk-lts
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted (core dumped)
ubuntu 22.04, pulseaudio-equalizer (qpaeq) seems to have no affect, shows no presets, no settings, no graph? https://askubuntu.com/questions/1560506/ubuntu-22-04-pulseaudio-equalizer-qpaeq-seems-to-have-no-affect-shows-no-pre

ubuntu 22.04 on framework laptop, I installed pulseaudio-equalizer using

sudo apt install pulseaudio-equalizer

then edited /etc/pulse/default.pa and added to the end:

load-module module-equalizer-sink
load-module module-dbus-protocol

then restarted pulseaudio.

Launched the equalizer as "qpaeq"

The equalizer comes up ok, but the sliders seem to have no effect when playing something on youtube using firefox or when playing an mp3 using vlc. If I kill the equalizer and run vlc again, the vlc equalizer doesn't seem to do anything either.

By "doesn't seem to do anything" I mean if I move the sliders for frequencies below 1000Hz to max and those 1000Hz and above to min, I don't hear any difference; then resetting to normal/flat I also hear no change. Same thing if I switch which are set to max and min.

In addition, there are no presets in the drop-down menu. Finally, is there supposed to be a frequency response graph? I don't see anything.

Thanks for any clues / pointers.

Ubuntu desktop booting only from usb and holding in ram storage, but installer simply crashes with 0 error messages every time it is attempted to use https://askubuntu.com/questions/1560505/ubuntu-desktop-booting-only-from-usb-and-holding-in-ram-storage-but-installer-s

I had windows on a failed ssd and decided to install ubuntu instead. I put in new fresh ssd and made sure the bios recognizes it and it does. I used rufus and Ubuntu 24.04.3 desktop and flashed it on the usb. Plugged it into the new ssd pc and selected the usb in boot and booted it up. I selected try or install Ubuntu and was able to get to the desktop purpley screen but the install crashes or simply just disappears everytime i open it. Ubuntu that is somehow running clearly only goes off the usb and is only temporary stored on ram when disconnected and is never actually installed. I have tried everything from formatting the usb in all kinds of ways to using etcher instead and still the same problem everytime. I looked in ubuntu desktop in gparted and it does recognize the new ssd. I am so confused and tired bc it feels like i have tried everything. I have never used anything Linux related before so please ask questions if this is confusing. The only thing that has gotten me this far is online forums and chat gbt.

Permanently map a Windows drive in Ubuntu 22.04 https://askubuntu.com/questions/1560504/permanently-map-a-windows-drive-in-ubuntu-22-04

I need to permanently map a Windows drive on 2 Ubuntu 22.04 machines with the same setup and configuration.

The strange thing is one is working, but the other one just doesn't.

//serverip/path /home/ubuntu/pictures ctfs credentials=/home/ubuntu/.smbcredentials,uid=1000,gid=1000,x-systemd,automount 0 0 UUID=F47A-11C2 /boot/efi vfat defaults 0 1

When I try to mount it after reboot, the mapped drive will show Unable to access location mount.cifs: Permission denied. I have tried to add _Netdev to it, but it's still not able to permanently map the drive.

Copy big data best practice [closed] https://askubuntu.com/questions/1560503/copy-big-data-best-practice

I want to copy appr. 12TB of data from one storage to another on a ubuntu 20.04 machine (ssh terminal, no desktop).

When I would start this with rsync the terminal/ssh session would loose connection after some time and I am not longer able to check the status.

So what is here the best practice to copy big data? Rsync output in file, tmux or some other way, how the pros do this? I am not interestet in getting live information for each file but I want to have information if there is/was an error and maybe an overall/atm status (atm XX percent, running time, avg speed, like that).

Ubuntu 24.04: All Chromium-based browsers crash when viewing Downloads https://askubuntu.com/questions/1560502/ubuntu-24-04-all-chromium-based-browsers-crash-when-viewing-downloads

I’m experiencing a repeatable crash issue when using Chrome on Ubuntu 24.04. Every time I download a file and then try to open the download list via the downloads button, Chrome immediately crashes.

I’ve already tried several fresh Chrome installations, including a completely fresh Ubuntu installation. The exact same issue occurs with Brave and Chromium as well.

I also tried launching Chrome without GPU acceleration and fresh profiles, but the crash still happens. At this point, I suspect there may be a problem with the NVIDIA driver 580.95.05, which was installed automatically during the initial Ubuntu setup.

Any help or insights would be greatly appreciated.

Terminal is not working in Ubuntu fresh install [duplicate] https://askubuntu.com/questions/1560493/terminal-is-not-working-in-ubuntu-fresh-install

The Terminal program does not work. I'm trying to enter text, but the line remains blank. I've seen this before in Ubuntu.

I'm writing about a standard Ubuntu image on an .iso disk downloaded from the Ubuntu downloads page. I installed the OS on my own hardware. It's standard hardware. Previously it was a Windows 11 PC. I didn't change any settings.

There's a simple reason for this. Does anyone know what this is?

CUPS wiped on upgrade to 24.04.3 https://askubuntu.com/questions/1560489/cups-wiped-on-upgrade-to-24-04-3

My 24.04 LTS just updated, and it seems to have wiped out CUPS. I have tried sudo apt-get install --reinstall cups - no joy. After research I tried system-config-printer and get a series of deprecation warnings. I have also tried sudo systemctl restart cups and get:

Job for cups.service failed because the control process exited with error code.
See "systemctl status cups.service" and "journalctl -xeu cups.service" for details.

When I go to systemctl status cups.service I get:

cups.service - CUPS Scheduler
     Loaded: loaded (/usr/lib/systemd/system/cups.service; enabled; preset: ena>
     Active: inactive (dead) (Result: exit-code) since Thu 2025-12-04 13:57:56 >
TriggeredBy: × cups.socket
             × cups.path
       Docs: man:cupsd(8)
    Process: 8007 ExecStart=/usr/sbin/cupsd -l (code=exited, status=1/FAILURE)
   Main PID: 8007 (code=exited, status=1/FAILURE)
        CPU: 17ms
and then more of the log of my earlier tries.
journalctl -xeu cups.service  yeilds:
   Subject: Automatic restarting of a unit has been scheduled
   Support: http://www.ubuntu.com/support

   Automatic restarting of the unit cups.service has been scheduled, as the res>
   the configured Restart= setting for the unit.
Dec 04 13:57:56 thomas-ThinkCentre-M75e systemd[1]: Stopped cups.service - CUPS>
   Subject: A stop job for unit cups.service has finished
   Defined-By: systemd
   Support: http://www.ubuntu.com/support
   
   A stop job for unit cups.service has finished.
   
   The job identifier is 6048 and the job result is done.
Dec 04 13:57:56 thomas-ThinkCentre-M75e systemd[1]: Dependency failed for cups.>
   Subject: A start job for unit cups.service has failed
   Defined-By: systemd
   Support: http://www.ubuntu.com/support
   
   A start job for unit cups.service has finished with a failure.
   
   The job identifier is 6048 and the job result is dependency. 
  (and more...)
What's the point off letting me turn of "Automatic" and specify what DNS to use, if the network just ignores it? https://askubuntu.com/questions/1560485/whats-the-point-off-letting-me-turn-of-automatic-and-specify-what-dns-to-use

What's the point off letting me turn of "Automatic" and specify what DNS to use, if the network just ignores it?

  • Go to a wifi network.

  • IPv4

  • Disable "Automatic"

  • Specify a DNS different from the wifi network's default.

  • Click "Apply"

  • Look at "details"

    DNS4 will be the wifi's DNS, not your specified server(s).

How to enable manifest v2 in Chrome https://askubuntu.com/questions/1560475/how-to-enable-manifest-v2-in-chrome

I have google-chrome-stable 142.0.7444.175-1 installed, and I'm trying to use manifests v2

When I open Chrome from the shortcut, it runs a exec commands that I think are configured here /usr/share/applications/google-chrome.desktop there are three different configs [Desktop Entry], [Desktop Action new-window], [Desktop Action new-private-window].

The exec commands look like this Exec=/usr/bin/google-chrome-stable %U for the [Desktop Entry], and similar for the other exec commands. I tried adding flags to the exec commands config, and I do not think that it worked. I didn't test a manifest, but I looked at the chrome://flags, and it didn't tell me about v2.

These are the flags I tried to add, and it looked like this:

Exec=/usr/bin/google-chrome-stable --enable-features=AllowLegacyMV2Extensions --disable-features=ExtensionManifestV2Unsupported,ExtensionManifestV2Disabled,ExtensionsManifestV3Only %U

Here is the entire file, well most of the file, this page has problems understanding Korean, so I have to remove that.

[Desktop Entry]
Version=1.0
Name=Google Chrome
# Only KDE 4 seems to use GenericName, so we reuse the KDE strings.
# From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413.
GenericName=Web Browser
GenericName[ar]=متصفح الشبكة
GenericName[bg]=Уеб браузър
GenericName[ca]=Navegador web
GenericName[cs]=WWW prohlížeč
GenericName[da]=Browser
GenericName[de]=Web-Browser
GenericName[el]=Περιηγητής ιστού
GenericName[en_GB]=Web Browser
GenericName[es]=Navegador web
GenericName[et]=Veebibrauser
GenericName[fi]=WWW-selain
GenericName[fr]=Navigateur Web
GenericName[gu]=વેબ બ્રાઉઝર
GenericName[he]=דפדפן אינטרנט
GenericName[hi]=वेब ब्राउज़र
GenericName[hu]=Webböngésző
GenericName[it]=Browser Web
GenericName[ja]=ウェブブラウザ
GenericName[kn]=ಜಾಲ ವೀಕ್ಷಕ
GenericName[ko]= removed removed
GenericName[lt]=Žiniatinklio naršyklė
GenericName[lv]=Tīmekļa pārlūks
GenericName[ml]=വെബ് ബ്രൌസര്‍
GenericName[mr]=वेब ब्राऊजर
GenericName[nb]=Nettleser
GenericName[nl]=Webbrowser
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador da Internet
GenericName[ro]=Navigator de Internet
GenericName[ru]=Веб-браузер
GenericName[sl]=Spletni brskalnik
GenericName[sv]=Webbläsare
GenericName[ta]=இணைய உலாவி
GenericName[th]=เว็บเบราว์เซอร์
GenericName[tr]=Web Tarayıcı
GenericName[uk]=Навігатор Тенет
GenericName[zh_CN]=网页浏览器
GenericName[zh_HK]=網頁瀏覽器
GenericName[zh_TW]=網頁瀏覽器
# Not translated in KDE, from Epiphany 2.26.1-0ubuntu1.
GenericName[bn]=ওয়েব ব্রাউজার
GenericName[fil]=Web Browser
GenericName[hr]=Web preglednik
GenericName[id]=Browser Web
GenericName[or]=ଓ୍ବେବ ବ୍ରାଉଜର
GenericName[sk]=WWW prehliadač
GenericName[sr]=Интернет прегледник
GenericName[te]=మహాతల అన్వేషి
GenericName[vi]=Bộ duyệt Web
# Gnome and KDE 3 uses Comment.
Comment=Access the Internet
Comment[ar]=الدخول إلى الإنترنت
Comment[bg]=Достъп до интернет
Comment[bn]=ইন্টারনেটটি অ্যাক্সেস করুন
Comment[ca]=Accedeix a Internet
Comment[cs]=Přístup k internetu
Comment[da]=Få adgang til internettet
Comment[de]=Internetzugriff
Comment[el]=Πρόσβαση στο Διαδίκτυο
Comment[en_GB]=Access the Internet
Comment[es]=Accede a Internet.
Comment[et]=Pääs Internetti
Comment[fi]=Käytä internetiä
Comment[fil]=I-access ang Internet
Comment[fr]=Accéder à Internet
Comment[gu]=ઇંટરનેટ ઍક્સેસ કરો
Comment[he]=גישה אל האינטרנט
Comment[hi]=इंटरनेट तक पहुंच स्थापित करें
Comment[hr]=Pristup Internetu
Comment[hu]=Internetelérés
Comment[id]=Akses Internet
Comment[it]=Accesso a Internet
Comment[ja]=インターネットにアクセス
Comment[kn]=ಇಂಟರ್ನೆಟ್ ಅನ್ನು ಪ್ರವೇಶಿಸಿ
Comment[ko]=removed removed
Comment[lt]=Interneto prieiga
Comment[lv]=Piekļūt internetam
Comment[ml]=ഇന്റര്‍‌നെറ്റ് ആക്‌സസ് ചെയ്യുക
Comment[mr]=इंटरनेटमध्ये प्रवेश करा
Comment[nb]=Gå til Internett
Comment[nl]=Verbinding maken met internet
Comment[or]=ଇଣ୍ଟର୍ନେଟ୍ ପ୍ରବେଶ କରନ୍ତୁ
Comment[pl]=Skorzystaj z internetu
Comment[pt]=Aceder à Internet
Comment[pt_BR]=Acessar a internet
Comment[ro]=Accesaţi Internetul
Comment[ru]=Доступ в Интернет
Comment[sk]=Prístup do siete Internet
Comment[sl]=Dostop do interneta
Comment[sr]=Приступите Интернету
Comment[sv]=Gå ut på Internet
Comment[ta]=இணையத்தை அணுகுதல்
Comment[te]=ఇంటర్నెట్‌ను ఆక్సెస్ చెయ్యండి
Comment[th]=เข้าถึงอินเทอร์เน็ต
Comment[tr]=İnternet'e erişin
Comment[uk]=Доступ до Інтернету
Comment[vi]=Truy cập Internet
Comment[zh_CN]=访问互联网
Comment[zh_HK]=連線到網際網路
Comment[zh_TW]=連線到網際網路
#Exec=/usr/bin/google-chrome-stable %U
Exec=/usr/bin/google-chrome-stable --enable-features=AllowLegacyMV2Extensions --disable-features=ExtensionManifestV2Unsupported,ExtensionManifestV2Disabled,ExtensionsManifestV3Only %U
StartupNotify=true
Terminal=false
Icon=google-chrome
Type=Application
Categories=Network;WebBrowser;
MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https;
Actions=new-window;new-private-window;

[Desktop Action new-window]
Name=New Window
Name[am]=አዲስ መስኮት
Name[ar]=نافذة جديدة
Name[bg]=Нов прозорец
Name[bn]=নতুন উইন্ডো
Name[ca]=Finestra nova
Name[cs]=Nové okno
Name[da]=Nyt vindue
Name[de]=Neues Fenster
Name[el]=Νέο Παράθυρο
Name[en_GB]=New Window
Name[es]=Nueva ventana
Name[et]=Uus aken
Name[fa]=پنجره جدید
Name[fi]=Uusi ikkuna
Name[fil]=New Window
Name[fr]=Nouvelle fenêtre
Name[gu]=નવી વિંડો
Name[hi]=नई विंडो
Name[hr]=Novi prozor
Name[hu]=Új ablak
Name[id]=Jendela Baru
Name[it]=Nuova finestra
Name[iw]=חלון חדש
Name[ja]=新規ウインドウ
Name[kn]=ಹೊಸ ವಿಂಡೊ
Name[ko]=removed removed
Name[lt]=Naujas langas
Name[lv]=Jauns logs
Name[ml]=പുതിയ വിന്‍ഡോ
Name[mr]=नवीन विंडो
Name[nl]=Nieuw venster
Name[no]=Nytt vindu
Name[pl]=Nowe okno
Name[pt]=Nova janela
Name[pt_BR]=Nova janela
Name[ro]=Fereastră nouă
Name[ru]=Новое окно
Name[sk]=Nové okno
Name[sl]=Novo okno
Name[sr]=Нови прозор
Name[sv]=Nytt fönster
Name[sw]=Dirisha Jipya
Name[ta]=புதிய சாளரம்
Name[te]=క్రొత్త విండో
Name[th]=หน้าต่างใหม่
Name[tr]=Yeni Pencere
Name[uk]=Нове вікно
Name[vi]=Cửa sổ Mới
Name[zh_CN]=新建窗口
Name[zh_TW]=開新視窗
Exec=/usr/bin/google-chrome-stable --enable-features=AllowLegacyMV2Extensions --disable-features=ExtensionManifestV2Unsupported,ExtensionManifestV2Disabled,ExtensionsManifestV3Only

[Desktop Action new-private-window]
Name=New Incognito Window
Name[ar]=نافذة جديدة للتصفح المتخفي
Name[bg]=Нов прозорец „инкогнито“
Name[bn]=নতুন ছদ্মবেশী উইন্ডো
Name[ca]=Finestra d'incògnit nova
Name[cs]=Nové anonymní okno
Name[da]=Nyt inkognitovindue
Name[de]=Neues Inkognito-Fenster
Name[el]=Νέο παράθυρο για ανώνυμη περιήγηση
Name[en_GB]=New Incognito window
Name[es]=Nueva ventana de incógnito
Name[et]=Uus inkognito aken
Name[fa]=پنجره جدید حالت ناشناس
Name[fi]=Uusi incognito-ikkuna
Name[fil]=Bagong Incognito window
Name[fr]=Nouvelle fenêtre de navigation privée
Name[gu]=નવી છુપી વિંડો
Name[hi]=नई गुप्त विंडो
Name[hr]=Novi anoniman prozor
Name[hu]=Új Inkognitóablak
Name[id]=Jendela Penyamaran baru
Name[it]=Nuova finestra di navigazione in incognito
Name[iw]=חלון חדש לגלישה בסתר
Name[ja]=新しいシークレット ウィンドウ
Name[kn]=ಹೊಸ ಅಜ್ಞಾತ ವಿಂಡೋ
Name[ko]=removed removed
Name[lt]=Naujas inkognito langas
Name[lv]=Jauns inkognito režīma logs
Name[ml]=പുതിയ വേഷ പ്രച്ഛന്ന വിന്‍ഡോ
Name[mr]=नवीन गुप्त विंडो
Name[nl]=Nieuw incognitovenster
Name[no]=Nytt inkognitovindu
Name[pl]=Nowe okno incognito
Name[pt]=Nova janela de navegação anónima
Name[pt_BR]=Nova janela anônima
Name[ro]=Fereastră nouă incognito
Name[ru]=Новое окно в режиме инкогнито
Name[sk]=Nové okno inkognito
Name[sl]=Novo okno brez beleženja zgodovine
Name[sr]=Нови прозор за прегледање без архивирања
Name[sv]=Nytt inkognitofönster
Name[ta]=புதிய மறைநிலைச் சாளரம்
Name[te]=క్రొత్త అజ్ఞాత విండో
Name[th]=หน้าต่างใหม่ที่ไม่ระบุตัวตน
Name[tr]=Yeni Gizli pencere
Name[uk]=Нове вікно в режимі анонімного перегляду
Name[vi]=Cửa sổ ẩn danh mới
Name[zh_CN]=新建隐身窗口
Name[zh_TW]=新增無痕式視窗
Exec=/usr/bin/google-chrome-stable --enable-features=AllowLegacyMV2Extensions --disable-features=ExtensionManifestV2Unsupported,ExtensionManifestV2Disabled,ExtensionsManifestV3Only --incognito

I also looked at this file.

 cat /usr/bin/google-chrome-stable 
#!/bin/bash
#
# Copyright 2011 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Let the wrapped binary know that it has been run through the wrapper.
export CHROME_WRAPPER="`readlink -f "$0"`"

HERE="`dirname "$CHROME_WRAPPER"`"

# We include some xdg utilities next to the binary, and we want to prefer them
# over the system versions when we know the system versions are very old. We
# detect whether the system xdg utilities are sufficiently new to be likely to
# work for us by looking for xdg-settings. If we find it, we leave $PATH alone,
# so that the system xdg utilities (including any distro patches) will be used.
if ! command -v xdg-settings &> /dev/null; then
  # Old xdg utilities. Prepend $HERE to $PATH to use ours instead.
  export PATH="$HERE:$PATH"
else
  # Use system xdg utilities. But first create mimeapps.list if it doesn't
  # exist; some systems have bugs in xdg-mime that make it fail without it.
  xdg_app_dir="${XDG_DATA_HOME:-$HOME/.local/share/applications}"
  mkdir -p "$xdg_app_dir"
  [ -f "$xdg_app_dir/mimeapps.list" ] || touch "$xdg_app_dir/mimeapps.list"
fi

export CHROME_VERSION_EXTRA="stable"

# We don't want bug-buddy intercepting our crashes. http://crbug.com/24120
export GNOME_DISABLE_CRASH_DIALOG=SET_BY_GOOGLE_CHROME

# Sanitize std{in,out,err} because they'll be shared with untrusted child
# processes (http://crbug.com/376567).
exec < /dev/null
exec > >(exec cat)
exec 2> >(exec cat >&2)

# Note: exec -a below is a bashism.
exec -a "$0" "$HERE/chrome" "$@"

I'm not sure what I should actually do so I can use manifest v2, or if I even should use manifest v2. I also want it to work from the desktop shortcut.

It could be I actually want to edit /usr/bin/google-chrome-stable or it could be I just use Firefox.

Ubuntu not displaying on Thinkpad boot menu https://askubuntu.com/questions/1560473/ubuntu-not-displaying-on-thinkpad-boot-menu

I am attempting to dual boot Ubuntu onto my Lenovo Thinkpad P14 Gen 4 (AMD). Windows 11 will be my primary OS, but I wanted to experiment with dual boot, and wanted to do it this way as opposed to a VM.

I followed the tutorial at this link https://ubuntu.com/tutorials/install-ubuntu-desktop#3-create-a-bootable-usb-stick, and I am stuck on the F12 boot menu. The displayed drive shows the NVMe and USB HDD, however Ubuntu does not show up as a bootable OS.

To troubleshoot:

Printer service does not seem to be available on Ubuntu 24.04 https://askubuntu.com/questions/1560433/printer-service-does-not-seem-to-be-available-on-ubuntu-24-04

enter image description here

I'm using Ubuntu 24.04. I tried to print a photo, and my system reports that the printer service seems to be unavailable. I used it yesterday without an issue, but today the printer service is unavailable in the settings screen.

How to read desktop notifications in the terminal https://askubuntu.com/questions/1560426/how-to-read-desktop-notifications-in-the-terminal

I am trying to create a script that listens to the desktop notifications dbus and print the sender and message to the command line.... the final goal is to run a specific function when I get a specific notification.

I tried using dbus-monitor --session which prints stuff out when I get a notification, but I don't see the actual notification. I had Gemini AI help me write some python code, this code runs, but nothing happens when I get a notification.

import asyncio
from dbus_next.aio import MessageBus
from dbus_next.constants import BusType, MessageType
from dbus_next import Message, Variant
import logging

# Set up basic logging
# Note: We are only using INFO level for connection status, 
# message processing is handled via print() for clarity.
logging.basicConfig(level=logging.INFO, format='%(levelname)s: %(message)s')

# --- DBus Interface Constants ---
# The D-Bus service name for notifications
NOTIF_SERVICE = 'org.freedesktop.Notifications'
# The D-Bus object path for notifications
NOTIF_PATH = '/org/freedesktop/Notifications'
# The D-Bus interface for notifications
NOTIF_INTERFACE = NOTIF_SERVICE

# ANSI escape codes for bold text
BOLD_START = '\033[1m'
BOLD_END = '\033[0m'

def message_handler(message):
    """
    Generic handler for D-Bus messages, focusing only on new notifications 
    (Notify method calls) and printing the sender, summary, and message body.
    """
    if message.interface == NOTIF_INTERFACE:
        
        # --- Handle New Notification (Method Call) ---
        if message.message_type == MessageType.METHOD_CALL and message.member == 'Notify':
            # Notify arguments: (app_name, replaces_id, app_icon, summary, body, actions, hints, expire_timeout)
            
            # Ensure we have enough arguments (at least app_name and body)
            if len(message.body) >= 8:
                app_name = message.body[0] # App Name (Sender)
                summary = message.body[3] # Notification Summary (Title)
                body_text = message.body[4] # Notification Body (Main message)
                
                # Combine summary and body for the message
                # If both exist, use "Summary: Body". If only one exists, use that.
                if summary and body_text:
                    message_content = f"{summary}: {body_text}"
                elif summary:
                    message_content = summary
                else:
                    message_content = body_text

                output = f"[{app_name}] {message_content}"
                
                # Apply bold formatting if the sender is Discord (case-insensitive check)
                if app_name.lower() == 'discord':
                    output = f"{BOLD_START}{output}{BOLD_END}"
                
                print(output)
            
        # Log other relevant messages (like replies to GetCapabilities)
        else:
            logging.debug(f"[D-Bus Message] Type: {message.message_type.name}, Member: {message.member}, Body: {message.body}")


async def notification_listener(bus):
    """
    Configures the bus to listen for all messages related to the 
    org.freedesktop.Notifications interface.
    """
    # 1. Add the generic message handler
    bus.add_message_handler(message_handler)

    # 2. Use AddMatch to filter messages directed to this interface
    # This is crucial for catching the 'Notify' method call.
    # The rule is updated to match on the specific method call ('Notify') rather than 
    # relying solely on the destination service, which is a more robust way to capture 
    # new notification requests.
    match_rule = f"type='method_call', interface='{NOTIF_INTERFACE}', member='Notify'"
    
    await bus.call(
        Message(
            destination='org.freedesktop.DBus',
            path='/org/freedesktop/DBus',
            interface='org.freedesktop.DBus',
            member='AddMatch',
            signature='s',
            body=[match_rule]
        )
    )

    logging.info("Listening for ALL D-Bus Messages on org.freedesktop.Notifications interface.")
    logging.info("To test, send a notification, e.g., 'notify-send Hello World'")
    
    # Keep the asyncio loop running indefinitely
    await asyncio.get_running_loop().create_future()


async def main():
    """
    The main entry point for the script.
    """
    try:
        logging.info(f"Attempting to connect to the D-Bus session bus...")
        bus = await MessageBus(bus_type=BusType.SESSION).connect()
        logging.info("Successfully connected to the D-Bus session bus.")
        
        # Attempt to call the GetCapabilities method to ensure the service is running
        reply = await bus.call(
            Message(
                destination=NOTIF_SERVICE,
                path=NOTIF_PATH,
                interface=NOTIF_INTERFACE,
                member='GetCapabilities',
                signature='',
                body=[]
            )
        )
        
        if reply.message_type == MessageType.METHOD_RETURN:
            caps = reply.body[0]
            logging.info(f"Notification service capabilities retrieved: {caps}")
            await notification_listener(bus)
        else:
            # This often means no notification daemon (like dunst or a desktop environment's service) is running.
            logging.error("Could not retrieve notification service capabilities. Is a notification daemon running?")
    except Exception as e:
        logging.error(f"Error during D-Bus setup or initial capability check: {e}")

if __name__ == "__main__":
    try:
        # Run the main coroutine
        asyncio.run(main())
    except KeyboardInterrupt:
        logging.info("Notification listener stopped by user.")
    except Exception as e:
        logging.error(f"An unexpected error occurred: {e}")

It seems like this should be a simple task.... I would rather use a bash script if I could, but python would be fine too.

I did find this post which had a python script that I had to be update to work with py3. This script runs but nothing happens when I get a notification or send one via notify-send

import gi
gi.require_version("Gtk", "3.0") # or "4.0" depending on your target GTK version
from gi.repository import Gtk
import dbus
from dbus.mainloop.glib import DBusGMainLoop

def filter_cb(bus, message):
    # the NameAcquired message comes through before match string gets applied
    if message.get_member() != "Notify":
        return
    args = message.get_args_list()
    # args are
    # (app_name, notification_id, icon, summary, body, actions, hints, timeout)
    print("Notification from app '%s'" % args[0])
    print("Summary: %s" % args[3])
    print("Body: %s", args[4])


DBusGMainLoop(set_as_default=True)
bus = dbus.SessionBus()
bus.add_match_string(
    "type='method_call',interface='org.freedesktop.Notifications',member='Notify'")
bus.add_message_filter(filter_cb)
Gtk.main()

Thanks.

Change Directory cd /home/Downloads "Directory Doesn't Exist" but cd /home does! https://askubuntu.com/questions/1560421/change-directory-cd-home-downloads-directory-doesnt-exist-but-cd-home-does

cd ~/Downloads - no other suggestions resulted in changing the directory. Something simple, something stupid I'm sure.

Change directory - In the file explorer, the file is located in /home/Downloads. So tried to change the directory in terminal using cd:

cd /home/Downloads

"NO Directory Exists", so then tried cd /home with no problems.

What is the syntax that is preventing terminal from changing directory into the downloads folder?

How to prevent Ubuntu 25.10 from waking up from suspend when I close the laptop lid? https://askubuntu.com/questions/1560258/how-to-prevent-ubuntu-25-10-from-waking-up-from-suspend-when-i-close-the-laptop

I think this is a new feature, I can enter suspend on my Lenovo ThinkPad P14s either via GUI menu or:

sudo systemctl suspend -f

I know it is suspended because when in suspend the LED blinks slowly.

But then if I close the lid it wakes up! So if I suspend and close to put it into my backup, it wakes up.

I think I have tried everything from How can I tell Ubuntu to do nothing when I close my laptop lid? but nothing helped including:

sudo sed -i '/HandleLidSwitch/d' /etc/systemd/logind.conf
echo 'HandleLidSwitch=ignore' | sudo tee -a /etc/systemd/logind.conf
sudo sed -i '/IgnoreLid/d' /etc/UPower/UPower.conf
echo 'IgnoreLid=true' | sudo tee -a /etc/UPower/UPower.conf

followed by reboot.

I also checked:

$ cat /proc/acpi/wakeup
Device  S-state   Status   Sysfs node
GPP0      S0    *disabled
GPP1      S4    *disabled
GPP2      S3    *disabled
GPP5      S0    *enabled   pci:0000:00:02.1
GPP6      S4    *enabled   pci:0000:00:02.2
GP11      S4    *disabled
SWUS      S4    *disabled
GP12      S4    *enabled   pci:0000:00:04.1
SWUS      S4    *disabled
XHC0      S3    *enabled   pci:0000:64:00.3
XHC1      S4    *enabled   pci:0000:64:00.4
XHC2      S4    *disabled  pci:0000:66:00.0
NHI0      S3    *disabled
XHC3      S3    *enabled   pci:0000:66:00.3
NHI1      S4    *enabled   pci:0000:66:00.6
XHC4      S3    *enabled   pci:0000:66:00.4
LID       S4    *enabled   platform:PNP0C0D:00
SLPB      S3    *enabled   platform:PNP0C0E:00

and tried to disable them all with:

for d in `awk 'NR>1 && $3=="*enabled"{print $1}' /proc/acpi/wakeup`; do
  printf "$d\n" | sudo tee /proc/acpi/wakeup
done

and:

$ cat /sys/power/mem_sleep
[s2idle]

and it seems that deep sleep is not supported on my system?

$ echo deep | sudo tee /sys/power/mem_sleep
deep
tee: /sys/power/mem_sleep: Invalid argument (os error 22)

Logs after I start suspend: https://gist.github.com/cirosantilli/dfe4082c1cfd2b50d92638732cc84ce5

Shame that after all these years they still haveng figured out how to add a working setting for this on the main settings GUI...

Related:

How can I temporarily override a change made in /etc/default/keyboard? https://askubuntu.com/questions/1559459/how-can-i-temporarily-override-a-change-made-in-etc-default-keyboard

In /etc/default/keyboard, I have XKBOPTIONS="ctrl:nocaps" set. Sometimes, I decide that I need my caps lock. In other words, I want to run something in my terminal to undo this setting.

I've tried setxkbmap -option caps:capslock, but that simply does nothing.

Resize icons on Ubuntu 24.04 top bar, *without* combining them with dock panel https://askubuntu.com/questions/1553013/resize-icons-on-ubuntu-24-04-top-bar-without-combining-them-with-dock-panel

I provide remote computer support for an elderly parent, so it's very important that things change as little as possible from what they're used to.

I need to increase the size of the icons on the top bar of the display (mic, volume, login/restart).

Right now the dock panel is on the left and it needs to stay on the left. And I don't want to add any icons to it (such as by merging it with the top bar). Unless I'm missing something, this rules out the Dock To Panel GNOME extension.

I simply want to roughly double the size of the top bar icons. (Desktop icons and such have already been taken care of.)

Recommended current 22.04 way to forward app's GUI Wayland to Wayland? https://askubuntu.com/questions/1466109/recommended-current-22-04-way-to-forward-apps-gui-wayland-to-wayland

I used ssh -X in 16.04. Since being both local & remote 22.04 Wayland, there is no hit with wayland keyword search in ssh nor sshd manuals. I have Xwayland installed on each end. I get this error after I connect with ssh or ssh -X:

gedit&
[1] 27111
me@remote:~$ 
(gedit:27111): dbind-WARNING **: 14:35:14.547: Couldn't register with accessibility bus:
 Did not receive a reply. Possible causes include: the remote application did not send a reply,
  the message bus security policy blocked the reply, the reply timeout expired,
  or the network connection was broken.

I believe this is related to X11 being replaced with Wayland because ssh -X stands for enable X11 forwarding, but revert 22.04 to Xorg as advised around the web or downgrade to 16.04 I'd rather like not.

Please what is the new way ? Many thanks.

[EDIT] I checked with Graham's advice below but this made no difference (both remote & local sessions were/are Wayland)

[EDIT 2023/12] @ændrük, this post (17.10) was somewhat old since we use 22.04. Since my own post here (this very one), I only reached to get a remote GUI by using RDP :-)

catkin_init_workspace and catkin_make are commands not found https://askubuntu.com/questions/1413097/catkin-init-workspace-and-catkin-make-are-commands-not-found

I have been trying to make an Unbuntu 22.04 ROS2 Humble catkin workspace, but I have been unable to resolve the two command not found errors. Trying to reinstall the catkin package has not been much help either. I think catkin and catkin-tools are probably already installed anyway. I thought maybe it was a search PATH issue but not sure. As the code below shows, setup.bash is called by .bashrc to prepare the Env variables. I do not understand the command not found errors, but I need to resolve them. Please assist me if you can.

/home/.bashrc {this file (.bashrc) was edited so it includes line below

source /opt/ros/humble/setup.bash {no edits to the setup.bash file by user}

$ cd ~/catkin_ws

~/catkin_ws$ catkin_init_workspace

Command 'catkin_init_workspace' not found, but can be installed with:
sudo apt install catkin

~/catkin_ws$ sudo apt install catkin

[sudo] password for kennr: 

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

The following information may help to resolve the situation:
The following packages have unmet dependencies:
python3-catkin-pkg : Conflicts: catkin but 0.8.10-7 is to be installed
python3-catkin-pkg-modules : Conflicts: catkin but 0.8.10-7 is to be installed
E: Unable to correct problems, you have held broken packages.

~/catkin_ws$ catkin_make

Command 'catkin_make' not found, but can be installed with:
sudo apt install catkin

~/catkin_ws$ catkin --version

catkin_tools 0.8.5 (C) 2014-2022 Open Source Robotics Foundation
catkin_tools is released under the Apache License, Version 2.0 
(https://www.apache.org/licenses/LICENSE-2.0)
---
Using Python 3.10.4 (main, Apr  2 2022, 09:04:19) [GCC 11.2.0]
Fibocom L850-GL installation on Ubuntu 20.04 or 21.10 https://askubuntu.com/questions/1385496/fibocom-l850-gl-installation-on-ubuntu-20-04-or-21-10

I have a Lenovo ThinkPad X1 Nano Gen 1 with the Fibcom L850-GL 4G LTE CAT9 module.

I found some information how to install it here, but id does not work. Since I cannot comment or answer here a new question.

Unfortunately, I don't really have a clue what I'm doing. But as I read, the module should work. Some ideas how I could do this?

Edit: Tried it on Ubuntu 20.04 and upgraded now to 21.10, with the same result

How to connect to Ubuntu via VNC from Windows https://askubuntu.com/questions/1369973/how-to-connect-to-ubuntu-via-vnc-from-windows

I need to connect to Ubuntu 20.04 from Windows with VNC; I followed this tutorial and I tried both with UltraVNC Viewer and TightVNC Viewer, but in both cases after inserting the password I only obtain a grey screen...it looks like I am connected, but I can't see anything.
Grey screen
Any suggestions?

Dual boot with2 SSDs, where do I install the bootloader? https://askubuntu.com/questions/1198074/dual-boot-with2-ssds-where-do-i-install-the-bootloader

I'm setting up a dual boot system on a brand new Windows 10 gaming laptop. It has 2 x 500GB SSDs (C: & D:), so I'll be installing Ubuntu on drive D:, which is empty.

Where should I install the bootloader? My first impulse was simply /sda, but upon closer inspection, the drive has a 300MB EFI partition. Should I install it there? Will grub detect both Windows 10 and Ubuntu even if they're on separate hard drives?

Where is the "Starred" directory in the Nautilus sidebar stored https://askubuntu.com/questions/1148262/where-is-the-starred-directory-in-the-nautilus-sidebar-stored

I am looking for the location of the "Starred" directory that is listed at the top of the sidebar in Nautilus on Ubuntu 19.04. I can find nothing under the name "Starred" on my system.

How to take snapshots from a USB camera using the terminal? https://askubuntu.com/questions/920381/how-to-take-snapshots-from-a-usb-camera-using-the-terminal

I am sure my device is reached since I tried lsusb:

Bus 003 Device 020: ID 1b3f:2002 Generalplus Technology Inc. 808 Camera #9 (web-cam mode)

I tried uvccapture. It uses the default camera (the laptop's camera), not the USB connected one and it saves it to a specified folder. This is OK, but I need the USB camera to take a snapshot.

I then tried Cheese. It makes the USB camera work, but I have to manually click on the button to save the picture however I need this to be done automatically in the terminal like by using uvccapture.

I need to type in the terminal and automatically the USB camera takes a snapshot and save it to a specified folder.

Oracle SQLDeveloper "no ocijdbc12 in java.library.path" https://askubuntu.com/questions/918518/oracle-sqldeveloper-no-ocijdbc12-in-java-library-path

I am trying to get Oracle SQL Developer to work in 16.04. I followed PhatHV's answer to this question, and the desktop app opens fine and appears correct, but when I try to connect to a database (and I know this should work because I've connected to the same database in Windows), an error window pops up saying

An error was encountered performing the requested operation:

no ocijdbc12 in java.library.path

Vendor code 0

Does anyone know what causes this error and how to fix it?

network-manager-openvpn-gnome not able to import ovpn https://askubuntu.com/questions/819085/network-manager-openvpn-gnome-not-able-to-import-ovpn

I have recently installed Ubuntu 16.04 and tried to configure OpenVPN client. When I copy the client.conf file to /etc/openvpn folder the VPN connection establishes automatically.. But I need to configure it in GUI and installed network-manager-openvpn-gnome and I'm getting the "Import a saved vpn configuration" menu in choose a connection type tab... The Client profile file is an autologin profile file downloaded from the VPN server.

When I try to import the client.ovpn I'm getting an error saying that

"Cannot import VPN connection" The file 'client.ovpn' could not be read or does not contain recognized VPN connection information - Error: the plugin does not support import capability.

Contents of client.ovpn

# Automatically generated OpenVPN client config file
# Generated on Sat Aug 31 16:25:23 2016 by openvpnas
# Note: this config file contains inline private keys
#       and therefore should be kept confidential!
# Note: this configuration is user-locked to the username below
# OVPN_ACCESS_SERVER_USERNAME=testuser
# Define the profile name of this particular configuration file
# OVPN_ACCESS_SERVER_PROFILE=testuser@vpnserver.abcde.com/AUTOLOGIN
# OVPN_ACCESS_SERVER_AUTOLOGIN=1
# OVPN_ACCESS_SERVER_CLI_PREF_ALLOW_WEB_IMPORT=True
# OVPN_ACCESS_SERVER_CLI_PREF_BASIC_CLIENT=False
# OVPN_ACCESS_SERVER_CLI_PREF_ENABLE_CONNECT=True
# OVPN_ACCESS_SERVER_CLI_PREF_ENABLE_XD_PROXY=True
# OVPN_ACCESS_SERVER_WSHOST=vpnserver.abcde.com:444
# OVPN_ACCESS_SERVER_WEB_CA_BUNDLE_START
# -----BEGIN CERTIFICATE-----
# 
# -----END CERTIFICATE-----
# -----BEGIN CERTIFICATE-----
#
# -----END CERTIFICATE-----
# -----BEGIN CERTIFICATE-----
# 
# -----END CERTIFICATE-----
# OVPN_ACCESS_SERVER_WEB_CA_BUNDLE_STOP
# OVPN_ACCESS_SERVER_IS_OPENVPN_WEB_CA=0
# OVPN_ACCESS_SERVER_ORGANIZATION=VPN to BANGALORE SERVER
setenv FORWARD_COMPATIBLE 1
client
server-poll-timeout 4
nobind
remote vpnserver.abcde.com 1194 udp
remote vpnserver.abcde.com 444 tcp
dev tun
dev-type tun
ns-cert-type server
reneg-sec 604800
sndbuf 100000
rcvbuf 100000
# NOTE: LZO commands are pushed by the Access Server at connect time.
# NOTE: The below line doesn't disable LZO.
comp-lzo no
verb 3
setenv PUSH_PEER_INFO

<ca>
-----BEGIN CERTIFICATE-----

-----END CERTIFICATE-----
</ca>

<cert>
-----BEGIN CERTIFICATE-----

-----END CERTIFICATE-----
</cert>

<key>
-----BEGIN PRIVATE KEY-----

-----END PRIVATE KEY-----
</key>

key-direction 1
<tls-auth>
#
# 2048 bit OpenVPN static key (Server Agent)
#
-----BEGIN OpenVPN Static key V1-----

-----END OpenVPN Static key V1-----
</tls-auth>

## -----BEGIN RSA SIGNATURE-----
## DIGEST:sha256
## 
## -----END RSA SIGNATURE-----
Unable to Save edited IP config Network settings in Ubuntu 16.04 https://askubuntu.com/questions/774170/unable-to-save-edited-ip-config-network-settings-in-ubuntu-16-04

I have recently installed Ubuntu 16.04 .and my networking settings are Proxy oriented. I added IPv4 settings and saved them but when I see the added IPv4 settings again, the subnetmask settings are not saved as I entered. In the place of subnetmask (255.255.252.0) a default number 22 is saved as show in the image below.

enter image description here

I don't know why that number has been appearing again and again even after saving required IPv4 settings.

How to install a wireless driver on my dell mini 9 running ubuntu 12.10 off a usb? https://askubuntu.com/questions/212272/how-to-install-a-wireless-driver-on-my-dell-mini-9-running-ubuntu-12-10-off-a-us

Not sure how to install a driver and which driver to use - or whether I could do something in terminal. I'm pretty sure there's no driver there already but I might be wrong. I'm running a dell mini 910 inspiron off of a 32gb usb with ubuntu 12.10 installed.

How to compare two package version numbers https://askubuntu.com/questions/169936/how-to-compare-two-package-version-numbers

I'm writing a script in PHP that needs to compare two package version numbers to determine which is newer.

PHP has a handy function called version_compare(), but it gets really confused with some of the more creative version numbers. For example, version_compare() thinks that 0.9.8g-16ubuntu3.1 is newer than 0.9.8o-1ubuntu4.4.

Anyone know how I can get this to work?

I'm happy to run any command line scripts using exec().

Switching window manager/desktop environments? https://askubuntu.com/questions/162516/switching-window-manager-desktop-environments

In general what is the approach to switch the desktop environment or window manager on Ubuntu? The main difference between stock Ubuntu, Kubuntu and Lubuntu is supposedly the use of Unity vs. KDE vs. LXDE.

However, in order to try various desktop environments and window managers I don't want to have to reinstall the respective flavor from scratch just to get a particular desktop environments or window manager. There probably is an easier method than that.

The question: How can I easily test different desktop environments and respective compatible window managers (say KDE, LXDE, Unity, GNOME, XFCE and StumpWM)?