pup-volume-monitor-0.2w

Moderator: Forum moderators

Post Reply
User avatar
peebee
Posts: 1717
Joined: Mon Jul 13, 2020 10:54 am
Location: Worcestershire, UK
Has thanked: 165 times
Been thanked: 753 times
Contact:

pup-volume-monitor-0.2w

Post by peebee »

Continuation of:
http://www.murga-linux.com/puppy/viewtopic.php?t=78881

Test pvm with:

Code: Select all

pup-volume-monitor-admin -v
pup-volume-monitor-admin -s
pup-volume-monitor-admin -l
Last edited by peebee on Sun Feb 14, 2021 11:39 am, edited 2 times in total.

Builder of LxPups, SPups, UPup32s, VoidPups; LXDE, LXQt, Xfce addons; Chromium, Firefox etc. sfs; & Kernels

User avatar
peebee
Posts: 1717
Joined: Mon Jul 13, 2020 10:54 am
Location: Worcestershire, UK
Has thanked: 165 times
Been thanked: 753 times
Contact:

Re: pup-volume-monitor

Post by peebee »

Amended 32 & 64-bit 0.2w versions by @wdlkmpx (with thanks) to get rid of strange 64-bit crash - see:
https://github.com/01micko/pup-volume-monitor/issues/5

http://smokey01.com/peebee/downloads/test/

Tested on ScPup64; LxPupSc64; BionicPup64; FossaPup64

Last edited by peebee on Sat Feb 13, 2021 2:05 pm, edited 2 times in total.

Builder of LxPups, SPups, UPup32s, VoidPups; LXDE, LXQt, Xfce addons; Chromium, Firefox etc. sfs; & Kernels

User avatar
Marv
Posts: 474
Joined: Fri Dec 20, 2019 3:09 am
Has thanked: 220 times
Been thanked: 128 times

Re: pup-volume-monitor

Post by Marv »

Seems fine here on a quick test. PVM version 0.1.15 updated to 0.1.17 in my 'experimental' LxPup64 20.06 +2 running the 5.10.15 kernel. External USB drive mounting and unmounting works and no errors noted in dmesg.

Code: Select all

# pup-volume-monitor-admin --version
0.1.17
# uname -a
Linux puppypc16298 5.10.15-lxpup64 #1 SMP Wed Feb 10 14:04:56 GMT 2021 x86_64 Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz GenuineIntel GNU/Linux

Cheers,

My pups: LxPupSc64 and Voidpup64 with LXDE ydrv and synaptics touchpad drivers, using small savefiles for customizations. Ydrv based NoblePup64 and Fossapup64-low (both LXDE/PCManFM with no savefiles). Small common custom fdrv throughout. :thumbup2:

User avatar
peebee
Posts: 1717
Joined: Mon Jul 13, 2020 10:54 am
Location: Worcestershire, UK
Has thanked: 165 times
Been thanked: 753 times
Contact:

Re: pup-volume-monitor

Post by peebee »

reuploaded 14-feb-2021

https://github.com/01micko/pup-volume-m ... 75b91e4384

pup-volume-monitor-0.2w

pets:
http://smokey01.com/peebee/downloads/te ... w-i686.pet
http://smokey01.com/peebee/downloads/te ... x86_64.pet

Tested on:
ScPup32, Slacko32-7.0, BionicPup32, UPupEF, UPupFF+D, UPupGG+D, UPupHH+D
ScPup64, Slacko64-7.0, BionicPup64, FossaPup64

Builder of LxPups, SPups, UPup32s, VoidPups; LXDE, LXQt, Xfce addons; Chromium, Firefox etc. sfs; & Kernels

mistfire
Posts: 768
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 195 times

Re: pup-volume-monitor-0.2w

Post by mistfire »

@peebee

pup-volume-monitor unable to show drives on desktop (xfdesktop) in XFCE 4.20. But GVFS udisks-volume-monitor able to show on desktop. Can you fix that problem?

User avatar
peebee
Posts: 1717
Joined: Mon Jul 13, 2020 10:54 am
Location: Worcestershire, UK
Has thanked: 165 times
Been thanked: 753 times
Contact:

Re: pup-volume-monitor-0.2w

Post by peebee »

mistfire wrote: Mon Dec 16, 2024 5:42 am

@peebee

