Popular Posts

How to open/save LibreOffice documents on Samba network

11:39 AM 5 Comments A+ a-

When users have to use some shared Windows folder on Linux you can easily access and open it automaticly with samba (Which comes preinstallled on most distros) , but when you open some files in LibreOffice or OpenOffice programs like Calc and Writer, and when you click "Save" nothing will happend, and if you click close, you will lose your changes in that file. When you open it again it will be unchanged.  If you want to recover it, click "Save as" and it will open temp folder in which it saves changes. Copy folder name and go to that folder on your folder explorer (Nautilus(GNOME), Dolphin(KDE), PCmanFM(LXDE), Thunar(XFCE)...) and you will find all your lost documents.

I searched for solution all over the web and find several solutions and none of them are wizard-like. You must do it by editing some config files.
 I will show you now solution that will fix all problems  caused by accessing samba resources, read-only permisions ....

Also this will solve the problem of Mapping network drivers in Linux , you can do it in several ways but this is the best for ordinary user because when you setup it once it will stay forever and user will never be in situation to enter samba user password, or to map it again... it will just work (I hope so :))

The solution is to mount your network drive on some folder.First create that folder:
mkdir /media/mappedfolder

Then enter this command to test if it working:

sudo mount -t cifs -o username= myusername@domain, password=mypassord,file_mode=0777, dir_mode=0777 //10.1.0.120/sharedfolder  /media/mappedfolder

Also if you use freenas or something similar, and if you use guest account you can easily mount it like this command:
sudo mount -t cifs  //10.102.10.4/userdata  /media/userdata

You must use parameter ,file_mode=0777, dir_mode=0777 to have read-write permission to all users on your computer .
Change myusername@domain to your username and domain, and change mypassord to your password.
Change //10.1.0.120/sharedfolder to your shared folder. You don't need to use smb:/ prefix because.
If you don't using ubuntu you can delete "sudo" word from command, and you must enter the root console.

If everything works then open /etc/ftab with root privilegies and add foolowing(Change it with your data): 
//10.1.0.120/sharedfolder /media/mappedfolder cifs username=yourusername, password=yourpassword, file_mode=0777,dir_mode=0777

And from now every time you start computer this will run and this folder will be mounted automatically.

If something is worng maybe you don't have installed all prerequisities. You must install samba, smbclient, cifs-utils (most people missing just this one) and it will work I hope so.

UPDATE: You probably not using nautilus file manager when you have those problems. We found out that all problems about accessing disk from LibreOffice or other programs are solved when you use nautilus to opet it. So if you don't using install it and try this. If it works on your computer you can make it default easily.

Access internet while OpenVPN is running on Linux

2:26 PM 0 Comments A+ a-


 If you have configured OpenVPN on your Linux machine , and when you run it , internet connection gone, this is solution.
I have this problem on Ubuntu, Lubuntu and Kubuntu 12.04. Internet works on Windows XP, / and most Linux distributions.

To connect on internet while running OpenVPN do this:
 Before you start you must dissconect OpenVPN.
1. Press ALT-F2
2. Enter this command and press ENTER: nm-connection-editor
Window on bottom picture will appear:


3.Click VPN, choose your VPN connection and click Edit
 Then this window will open:



3.Click IPv4 Settings, and then click Routes...
Then this window will open:

Edit routes , click on option "Use this connection for resource  on its network"

4.Click "Use this connection for resource  on its network".
5.Click "OK", and then "Save".

Now connect to OpenVPN and try to open some web page to test connection. It should work.
If you expirience loosing network connection try enabling and disabling it, and then again enabling.