Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 12 Nov 2019, 22:28
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » System
How do I mount device without displaying file-list?
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 2 [21 Posts]   Goto page: Previous 1, 2
Author Message
mikeslr


Joined: 16 Jun 2008
Posts: 3469
Location: 500 seconds from Sol

PostPosted: Thu 06 Dec 2018, 15:48    Post subject:  

Have you tried adding the /usr/share/defaultfilemanager.desktop file I suggested, http://murga-linux.com/puppy/viewtopic.php?p=1012213#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.
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 5543
Location: King's Lynn, UK.

PostPosted: Thu 06 Dec 2018, 16:39    Post subject:  

@ 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...





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 * Embarassed - '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
Puppyapps_upgrade-1.0.pet
Description  Modern 'Default Applications Chooser' upgrade .pet; re-instates/adds the 'FileManager' entry.
pet

 Download 
Filename  Puppyapps_upgrade-1.0.pet 
Filesize  7.77 KB 
Downloaded  154 Time(s) 

_________________
MY 'PUPPY' PACKAGES

Back to top
View user's profile Send private message 
B.K. Johnson

Joined: 12 Oct 2009
Posts: 773

PostPosted: Thu 06 Dec 2018, 18:47    Post subject:  

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.

_________________
B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM

Back to top
View user's profile Send private message 
HerrBert

Joined: 03 Nov 2016
Posts: 99
Location: NRW, Germany

PostPosted: Fri 07 Dec 2018, 07:44    Post subject:  

/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:
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...
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 12828
Location: S.C. USA

PostPosted: Fri 07 Dec 2018, 12:21    Post subject:  

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
Screenshot.jpg
 Description   
 Filesize   27.02 KB
 Viewed   189 Time(s)

Screenshot.jpg


_________________
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected Shocked
YaPI(any iso installer) http://www.murga-linux.com/puppy/viewtopic.php?t=107601
Back to top
View user's profile Send private message 
B.K. Johnson

Joined: 12 Oct 2009
Posts: 773

PostPosted: Sat 09 Nov 2019, 01:58    Post subject:  

Hello all
This is rather long, but stay with me.
Takeaways:

/etc/init.d is where scripts invoking services to be run at startup are placed.
/root/Startup is where user scripts to be executed at bootup after X has loaded are placed.
In some puppies*, viz Precise 571, Lucid 5287, and Racy 5.5 (Walsh) and Tahr-6.0.6 (BKJ), when a script/symlink calls for accessing a storage device it can be done using /etc/init.d without any other changes i.e. mount point not needed.
In upupbb, a /etc/init.d script/symlink that requires accessing a storage device does not work.
In upupbb, a /Startup script/symlink that requires accessing a storage device works ONLY if the script sets a mount point.
autostart, a replacement for Startup, has been available for use since 2006. It is used minimally in upupbb but seemingly not at all by the community.


* This is not the result of analyzing all puppies.

Sometimes you keep doing something and after a while you think the idea was your own. Laughing Though I have used the Startup directory for actions I want at startup, I make no such claim of ownership. My latest use is to mount storage devices at startup to avoid ROX-Filer cluttering my desktop. Go here to read the scenario.
On that thread, Burn_IT and Mike Walsh provided the solution, but Mike placed the symlink to his script in /etc/init.d. Accustomed as I am to using Startup for that purpose, I overlooked Mike's placement when I read the post and then Mike, bigpup, I and others got sidetracked on Chooser and File Managers. I forgot completely about my original question until yesterday, almost a year after the initial post.

Two issues ensued. First, when I placed this script in /root/my-applicationa/bin and symlinked to Startup, it didn't work in upupbb (32 bit). UUIDs redacted.
Code:

#!/bin/sh
#
#Name: roxlessmount
#
#Auto mount my 2 normally installed drives at boot - sda1 and sdc1.
#With emelfm2 being my file manager, I can now access the drives
#immediately after booting without first invoking ROX, to clutter my
#desktop with its file-list display.
#
mount UUID=XXXXXXXXXXXXXXXX /mnt/sda1
mount UUID=XXXXXXXXX /mnt/sdc1
.
After much head-scratching and DuckDuckGo search, I guessed that I needed to create a mount point. Modifying the script as below then worked.
Code:

#!/bin/sh
#
#Name: roxlessmount
#
#Auto mount my 2 normally installed drives at boot - sda1 and sdc1.
#With emelfm2 being my file manager, I can now access the drives
#immediately after booting without first invoking ROX, to clutter my
#desktop with its file-list display.
#
mkdir /mnt/sda1
mount UUID=XXXXXXXXXXXXXXXX /mnt/sda1
mkdir /mnt/sdc1
mount UUID=XXXXXXXXX /mnt/sdc1


That's what drew me back to the thread: to see if Mike had likewise set up a mount point but I had missed it. He had not.

The README files did not help in this regard, but it raises the question of the proper placement of scripts with startup actions.

README in /etc/init.d
Quote:

The scripts in /etc/init.d are executed at bootup and shutdown to start and stop services.

- emphasis is mine. a specific set of named services; not user scripts

README in Startup
Quote:

Any executable or scripts (or symlink to) placed in this directory
will be executed after the X desktop has loaded. For example, say that you wanted to run /usr/local/bin/rubix (a game) everytime Puppy is started. ...


Quote:
Note, if you want to execute something at bootup and prior to X desktop
loading, edit /etc/rc.d/rc.local.


Mike's code that succeeded did not have mount point(s). I tried linking my script with and without the mount point to /etc/init.d from tahr-6.0.6. In both instances it worked. On my experimental upupbb, roxlessmount without mount points set, and symlinked to /etc/init.d, the drives were not marked as mounted when the system booted. As shown in the console extract below, the script exists and is executable, but when invoked, we get a mount point does not exist error.
Code:

# which roxlessmount
/root/my-applications/bin/roxlessmount
# roxlessmount
ntfs-3g-mount: failed to access mountpoint /mnt/sda1: No such file or directory
mount-FULL: /mnt/sdc1: mount point does not exist.
#

I got the exact error when symlinked to Startup.

So, in tahr-6.0.6 and the puppies that Mike use (Precise 571, Lucid 5287, and Racy 5.5), a symlink to /etc/init.d works without a mount point, but not in upupbb.

Strange things do happen.
.
In this layman's opinion, the proper location to link scripts like mine which are not services, is in the Startup directory, even if using /etc/init.d works. I will continue to use Startup.
[Later]
Help is on the way.
Barry recently wrote:
Quote:
I know that woof-CE has gone over to /etc/xdg/autostart and $HOME/.config/autostart, as per the xdg specification.


And this is what $HOME/.config/autostart README in upupbb states:

Quote:
This is a new directory for starting applications when X starts
It is to be populated by .desktop files only, anything else is to be ignored.
This is part of the deprecation of /root/Startup
For guidelines on autostart and creating .desktop files see :
http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html

Edited 11/11/2019 for addition of Takeaways.

_________________
B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 2 [21 Posts]   Goto page: Previous 1, 2
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » System
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0553s ][ Queries: 13 (0.0060s) ][ GZIP on ]