Something is wrong with the LUKS opening and closing done by puppy Event manager

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

User avatar
April
Posts: 493
Joined: Tue Dec 29, 2020 9:06 pm
Has thanked: 57 times
Been thanked: 28 times

Something is wrong with the LUKS opening and closing done by puppy Event manager

Post by April »

Edit : I changed the title to be more explicit. I am grateful to this forum that gets my login right and allows me to edit posts when I want to . Its not done on a lot of other sites and its a PITA if you can't edit.

First I'm using xenialpup64-7.5 for this

I plugged in the USB stick and used gparted to clean it and put a new ext4 partition on it with no flags

I then set up an encrypted partition on sde1 like so

Code: Select all

    root# dd bs=4K if=/dev/urandom of=/dev/sde1...................to overwrite random stuff.
^Z
[1]+  Stopped                 dd bs=4K if=/dev/urandom of=/dev/sde1...................could not be bothered waiting 


root# cryptsetup -h sha256 -c aes-xts-plain -s 256 luksFormat /dev/sde1

WARNING!
========
This will overwrite data on /dev/sde1 irrevocably.

Are you sure? (Type uppercase yes): YES
Enter passphrase: 
Verify passphrase: 

root# cryptsetup luksOpen /dev/sde1 myprivate
Enter passphrase for /dev/sde1: 

root# mkfs.ext4 /dev/mapper/myprivate
mke2fs 1.44.1 (24-Mar-2018)
Creating filesystem with 3909888 4k blocks and 979200 inodes
Filesystem UUID: e6c73a9c-f406-4766-bdf6-adce5a8432e4
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done   

root# mkdir /mnt/myprivate
root# mount /dev/mapper/myprivate /mnt/myprivate

root# chown -R root.root /mnt/myprivate.......didn't check may be root already
root#         

Now going in Rox to /mnt/myprivate I can add and remove files as I wish. All good.

However if I try to access the usb stick from the lock icon representing sde1 it will not open the partition at all. It wants to keep loading PMount and thats it ?

Now if I close properly as I should

Code: Select all

  root# umount /mnt/myprivate 
root# cryptsetup luksClose /dev/mapper/myprivate
root#  

Then click on the locked icon and enter the passphrase it works and opens that myprivate directory.

Clicking on the little green icon inside does not unmount it . In fact it opens another instance of rox filer.
If I pull the USB stick out it seems to remove the drive icon but the /mnt/myprivate directory is still free and available un-encrypted but there is nothing in it ?

I'm wondering why I cannot unmount from the icon?
I've put up all the other code because perhaps its something I have done wrong .
I am following this page .https://linuxconfig.org/usb-stick-encry ... sing-linux

Last edited by April on Mon May 03, 2021 11:20 pm, edited 3 times in total.

The Australian State Governments have all enacted laws to steal your assets on your death. All legal paperwork is binned and all assets seized on one disgruntled child's complaint.Move them well before you die or go into a home.

williwaw
Posts: 1874
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 167 times
Been thanked: 345 times

Re: Something is wrong with the crypto opening done by puppy

Post by williwaw »

April wrote: Thu Apr 29, 2021 12:28 am

I've put up all the other code because perhaps its something I have done wrong .
I am following this page .https://linuxconfig.org/usb-stick-encry ... sing-linux

Nice tutorial, thanks for posting the link. As I read your post, everything from the tutorial works well as long as you work from the terminal?

Then click on the locked icon and enter the passphrase it works and opens that myprivate directory.

clicking the icon brings up a gui or a terminal? what does the icon open if you right click > edit item ?

I'm wondering why I cannot unmount from the icon?

Is unmounting with a desktop click all you wish to acheive?

User avatar
Jafadmin
Posts: 383
Joined: Tue Aug 04, 2020 4:51 pm
Has thanked: 68 times
Been thanked: 85 times

Re: Something is wrong with the crypto opening done by puppy

