How p_cache works and how to change LXQt file associations

Technical issues/questions of an intermediate or advanced nature.
Post Reply
fulalas
Contributor
Contributor
Posts: 578
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

How p_cache works and how to change LXQt file associations

Post#1 by fulalas » 06 Dec 2016, 15:06

I'm trying to change some file associations on LXQt, beginning with /usr/share/applications/mimeinfo.cache. It works as long it's the last thing I did during a boot. But if it's embedded on 003 module, it seems that p_cache runs and overwrites it. Any idea?

User avatar
ncmprhnsbl
Full of knowledge
Full of knowledge
Posts: 787
Joined: 20 Mar 2012, 03:42
Distribution: 3.2.2-64bit xfce/openbox
Location: australia
Contact:

Re: How p_cache works and how to change LXQt file associatio

Post#2 by ncmprhnsbl » 07 Dec 2016, 14:07

a good question....not sure i understand it :)
reasonably sure p_cache doesnt run if you dont ask it..
both p_cache and cache-module make a module of various system caches after updating them..

Code: Select all

root@porteus:/home/guest# p_cache
updating system cache...
all cache files have been merged into 009-caches.xzm, which has been placed in /tmp folder

Code: Select all

root@porteus:/home/guest# cache-module
/usr/bin/gtk-query-immodules-2.0
warning: Schema 'org.gnome.crypto.cache' has path '/desktop/gnome/crypto/cache/'.  Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.gnome.crypto.pgp' has path '/desktop/gnome/crypto/pgp/'.  Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.gnome.system.locale' has path '/system/locale/'.  Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.gnome.system.proxy' has path '/system/proxy/'.  Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.gnome.system.proxy.http' has path '/system/proxy/http/'.  Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.gnome.system.proxy.https' has path '/system/proxy/https/'.  Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.gnome.system.proxy.ftp' has path '/system/proxy/ftp/'.  Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.gnome.system.proxy.socks' has path '/system/proxy/socks/'.  Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
/usr/bin/update-desktop-database
/usr/bin/gdk-pixbuf-query-loaders
/usr/bin/update-mime-database
Do you want to make a module from the caches? [y/n] y
mkdir: cannot create directory ‘/tmp/cachecreate’: File exists
Parallel mksquashfs: Using 8 processors
Creating 4.0 filesystem on /tmp/009-caches.xzm, block size 262144.
[=================================================|] 6/6 100%

Exportable Squashfs 4.0 filesystem, xz compressed, data block size 262144
        compressed data, compressed metadata, compressed fragments, compressed xattrs
        duplicates are removed
Filesystem size 37.97 Kbytes (0.04 Mbytes)
        23.08% of uncompressed filesystem size (164.53 Kbytes)
Inode table size 262 bytes (0.26 Kbytes)
        38.87% of uncompressed inode table size (674 bytes)
Directory table size 314 bytes (0.31 Kbytes)
        62.30% of uncompressed directory table size (504 bytes)
Number of duplicate files found 0
Number of inodes 21
Number of files 6
Number of fragments 1
Number of symbolic links  0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 15
Number of ids (unique uids + gids) 1
Number of uids 1
        root (0)
Number of gids 1
        root (0)
40K     /tmp/009-caches.xzm
typically it(cache-module) is used when you make a 003-module at first bootup into textmode and the resulting module is merged into the 003-module..
Forum Rules : http://forum.porteus.org/viewtopic.php?f=35&t=44

fulalas
Contributor
Contributor
Posts: 578
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

Re: How p_cache works and how to change LXQt file associatio

Post#3 by fulalas » 07 Dec 2016, 22:20

ncmprhnsbl wrote:reasonably sure p_cache doesnt run if you dont ask it..
I think it runs during boot when Porteus detects xzm modules. You can see the message just before the GUI appears.

I'm having troubles creating file associations on LXQt. I find out that /usr/local/share/applications/defaults.list kind of works. But .m3u (Qmmp playlist file) and .torrent/magnet (new LXQt module will come with Transmission ;)) links don't work. Can you help me?

User avatar
ncmprhnsbl
Full of knowledge
Full of knowledge
Posts: 787
Joined: 20 Mar 2012, 03:42
Distribution: 3.2.2-64bit xfce/openbox
Location: australia
Contact:

Re: How p_cache works and how to change LXQt file associatio

Post#4 by ncmprhnsbl » 08 Dec 2016, 01:55

fulalas wrote:I think it runs during boot when Porteus detects xzm modules. You can see the message just before the GUI appears.
i dont know...but i think thats something from initrd, before (aufs) porteus starts..wrong :oops:
brokenman could put us straight on that...
mime is a bit of a mystery to me... but cache-module seems to handle it for me..
the key commands in this are:

Code: Select all

update-mime-database /usr/share/mime
and (maybe)

Code: Select all

update-desktop-database
run cache-module and the have a look at /tmp/cache-create, particularly /usr/share/mime/mime.cache (it isnt readable/editable)
Forum Rules : http://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
ncmprhnsbl
Full of knowledge
Full of knowledge
Posts: 787
Joined: 20 Mar 2012, 03:42
Distribution: 3.2.2-64bit xfce/openbox
Location: australia
Contact:

Re: How p_cache works and how to change LXQt file associatio

Post#5 by ncmprhnsbl » 09 Dec 2016, 04:38

fulalas wrote:I think it runs during boot when Porteus detects xzm modules. You can see the message just before the GUI appears.
this actually /opt/porteus-scripts/xorg/update-cache script, read it to see what it does...
but i dont think this is the problem..
Forum Rules : http://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
brokenman
Site Admin
Site Admin
Posts: 5439
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: How p_cache works and how to change LXQt file associatio

Post#6 by brokenman » 16 Dec 2016, 13:10

If any modules are found in the modules folder during boot then the caches will be regenerated. Which file associations are you trying to change? Can you edit the desktop file to achieve this?
How do i become super user?
Wear your underpants on the outside and put on a cape.

fulalas
Contributor
Contributor
Posts: 578
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

Re: How p_cache works and how to change LXQt file associatio

Post#7 by fulalas » 16 Dec 2016, 18:13

brokenman wrote:Which file associations are you trying to change? Can you edit the desktop file to achieve this?
I'm trying to fix somethings:

1- .m3u files -> can't make them open with double click, although 'Open with...' context menu works;
2- magnet links -> on Opera it opens a new tab instead of Transmission;
3- 'open folder' option -> on a few programs it doesn't work properly (Transmission, for example), launching Qmmp instead of pcmanfm-qt;

The desktop files are just fine and everything is inside /usr/share/applications/mimeinfo.cache (with wrong priority, once this file is auto-generated). Me and ncmprhnsbl are trying a lot of things (discussion here), but no success so far. I also opened 3 threads on different LXQt forums/lists. :wall:

Post Reply