File Open Dialog - No Network Drives

More
25 Jan 2016 15:37 #69092 by HDVideo
I'm a new user of the Gmoccapy interface and finding I like it quite a bit. The only problem I'm having is that I can't open g-code files located on my home network. I can get to them from File Manager, but not the file open link in Gmoccapy. From Gmoccapy I can get to any local folder on my hard drive, just not the network files.

I'm not very familiar with Linux, so is there some configuration change needed to enable this so I'll be able to directly open networked files from within Gmoccapy? Currently I'm having to copy files to a local folder before I can use them.

Thanks

Please Log in or Create an account to join the conversation.

More
25 Jan 2016 17:01 #69095 by ArcEye
Don't know what you are trying to open, Linux, windoze, Mac ?

Don't use Gmoccapy, so not familiar with its dialogs, but if it is just another linux machine, cifs is probably one of the easiest to use, to mount a network drive to a local folder, should also work with a samba share

This seems a reasonable howto
linhost.info/2012/05/mount-a-network-share-in-linux-ubuntu/

regards
The following user(s) said Thank You: HDVideo

Please Log in or Create an account to join the conversation.

More
25 Jan 2016 17:45 #69097 by Todd Zuercher
I just tried installing cifs-utils (using synaptic) and the command mount.cifs returns this
bash: mount.cifs: command not found

What did I do wrong?

Please Log in or Create an account to join the conversation.

More
25 Jan 2016 17:54 #69098 by ArcEye

I just tried installing cifs-utils (using synaptic) and the command mount.cifs returns this
bash: mount.cifs: command not found

What did I do wrong?


No idea. I have just installed cifs-utils on Jessie and it works fine.
I just installed on the command line.

If you can't get man mount.cifs to show you the man page or mount.cifs -v to show you the version, it is not installed.

Please Log in or Create an account to join the conversation.

More
25 Jan 2016 18:08 #69099 by Todd Zuercher
man mount.cifs, does bring up the manual. I'll look that over a bit and see if I can find a hint.

Please Log in or Create an account to join the conversation.

More
25 Jan 2016 18:12 #69100 by HDVideo
The files I'm trying to access are on a Windows 7 system attached to my home network through a router. Using the Linux File Manager, I can get to the files without any sort of mount commands. The files/folders are designated "shared" on the Windows system.

I'll try another of the GUIs available to see if I have the same problem. I was thinking I had been able to do it on a previous version of LinuxCNC, but could be wrong.

Considering the files are on a Windows box, should I still be using cifs-utils and the mount commands listed above?

Thanks

Please Log in or Create an account to join the conversation.

More
25 Jan 2016 19:43 #69101 by Todd Zuercher
I don't think it will matter which gui you use. This isn't a new or Linuxcnc problem. It is a general Linux problem, problem with how the way most Linux application access the file system. It was much simpler back when Linuxcnc was using Ubuntu as the OS. Ubuntu had a hidden directory where windows (samba) shares were mounted, and you could easily set up a simlink from there to a directory that you could easily access with with the file chooser of your application. Work-arrounds like this don't always work with different versions and some of us less proficient Linux users have been left struggling to figure out how to make the newer Debian based Linuxcnc versions work. So to use Linuxcnc (and most other Linux applications) with your network share, you will need to set up a mounting point for it somewhere. This cifs-utils seems to be one of the simplest ways to do it, But I'm still working out the details of how to make it work smoothly for myself as well.

Please Log in or Create an account to join the conversation.

More
25 Jan 2016 21:04 - 25 Jan 2016 21:11 #69104 by Todd Zuercher
Ok I think I have it sorted out. Part of what was giving me all sorts of grief was the fact that the network share I was trying to mount had a "space" in one of the directory names.

I found this set of instructions to be quite helpful as well.
wiki.ubuntu.com/MountWindowsSharesPermanently

Anyway, I would open your share that you are trying to access with file browser from there you should be able to copy the path name for it. (should be something like smb://your_windows_share/)
Next you need to create a directory where ever you'd like to mount your network share. (my example will use /home/username/linuxcnc/ngcfiles/network)
Then after you've installed cifs-utils, you can do a test mount to make sure you've gotten it all straight. From a terminal type:
sudo mount.cifs  //your_windows_share/  /home/username/linuxcnc/ngcfiles/network/

This will mount your windows share at that location. Check to see that it is there with a file browser or in Linuxcnc.
Unfortunately this will disappear next time you reboot. To make it perminant you will have to add an entry to the fstab file in /etc/
To do that you must have root privlages, so from a terminal type sudo leafpad /etc/fstab (or use sudo "what ever editor you like"). At the bottom of the fstab file add a new line :
//your_windows_share/  /home/username/linuxcnc/ngcfiles/network/  cifs  guest,uid=1000,iocharset=utf8  0  0

reboot your computer and make sure it works. If your windows share requires certain usernames and passwords you will need to make adjustments to the fstab line.

Oh and about spaces in your path names. The terminal command mount.cifs when a directory has a space or other special character in it put that directory name in double quotes such as //server_name/"dir name"/ but in the fstab file you use \040 to replace a space like this //server_name/dir\040name/
Last edit: 25 Jan 2016 21:11 by Todd Zuercher.
The following user(s) said Thank You: HDVideo

Please Log in or Create an account to join the conversation.

More
25 Jan 2016 23:18 #69106 by HDVideo
Thanks for that, I'll give it a try. I had read much the same and was working on it. Cifs-Utils installed with no problems, but I couldn't quite get the mount command to work. I think the problem was with my Windows share name.

I appreciate the help.

Please Log in or Create an account to join the conversation.

More
26 Jan 2016 09:11 - 26 Jan 2016 09:54 #69114 by ArcEye

The files I'm trying to access are on a Windows 7 system attached to my home network through a router. Using the Linux File Manager, I can get to the files without any sort of mount commands. The files/folders are designated "shared" on the Windows system.


Most file dialogs used in programs come from the SDK from that language and populate their file trees simply from detected files using similar to a ls command.

The more advanced file managers, especially those integrated into the system, do all sorts in the background.
They automatically mount your mobile phone through MTP using the /proc system, create a directory and mount inserted USB sticks onto it, automatically mount detected network shares etc etc

The killer for sharing from windoze to Linux, is very often the awful file names, full of spaces, multiple periods, asterisks, brackets or escaped sequences to try to overcome them if accessing in a browser.

In very many Linux programs a space precedes a new argument, a period precedes the extension as far as the parsers are concerned, so they cause problems
Anyone who has tried to download a video ripped by a windoze user, using wget on the commandline will know what I mean. :P

The safest word separation to use in a filename is an underscore _ . Even a dash - has dangers in some circumstances, where it is possible the name could be seen as an instruction to subtract one named variable from another.

As Todd pointed out you can automatically mount at boot if necessary, be aware of course that the networked drive MUST be available at EVERY boot, or you may hit other problems.

A slow boot is one possibility, already the newer kernels will wait for 1 1/2 minutes at boot up if they find an instruction in fstab to mount a drive by UUID which they cannot resolve.

(NB. Most common reason for this problem if you have it, is that the swap partition was reformatted when a new partition install was done and all the other partitions which mount that same swap, now have the wrong UUID in their fstab - bugged the hell out of me until I realised what was happening :laugh: )

regards
Last edit: 26 Jan 2016 09:54 by ArcEye.
The following user(s) said Thank You: HDVideo

Please Log in or Create an account to join the conversation.

Moderators: newbynobiHansU
Time to create page: 0.105 seconds
Powered by Kunena Forum