Post by Jafadmin »

I'm guessing you can't unmount from the icon because the mounted volume is being kept open by cryptsetup. You need a:

Code: Select all

cryptsetup luksClose myprivate

before you can unmount it.

ps: there's a "LotsaLuks" app for that: viewtopic.php?f=104&t=520

User avatar
April
Posts: 493
Joined: Tue Dec 29, 2020 9:06 pm
Has thanked: 57 times
Been thanked: 28 times

Re: Something is wrong with the crypto opening done by puppy

Post by April »

williwaw wrote: Thu Apr 29, 2021 9:42 pm

I'm wondering why I cannot unmount from the icon?

Is unmounting with a desktop click all you wish to acheive?

Well yes and no. I'm trying to understand why iPuppy does not unmount it when the small inner green icon is clicked , but also it actually adds another rox filer window. That seems to point to a coding error in there which I would like to fix if I can.

The Australian State Governments have all enacted laws to steal your assets on your death. All legal paperwork is binned and all assets seized on one disgruntled child's complaint.Move them well before you die or go into a home.

User avatar
April
Posts: 493
Joined: Tue Dec 29, 2020 9:06 pm
Has thanked: 57 times
Been thanked: 28 times

Re: Something is wrong with the crypto opening done by puppy

Post by April »

Jafadmin wrote: Fri Apr 30, 2021 6:44 pm

I'm guessing you can't unmount from the icon because the mounted volume is being kept open by cryptsetup. You need a:

Code: Select all

cryptsetup luksClose myprivate

before you can unmount it.
ps: there's a "LotsaLuks" app for that: viewtopic.php?f=104&t=520

Hi, Yes I think thats the case too . I downed your program and it seems to work pretty well. Thanks. Might help me sort out my current problem which may be related to header error.

However the same thing happens with the little green unmount icon when yours is running . It does not close from there and actually opens another rox filer too.

Edit :- Using your program is somewhat confusing . I read the pdf but for the uninitiated (me) I found it hard to follow . I know a little about it but got lost creating a Luks file from the GUI ,setting its size etc then when I tried to look at it got a message "failed to mount".
Forgive me but atm I don't understand what it was trying to do or what I was doing making the backup file?

Last edited by April on Fri Apr 30, 2021 11:14 pm, edited 1 time in total.

The Australian State Governments have all enacted laws to steal your assets on your death. All legal paperwork is binned and all assets seized on one disgruntled child's complaint.Move them well before you die or go into a home.

User avatar
April
Posts: 493
Joined: Tue Dec 29, 2020 9:06 pm
Has thanked: 57 times
Been thanked: 28 times

Something is wrong with the crypto closing too

Post by April »

Something is wrong with the crypto closing too.

If I successfully mount the crypto USB partition via Puppy then I pull out the USB stick as the only way available to unmount it (except using the terminal to unmount) then the data remains available at the mount point eg. /mnt/sdb1 and 2 , or /mnt/sdc1 and 2. Even though the encrypted USB has been removed?

The Australian State Governments have all enacted laws to steal your assets on your death. All legal paperwork is binned and all assets seized on one disgruntled child's complaint.Move them well before you die or go into a home.

User avatar
Jafadmin
Posts: 383
Joined: Tue Aug 04, 2020 4:51 pm
Has thanked: 68 times
Been thanked: 85 times

Re: Something is wrong with the crypto opening done by puppy

Post by Jafadmin »

If you have a furling jib, you don't strike it using the halyard. Things get messy, quick.

The desktop icons are the halyards. They will only strike the "hank on" jibs. :thumbup2:

Now let me correct myself, here. 1st you must 'umount -l /mntpoint/CryptDevice', then you must 'cryptsetup luksClose CryptDevice'. The lowercase 'L' in the umount command means "lazy" unmount. That may be what is hanging you up.

