Page 1 of 2

How do I mount device without displaying file-list?

Posted: Wed 05 Dec 2018, 13:22
by B.K. Johnson
Hello all
How can I mount a drive without actually having the files displayed in ROX or PCMan or whatever?

Here's the "problem::
I prefer to use emelfm2 or doublecmd as my file managers, but they are of no use until the devices are mounted. Mounting means a ROX display which clutters up my desktop. I have to click the drive icon to mount then close the display window. What I think would be ideal would be a Shift-Click or Alt-Click on the existing drive icon, which would mount but not display.

A CLI command couched in a script with YAD that I could associate with a custom desktop icon would be acceptable too, as second best.

TIA

Posted: Wed 05 Dec 2018, 14:31
by Burn_IT
Open a command window and use the MOUNT command???

Re: How do I mount device withot displaying file-list?

Posted: Wed 05 Dec 2018, 14:33
by nosystemdthanks
the easiest hack would be to rename the rox file manager-- then you could still run it, but scripts that opened it when you didnt want them to would be unable.

obviously the route of creating a different mount tool would also work.

Posted: Wed 05 Dec 2018, 14:35
by bigpup
In Pmount.
There are right click options menu for the listed drives.
Try setting the drive to mount partition at boot.
That should just have it already mounted when Puppy boots.

Posted: Wed 05 Dec 2018, 14:43
by bigpup
In Default Application Chooser
See if you can change file manager to what you want it to be.
Even if the name of the file manager is not listed in the drop down list.
It can be typed into the choice.
Just need to put the correct info that starts/runs the file manager.
Usually the name of the exec file that starts it.

Posted: Wed 05 Dec 2018, 15:14
by Mike Walsh
@ BKJ:-

There's two alternatives, if we're talking about the older Pups that didn't have the current pMount 'auto-mount' behaviour & options. You can either:-

1) Create a small script that goes in /etc/init.d - stuff in here gets run/executed at startup. Using the blkid command, you can obtain the UUID of all your available partitions. Like this:-

Code: Select all

root# blkid
/dev/sda1: LABEL="DATA/Boot" UUID="d02d3eb7-4f23-4608-af43-85b7bf7a86bf" TYPE="ext3" PARTUUID="000ec3ee-01"
/dev/sda10: LABEL="HOME" UUID="6234549f-ca89-4081-b590-6a0c1198d91e" TYPE="ext3" PARTUUID="000ec3ee-0a"
/dev/sda11: LABEL="Swap" UUID="8902e9df-6614-4439-97c5-2f222f945fad" TYPE="swap" PARTUUID="000ec3ee-0b"
/dev/sda3: LABEL="64-6.05" UUID="91036e28-b049-4cd7-9d34-3222e9887c0a" SEC_TYPE="ext2" TYPE="ext3" PARTUUID="000ec3ee-03"
/dev/sda5: LABEL="5.5+560" UUID="6b34b50a-60e5-4e2b-bb44-a1690c9756f2" SEC_TYPE="ext2" TYPE="ext3" PARTUUID="000ec3ee-05"
/dev/sda6: LABEL="570" UUID="d808a0fc-6e9b-4d1a-b333-d546e25eb1f1" SEC_TYPE="ext2" TYPE="ext3" PARTUUID="000ec3ee-06"
/dev/sda7: LABEL="571" UUID="aaa36ae9-5da1-4736-ad4f-13cc1b7d7b42" SEC_TYPE="ext2" TYPE="ext3" PARTUUID="000ec3ee-07"
/dev/sda8: LABEL="5287" UUID="2243277a-13a0-4930-9d0d-6102f8ea1db4" SEC_TYPE="ext2" TYPE="ext3" PARTUUID="000ec3ee-08"
/dev/sda9: LABEL="606efi" UUID="253d4d4c-0267-41ed-bbfa-6a04704d34ba" SEC_TYPE="ext2" TYPE="ext3" PARTUUID="000ec3ee-09"
/dev/sdb1: LABEL="TEST" UUID="2e5e441b-4c52-4865-96b8-5bcb4c924f3f" TYPE="ext3" PARTUUID="00087457-01"
/dev/sdc1: LABEL="SeaDesk-1" UUID="190eb203-07ac-490e-aa0f-d10419ca91bc" TYPE="ext3" PARTLABEL="Seagate-1" PARTUUID="531048e8-347b-4b54-9b1d-671dc5718241"
/dev/sdc2: LABEL="SeaDesk-2" UUID="6d394fd7-aad2-4e20-90a9-c3ddcf07cc3e" TYPE="ext3" PARTLABEL="Seagate-2" PARTUUID="68a52708-806b-4141-bf9f-03d878b80bd3"
/dev/sdc3: LABEL="SWAP" UUID="e7e241e2-672d-4a67-900f-86e5b968d320" TYPE="swap" PARTUUID="a4a08ab9-4330-4284-a62b-31d6f47dbec3"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: UUID="6855c42a-96fa-40c3-be08-9aba6b37e2e2" TYPE="ext3"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/loop7: TYPE="squashfs"
/dev/loop8: TYPE="squashfs"
/dev/loop9: TYPE="squashfs"
/dev/loop10: TYPE="squashfs"
/dev/loop11: TYPE="squashfs"
/dev/loop12: TYPE="squashfs"
root#
You then use the UUID for the relevant partitions (only the bit between the quotation marks, mind), and put together a wee script like this:-