pup-volume-monitor unable to show drives on desktop (xfdesktop) in XFCE 4.20. But GVFS udisks-volume-monitor able to show on desktop. Can you fix that problem?

Not without more clues as to what is needed............

Builder of LxPups, SPups, UPup32s, VoidPups; LXDE, LXQt, Xfce addons; Chromium, Firefox etc. sfs; & Kernels

mistfire
Posts: 768
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 195 times

Re: pup-volume-monitor-0.2w

Post by mistfire »

peebee wrote: Mon Dec 16, 2024 6:50 am
mistfire wrote: Mon Dec 16, 2024 5:42 am

@peebee

pup-volume-monitor unable to show drives on desktop (xfdesktop) in XFCE 4.20. But GVFS udisks-volume-monitor able to show on desktop. Can you fix that problem?

Not without more clues as to what is needed............

I read the source code of xfdesktop, and I found this line of code. It seems this is the clue

Code: Select all


 fmodel->volume_monitor = g_volume_monitor_get();
    g_signal_connect(fmodel->volume_monitor, "volume-added",
                     G_CALLBACK(volume_added), fmodel);
    g_signal_connect(fmodel->volume_monitor, "volume-removed",
                     G_CALLBACK(volume_removed), fmodel);
    g_signal_connect(fmodel->volume_monitor, "volume-changed",
                     G_CALLBACK(volume_changed), fmodel);
    g_signal_connect(fmodel->volume_monitor, "mount-added",
                     G_CALLBACK(mount_added), fmodel);
    g_signal_connect(fmodel->volume_monitor, "mount-removed",
                     G_CALLBACK(mount_removed), fmodel);
    g_signal_connect(fmodel->volume_monitor, "mount-changed",
                     G_CALLBACK(mount_changed), fmodel);
    g_signal_connect(fmodel->volume_monitor, "mount-pre-unmount",
                     G_CALLBACK(mount_pre_unmount), fmodel);

User avatar
Jasper
Posts: 1820
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 895 times
Been thanked: 384 times

Re: pup-volume-monitor-0.2w

Post by Jasper »

Dead links :thumbdown:

viewtopic.php?p=17536#p17536

Complied in FP95

User avatar
fredx181
Posts: 3385
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 437 times
Been thanked: 1484 times
Contact:

Re: pup-volume-monitor-0.2w

Post by fredx181 »

User avatar
peebee
Posts: 1717
Joined: Mon Jul 13, 2020 10:54 am
Location: Worcestershire, UK
Has thanked: 165 times
Been thanked: 753 times
Contact:

Re: pup-volume-monitor-0.2w

Post by peebee »

mistfire wrote: Mon Dec 16, 2024 1:18 pm

I read the source code of xfdesktop, and I found this line of code. It seems this is the clue

Code: Select all


 fmodel->volume_monitor = g_volume_monitor_get();
    g_signal_connect(fmodel->volume_monitor, "volume-added",
                     G_CALLBACK(volume_added), fmodel);

If this is the problem, we need to know how this relates to the pup-volume-monitor code?

Searches:
https://github.com/search?q=repo%3A01mi ... &type=code
https://github.com/search?q=repo%3A01mi ... &type=code

Builder of LxPups, SPups, UPup32s, VoidPups; LXDE, LXQt, Xfce addons; Chromium, Firefox etc. sfs; & Kernels

mistfire
Posts: 768
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 195 times

Re: pup-volume-monitor-0.2w

Post by mistfire »

peebee wrote: Mon Dec 16, 2024 4:29 pm
mistfire wrote: Mon Dec 16, 2024 1:18 pm

I read the source code of xfdesktop, and I found this line of code. It seems this is the clue

Code: Select all


 fmodel->volume_monitor = g_volume_monitor_get();
    g_signal_connect(fmodel->volume_monitor, "volume-added",
                     G_CALLBACK(volume_added), fmodel);

If this is the problem, we need to know how this relates to the pup-volume-monitor code?

Searches:
https://github.com/search?q=repo%3A01mi ... &type=code
https://github.com/search?q=repo%3A01mi ... &type=code

I kept digging on xfdesktop source code. pup-volume-monitor indeed emits the same signal needed by xfdesktop. I noticed another lines of code on xfdesktop

Code: Select all

fmodel->volume_monitor = g_volume_monitor_get();

Code: Select all

