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= ...

Scripting essential

Bash built-in commands GNU manual:
https://www.gnu.org/software/bash/manual/html_node/Bash-Builtins.html

Built-in, Special built-in and POSIX Inherited command list:
https://www.computerhope.com/unix/bash/index.htm


Basic syntax and special characters


Character Description
#                 Used to add a comment, except when used as \#, or as #! when starting a script
\                 Used at the end of a line to indicate continuation on to the next line
;                 Used to interpret what follows as a new command to be executed next
$                 Indicates what follows is an environment variable
>                 Redirect output
>>                 Append output
<                 Redirect input
|                 Used to pipe the result into the next command


Parameters




Command substitution



Variables

To export the variable in order to be valid also for the child processes:
export VAR=value
or
VAR=value ; export VAR
where "VAR" is the variable we want to export.

When a child process modifies a variable, that remains within the child processes and it doesn't affect the variable of the parent process. In other words, exporting means copying and inheriting.


Functions

Entering a function in a script means:
  1. Declaring a function
  2. Calling a function
The function declaration requires a name which is used to invoke it. The proper syntax is:
function_name () {
   command...
}







Comments