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
Moderator: Forum moderators
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
Builder of LxPups, SPups, UPup32s, VoidPups; LXDE, LXQt, Xfce addons; Chromium, Firefox etc. sfs; & Kernels
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
Builder of LxPups, SPups, UPup32s, VoidPups; LXDE, LXQt, Xfce addons; Chromium, Firefox etc. sfs; & Kernels
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.
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
@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?
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
peebee wrote: Mon Dec 16, 2024 6:50 ammistfire 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);
mistfire wrote: Mon Dec 16, 2024 1:18 pmI 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
peebee wrote: Mon Dec 16, 2024 4:29 pmmistfire wrote: Mon Dec 16, 2024 1:18 pmI 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));
}
@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
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