→ anonymous NAS samba server
reference:
Ubuntu 16.04: sambaをインストールしてWindows 10とファイル共有する
recipe:
/etc/samba/smb.conf
+ [share]
+ comment = share directory
+ path = $PATH
+ read only = no
+ browseable = yes
+ guest ok = yes
+ share modes = yes
permission:
sudo chown -R nobody:nogroup $PATH
→Workflow
# |
Name |
Description |
Code |
File |
1 |
Installation, create directory, chown to share user
[1]
|
|
sudo apt-get install samba
sudo mkdir ~/Share
sudo adduser --system sharer
sudo chown -R sharer ~/Share/
sudo nano /etc/samba/smb.conf
+ [share]
+ comment = share directory
+ path = /home/trancemania/Share
+ read only = no
+ browseable = yes
+ guest ok = yes
+ public = yes
+ writeable = yes
+ share modes = yes
+ create mode = 0777
+ directory mode =0777
+ force user = sharer
sudo service smbd start
|
/etc/samba/smb.conf
|
2 |
Share CD Drive
[2]
|
modify /etc/samba/smb.conf
|
sudo nano /etc/samba/smb.conf
+ [cd-drive]
+ path = /cdrom
+ browseable = yes
+ read only = no
+ guest ok = yes
+ public = yes
+ locking = no
+ force user = sharer
+ preexec = /bin/mount /cdrom
+postexec = /bin/umount /cdrom
sudo service smbd restart
|
same as
above
|
→ Ubuntu VNC grey screen
reference:
Ubuntu 15.10安装VNC灰屏的问题
solution:
~/.vnc/xstartup
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#gnome-session &
# exec gnome-session &
# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
#/etc/X11/Xsession
# /etc/X11/xinit/xinitrc
#!/bin/sh
# Uncomment the following two lines for normal desktop:
# export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
unset DBUS_SESSION_BUS_ADDRESS
gnome-panel & gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &
conclusion:
This way provides a way to access remote Ubuntu host as a non-root account, for root VNC, check X11VNC.
→Workflow
# |
Name |
Description |
Code |
File |
1 |
Installation
[1]
|
install Xfce desktop environment and main program |
see
[1]
|
|
2 |
Configuration
[2]
|
config graphical desktop Xfce to connect, and make the config file executable |
sudo nano ~/.vnc/xstartup
+ #!/bin/bash
+ xrdb $HOME/.Xresources
+ startxfce4 &
sudo chmod +x ~/.vnc/xstartup
|
|
3 |
Autostart as system service
[3]
|
VNC starts up as system service when reboots
|
see
[3]
|
/etc/systemd/system/vncserver@.service
|
→ set up Resilio Sync on Ubuntu
reference:
installation - https://help.getsync.com/hc/en-us/articles/206178924
use - https://help.getsync.com/hc/en-us/articles/204762449-Guide-to-Linux
→ some basic command using Resilio Sync on Ubuntu
systemctl start/restart/stop resilio-sync
→ LAN access to webUI of Ubuntu Resilio Sync
solution:
revise /etc/resilio-sync/config.json as
7c7
< "listen" : "127.0.0.1:8888"
---
> "listen" : "0.0.0.0:8888"
then restart resilio-sync
→Workflow
# |
Name |
Description |
Code |
File |
1 |
Installation
[1]
|
add source.list and install using apt-get |
see
[1]
|
|
2 |
Create Sync folder
|
create Sync folder and grant permission and possesion |
sudo mkdir ~/Sync
sudo chmod g+rw /home/trancemania/Sync/
sudo chown -R rslsync:trancemania ~/Sync/
|
|
3 |
modify config file
|
config script to listening |
sudo nano /etc/resilio-sync/config.json
- "listen" : "127.0.0.1:8888"
+ "listen" : "0.0.0.0:8888"
|
|
4 |
run Sync in config mode
|
for LAN access |
sudo systemctl enable resilio-sync
sudo service resilio-sync stop
sudo rslsync --config /etc/resilio-sync/config.json
|
|