You should also 'rmdir' (delete) any mountpoints you created to ensure nothing tries to write to them after unmounting them.

At any case, don't rely on the code behind the desktop icons to do anything more than the basic mount/unmount tasks. They certainly don't have the code needed to handle special case mounting, unmounting, and cleanup after a hardware failure (physically removing a USB device still "in use" constitutes a hardware failure). Neither do they recycle /dev/names.

So once a device has been properly unmounted, then no, you cannot access data on that device. If you can, it probably means something has written data to the orphaned mountpoint. Try rebooting and checking to see if the mountpoint/data persists.

With crypto, you, the user, are solely responsible for insuring that crypto mounts and dismounts are clean. I strongly suggest you use LotsaLuks. Get used to using a single tool for your crypto. I wrote it so folks could do crypto free of the hassles you are experiencing. I don't believe we should have to be code monkeys to use government class crypto ..

ps: A protip: You can change the default encryption suite used in LotsaLuks by changing line 189. Change "off" to "on". ;)

Last edited by Jafadmin on Fri Apr 30, 2021 11:40 pm, edited 1 time in total.
williams2
Posts: 1059
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 302 times

Re: Something is wrong with the crypto opening done by puppy

Post by williams2 »

It might be better to use umount-FULL instead of umount

umount-FULL -l /mntpoint/CryptDevice

umount is a script, and it is not totally free of bugs.

williams2
Posts: 1059
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 302 times

Re: Something is wrong with the crypto opening done by puppy

Post by williams2 »

@April, I'm not sure what you mean by "little green unmount icon"
There are icons in a RoxFiler window which can show a green dot to indicate it is a mount point.
And there can be mount icons on the desktop.

I think for both kinds of icon you can right-click and select Unmount in the menu.

Unmounting from an icon will use the umount script, which I have found sometimes does not work properly.
I modified the script slightly, it seems to work better.
viewtopic.php?f=6&t=507

You might be experiencing this bug. Or not.

User avatar
April
Posts: 493
Joined: Tue Dec 29, 2020 9:06 pm
Has thanked: 57 times
Been thanked: 28 times

Re: Something is wrong with the crypto opening done by puppy

Post by April »

When a USB stick is plugged in it is not mounted automatically.
When you click on its square icon the USB is mounted and a smaller green square is added to the icon top right.
That's what I am referring to .
In normal operation click on the green square (the one I just carefully explained to you) and it is unmounted ready to pull the stick out without damage. Changes are written to it thats why you do it .I'm sure you know this .

When its a luks partition this is not happening and another rox window is being created instead
Yes I know right click unmounts it normally but it does not work here either.

Please try it ! The Event Manager is not getting it right.

I see that the opened LUKS directory remains in memory unencrypted after the USB stick is removed while the machine is running at least and is therefore dangerous. You think its gone but it is not.

The Australian State Governments have all enacted laws to steal your assets on your death. All legal paperwork is binned and all assets seized on one disgruntled child's complaint.Move them well before you die or go into a home.

User avatar
Jafadmin
Posts: 383
Joined: Tue Aug 04, 2020 4:51 pm
Has thanked: 68 times
Been thanked: 85 times

Re: Something is wrong with the crypto opening done by puppy Event manager

Post by Jafadmin »

Ok, @April I see what you are talking about. I'm using BionicPup64, but similar results.

If I just physically remove the flash drive, Rox can still read a cached copy of the FAT (file allocation table), but if I click on any of the files listed, nothing happens. It errors out. The mount point still thinks it's active, but it's not. No cleanup is performed, I assume because there is no "unplug" event associated with the device in the udev rules file.

If It's mounted and I click the little green up arrow, it does unmount it, but doesn't revert the icon, which is confusing.

User avatar
April
Posts: 493
Joined: Tue Dec 29, 2020 9:06 pm
Has thanked: 57 times
Been thanked: 28 times

Re: Something is wrong with the crypto opening done by puppy Event manager

