thaicosmic.com

หนัง

วันจันทร์ที่ 24 พฤศจิกายน พ.ศ. 2557

How to Mount Your Box.com Storage in Ubuntu Desktop

from http://ubuntuhandbook.org/index.php/2014/08/map-box-com-storage-ubuntu-desktop/


This quick tutorial shows you how to mount and map your Box.com storage in Ubuntu desktop so that you can access your cloud storage within Nautilus file browser.
There are many cloud storage services available for Ubuntu Linux. Box.com is one of them that provides 10 GB free web space with 250 MB file upload size. It allows to access directly through WebDav protocol.
There is an open source project Box2Tux, it makes the configuration of WebDav protocol easy. All you need to do is insert your Box account name and password, then it allows you to access the cloud storage directly in Nautilus file browser by mounting it automatically at start up.

NOTE that normal user only have read permission to the mounted storage, you need to open Nautilus with root for full access (drop and drop to upload, delete, etc…). To do so, run gksudo nautilus in terminal or in Alt+F2 ‘Run a command’ dash.
Mount Box.com Storage in Ubuntu:
1. First of first, install davfs2 (WebDav) from Ubuntu Software Center.
You can click the link below to bring up Softare Center and click the install button.
2. Press Ctrl+Alt+T on keyboard to open the terminal. When it opens, paste the commands below and run one by one:
Reconfigure davfs2 and select Yes to allow non-root user to mount the WebDav resource:
sudo dpkg-reconfigure davfs2
Download Box2Tux:
wget https://github.com/alfredobonino/Box2Tux/archive/master.zip
Extract the downloaded package:
unzip master.zip
Navigate to the result folder:
cd Box2Tux-master/
Give permission and run the box2tux:
chmod +x box2tux && ./box2tux
Input your box.com account and password when prompt:

Once done, you should get box.com mounted just as a network drive on Unity Launcher. Enjoy!


วันอังคารที่ 18 พฤศจิกายน พ.ศ. 2557

http://kodi.wiki/view/Samba

Samba

Home icon grey.png ▶ SMB▶ Samba
Samba the Linux and Unix implementation SMB/CIFS (aka, Windows File Sharing). If it is not included in a given OS distro, it can be installed easily to share files to XBMC (among other uses). Samba/SMB is often a good choice due to it being highly compatible with other computers, regardless of the OS.