Code: Select all

#!/bin/sh
#
#Auto mount partitions at boot
#
mount -U d02d3eb7-4f23-4608-af43-85b7bf7a86bf /mnt/sda1
mount -U 6234549f-ca89-4081-b590-6a0c1198d91e /mnt/sda10
mount -U 190eb203-07ac-490e-aa0f-d10419ca91bc /mnt/sdg1
mount -U 6d394fd7-aad2-4e20-90a9-c3ddcf07cc3e /mnt/sdg2
The above is my auto-mount script for Precise 571, Lucid 5287, and Racy 5.5. Once you've created the script, you then need to make it executable, so it shows up green, as opposed to black. In Rox, it's rt-clk->Properties, then tick all 3 checkboxes in the 'Exec' column down the bottom, and hit 'Refresh' at the bottom when you're done.

You'll need to re-boot for this to take effect, and for the config changes to be written to your save. I believe this is in effect what modern pMount does when you hit the 'Refresh' button after selecting changes.

(Obviously, you need to modify the script for your own use-case, using your own partition ids/device UUIDs. You can have as many, or as few lines as you need to get the job done; Bash is only executing a string of consecutive commands, after all.)

----------------------------------------

If that all looks like too much hard work, there's always good old Startmount, created nearly a decade ago by Micko and tasmod. It works very well, too.

Whichever you choose, you can then start your chosen FM, secure in the knowledge that Rox won't pop-up and spoil the party!

-----------------------------------------

@ bigpup:-
bigpup wrote:In Default Application Chooser
See if you can change file manager to what you want it to be.
Even if the name of the file manager is not listed in the drop down list.
It can be typed into the choice.
Just need to put the correct info that starts/runs the file manager.
Usually the name of the exec file that starts it.
Good idea.....if it were possible. But in every version of the Default Applications Chooser that I've ever seen, the file-manager itself is one category that never puts in an appearance, unfortunately.

Personally, if it were me, I'd simply edit /usr/local/bin/defaultfilemanager to point to the exec for whatever FM I wanted to use.


Mike. :wink:

Posted: Wed 05 Dec 2018, 23:21
by B.K. Johnson
Thanks for your response, guys. I have settled on Mike Walsh's but have not tried it yet, Thanks again.

Posted: Thu 06 Dec 2018, 00:49
by bigpup
bigpup wrote:
In Default Application Chooser
See if you can change file manager to what you want it to be.
Even if the name of the file manager is not listed in the drop down list.
It can be typed into the choice.
Just need to put the correct info that starts/runs the file manager.
Usually the name of the exec file that starts it.


Mike Walsh wrote:Good idea.....if it were possible. But in every version of the Default Applications Chooser that I've ever seen, the file-manager itself is one category that never puts in an appearance, unfortunately.
Worked for me in Bionicpu64 7.9.7
Installed pcmanfm 1.3.0
http://www.murga-linux.com/puppy/viewto ... 043#996043
Default Application Chooser
Made pcmanfm the default file manager

Now when I click on a desktop drive icon it mounts and opens pcmanfm showing the contents.

Posted: Thu 06 Dec 2018, 01:38
by mikeslr
Hi All,

Booted into my 'oldest' Puppy on this computer -Slacko 5.7 (albeit substantially modified). As bigpup suggested, Menu>Setup>Default Application Chooser had a section for selecting the default File-manager. I hunted the actual application down. It's /usr/sbin/puppyapps, a bash-script. Opening it in geany revealed that zigbert last modified it in 2015. [If my flaky memory serves, about that time the ability to select the default terminal was added and there was a lot of discussion about using File-managers other than rox as default]. So, perhaps if you're using a pre-2015 Puppy, its Default Application Chooser doesn't have that capacity.

At any rate, attached is the puppyapps script from 'my' Slacko 5.7. Rename your current version [perhaps to puppyapps-old], remove the false '.gz' from the attached and drop it in to /usr/sbin. If it works, great. If not, it should't be hard to revert.