Post by April »

Jafadmin wrote: Sat May 01, 2021 7:37 am

Ok, @April I see what you are talking about. I'm using BionicPup64, but similar results.

If I just physically remove the flash drive, Rox can still read a cached copy of the FAT (file allocation table), but if I click on any of the files listed, nothing happens. It errors out. The mount point still thinks it's active, but it's not. No cleanup is performed, I assume because there is no "unplug" event associated with the device in the udev rules file.

If It's mounted and I click the little green up arrow, it does unmount it, but doesn't revert the icon, which is confusing.

Yes .

If It's mounted and I click the little green up arrow, it does unmount it, but doesn't revert the icon, which is confusing.

I didn't know that!
But I get a new rox window on every click?
I must do it over .Thanks

I unplug it and take the usb stick away then go to /mnt/sdb1 and its still mounted . I click on a mp4 file I have in there and it happily plays away and I stop it and click the file again and it runs as normal . Wont stop until I right click and unmount it .
Xenialpup64-7.5

The Australian State Governments have all enacted laws to steal your assets on your death. All legal paperwork is binned and all assets seized on one disgruntled child's complaint.Move them well before you die or go into a home.

User avatar
Jafadmin
Posts: 383
Joined: Tue Aug 04, 2020 4:51 pm
Has thanked: 68 times
Been thanked: 85 times

Re: Something is wrong with the crypto opening done by puppy Event manager

Post by Jafadmin »

@April The main problem here is we're trying to use a screwdriver to drive nails. I think I know what you are trying to get to .. plug it in and it prompts for a password and mounts the encrypted volume. Unplug it and it closes, unmounts, and cleans up everything, right?

For that you need a different tool. This is a job for 'udev'. This little beauty, right here, will get you on the road to hassle-free encrypted volume management in no time, kiddo. And remember, always use ur powers for good! :thumbup2:

Luks-udev.tar.gz
The Goodz!
(1.94 KiB) Downloaded 20 times

*The 'mntluks' script assumes a fat32 partition on the encrypted device, but just edit the mount command to suit.

User avatar
April
Posts: 493
Joined: Tue Dec 29, 2020 9:06 pm
Has thanked: 57 times
Been thanked: 28 times

Re: Something is wrong with the LUKS opening and closing done by puppy Event manager

Post by April »

Thanks .
I had a look over that and a try.

Code: Select all

root# mkrule
bash: mkrule: command not found
root# ./mkrule

    Usage: ./mkrule /dev/sdX <Convenient USB Device Name i.e.: WD1600z> 

    Do NOT use spaces, slashes, asterisks, or other weird characters 
      in device name. 

root# lsblk
NAME                   MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
loop1                    7:1    0  77.5M  1 loop  /initrd/pup_z
sdb                      8:16   1  14.9G  0 disk  
├─sdb2                   8:18   1  13.1G  0 part  
└─sdb1                   8:17   1   1.9G  0 part  
  └─lukspartition_sdb1 252:0    0   1.9G  0 crypt /mnt/sdb1
loop4                    7:4    0     3M  1 loop  /initrd/pup_ro4
sr0                     11:0    1   330M  0 rom   
loop2                    7:2    0   6.7G  0 loop  /initrd/pup_rw
loop0                    7:0    0 239.8M  1 loop  /initrd/pup_ro2
sda                      8:0    0  74.5G  0 disk  
└─sda1                   8:1    0  74.5G  0 part  /initrd/mnt/dev_save
loop3                    7:3    0   3.5M  1 loop  /initrd/pup_ro3
root#

So its loaded as sdb1 and did the mkrule as you see . That's all good but unplugging and replugging produces a new mount point of sdc1 as is usual and the sdb1 point is no longer available?

So OK something like that will no doubt work .

What I want to try to correct firstly though is the clicking on the green square normally unmounts a USB as I said, but in LUKS case when mounted it does not unmount it and in fact produces another instance of Rox window.

