소스 검색

Use a form where the device ID can be copied to clipboard

Bob Mottram 9 년 전
부모
커밋
9420316d2f
4개의 변경된 파일44개의 추가작업 그리고 3개의 파일을 삭제
  1. 40
    0
      doc/EN/usage.org
  2. BIN
      img/controlpanel/control_panel_file_sync.jpg
  3. BIN
      img/controlpanel/control_panel_user.jpg
  4. 4
    3
      src/freedombone-controlpanel-user

+ 40
- 0
doc/EN/usage.org 파일 보기

@@ -90,6 +90,46 @@ Subsequently even if dynamic DNS isn't working you may still be able to administ
90 90
 [[https://syncthing.net][Syncthing]] provides a similar capability to proprietary systems such as [[http://www.drop-dropbox.com/][Dropbox]], and also is well suited for use with low power single board computers. You can have one or more directories which are synchronized across your various laptops/desktops/devices, and this makes it hard for you to ever lose important files. The manner in which the synchronization is done is pretty secure, such that it would be difficult for passive adversaries (mass surveillance, "/men in the middle/", etc) to know what files you're sharing. Of course, you don't necessarily need to be running a server in order to use Syncthing, but if you do have a server which is always running then there's always at least one place to synchronize your files to or from.
91 91
 
92 92
 Freedombone provides Syncthing shared directories for each user on the system, plus a single shared directory for all users. The expected most common scenario here is that of a family in which members may not want to share /all of their files/ with each other, but might want to share some in a common pool (eg. birthday photos). You can also easily share between different servers.
93
+
94
+** On a laptop
95
+Install syncthing:
96
+
97
+#+BEGIN_SRC bash
98
+curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
99
+echo "deb http://apt.syncthing.net/ syncthing release" | sudo tee /etc/apt/sources.list.d/syncthing.list
100
+sudo apt-get update
101
+sudo apt-get install syncthing
102
+#+END_SRC
103
+
104
+Add syncthing to your startup applications, so that it begins running when your system starts. Then either restart your system or run the command "syncthing" from a terminal.
105
+
106
+In another terminal log into Freedombone:
107
+
108
+#+BEGIN_SRC bash
109
+ssh username@domainname -p 2222
110
+#+END_SRC
111
+
112
+[[file:images/controlpanel/control_panel_user.jpg]]
113
+
114
+Then select *File Synchronization*.
115
+
116
+[[file:images/controlpanel/control_panel_file_sync.jpg]]
117
+
118
+Select *Show device ID* and copy the long string of letters and numbers shown (usually select then CTRL+c).
119
+
120
+Open a non-Tor browser and enter  *http://127.0.0.1:8384* as the URL. You should now see the minimalistic user interface. Under *Remote Devices* select *Add Remote Device*. In the *Device ID* field paste the string you just copied (CTRL+v). The Device name can be anything. Under *Share Folders with Device* check *default* (or whatever folder you created on your local machine), then save.
121
+
122
+From the top menu select *Actions* and then *Show ID*, then copy the ID string (usually select then CTRL+c). Go back to the terminal control panel menu and select *Add an ID* then paste what you just copied (CTRL+v). Optionally you can also provide a description so that you later can know what that string corresponds to.
123
+
124
+Now wait for a few minutes. Eventually you will see a message appear within the browser asking if you want to add a new device (the Freedombone system). Say yes to that, and specify *~/Sync* as the directory to synchronize to. You can now copy files into your *~/Sync* directory and they will automatically be synced to the server.
125
+** On Android
126
+Install Syncthing and Connectbot from F-droid.
127
+
128
+Set up Connectbot to log into Freedombone.
129
+
130
+Open Syncthing, select the menu and then press on *Device ID*. It will be copied to the clipboard. 
131
+
132
+Select *Devices* then *Add*.
93 133
 * Play Music
94 134
 ** With the DLNA service
95 135
 An easy way to play music on any mobile device in your home is to use the DLNA service. Copy your music into a directory called "/Music/" on a USB thumb drive and then insert it into from socket on the Beaglebone.

BIN
img/controlpanel/control_panel_file_sync.jpg 파일 보기


BIN
img/controlpanel/control_panel_user.jpg 파일 보기


+ 4
- 3
src/freedombone-controlpanel-user 파일 보기

@@ -572,9 +572,10 @@ function syncthing_show_id {
572 572
     fi
573 573
 
574 574
     SYNCTHING_ID=$(cat ~/.syncthing-server-id)
575
-    dialog --title $"Device ID for ${PROJECT_NAME}" \
576
-           --backtitle $"Freedombone User Control Panel" \
577
-           --msgbox $"Within your syncthing user interface add this device ID:\n\n$SYNCTHING_ID" 8 78   
575
+    dialog --backtitle $"Freedombone User Control Panel" \
576
+           --title $"Device ID for ${PROJECT_NAME}" \
577
+           --form $"You can copy and paste this into syncthing on your local system" 8 80 1 \
578
+           "" 1 1 "$SYNCTHING_ID" 1 0 80 80
578 579
 }
579 580
 
580 581
 function syncthing_add_id {