Xfce Forum

Sub domains
 

You are not logged in.

#1 2025-03-14 15:35:36

dselen
Member
Registered: 2025-01-06
Posts: 12
Windows 10Firefox 128.0

How to change default applications with Terminal

I want to change the default applications to /dev/null (to not open things in applications that are not allowed). How can I do this programmatically?

Offline

#2 2025-03-14 16:28:58

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,815
LinuxFirefox 136.0

Re: How to change default applications with Terminal

to not open things in applications that are not allowed

You'll need to explain what you mean here. Are you looking at preventing opening certain files, certain applications, or a combination? Maybe give an example.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2025-03-14 16:52:01

dselen
Member
Registered: 2025-01-06
Posts: 12
AndroidChrome 134.0

Re: How to change default applications with Terminal

ToZ wrote:

to not open things in applications that are not allowed

You'll need to explain what you mean here. Are you looking at preventing opening certain files, certain applications, or a combination? Maybe give an example.

Hello Toz,
Thank you first off for all you have done.

An example is: with Teams For Linux i am trying to open a "Edit in browser" link and suddenly the terminal opens, probably because I dont have a browser installed... So I want to prevent those actions. Which I can do at least in basic form with going into default applications and setting the 4 most important categories to /dev/null. But I'd like to know if there is a better way.

Ive looks into mime info slightly but even with changed default apps I cannot see those applied changes anywhere on the filesystem.

For more specifics: https://github.com/daanselen/ntos where I store my project with xfce at its centre.

Thank you.

Last edited by dselen (2025-03-14 16:52:49)

Offline

#4 2025-03-15 01:46:13

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,815
LinuxFirefox 136.0

Re: How to change default applications with Terminal

An example is: with Teams For Linux

Unfortunately, Teams is a closed source application meaning its not known how it opens links in a browser. You could look at creating a overriding mime association to deal with something like this, but unfortunately that doesn't work. I tried.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2025-03-26 13:59:56

dselen
Member
Registered: 2025-01-06
Posts: 12
Windows 10Firefox 128.0

Re: How to change default applications with Terminal

I think its regarding the mime types yeah. But for now I will leave it for what it is.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 536.52 KiB (Peak: 537.37 KiB) ]