There must be some code somewhere that is activated by clicking on that small green square that I can find and fix and maybe even get changed in future releases. That's what I'm after . I can right click each time to unmount that . That's not a problem but I'd like to correct the appropriate code.

Oh and I would never use a screwdriver to drive a nail . I use a nail gun. I'm a female ,I look after my nails.

The Australian State Governments have all enacted laws to steal your assets on your death. All legal paperwork is binned and all assets seized on one disgruntled child's complaint.Move them well before you die or go into a home.

williams2
Posts: 1059
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 302 times

Re: Something is wrong with the LUKS opening and closing done by puppy Event manager

Post by williams2 »

As far as I know, when you click a drive icon on the desktop:

it mounts the file system on the drive/partition and pops up a Roxfiler window.

If the file system is already mounted, AFAIK, it just pops up a Rox window.
AFAIK, it does not unmount the file system.

To unmount the file system from the icon, you need to right click the icon, and Click Unmount in the menu.

I think that is how it is supposed to work.

The desktop drive icons are created in /usr/sbin/eventmanager

Each desktop drive icon is a Rox Application Directory (Rox AppDir)
A RoxApp is not an executable file, it is a directory.
It has files and dirs inside it.

If you click a RoxApp it runs the executable file named AppRun that is inside the RoxApp dir.
AppRun is often a shell script, you can look at the AppRun script in a text editor, like Geany.
Examine AppRun if you want to know what the icon will do when it is clicked.

The picture for the icon is in the Rox appDir too, named .icon I think.

EDIT: AppRun in the drive RoxApp dir seems to execute /usr/local/bin/drive_all
From /usr/local/bin/drive_all this comment (line 135 in BionicPup64)

#if it is a mountable partition then mount and open with rox. If already mntd then open in rox...

Is what you mean by a green square a drive icon on the desktop?

User avatar
April
Posts: 493
Joined: Tue Dec 29, 2020 9:06 pm
Has thanked: 57 times
Been thanked: 28 times

Re: Something is wrong with the LUKS opening and closing done by puppy Event manager

Post by April »

No...and yes in parts .

For the last few years at least since xenialpup64-7.5 the icon shows a small green square top right corner of the drive icon . That when clicked specifically unmounts the drive. I have made it clear that right clicking is not a problem and it works .

Thanks for the explanation of the AppRun program inside the icon. 530 odd lines! Phew.
So I guess somewhere in there will be the bit that creates the green square but I have not found it yet. Wherever that is is where I need to be.

Perhaps its not the same in other distros of Puppy. I'll have a look at Bionic and Fossa again soon and edit here.

A similar thing happens in the /mnt/ directory where a green dot appears against any mounted partition and clicking the green dot will open another rox window. It will not unmount it so I think there is some confusion in the coding for this green square usage.

I don't understand the app stuff really . Seems to add unnecessary confusion to what should be reasonably straight forward coding. Somebody's fantastic but not quite perfected idea of a system. Sticking a 500 line script on each icon does not seem like a good system , but then I am not greatly experienced in that depth of coding.

Drive icons.png
Drive icons.png (85.4 KiB) Viewed 573 times
Drive icons2.png
Drive icons2.png (13.75 KiB) Viewed 570 times

Also I am curious what the "non displayable character" is in the label ?

The Australian State Governments have all enacted laws to steal your assets on your death. All legal paperwork is binned and all assets seized on one disgruntled child's complaint.Move them well before you die or go into a home.

User avatar
8Geee
Posts: 376
Joined: Wed Jul 29, 2020 10:52 pm
Location: N.E. USA
Has thanked: 17 times
Been thanked: 55 times

Re: Something is wrong with the LUKS opening and closing done by puppy Event manager

Post by 8Geee »

April;

