LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   4MLinux (https://www.linuxquestions.org/questions/4mlinux-115/)
-   -   In which file is stored DefaultApps settings (liveCD 4MLinux 30.0)? (https://www.linuxquestions.org/questions/4mlinux-115/in-which-file-is-stored-defaultapps-settings-livecd-4mlinux-30-0-a-4175660782/)

forem 09-12-2019 07:14 AM

In which file is stored DefaultApps settings (liveCD 4MLinux 30.0)?
 
Hi, can you guys help me please with - where can I find the file in which stored the setting of is:
Default apps players
Default apps browser

The idea is when I boot pc from LiveCD > set it > find the "setting storage file" in / system > copy & backup that file on external hdd.

Then when I boot next time LiveCD I do not have to set it again - just copy with one click this my backuped file (by my bash script.sh) from external hdd back into system / (somewhere where it belong) - and it will be set.

(I do have successfully using this my script.sh with easy quick PCManFM & Chrome & Firefox settings :)).


I was going through files in /usr/share/jwm/system.jwmrc & /usr/bin/4mlinuX but I'm just not able to figure it out by myself to which/where file in final it goes :(.

Thank you for your help.
4m rulez :).

zk1234 09-12-2019 04:59 PM

Menu > Settings > Default Apps

.

forem 09-14-2019 09:23 AM

Hi zk1234. Thank you for info.
It's just please that I do know how to set it by clicks going through Menu > just I'm looking for file in system where in which file these setting has been written after it's done set.
So I can save/backup this file (& I do not have to do this clicking 20 times a day - if I start LiveCD at least 5 times a day, which I do ...).

zk1234 09-14-2019 09:46 AM

Unfortunately, such a configuration file does not exist. Instead, there is a script which creates symbolic links. A part of the script looks as follows:
Code:

if [ ! -e /usr/bin/media-player ]; then
  ln -s /usr/bin/gnome-mpv /usr/bin/media-player
 fi
 if [ ! -e /usr/bin/audio-player ]; then
  ln -s /usr/bin/audacious /usr/bin/audio-player
 fi
 if [ ! -e /usr/bin/viewer ]; then
  ln -s /usr/bin/gpicview /usr/bin/viewer
 fi
 if [ ! -e /usr/bin/archiver ]; then
  ln -s /usr/bin/engrampa /usr/bin/archiver
 fi

As you can see, the script defines the set of default applications in 4MLinux by creating symbolic links.
The location of the script: /usr/share/jwm/mime/mime.sh

PS.
Which application would you like to set as the default one ?

.

forem 09-14-2019 12:22 PM

Thanks zk1234 for answering, I know you probably must be busy with makin 4MLinux, so sorry for takin' you time.
When I was running liveCD 4MLinux 30.0 for a first time I did install almost everything :),
and I do have Firefox, Chromium, Opera, SeaMonkey, Thunderbird, also VLC, SMPlayer.

I did run 'DefaultApps' a few times before (to test it), so I guess there will be all of those symbolic links,
but to set as the default one I would like to:
Browser Firefox
Video VLC
Audio Aaudacious
Archiver as it is default out-of-box
Viewer as it is default out-of-box


Where is the symbolic links please and what is its name? Are those files?:
/usr/bin/archiver
/usr/bin/audio-player
/usr/bin/browser
/usr/bin/media-player
/usr/bin/viewer

Can I copy/backup it 'out of system' .... and later nex liveCD put it back where it belongs please?

forem 09-14-2019 12:43 PM

OKi-doki, I think I did answered it a little in my previous post.
Thanks to zk1234 (before I didn't know its command :)) it gave me an idea and I went to do some more homework: find what means ln -s
https://linuxize.com/post/how-to-cre...he-ln-command/

So if it's similar to 'windows shortcust' I will try to copy these out (or .zip it first) ... and then put it back later with next liveCD run.
Thank you - I think it's solved here.

4m rulez:)

zk1234 09-14-2019 01:06 PM

You're welcome!

The following simple script will do the job for you:
Code:

ln -sf /opt/firefox/firefox /usr/bin/websurf
ln -sf /usr/bin/vlc /usr/bin/media-player

.


All times are GMT -5. The time now is 06:52 AM.