Posted: Thu 06 Dec 2018, 02:31
by Mike Walsh
Hi, Mike.

Mm. Curious. Very much so, in fact.

I've just booted into my own Slacko 570 to have a look, before turning in for the night. Dropped yr 'puppyapps' script in; it works fine. But here's the rub:-

My standard Default Applications Chooser in 570 is 0.8.6, OK?


Image


As you see.....no 'file manager' selector, right?

Starting /usr/bin/puppyapps with a click gives me this:-


Image


.....and guess what? Still no sign of 'file manager'; it echoes exactly what the original shows.....yes? (It jumps from 'Draw' straight to 'HTML editor'; missing out 'f' completely.)

Even in /usr/local/bin, where all the 'default' entries live, it jumps straight from 'defaultemail' to 'defaulthandler'. 'Defaultfilemanager' doesn't, in fact, exist.....so I can't quite see how it can be 'set'!

So answer me this. Where does 'puppyapps' actually draw the code from to make that 'filemanager' box show up? Why d'you have it, but I don't? Unless it's something to do with alterations you've made yrself; after all, you mention that your 570 is substantially modified.....

Perhaps I need to track down the 'defaultfilemanager' entry from a more recent Pup, drop it in, and see what happens, like. Not fussed about it, but I am getting dead curious now! :lol:


Mike. :wink:

Posted: Thu 06 Dec 2018, 03:33
by mikeslr
Curiouser and Curiouser.

Well, my Slacko is actually 5.7.1, probably with a kernel different than that which came in the ISO but using a SaveFolder which goes back a couple of years. Examining the applications I installed the only one I thought might have altered the puppyapps file was vicmz's openboxplus 6.2. But decompressing the pet I have in storage revealed that it did not contain a puppyapps file in /usr/sbin.

I don't currently have the original Slacko 5.7 ISO. So perhaps it's puppyapps file is different from that in Slacko 5.7.1.

Examining the code of puppyapps, its lines 28 to 31 read:

desktop_output () {
LANG=C grep -E '^Name=|^GenericName=|^Comment=|^MimeType=|^Icon=' /usr/share/applications/*.desktop | \
grep -v "/usr/share/applications/default.*" > /tmp/puppyapps/puppyapps_desktop_output #we do this one time, instead of in search_desktop
}

which I think means it is reading all default desktop files in /usr/share/applications. Among those on my system is one named defaultfilemanager.desktop. Its arguments are:

[Desktop Entry]
Encoding=UTF-8
Type=Application
NoDisplay=true
Name=Default file manager
Exec=defaultfilemanager
Icon=/usr/share/pixmaps/puppy/directory.svg

Do you have that desktop on your system? If not, does creating one help?

Posted: Thu 06 Dec 2018, 11:33
by Mike Walsh
Mike:-

A-ha. Light begins to dawn. I've got my own install of Sailor's 571, like you. I still don't use it quite as much as I do the original, although I've been having something of a 'pruning' session in recent days. I've had too many Pups (and 'alternate' distros) on here in various stages of 'usability'; but to cut a long story short, I've got it from 17 down to an even dozen...!! :roll:

571 is still with me, so.....I'll boot in later on and see what I can find.

(I'm like you in another respect, Mike. I too run crazy mixtures of save-files, kernels, modified apps/configs, remotely sym-linked stuff from all over the place.....

I'm glad I'm not the only one. I thought there must be summat wrong with me! :lol: :shock: :lol: )


Mike. :wink:

Posted: Thu 06 Dec 2018, 15:48
by B.K. Johnson
Guys
Chooser is a prog I have never used. Looked in when bigpup suggested I do but saw no FM. I am using tahr-6.0.6 with Chooser version 0.9. Looked just now ...see screenshot. The only thing I changed from the virgin was the HTML editor.

Posted: Thu 06 Dec 2018, 17:00
by mikeslr
Hi B.K. Johnson,

IIRC, Tahrpup 6.0.6 has two 'chooser' applications. Both appeared on the Setup Submenu. One was named Default Applications, the other PuppyApps Default Applications Chooser. One may have been 'hidden'. You can un-hide it via Menu>Utility>PupMenuEdit Menu Editor, [not to be confused with Menu>Utility>PupMenu Launcher & Editor]. Click the Show/Hide panel. See if the one you didn't use has a File-Manager option.

Posted: Thu 06 Dec 2018, 18:23
by B.K. Johnson
Hi mikeslr
Both Default Applications and PuppyApps Default Applications Chooser appear on the Setup Submenu, but as Mike Walsh reported, a FM does not appear in either.

Posted: Thu 06 Dec 2018, 19:48
by mikeslr
Have you tried adding the /usr/share/defaultfilemanager.desktop file I suggested, http://murga-linux.com/puppy/viewtopic. ... 13#1012213 ?

By the way, I can't suggest a hunt for the version I mentioned as, like the second screenshot in Mike Walsh's post, it doesn't display one.

Posted: Thu 06 Dec 2018, 20:39
by Mike Walsh
@ Mike/BKJ:-

I believe I've got to the bottom of the mystery.....

I've just come from Slacko 571 (where the 'FileManager' entry is very definitely 'present & correct'), and booted into my own copy of Tahr 606. BK, you're quite right; there is no 'FileManager' entry showing up in either of the Default Choosers.

And I know why, too.

---------------------------------

Both Pups have the 'puppyapps' script' in /usr/sbin. But if you open the two of them up, side-by-side, in Geany, you can see the difference.

The version Sailor used has an extra entry - both in the 'Defaults' list near the top of the script, and in the 'static' chooser section, further down in the main body of the script. I've not scanned the whole thing (there's quite a lot of it!), but I saw enough to convince me to try a wee experiment.....

Assuming that Phil has used the original script, as produced by Ziggy, I can only postulate that Sailor, when creating 571 before the final re-master of its ISO, added an extra entry for 'FileManager'. I can't somehow believe that Phil, of all people, would have gone out of his way to remove said entry.....so I'm inclined to believe my first statement; that Sailor did some additional coding and added the extra entry.

I now have the 'FileManager' entry showing in Tahr 606's 'PuppyApps Default Applications Chooser'. This is in the 'System' sub-section, for ease of displaying here on the forum...


Image


BK, this one's an easy 'fix'. All you need to do is install the attached .pet (it merely substitutes the Slacko 'puppyapps' script for Tahr's). No reboot/restart of 'X' is required. Then, go to /Menu->Setup->Puppyapps Default Applications Chooser.

As shown in the image, where 'rox-filer' is shown, just delete the entry and type 'pcmanfm' instead (yeah, I know; it ought to show in the list, but they don't always. I think in this case it's because 'pcmanfm' shows as a shared library rather than a binary..?) Then 'OK' it. Now, when you click on the desktop 'Files' icon, PCManFM will start every time, instead of ROX. Should you ever want to change back, just reverse the process, and type (or select) 'rox-filer' instead.

Make sure to use the second of the two MenuEntries; the 'PuppyApps Default Applications Chooser' (not the 'original'.) You'll also need to run through the full list just once (select 'All'), and set your own defaults up initially, because these are all my entries from Slacko 571..! (*sorry about that * :oops: - 'sheepish grin'*)

This hasn't been a waste of time, because although I love ROX, occasionally I find myself hankering after something different. Now that I know the default can be changed, I'm going to do some experimenting..!

Hope that helps.


Mike. :wink:

Posted: Thu 06 Dec 2018, 22:47
by B.K. Johnson
Mike,
Your pet did the job - File Manag=rox-filer appeared.
I was surprised when I opened the drop-down box to see both emelfm2 and doublecmd listed. Chose emelfm2 but nothing (I could see) happened when I clicked a drive icon. I got some work to do. Reverted to rox-filer and all is well again.

Posted: Fri 07 Dec 2018, 11:44
by HerrBert
/usr/local/bin/rox is only a script to execute /usr/local/apps/ROX-Filer/AppRun, so why not change the exec-command to something else?

another approach would be to edit /usr/local/bin/drive_all not to open rox by commenting out -d /mnt/$xONEDRVNAME

Code: Select all

rox -x /mnt/$xONEDRVNAME -d /mnt/$xONEDRVNAME &
you would have to do a search for the code as files differ on slacko and tahr.

on slacko and tahr drive_all explicitly calls rox not defaultfilemanager...

Posted: Fri 07 Dec 2018, 16:21
by bigpup
B.K. Johnson wrote:Mike,
Your pet did the job - File Manag=rox-filer appeared.
I was surprised when I opened the drop-down box to see both emelfm2 and doublecmd listed. Chose emelfm2 but nothing (I could see) happened when I clicked a drive icon. I got some work to do. Reverted to rox-filer and all is well again.
I tried this with emelfm2 as the default file manager.

I think the problem is emelfm2 wants to start based on settings in it's config.
If you go to the config>General it gives option for where in the file system it opens.

With clicking on a drive icon being /mnt/whatever the drive is.
That /mnt/whatever is not a config option for emelfm2 startup.

Maybe some added command code for the emelfm2 entry in
Application Chooser would do it, but not sure what :idea: