Network Samba Share Rox App

Configuration wizards, scanners, remote desktop, etc.
Message
Author
User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

Network Samba Share Rox App

#1 Post by 01micko »

This app was originally written by kirk for Fatdog64 but works just as well in Slacko and Precise. It is a simple rox app where you just click it and it scans for shares, then it makes a drive icon for each share which you simply click and it shows the network share. If a password is needed a box pops up requiring the username and password.

The reason for this app is that Pnethood, while it has served us well for many years is often failing to discover network shares in the latest Puppies even though the shares exist. This is because it's major dependency nbtscan is getting old and largely unmaintained.

This is designed for home use. For a more heavy-duty solution use YASSM by rcrsn51. The next Slacko will be shipping with both in place of Pnethood.

This is tested working with XP, Windows 7, Mac and Puppy-samba shares. It is tested with the latest Slacko-beta, Precise Puppy and latest Wary/Racy Beta.

Once you install the pet there is a directory made in /root/network with the Network icon inside. Navigate to that and just click the Network icon to begin. There is no menu entry.

If you forget to unmount shares at shutdown then there is a service script to take care of that.

Warning: No warranty. There is the possibility that if you do something silly like deleting a mounted share then there will be data loss on the share. If you have problems just reboot.

Dependencies:
  • rox-filer
    mpscan (should be already there in most pups)
    mount.cifs (should be already there in most pups)
    smbclient (should be already there in most pups)
    base64 (only in latest pups - includes slacko-533, wary/racy-5.3,precise-5.4)
This will likely fail in Lupu, just test if base64 is there with

Code: Select all

which base64
EDIT:
update to 0.8 fixed issues with nounix and sec=ntlm thanks to shinobar and gcmartin

update to 0.7 fixed verbosity at boot, now echoes "ok", fixed guest password. (base64 error)

update to 0.6, improved unmounting at shutdown thanks to jamesbond
Attachments
capture5884.jpg
What it looks like inside /root/network after it has been run if shares are available.
(20.67 KiB) Downloaded 5339 times
network_roxapp-0.8.pet
(26.32 KiB) Downloaded 1871 times
Last edited by 01micko on Mon 05 Aug 2013, 02:19, edited 3 times in total.
Puppy Linux Blog - contact me for access

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#2 Post by peebee »

Hi Mick

I'm afraid that this new app doesn't seem to work very well for me :(

I'm running samba on my desktop pc under slacko 5.3.3 - my system definitely falls into "home use" as I just use it to gain access to my files on my desktop from my laptop.

pnethood connects reliably and quickly under most puppies (I have reported speed problems recently with precise but these were fixed)

I loaded the new "final version" 5 of the app onto a pristine frugal install of slacko 5.3.6.5.

On my first attempt to connect nothing happened - the scanning message appeared and then after about 1 min disappeared again with no shares discovered.

On my 2nd attempt I did get a prompt box to enter a user name and password but this took a very long time to appear. A share was established and accessible.

For my setup this would be a retrograde replacement for pnethood as it currently stands.....

Thanks
Peter
Attachments
capture21101.png
(51.53 KiB) Downloaded 5190 times
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#3 Post by rcrsn51 »

@peebee: Can you do some testing? Using your network prefix, run this command. Note the spaces around the "-".

Code: Select all

mpscan -p 139 aaa.bbb.ccc.1 - aaa.bbb.ccc.254
Then

Code: Select all

mpscan -t 3 -p 139 aaa.bbb.ccc.1 - aaa.bbb.ccc.254
I find that mpscan is slower in Slacko than in other Puppies, but not as slow on my network as you are reporting.

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#4 Post by peebee »

rcrsn51 wrote:@peebee: Can you do some testing?
Hi rcrsn51

Results:

Code: Select all

# mpscan -p 139 192.168.1.1 - 192.168.1.254
Timeout: 1
# mpscan -t 3 -p 139 192.168.1.1 - 192.168.1.254
Timeout: 1
Timeout: 2
Timeout: 3
Timeout: 4
Timeout: 5
Timeout: 6
Timeout: 7
Timeout: 8
Timeout: 9
Timeout: 10
Timeout: 11
Reach max number of timeouts
# 
For command #1 - the Timeout 1 output only appeared after 30-40 sec. For command #2 the outputs appeared at roughly 2 sec intervals.

Hope helps
Cheers
peebee
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#5 Post by rcrsn51 »

And in neither case did it find the target server. I'm curious - what other devices are connected to this network?

What happens if you probe the server directly with

Code: Select all

mpscan -p 139 aaa.bbb.ccc.ddd

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#6 Post by peebee »

rcrsn51 wrote:And in neither case did it find the target server. I'm curious - what other devices are connected to this network?

What happens if you probe the server directly with

Code: Select all

mpscan -p 139 aaa.bbb.ccc.ddd
Just 2 devices:
- desktop pc ethernet direct wired to wifi router
- laptop over wpa wifi

Direct probe (from slacko 5.3.3 as that's what's loaded):

Code: Select all

# mpscan -p 139 192.168.1.69
ip: 192.168.1.69 139 OK
Your test commands seem to find the server on 5.3.3 but not on 5.3.6.5.....

I better try 5.3.6.5 again.....
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#7 Post by 01micko »

I'm curious - what other devices are connected to this network?
Me too :) (ok saw post, no smart-phone, smart-TVs?)

In any case, The scan only needs to be done when you need to find new shares, the existing shares need not be updated.

kirk actually hacked mpscan in fatdog to time out quicker. I have that source and will compile soon. I just checked, and mpscan is a part of kirk's File-Sharing rox app present in all puppies. I compiled mpscan on the raspberry-pi so I can test how fast it is in SAP6 (provided I have smbclient, can't remember). I know the FIle-Sharing works fine in SAP6.

peebee, do you ever use that File-Sharing app? I'd be interested to know how fast/slow that is for you.
Puppy Linux Blog - contact me for access

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#8 Post by peebee »

01micko wrote:
I'm curious - what other devices are connected to this network?
Me too :) (ok saw post, no smart-phone, smart-TVs?)

peebee, do you ever use that File-Sharing app? I'd be interested to know how fast/slow that is for you.
No other devices - just the desktop and laptop....I'm a simple soul lol

No - haven't used the file-sharing app - not even sure I knew it existed - is it in the menu?? Where would I find it?

When I went back to 5.3.6.5 the direct command found the server. Then when I did rcrsn51's test command it also found the server but took a long time to finish with the Timeout output.

Actually pnethood sometimes doesn't find the server and a couple of presses of the rescan are needed - its almost like the server goes to sleep and has to be kicked back into action.
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#9 Post by rcrsn51 »

[Deleted]
Last edited by rcrsn51 on Wed 31 Oct 2012, 06:14, edited 1 time in total.

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#10 Post by 01micko »

Attached is kirk's mpscan source and accompanying binary compiled in slacko-5.3.6.5

If you want to recompile just run ./configure && make and strip the bin in the src dir with strip --strip-unneeded mpscan

Back up the old /usr/sbin/mpscan and replace with the new binary.

I can't see any difference.

-

BTW, it works (sort of) on the raspberry pi, but network_roxapp doesn't produce the win7 mounts. even though I get the prompt for a user and password. It's some weird error, probably to do with the fact that I had to install nearly all of debian samba, which links to kerberos and all the security stuff. The mac and my puppy share worked fine. I'll save that for another day.
NOTE: raspi users, please don't use on SAP6 because there is a potential data loss bug specific to the SAP6 OS and the network_roxapp.
Attachments
mpscan_kirk-0.1.0.tar.bz2
(55.13 KiB) Downloaded 1408 times
Puppy Linux Blog - contact me for access

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#11 Post by peebee »

01micko wrote:Back up the old /usr/sbin/mpscan and replace with the new binary.
I can't see any difference.
:D :D :D

Hi Mick & rcrsn51

Big difference here....

Installed the "new" mpscan

Ran rcrsn51 tests - showed that it found my share.

Installed the network_roxapp-0.5.pet

Network scan found my share in an acceptable time - c. 10 secs

Share survived reboot.

Seems to have fixed it for me.

Many thanks
Peter
Attachments
capture14468.png
(20.05 KiB) Downloaded 5009 times
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#12 Post by 01micko »

peebee wrote: Network scan found my share in an acceptable time - c. 10 secs
~
Seems to have fixed it for me.
Ok, good news :) . Even though I had no issues and and couldn't really tell the difference in speed, kirk must have seen something and made the appropriate adjustments. I haven't done a diff so as of now I don't know. Maybe I don't need to know :lol: .

I'll put the new binary in the next slacko beta.

Thanks.
Puppy Linux Blog - contact me for access

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#13 Post by jamesbond »

Note: some windows servers only listen on ports 445 instead of 139.
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#14 Post by 01micko »

jamesbond wrote:Some note: some windows servers only listen on ports 445 instead of 139.
Yeah.. do you reckon it's worth running a second loop on failure ? Or maybe a 'help' file or README ? It's nice and simple how it is, more complication breeds complications .. :) . There is the config file, a readme file could point that out I guess.
Puppy Linux Blog - contact me for access

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#15 Post by 01micko »

Updated to 0.6

Changed the service script (run at shutdown) to ensure everything is killed before unmounting the shares, thanks to jamesbond

See main post
Puppy Linux Blog - contact me for access

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#16 Post by 01micko »

Updated to 0.7

See main post
Puppy Linux Blog - contact me for access

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

nounix option

#17 Post by shinobar »

Using v0.7 on the precise puppy 5.5.
Cool, but i got error message when i put files in the mounted share.
I think we need 'nounix' option at mount. See the next post:
http://murga-linux.com/puppy/viewtopic. ... 2&start=15
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

sec=ntlm option

#18 Post by shinobar »

See the posts of gcmartin and shinobar:
http://www.murga-linux.com/puppy/viewto ... &start=187
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

Re: sec=ntlm option

#19 Post by 01micko »

shinobar wrote:See the posts of gcmartin and shinobar:
http://www.murga-linux.com/puppy/viewto ... &start=187
New version 0.8 is now in the main post, thanks!
Puppy Linux Blog - contact me for access

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#20 Post by sunburnt »

It`d be really nice for the top developers here to start making RoxApps.
I`ve said for awhile now that this is the direction for Puppy and Linux to go.

Pet packages, or any "installed" software take up Puppy`s Save file space.
For RoxApps and SFS, only the "config." files and /root stuff take up space.
No-install apps are easy to add and remove, and can contain their configs.

If apps are not installed, and other things that bloat the Save file like Firefox ( browser ) cache
are linked to a dir. on a partition, then the Save file only needs to be 64 MB to 256 MB in size.
.

Post Reply