That last point about the non-displayed character.. it not a character per se, its a control character. Only a literal handful of fonts can use that 000A control character. In fact its a signature of who scripited the icon, as not all developers use such a font. I'll go out on a limb here and say that special character allows coding within the icon itsellf, the apparant root of the inquiry.

8Geee

Money talks... no, it shouts, so that it doesn't have to hear common sense.

williams2
Posts: 1059
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 302 times

Re: Something is wrong with the LUKS opening and closing done by puppy Event manager

Post by williams2 »

A 0x0A (hexadecimal, decimal 10) character is a line feed control character, also known as a newline character.

Each line of a text file, or a text shell script or a text configuration file, ends with a line feed (0x0A) character.

The event manager scripts edit the Rox PinBoard file in /root/Choices/.
It sounds like an echo command should have been an echo -n command (print without a line feed.)
Or something in the script added a superfluous line feed.

I don't think the drive icons unmount when clicked. I could be wrong.

You could easily write your own script which would mount something when clicked, and unmount it when clicked again, using LUKS if you like.
Something like:

Code: Select all

#!/bin/sh
if mount-FULL | grep -q /dev/sdb2
then
  umount-FULL /dev/sdb2
else
  mkdir -p /mnt/sdb2
  mount-FULL /dev/sdb2 /mnt/sdb2
fi
User avatar
April
Posts: 493
Joined: Tue Dec 29, 2020 9:06 pm
Has thanked: 57 times
Been thanked: 28 times

Re: Something is wrong with the LUKS opening and closing done by puppy Event manager

Post by April »

williams2 wrote: Tue May 04, 2021 8:23 am

The event manager scripts edit the Rox PinBoard file in /root/Choices/.
It sounds like an echo command should have been an echo -n command (print without a line feed.)
Or something in the script added a superfluous line feed.

I don't think the drive icons unmount when clicked. I could be wrong.

Thanks for trying.
That's why I posted the screenshots ...See the drive icon sdb2 ...then see the green mounted square in the first pic.
I click on the little green man and voila...
Then see the unmounted sdb2 ,no green square in the second.?
I'm not looking for work arounds thanks I'm looking to fix what I think is an error.

And the text in that box is 000A if I'm reading it right and not 0x0A.

The event manager seems to icon the sda in PinBoard but not other USB drive icons that I can see.

The Australian State Governments have all enacted laws to steal your assets on your death. All legal paperwork is binned and all assets seized on one disgruntled child's complaint.Move them well before you die or go into a home.

User avatar
April
Posts: 493
Joined: Tue Dec 29, 2020 9:06 pm
Has thanked: 57 times
Been thanked: 28 times

Re: Something is wrong with the LUKS opening and closing done by puppy Event manager

Post by April »

8Geee wrote: Tue May 04, 2021 4:33 am

April;That last point about the non-displayed character.. it not a character per se, its a control character. Only a literal handful of fonts can use that 000A control character. In fact its a signature of who scripited the icon, as not all developers use such a font. I'll go out on a limb here and say that special character allows coding within the icon itsellf, the apparant root of the inquiry.
8Geee

Yes Interesting ,I'd like to know more . Where might I read up on such tactics please?
DuckDuck gives me

Unicode meta-data
The following table show specific meta-data that is known about this character.The u+000A name is line feed (lf) emoji.

field value
Codepoint (hex) 000A, u000A
Character age Unicode 1.1
Legacy name (Unicode 1.0) LINE FEED (LF)
Official name (Unicode 9.0) -
resolved name line feed (lf)
block Basic Latin (ASCII)
common typos u+000A, u+000A

So it looks like something dropped by C* programming maybe accidentally? But if it is used in coding withing the icon I'd like to know more.

The Australian State Governments have all enacted laws to steal your assets on your death. All legal paperwork is binned and all assets seized on one disgruntled child's complaint.Move them well before you die or go into a home.

User avatar
JakeSFR
Posts: 270
Joined: Wed Jul 15, 2020 2:23 pm
Been thanked: 157 times