Contents

 [hide

1 Installing

Gentoo
emerge samba
Debian/Ubuntu
sudo apt-get install samba

1.1 Compile from source

Installing Samba regardless of distro
wget http://us4.samba.org/samba/ftp/samba-latest.tar.gz
tar -xvf samba-latest.tar.gz
cd samba-{version}
./configure
make install

2 Configuring

Note: The example below is for a public share.
Samba's configuration is stored /etc/samba/smb.conf. All the following items should be placed in that file.

2.1 Global configuration

[global]
workgroup = >

netbios name =  of server>
server string = ></span></span></span><br>log file = /var/log/samba/log.%m<br>max log size = 50<br>map to guest = bad user<br>socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192<br>local master = no<br>dns proxy = no</div> </div> <dl style="margin-top: 0.2em; margin-bottom: 0.5em;"><dd style="line-height: 1.5em; margin-left: 1.6em; margin-bottom: 0.1em; margin-right: 0px;"> <dl style="margin-top: 0.2em; margin-bottom: 0.5em;"> <dt style="font-weight: bold; margin-bottom: 0.1em;">workgroup </dt> <dd style="line-height: 1.5em; margin-left: 1.6em; margin-bottom: 0.1em; margin-right: 0px;">Should be set to the workgroup your home pc uses if you planning on accessing this share from a windows PC</dd> <dt style="font-weight: bold; margin-bottom: 0.1em;">netbios name </dt> <dd style="line-height: 1.5em; margin-left: 1.6em; margin-bottom: 0.1em; margin-right: 0px;">This is the name that will be displayed when browsing the your Network Neighborhood</dd> <dt style="font-weight: bold; margin-bottom: 0.1em;">server string </dt> <dd style="line-height: 1.5em; margin-left: 1.6em; margin-bottom: 0.1em; margin-right: 0px;">The title of the server that will be displayed in windows(This is not the share name)</dd></dl> </dd></dl> <h3 style="margin: 0px 0px 0.3em; overflow: hidden; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-style: none; width: auto; font-size: 17px; background-image: none; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;"> <span class="mw-headline" id="Share_configuration">2.2 Share configuration</span></h3> <div dir="ltr" class="mw-geshi mw-content-ltr" style="direction: ltr; padding: 1em; border: 1px dashed rgb(47, 111, 171); line-height: 1.1em; background-color: rgb(249, 249, 249);"> <div class="xml source-xml" style="line-height: normal; font-family: monospace;"> [public]<br>path = <span class="sc3" style="color: rgb(0, 153, 0);"><span class="re1" style="color: rgb(0, 0, 0); font-weight: bold;"><dir</span> to share<span class="re2" style="color: rgb(0, 0, 0); font-weight: bold;">></span></span><br>public = yes<br>only guest = yes<br>writable = yes</div> </div> <dl style="margin-top: 0.2em; margin-bottom: 0.5em;"><dd style="line-height: 1.5em; margin-left: 1.6em; margin-bottom: 0.1em; margin-right: 0px;"> <dl style="margin-top: 0.2em; margin-bottom: 0.5em;"> <dt style="font-weight: bold; margin-bottom: 0.1em;">path</dt> <dd style="line-height: 1.5em; margin-left: 1.6em; margin-bottom: 0.1em; margin-right: 0px;">Set this to the path to be shared by samba</dd></dl> </dd></dl> <p style="margin-top: 0.4em; margin-bottom: 0.5em; line-height: 1.5em;"> Run <code style="font-family: monospace, Courier; background-color: rgb(249, 249, 249);">testparm</code> to check your smb.conf for internal correctness.</p> <p style="margin-top: 0.4em; margin-bottom: 0.5em; line-height: 1.5em;"> Finally resart samba service.</p> <div dir="ltr" class="mw-geshi mw-content-ltr" style="direction: ltr; padding: 1em; border: 1px dashed rgb(47, 111, 171); line-height: 1.1em; background-color: rgb(249, 249, 249);"> <div class="bash source-bash" style="line-height: normal; font-family: monospace;"> <span class="kw2" style="color: rgb(194, 12, 185); font-weight: bold;">sudo</span> service smdb restart<br><br><span class="co0" style="color: rgb(102, 102, 102); font-style: italic;"># or</span><br><br><span class="kw2" style="color: rgb(194, 12, 185); font-weight: bold;">sudo</span> smbd restart</div> </div> </div> </div>

http://verahill.blogspot.com/2012/03/building-and-installing-samba-from.html

93. Building and installing samba from source

Here's how to compile and get started with SAMBA, which may come in handy if you need to set up a mixed environment.


Compiling

sudo apt-get install build-essential

wget https://ftp.samba.org/pub/samba/stable/samba-3.6.3.tar.gz
tar -xvf samba-3.6.3.tar.gz
cd samba-3.6.3/
cd source3
./configure
make
sudo checkinstall

You may want to look through the checkinstall settings:
*****************************************
**** Debian package creation selected ***
*****************************************
This package will be built according to these values:
0 -  Maintainer: [ root@barebone ]
1 -  Summary: [ samba 3.6.3 ]
2 -  Name:    [ samba ]
3 -  Version: [ 3.6.3 ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ amd64 ]
8 -  Source location: [ source3 ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ source3 ]
12 - Conflicts: [  ]
13 - Replaces: [  ]
Enter a number to change any of them or press ENTER to continue:
Once the package is installed you need to put symlinks in your /usr/lib to the installed samba libs:
sudo ln -s /usr/local/samba/lib/libtalloc.so.2 /usr/lib/libtalloc.so.2
 sudo ln -s /usr/local/samba/lib/libtdb.so.1 /usr/lib/libtdb.so.1


Finally, create smb.conf in /etc/samba/ and make samba find it using a symlink
sudo mkdir /etc/samba
sudo touch /etc/samba/smb.conf
sudo ln -s /etc/samba/smb.conf /usr/local/samba/lib/smb.conf

Done. Sort of. You need to configure samba using smb.conf...a minimal configuration file can be found at the end of the post.



Errors:
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/verahill/tmp/samba-3.6.3/source3':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

Solution:
sudo apt-get install build-essential



error:
-bash: smbclient: command not found
solution:
 put /usr/local/samba/bin in PATH
export $PATH=PATH:/usr/local/samba/bin


error:
/usr/local/samba/bin/smbclient: error while loading shared libraries: libtalloc.so.2: cannot open shared object file: No such file or directory
solution:
sudo ln -s /usr/local/samba/lib/libtalloc.so.2 /usr/lib/libtalloc.so.2


error:
/usr/local/samba/bin/smbclient: error while loading shared libraries: libtdb.so.1: cannot open shared object file: No such file or directory
solution:
 sudo ln -s /usr/local/samba/lib/libtdb.so.1 /usr/lib/libtdb.so.1


Error:
/usr/local/samba/bin/smbclient: error while loading shared libraries: libwbclient.so.0: cannot open shared object file: No such file or directory
Solution:
 sudo ln -s /usr/local/samba/lib/libwbclient.so.0 /usr/lib/libwbclient.so.0


error:
/usr/local/samba/bin/smbclient: Can't load /usr/local/samba/lib/smb.conf - run testparm to debug it
solution:
because I know where debian normally puts the smb.conf --
sudo mkdir /etc/samba
sudo touch /etc/samba/smb.conf
sudo ln -s /etc/samba/smb.conf /usr/local/samba/lib/smb.conf



Configuration:
Following https://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/install.html#id2551954

Minimal /etc/samba/smb.conf:
[global]
workgroup = WKG
netbios name = MYNAME
[share1]
path = /tmp
Also, open up the relevant ports in your firewall:
Iptables
sudo iptables -A INPUT -p udp -m udp --dport 137 -j ACCEPT
sudo iptables -A INPUT -p udp -m udp --dport 138 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 139 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 445 -j ACCEPT

แก้ permission ในกรณีย์ jautoup แก้ไม่สำเร็จ

sudo chmod 777 -fR /home/pcu03314/\JHCIS_export21
sudo chmod 777 -fR /home/pcu03314/\JHCIS_export43