Score:0

Default value if %U is empty in .desktop file

md flag

I'm trying to default open a couple of tabs in Brave on my work computer. I don't want these to open on my personal computer and since my account is synced, I can't use the built in default tabs in Brave.

I modified the Exec command in my .desktop file to the following and it works, but it also opens these tabs when I open a link from another application.

Exec=/usr/bin/brave-browser-stable %U "foo" "bar"

I want to either set a default value for %U with these 2 urls or only open these 2 urls if %U is empty.

muru avatar
us flag
Use a wrapper script that sets these arguments if no arguments are given
Michiel avatar
md flag
Could you give me an example?
waltinator avatar
it flag
Read `man bash`. It's a Simple Matter Of Programming (SMOP). Replace your `Exec=` line with `Exec=/path/to/script`
Michiel avatar
md flag
Could you give me an example?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.