Re: Something is wrong with the LUKS opening and closing done by puppy Event manager

Post by JakeSFR »

April wrote: Tue May 04, 2021 3:07 am

Image
Also I am curious what the "non displayable character" is in the label ?

It's just an ugly side effect.
The newline is there, so ROX drive icons can show a partition label in the next line (if you have this feature enabled in Eventmanager and partitions actually have labels).

Here's the original PR: https://github.com/puppylinux-woof-CE/w ... 0R209-R215

I've done the same later in Fatdog:

Image

Greetings!

[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
User avatar
Jafadmin
Posts: 383
Joined: Tue Aug 04, 2020 4:51 pm
Has thanked: 68 times
Been thanked: 85 times

Re: Something is wrong with the LUKS opening and closing done by puppy Event manager

Post by Jafadmin »

April wrote: Mon May 03, 2021 11:10 pm

Thanks .
I had a look over that and a try.

So its loaded as sdb1 and did the mkrule as you see . That's all good but unplugging and replugging produces a new mount point of sdc1 as is usual and the sdb1 point is no longer available?

@April No, that's not what's happening at all. Those desktop icons ARE NOT MOUNTPOINTS. They are desktop icons. They can be, and are in this case, VERY misleading. They are iconic (gui) representations of disk media that contain a filesystem of some sort. The behavior of those icons depends on what you tell it to do in Event Manager.

The key thing to keep in mind here is that those icons are rudimentary. They are only intended to handle "vanilla" mount/unmount requests. They are NOT sophisticated enough to handle advanced mounting needs like crypto usually requires. Crypto has extra steps and extra requirements beyond the design parameters of those drive "icons". ALL linux distros have the same limitation with their drive icons.

You are trying to put the cart before the horse. Those icons are intended to be a visual convenience to make you aware of underlying filesystem presence. These should never be used as advanced disk management tools. It's not their purpose.

So I think that's where you are stuck. Understandably so. GUI devs go to great lengths to put "Oh wow!" icons on your desktop to promote their product. But now you want the shiny toaster to butter your bread for you, as well. (That's called "scope creep")

Unix/Linux has the most vast and powerful collection of disk/fs management tools of any computer OS in existence. "Icon" is not one of those tools ..

View ur mount points:

Code: Select all

mount | grep -i "^/" | grep -v loop | cut -d' ' -f1-3

.

Last edited by Jafadmin on Tue May 04, 2021 1:15 pm, edited 1 time in total.
User avatar
Jafadmin
Posts: 383
Joined: Tue Aug 04, 2020 4:51 pm
Has thanked: 68 times
Been thanked: 85 times

Re: Something is wrong with the LUKS opening and closing done by puppy Event manager

Post by Jafadmin »

@April .. Did you know that after you create a special purpose mount point for your device, you can drag/drop that mountpoint link onto your desktop and the icon will show the mount state? Tru story, bro(ette) .. :geek:

User avatar
April
Posts: 493
Joined: Tue Dec 29, 2020 9:06 pm
Has thanked: 57 times
Been thanked: 28 times

Re: Something is wrong with the LUKS opening and closing done by puppy Event manager

Post by April »

I see what I see before me . Sure they are icons only but they tell me whats plugged in and also what is mounted .They get an additional marker when they are mounted which is good for me and probably most people who use them.
I understand your remarks perfectly I think.

Crypto has extra steps and extra requirements beyond the design parameters of those drive "icons". ALL linux distros have the same limitation with their drive icons.

Once mounted I don't see that there ought be a difference ? The command

Code: Select all

cryptsetup luksClose /dev/mapper/myprivate 

in my case just needs to be given but is not.

It still stands unanswered though why the open LUKS partition does not close like the others.