load_removable_media(XfdesktopFileIconModel *fmodel) {
    DBG("entering");

    GList *volumes = g_volume_monitor_get_volumes(fmodel->volume_monitor);
    for (GList *l = volumes; l != NULL; l = l->next) {
        GVolume *volume = G_VOLUME(l->data);
        volume_added(fmodel->volume_monitor, volume, fmodel);
        g_object_unref(volume);
    }
    g_list_free(volumes);

    GList *mounts = g_volume_monitor_get_mounts(fmodel->volume_monitor);
    for (GList *l = mounts; l != NULL; l = l->next) {
        GMount *mount = G_MOUNT(l->data);
        mount_added(fmodel->volume_monitor, mount, fmodel);
        g_object_unref(mount);
    }
    g_list_free(mounts);
}

Code: Select all


static void
volume_added(GVolumeMonitor *monitor, GVolume *volume, XfdesktopFileIconModel *fmodel) {
    TRACE("entering");
    if (!g_hash_table_contains(fmodel->volume_icons, volume)) {
        add_volume_icon(fmodel, volume);
    }
}

static void
mount_added(GVolumeMonitor *monitor, GMount *mount, XfdesktopFileIconModel *fmodel) {
    TRACE("entering");
    XfdesktopFileIcon *icon = g_hash_table_lookup(fmodel->volume_icons, mount);
    if (icon == NULL && !g_mount_is_shadowed(mount)) {
        GVolume *volume = g_mount_get_volume(mount);
        if (volume != NULL) {
            DBG("got existing volume for mount");
            icon = g_hash_table_lookup(fmodel->volume_icons, volume);
            if (icon != NULL) {
                DBG("got existing icon for volume for mount");
                xfdesktop_volume_icon_mounted(XFDESKTOP_VOLUME_ICON(icon), mount);
                xfdesktop_icon_view_model_changed(XFDESKTOP_ICON_VIEW_MODEL(fmodel), icon);
                g_hash_table_insert(fmodel->volume_icons, g_object_ref(mount), icon);
            }
            g_object_unref(volume);
        } else {
            add_mount_icon(fmodel, mount);
        }
    }
}


Code: Select all

static void
add_volume_icon(XfdesktopFileIconModel *fmodel, GVolume *volume) {
#if defined(DEBUG_TRACE) && DEBUG_TRACE > 0
    {
        gchar *name = g_volume_get_name(volume);
        TRACE("entering: '%s'", name);
        g_free(name);
    }
#endif

    XfdesktopVolumeIcon *icon = xfdesktop_volume_icon_new_for_volume(volume, fmodel->gdkscreen);
    g_hash_table_insert(fmodel->volume_icons, g_object_ref(volume), icon);
    add_icon(fmodel, XFDESKTOP_FILE_ICON(icon));
}

static void
add_mount_icon(XfdesktopFileIconModel *fmodel, GMount *mount) {
#if defined(DEBUG_TRACE) && DEBUG_TRACE > 0
    {
        gchar *name = g_mount_get_name(mount);
        TRACE("entering: '%s'", name);
        g_free(name);
    }
#endif

    XfdesktopVolumeIcon *icon = xfdesktop_volume_icon_new_for_mount(mount, fmodel->gdkscreen);
    g_hash_table_insert(fmodel->volume_icons, g_object_ref(mount), icon);
    add_icon(fmodel, XFDESKTOP_FILE_ICON(icon));
}

User avatar
peebee
Posts: 1717
Joined: Mon Jul 13, 2020 10:54 am
Location: Worcestershire, UK
Has thanked: 165 times
Been thanked: 753 times
Contact:

Re: pup-volume-monitor-0.2w

Post by peebee »

@mistfire

Did you determine what changes were needed to pvm?

Builder of LxPups, SPups, UPup32s, VoidPups; LXDE, LXQt, Xfce addons; Chromium, Firefox etc. sfs; & Kernels

mistfire
Posts: 768
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 195 times

Re: pup-volume-monitor-0.2w

Post by mistfire »

peebee wrote: Tue Jan 07, 2025 3:13 pm

@mistfire

Did you determine what changes were needed to pvm?

As of now I'm still reading the source code of thunar, and gvfs-udisks2. It was still cryptic for me to read.

However, I find something weird. Only optical drive was shown on desktop. But fixed drives does not

quickpup-desktop.PNG
quickpup-desktop.PNG (115.3 KiB) Viewed 922 times
Post Reply

Return to “System”