KDE Plasma + Brave on Debian

  This is the “how do I make Brave do what I want” note --- especially when Brave profile UI is broken and KDE is strict about .desktop launchers. 1) Know what you’re running. Check where Brave comes from. which brave-browser If it returns /usr/bin/brave-browser , you’re on the APT-installed build (good, predictable). Also note that on Debian you often have both commands available. brave-browser is commonly a wrapper. brave-browser-stable is commonly the actual binary. 2) Where Brave stores its data. Default Brave user-data root (APT install). ~/.config/BraveSoftware/Brave-Browser/ If you only see Default/ , then you effectively have a single Brave “profile” in that directory. 3) Multiple isolated Brave sessions without Brave profiles. This is the clean workaround: run separate user-data directories . Create a new isolated environment. mkdir -p ~/.config/BraveSoftware/Brave-RDT Launch Brave using that directory. brave-browser-stable --user-data-dir= ...

Printing

CUPS - Common UNIX Printing System





CUPS Process

After a print command execution:
  1. The scheduler validates the command and processes the print job:
    • Creates job files according to the settings specified in the configuration files.
    • Records activities in the log files.
  2. Job files are processed with the help of the filter, printer driver, and backend, and then sent to the printer.

Scheduler

Scheduler manages:
  • Print jobs
  • Handles administrative commands
  • Allows users to query the printer status
  • Manages the flow of data through all CUPS components

Mainly 2 files under /etc/cups/ directory:
  • cupsd.conf
    System settings, no printer details. Mainly network security.
  • printers.conf
    Printer settings.

Job Files

The instances to print are in the form of print requests stored in files under /var/spool/cups/.
Those files are put into a Print Queue and removed after printing. They are of 2 types:
  • Data files, starting with the letter d.
  • Control files, starting with the letter c.

Log files

Store in /var/log/cups

Filters, Printer Drivers, and Backends

  1. Job files are converted in printable format by filters.
  2. Printer drivers are contained in /etc/cups/ppd/ directory.
  3. The print data is then sent to the printer through another filter, and via a backend that helps to locate devices connected to the system.

Managing CUPS

To use CUPS, CUPS daemon need to be activated and properly managed:
  1. $ systemctl status cups
  2. $ sudo systemctl [enable|disable] cups
  3. $ sudo systemctl [start|stop|restart] cups
A webserver is already provided by CUPS at the address http://localhost:631.

Commands for printing

$ lp <filename>
To print the file to default printer

$ lp -d printer <filename>
To print to a specific printer (useful if multiple printers are available)

$ program | lp
or
$ echo string | lp
To print the output of a program

$ lp -n number <filename>
To print multiple copies

$ lpoptions -d printer
To set the default printer

$ lpq -a
To show the queue status

$ lpadmin
To configure printer queues

Print management commands

$ lpstat -p -d
To get a list of available printers, along with their status

$ lpstat -a
To check the status of all connected printers, including job numbers

$ cancel job-id
or
$ lprm job-id
To cancel a print job

$ lpmove job-id newprinter
To move a print job to new printer


Utilities

PS/PDF conversion:
  • pdf2ps / ps2pdf
  • enscript
  • pstopdf / pdftops
  • convert
  • gm convert

PDF visualisation:
  • evince
  • okular

PDF manipulation:
  • qpdf
  • pdftk
  • ghostscript

Extra:
  • pdfinfo
    Extracts information

  • flpsed
    Adds data such as comments

  • pdfmod
    GUI for the operations

Comments