In the pic below I mounted and unmounted sdb2 fine but could not unmount sdb1 ....Im still looking for the anomaly that occurs on LUKS.
And also why is the same little square different on sda1 ? Clearly mounted but protected from unmount because of the savefile?

Ohh its all fun isn't it . Might be away for a bit . Gotta move the boat from Cairns as the Tourists are arriving in droves, anchorages bring big bucks.

Drive icons3.png
Drive icons3.png (238.19 KiB) Viewed 598 times

The Australian State Governments have all enacted laws to steal your assets on your death. All legal paperwork is binned and all assets seized on one disgruntled child's complaint.Move them well before you die or go into a home.

williams2
Posts: 1059
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 302 times

Re: Something is wrong with the LUKS opening and closing done by puppy Event manager

Post by williams2 »

It still stands unanswered though why the open LUKS partition does not close like the others

AFAIK

If you click a drive icon it mounts the drive's fs and pops up a RoxFiler window.

If it's already mounted, it just pops up a RoxFiler window.
It does not unmount the drive.
To unmount a drive using a drive icon, you must right click the icon and select Unmount in the menu.

AFAIK, that is how any Puppy that I have ever used, works.
Because it was written that way.
Which is why I was confused about whether you were talking about drive icons on the desktop or not.
AFAIK, the drive icons do not behave the way you are describing.

Note, I usually do not use the drive icons, one of the first things I do after installing a Pup is disable the drive icons in the Event Manager configuration tool.

williwaw
Posts: 1874
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 167 times
Been thanked: 345 times

Re: Something is wrong with the LUKS opening and closing done by puppy Event manager

Post by williwaw »

I am using easy, so I do not know if some puppies have the same capibility.

clicking the icon calls rox, and mounts if unmounted
clicking the small box in the upper right will unmount a mounted partition.

something about overlaid icons perhaps?

williams2
Posts: 1059
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 302 times

Re: Something is wrong with the LUKS opening and closing done by puppy Event manager

Post by williams2 »

something about overlaid icons perhaps?

It could be. Rox has these icons:

/usr/local/apps/ROX-Filer/images/rox-mount.png
/usr/local/apps/ROX-Filer/images/rox-mounted.png

And, for example, BionicPup64 has a slightly different version of ROx than XenialPup64.

williams2
Posts: 1059
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 302 times

Re: Something is wrong with the LUKS opening and closing done by puppy Event manager

Post by williams2 »

The drive icons in BionicPup64 definately do not behave that way.
Clicking the green top right corner does the same thing as clicking anywhere on the icon.
It does not unmount anything.

Looking in /usr/local/pup_event/drive_all there are no umount commands, except for optical (cd,dvd) discs.
line 135: #if it is a mountable partition then mount and open with rox. If already mntd then open in rox...

I think Xenial works about the same way.

williams2
Posts: 1059
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 302 times

Re: Something is wrong with the LUKS opening and closing done by puppy Event manager

Post by williams2 »

In FossaPup, clicking the top-right part of the icon does work.
This is not part of Rox, this is part of /usr/local/pup_event/drive_all which sources functions in /usr/local/pup_event/frontend_rox_funcs
It is the rox_desktop_icon_clicked() function that seems to test which part of the icon was clicked.

If the top-right corner is clicked it sets PARAM1="unmount"

So that DOES work the way you said. It doesn't seem to work in BionicPup.

User avatar
bigpup
Moderator
Posts: 6836
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 874 times
Been thanked: 1472 times

Re: Something is wrong with the LUKS opening and closing done by puppy Event manager

Post by bigpup »

could not unmount sdb1

Again, these desktop drive icons are simple mount/unmount.
If any other operation is keeping the partition mounted, the drive icons will not unmount it.
I get hung up all the time when I open a iso, which is mounting it and displaying contents in Rox.
Forget to click on the iso to unmount it, but close Rox.
The desktop icon will not unmount the partition, because it is still mounted by the mounted iso.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

Post Reply

Return to “Users”