瀏覽代碼

Merge branch 'stretch' of https://github.com/bashrc/freedombone

Bob Mottram 7 年之前
父節點
當前提交
cbe2e5a401

+ 1
- 1
doc/EN/app_mediagoblin.org 查看文件

@@ -16,7 +16,7 @@
16 16
 </center>
17 17
 #+END_EXPORT
18 18
 
19
-With Mediagoblin you can host video and audio content in a similar manner to the proprietary systems such as YouTube and SoundCloud. This system supports free media formats such as /webm/, /ogv/ and /ogg/.
19
+With Mediagoblin you can host video and audio content in a similar manner to the proprietary systems such as YouTube and SoundCloud. This system supports free media formats such as /webm/, /ogv/ and /ogg/. Another similar system which might be better fitted for small servers is [[./app_peertube.html][PeerTube]], since it uses webtorrent to distribute video files. Webtorrent will only work with WebRTC enabled browsers though.
20 20
 
21 21
 When hosting media files you should take into consideration that since anyone on the internet can view your content then this could significantly increase your bandwidth usage and overall strain on the server. Also unless you are just hosting images then hardware such as the Beaglebone Black won't be powerful enough for a good user experience when either uploading or playing back videos. It's recommended that you use one of the more powerful quad (or more) core single board computers or an old laptop if you want to run Mediagoblin on it.
22 22
 

+ 2
- 2
doc/EN/mesh_images.org 查看文件

@@ -45,7 +45,7 @@ wget https://freedombone.net/downloads/current/freedombone-meshclient-i386.img.x
45 45
 wget https://freedombone.net/downloads/current/freedombone-meshclient-i386.img.xz.sig
46 46
 gpg --verify freedombone-meshclient-i386.img.xz.sig
47 47
 sha256sum freedombone-meshclient-i386.img.xz
48
-376668ae375518af268d67b9ccb7ab7b2c2787b445c125f61487ff97950092e8
48
+3e88205461bb2061dc172ff0a1e65e5cae1013f8f7dc26c6d5cbe1c986c98555
49 49
 unxz freedombone-meshclient-i386.img.xz
50 50
 sudo dd if=/dev/zero of=/dev/sdX bs=1M count=8
51 51
 sudo dd bs=1M if=freedombone-meshclient-i386.img of=/dev/sdX conv=fdatasync
@@ -61,7 +61,7 @@ wget https://freedombone.net/downloads/current/freedombone-meshclient-insecure-i
61 61
 wget https://freedombone.net/downloads/current/freedombone-meshclient-insecure-i386.img.xz.sig
62 62
 gpg --verify freedombone-meshclient-insecure-i386.img.xz.sig
63 63
 sha256sum freedombone-meshclient-insecure-i386.img.xz
64
-81098572ac522b543f2c015dd0819d27c290b93b771efc9de6e93742e3981daf
64
+09c059664daf56d210134735d37e8117bb7b755acc8b9b253cdfa42052249ccb
65 65
 unxz freedombone-meshclient-insecure-i386.img.xz
66 66
 sudo dd if=/dev/zero of=/dev/sdX bs=1M count=8
67 67
 sudo dd bs=1M if=freedombone-meshclient-insecure-i386.img of=/dev/sdX conv=fdatasync

+ 21
- 5
doc/EN/mesh_usage.org 查看文件

@@ -28,6 +28,10 @@
28 28
 
29 29
 When you first boot from the USB drive the system will create some encryption keys, assign a unique network address to the system and then reboot itself. When that's done you should see a prompt asking for a username. This username just makes it easy for others to initially find you on the mesh and will appear in the list of users.
30 30
 
31
+#+BEGIN_CENTER
32
+[[file:images/mesh_initial_login.jpg]]
33
+#+END_CENTER
34
+
31 35
 After a minute or two if you are within wifi range and there is at least one other user on the network then you should see additional icons appear on the desktop, such as /Other Users/ and /Chat/.
32 36
 
33 37
 * Boot trouble
@@ -77,7 +81,7 @@ Maybe the internet exists, but you don't care about getting any content from it
77 81
 In your home directory on a system connected via ethernet to an internet router you'll find a file called *vpn.tar.gz*. If you want another mesh to be able to connect to yours then send them this file and get them to uncompress it into their home directory also on an internet gateway machine. If they have an external IP address or domain name for your router then they will be able to VPN connect using the *Connect Meshes* icon. They should also forward port 653 from their internet router to the mesh gateway machine.
78 82
 
79 83
 #+BEGIN_CENTER
80
-[[file:images/mesh_connect.jpg]]
84
+[[file:images/mesh_connect.png]]
81 85
 #+END_CENTER
82 86
 
83 87
 You should create a new *vpn.tar.gz* file for every other mesh which wants to be able to connect to yours. If you are prompted for a password it is 'freedombone'.
@@ -101,7 +105,15 @@ On a typical Android device go to *Settings* then *Security* and ensure that *Un
101 105
 On some android devices you may need to move the downloaded APK file from the *Downloads* directory to your *home* directory before you can install it.
102 106
 * Chat System
103 107
 
104
-Ensure that you're within wifi range of at least one other mesh peer (could be a router or client) and then you should see that the /Chat/ and /Other Users/ icons appear. Select the users icon and you should see a list of users on the mesh. Select the /Chat/ icon and once you are connected you should see the status light turn green. If after a few minutes you don't get the green status light then try closing and re-opening the Tox chat application. Select the plus button to add a friend and then copy and paste in a Tox ID from the users list.
108
+Ensure that you're within wifi range of at least one other mesh peer (could be a router or client) and then you should see that the /Chat/ and /Other Users/ icons appear. Select the users icon and you should see a list of users on the mesh.
109
+
110
+#+BEGIN_CENTER
111
+[[file:images/mesh_peerslist.png]]
112
+#+END_CENTER
113
+
114
+Selecting a user followed by the Ok button will copy their Tox ID to the clipboard.
115
+
116
+Now select the /Chat/ icon and once you are connected you should see the status light turn green. If after a few minutes you don't get the green status light then try closing and re-opening the Tox chat application. Select the plus button to add a friend and then paste in a Tox ID.
105 117
 
106 118
 #+BEGIN_CENTER
107 119
 [[file:images/mesh_paste_tox_id.jpg]]
@@ -170,10 +182,10 @@ You can make files publicly available on the network simply by dragging and drop
170 182
 #+END_CENTER
171 183
 
172 184
 * Blogging
173
-To create a blog post select the /Blog/ icon on the desktop and then use the up and down cursor keys, space bar and enter key to add a new entry. Edit the title of the entry and add your text. You can also include photos if you wish - just copy them to the *CreateBlog/content/images* directory and then link to them as shown.
185
+To create a blog post select the /Blog/ icon on the desktop and then select *New blog entry* and *Ok*. Edit the title of the entry and add your text. You can also include photos if you wish - just copy them to the *CreateBlog/content/images* directory and then link to them as shown.
174 186
 
175 187
 #+BEGIN_CENTER
176
-[[file:images/mesh_new_blog.jpg]]
188
+[[file:images/mesh_blog.png]]
177 189
 #+END_CENTER
178 190
 
179 191
 To finish your blog entry just select /Save/ and then close the editor. On older hardware it may take a while to publish the results, and this depends upon the amount of computation needed by IPFS to create file hashes. If you make no changes to the default text then the new blog entry will not be saved.
@@ -186,4 +198,8 @@ To finish your blog entry just select /Save/ and then close the editor. On older
186 198
 [[file:images/mesh_view_blog.jpg]]
187 199
 #+END_CENTER
188 200
 
189
-You can also visit other blogs, edit or delete your previous entry and also change your blog theme.
201
+You can also visit other blogs, edit or delete your previous entry and change your blog theme.
202
+
203
+#+BEGIN_CENTER
204
+[[file:images/mesh_select_blog_theme.png]]
205
+#+END_CENTER

二進制
img/icon_kdenlive.png 查看文件


二進制
img/icon_photos.png 查看文件


二進制
img/mesh_blog.png 查看文件


二進制
img/mesh_connect.png 查看文件


二進制
img/mesh_initial_login.jpg 查看文件


二進制
img/mesh_peerslist.png 查看文件


二進制
img/mesh_select_blog_theme.png 查看文件


+ 21
- 2
src/freedombone-app-matrix 查看文件

@@ -329,12 +329,30 @@ function matrix_generate {
329 329
     matrix_configure_homeserver_yaml "${turnkey}" $homeserver_config
330 330
 }
331 331
 
332
+function create_matrix_user_removal_script {
333
+    read_config_param MY_USERNAME
334
+    read_config_param MATRIX_DOMAIN_NAME
335
+
336
+    matrix_remove_user=/usr/bin/matrix-remove-user
337
+    echo '#!/bin/bash' > $matrix_remove_user
338
+    echo "cd $MATRIX_DATA_DIR" >> $matrix_remove_user
339
+    echo 'remove_username=$1' >> $matrix_remove_user
340
+    echo "ADMIN=\"@${MY_USERNAME}:$MATRIX_DOMAIN_NAME\"" >> $matrix_remove_user
341
+    echo 'BUSY="pragma busy_timeout=20000"' >> $matrix_remove_user
342
+    echo "BUFFER=\$(sqlite3 homeserver.db \"\$BUSY;select token from access_tokens where user_id like '\$ADMIN' order by id desc limit 1;\")" >> $matrix_remove_user
343
+    echo "TOKEN=\$(echo \$BUFFER|awk '{print \$2}')" >> $matrix_remove_user
344
+    echo 'set -x' >> $matrix_remove_user
345
+    echo "curl -X POST 'https://$MATRIX_DOMAIN_NAME/_matrix/client/r0/admin/deactivate/%40\$remove_username%3A$MATRIX_DOMAIN_NAME?access_token=\$TOKEN' --data '{}'" >> $matrix_remove_user
346
+
347
+    chmod +x $matrix_remove_user
348
+}
349
+
332 350
 function remove_user_matrix {
333 351
     remove_username="$1"
334 352
 
353
+    create_matrix_user_removal_script
335 354
     ${PROJECT_NAME}-pass -u $remove_username --rmapp matrix
336
-
337
-    # TODO: There is no user removal script within synapse
355
+    $matrix_remove_user "$remove_username"
338 356
 }
339 357
 
340 358
 function add_user_matrix {
@@ -780,6 +798,7 @@ function install_matrix {
780 798
         echo $'Failed to add matrix admin user';
781 799
         exit 879352
782 800
     fi
801
+    create_matrix_user_removal_script
783 802
 
784 803
     set_completion_param "matrix domain" "$MATRIX_DOMAIN_NAME"
785 804
 

+ 190
- 9
src/freedombone-app-peertube 查看文件

@@ -10,6 +10,9 @@
10 10
 #
11 11
 # PeerTube server
12 12
 #
13
+# There's a problem with installing this onto mesh images, which is
14
+# that qemu appears to run out of RAM when using yarn to add webpack.
15
+#
13 16
 # License
14 17
 # =======
15 18
 #
@@ -39,6 +42,7 @@ PEERTUBE_REPO="https://github.com/Chocobozzz/PeerTube"
39 42
 PEERTUBE_COMMIT='fef2c7164e025b12a64185dbab058ef4129733c6'
40 43
 PEERTUBE_ONION_PORT=8136
41 44
 PEERTUBE_PORT=9004
45
+MESH_PEERTUBE_PORT=8500
42 46
 PEERTUBE_DIR=/etc/peertube
43 47
 
44 48
 peertube_variables=(PEERTUBE_DOMAIN_NAME
@@ -479,21 +483,83 @@ function peertube_setup_web {
479 483
     nginx_ensite $PEERTUBE_DOMAIN_NAME
480 484
 }
481 485
 
486
+function mesh_peertube_setup_web {
487
+    peertube_nginx_file=$rootdir/etc/nginx/sites-available/peertube
488
+
489
+    echo 'server {' >> $peertube_nginx_file
490
+    echo "  listen $MESH_PEERTUBE_PORT http2;" >> $peertube_nginx_file
491
+    echo '  listen [::]:$MESH_PEERTUBE_PORT http2;' >> $peertube_nginx_file
492
+    echo '  server_name $HOSTNAME;' >> $peertube_nginx_file
493
+    echo '' >> $peertube_nginx_file
494
+    echo '  location / {' >> $peertube_nginx_file
495
+    echo "    proxy_pass http://localhost:${PEERTUBE_PORT};" >> $peertube_nginx_file
496
+    echo '    proxy_set_header X-Real-IP $remote_addr;' >> $peertube_nginx_file
497
+    echo '    proxy_set_header Host $host;' >> $peertube_nginx_file
498
+    echo '    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;' >> $peertube_nginx_file
499
+    echo '' >> $peertube_nginx_file
500
+    echo '    # For the video upload' >> $peertube_nginx_file
501
+    echo '    client_max_body_size 2G;' >> $peertube_nginx_file
502
+    echo '  }' >> $peertube_nginx_file
503
+    echo '' >> $peertube_nginx_file
504
+    echo '  location /static/webseed {' >> $peertube_nginx_file
505
+    echo "    if (\$request_method = 'OPTIONS') {" >> $peertube_nginx_file
506
+    echo "      add_header 'Access-Control-Allow-Origin' '*';" >> $peertube_nginx_file
507
+    echo "      add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';" >> $peertube_nginx_file
508
+    echo "      add_header 'Access-Control-Allow-Headers' 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';" >> $peertube_nginx_file
509
+    echo "      add_header 'Access-Control-Max-Age' 1728000;" >> $peertube_nginx_file
510
+    echo "      add_header 'Content-Type' 'text/plain charset=UTF-8';" >> $peertube_nginx_file
511
+    echo "      add_header 'Content-Length' 0;" >> $peertube_nginx_file
512
+    echo '      return 204;' >> $peertube_nginx_file
513
+    echo '    }' >> $peertube_nginx_file
514
+    echo '' >> $peertube_nginx_file
515
+    echo "    if (\$request_method = 'GET') {" >> $peertube_nginx_file
516
+    echo "      add_header 'Access-Control-Allow-Origin' '*';" >> $peertube_nginx_file
517
+    echo "      add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';" >> $peertube_nginx_file
518
+    echo "      add_header 'Access-Control-Allow-Headers' 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';" >> $peertube_nginx_file
519
+    echo '    }' >> $peertube_nginx_file
520
+    echo '' >> $peertube_nginx_file
521
+    echo "    alias $PEERTUBE_DIR/videos;" >> $peertube_nginx_file
522
+    echo '  }' >> $peertube_nginx_file
523
+    echo '' >> $peertube_nginx_file
524
+    echo '  # Websocket tracker' >> $peertube_nginx_file
525
+    echo '  location /tracker/socket {' >> $peertube_nginx_file
526
+    echo '    # Peers send a message to the tracker every 15 minutes' >> $peertube_nginx_file
527
+    echo '    # Dont close the websocket before this time' >> $peertube_nginx_file
528
+    echo '    proxy_read_timeout 1200s;' >> $peertube_nginx_file
529
+    echo '    proxy_set_header Upgrade $http_upgrade;' >> $peertube_nginx_file
530
+    echo '    proxy_set_header Connection "upgrade";' >> $peertube_nginx_file
531
+    echo '    proxy_http_version 1.1;' >> $peertube_nginx_file
532
+    echo '    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;' >> $peertube_nginx_file
533
+    echo '    proxy_set_header Host $host;' >> $peertube_nginx_file
534
+    echo "    proxy_pass http://localhost:${PEERTUBE_PORT};" >> $peertube_nginx_file
535
+    echo '  }' >> $peertube_nginx_file
536
+    echo '}' >> $peertube_nginx_file
537
+}
538
+
482 539
 function peertube_create_config {
483
-    peertube_config_file=$PEERTUBE_DIR/config/production.yaml
540
+    peertube_prefix=$1
541
+
542
+    peertube_config_file=$peertube_prefix$PEERTUBE_DIR/config/production.yaml
543
+
484 544
     echo 'listen:' > $peertube_config_file
485 545
     echo "  port: $PEERTUBE_PORT" >> $peertube_config_file
486 546
     echo '' >> $peertube_config_file
487 547
     echo '# Correspond to your reverse proxy "listen" configuration' >> $peertube_config_file
488 548
     echo 'webserver:' >> $peertube_config_file
489
-    if [[ $ONION_ONLY == 'no' ]]; then
490
-        echo '  https: true' >> $peertube_config_file
491
-        echo "  hostname: '$PEERTUBE_DOMAIN_NAME'" >> $peertube_config_file
492
-        echo '  port: 443' >> $peertube_config_file
549
+    if [ ! $peertube_prefix ]; then
550
+        if [[ $ONION_ONLY == 'no' ]]; then
551
+            echo '  https: true' >> $peertube_config_file
552
+            echo "  hostname: '$PEERTUBE_DOMAIN_NAME'" >> $peertube_config_file
553
+            echo '  port: 443' >> $peertube_config_file
554
+        else
555
+            echo '  https: false' >> $peertube_config_file
556
+            echo "  hostname: '$PEERTUBE_ONION_HOSTNAME'" >> $peertube_config_file
557
+            echo '  port: 80' >> $peertube_config_file
558
+        fi
493 559
     else
494 560
         echo '  https: false' >> $peertube_config_file
495
-        echo "  hostname: '$PEERTUBE_ONION_HOSTNAME'" >> $peertube_config_file
496
-        echo '  port: 80' >> $peertube_config_file
561
+        echo "  hostname: ''" >> $peertube_config_file
562
+        echo "  port: $MESH_PEERTUBE_PORT" >> $peertube_config_file
497 563
     fi
498 564
     echo '' >> $peertube_config_file
499 565
     echo '# Your database name will be "peertube"+database.suffix' >> $peertube_config_file
@@ -502,7 +568,11 @@ function peertube_create_config {
502 568
     echo '  port: 5432' >> $peertube_config_file
503 569
     echo "  suffix: ''" >> $peertube_config_file
504 570
     echo "  username: 'peertube'" >> $peertube_config_file
505
-    echo "  password: '$PEERTUBE_ADMIN_PASSWORD'" >> $peertube_config_file
571
+    if [ ! $peertube_prefix ]; then
572
+        echo "  password: '$PEERTUBE_ADMIN_PASSWORD'" >> $peertube_config_file
573
+    else
574
+        echo "  password: ''" >> $peertube_config_file
575
+    fi
506 576
     echo '' >> $peertube_config_file
507 577
     echo '# From the project root directory' >> $peertube_config_file
508 578
     echo 'storage:' >> $peertube_config_file
@@ -519,7 +589,7 @@ function peertube_create_config {
519 589
     echo '    size: 10 # Max number of previews you want to cache' >> $peertube_config_file
520 590
     echo '' >> $peertube_config_file
521 591
     echo 'admin:' >> $peertube_config_file
522
-    echo "  email: '$MY_EMAIL_ADDRESS'" >> $peertube_config_file
592
+    echo "  email: 'root@local'" >> $peertube_config_file
523 593
     echo '' >> $peertube_config_file
524 594
     echo 'signup:' >> $peertube_config_file
525 595
     echo '  enabled: true' >> $peertube_config_file
@@ -543,7 +613,118 @@ function peertube_create_config {
543 613
     echo '    1080p: false' >> $peertube_config_file
544 614
 }
545 615
 
616
+function mesh_install_peertube {
617
+    if [[ $VARIANT != "meshclient" && $VARIANT != "meshusb" ]]; then
618
+        return
619
+    fi
620
+    if [[ $ARCHITECTURE != 'x86_64' && $ARCHITECTURE != 'amd64' ]]; then
621
+        return
622
+    fi
623
+
624
+    chroot "$rootdir" apt-get -yq install ffmpeg curl
625
+
626
+    function_check install_postgresql
627
+    install_postgresql
628
+
629
+    if [ -d $rootdir$PEERTUBE_DIR ]; then
630
+        rm -rf $rootdir$PEERTUBE_DIR
631
+    fi
632
+
633
+    git clone $PEERTUBE_REPO $rootdir$PEERTUBE_DIR
634
+
635
+    chroot "$rootdir" groupadd peertube
636
+    chroot "$rootdir" useradd -c "PeerTube system account" -d $PEERTUBE_DIR -m -r -g peertube peertube
637
+
638
+    cd $rootdir$PEERTUBE_DIR
639
+    git checkout $PEERTUBE_COMMIT -b $PEERTUBE_COMMIT
640
+
641
+
642
+    get_npm_arch
643
+
644
+    cat <<EOF > $rootdir/usr/bin/install_peertube
645
+#!/bin/bash
646
+cd $PEERTUBE_DIR
647
+curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
648
+echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
649
+apt-get -y update
650
+apt-get -yq install yarn
651
+
652
+#npm install --arch=$NPM_ARCH -g yarn
653
+#if [ ! "\$?" = "0" ]; then
654
+#    echo $'PeerTube Failed to install yarn'
655
+#    exit 79353234
656
+#fi
657
+#npm install --arch=$NPM_ARCH webpack@3.10.0 --no-optional
658
+#if [ ! "\$?" = "0" ]; then
659
+#    echo $'PeerTube failed to install webpack'
660
+#    exit 68386353
661
+#fi
662
+yarn install
663
+yarn run build:prod
664
+yarn add -D webpack
665
+if [ ! "\$?" = "0" ]; then
666
+    echo $'PeerTube failed to add webpack'
667
+    exit 67342823
668
+fi
669
+yarn install --ignore-optional
670
+if [ ! "\$?" = "0" ]; then
671
+    echo $'PeerTube failed to run yarn install'
672
+    exit 63754235
673
+fi
674
+npm install --arch=$NPM_ARCH
675
+if [ ! "\$?" = "0" ]; then
676
+    echo $'PeerTube failed to install peertube'
677
+    exit 7835243
678
+fi
679
+npm run build --arch=$NPM_ARCH
680
+if [ ! "\$?" = "0" ]; then
681
+    echo $'PeerTube failed to build peertube'
682
+    exit 5293593
683
+fi
684
+EOF
685
+    chmod +x $rootdir/usr/bin/install_peertube
686
+    chroot "$rootdir" /usr/bin/install_peertube
687
+    if [ ! "$?" = "0" ]; then
688
+        echo $'PeerTube install failed'
689
+        exit 735638
690
+    fi
691
+
692
+    echo '[Unit]' > $rootdir/etc/systemd/system/peertube.service
693
+    echo 'Description=PeerTube Decentralized video streaming platform' >> $rootdir/etc/systemd/system/peertube.service
694
+    echo 'After=syslog.target' >> $rootdir/etc/systemd/system/peertube.service
695
+    echo 'After=network.target' >> $rootdir/etc/systemd/system/peertube.service
696
+    echo '' >> $rootdir/etc/systemd/system/peertube.service
697
+    echo '[Service]' >> $rootdir/etc/systemd/system/peertube.service
698
+    echo 'User=peertube' >> $rootdir/etc/systemd/system/peertube.service
699
+    echo 'Group=peertube' >> $rootdir/etc/systemd/system/peertube.service
700
+    echo "WorkingDirectory=$PEERTUBE_DIR" >> $rootdir/etc/systemd/system/peertube.service
701
+    echo "ExecStart=/usr/local/bin/npm start" >> $rootdir/etc/systemd/system/peertube.service
702
+    echo "ExecStop=/usr/local/bin/npm stop" >> $rootdir/etc/systemd/system/peertube.service
703
+    echo 'StandardOutput=syslog' >> $rootdir/etc/systemd/system/peertube.service
704
+    echo 'StandardError=syslog' >> $rootdir/etc/systemd/system/peertube.service
705
+    echo 'SyslogIdentifier=peertube' >> $rootdir/etc/systemd/system/peertube.service
706
+    echo 'Restart=always' >> $rootdir/etc/systemd/system/peertube.service
707
+    echo "Environment=NODE_ENV=production" >> $rootdir/etc/systemd/system/peertube.service
708
+    echo '' >> $rootdir/etc/systemd/system/peertube.service
709
+    echo '[Install]' >> $rootdir/etc/systemd/system/peertube.service
710
+    echo 'WantedBy=multi-user.target' >> $rootdir/etc/systemd/system/peertube.service
711
+
712
+    peertube_create_config $rootdir
713
+
714
+    chroot "$rootdir" chown -R peertube:peertube $PEERTUBE_DIR
715
+
716
+    mesh_peertube_setup_web
717
+}
718
+
546 719
 function install_peertube {
720
+    if [[ $VARIANT == "mesh"* ]]; then
721
+        mesh_install_peertube
722
+        return
723
+    fi
724
+    if [[ $ARCHITECTURE != 'x86_64' && $ARCHITECTURE != 'amd64' ]]; then
725
+        return
726
+    fi
727
+
547 728
     if [ ! $ONION_ONLY ]; then
548 729
         ONION_ONLY='no'
549 730
     fi

+ 16
- 0
src/freedombone-app-pelican 查看文件

@@ -275,6 +275,13 @@ function pelican_delete_blog {
275 275
     esac
276 276
 }
277 277
 
278
+function pelican_remove_bad_blog_links {
279
+    current_theme=$1
280
+    if [ -f $PELICAN_BLOG_INSTALL_DIR/themes/$current_theme/static/css/style.css ]; then
281
+        sed -i '/googleapi/d' $PELICAN_BLOG_INSTALL_DIR/themes/$current_theme/static/css/style.css
282
+    fi
283
+}
284
+
278 285
 function pelican_change_theme {
279 286
     THEMES=()
280 287
     for d in $PELICAN_BLOG_INSTALL_DIR/themes/*/ ; do
@@ -323,6 +330,7 @@ function pelican_change_theme {
323 330
     CHOSEN_THEME_INDEX=$((CHOSEN_THEME_INDEX - 1))
324 331
 
325 332
     CHOSEN_THEME=${THEMES[$CHOSEN_THEME_INDEX]}
333
+    pelican_remove_bad_blog_links $CHOSEN_THEME
326 334
     if grep -q "THEME=" $PELICAN_BLOG_INSTALL_DIR/pelicanconf.py; then
327 335
         sed -i "s|THEME=.*|THEME='themes/${CHOSEN_THEME}'|g" $PELICAN_BLOG_INSTALL_DIR/pelicanconf.py
328 336
     else
@@ -733,6 +741,14 @@ function pelican_themes {
733 741
     git clone https://github.com/samael500/w3-personal-blog
734 742
     git clone https://github.com/jarv/water-iris
735 743
     git clone https://github.com/kplaube/yapeme
744
+
745
+    # remove any dubious css
746
+    for d in */ ; do
747
+        THEME_NAME=$(echo "$d" | awk -F '/' '{print $1}')
748
+        if [ -d $d/static/css/style.css ]; then
749
+            sed -i '/googleapi/d' $d/static/css/style.css
750
+        fi
751
+    done
736 752
 }
737 753
 
738 754
 function mesh_install_pelican {

+ 2
- 2
src/freedombone-app-riot 查看文件

@@ -33,9 +33,9 @@ VARIANTS='full full-vim chat'
33 33
 IN_DEFAULT_INSTALL=0
34 34
 SHOW_ON_ABOUT=1
35 35
 
36
-RIOT_VERSION='0.13.0'
36
+RIOT_VERSION='0.13.3'
37 37
 RIOT_FILENAME="riot-v${RIOT_VERSION}"
38
-RIOT_HASH='b65535c4c3bfe6407b491f55df238847884ab83a9d5cbdd1f8b4d6e31cbb5870'
38
+RIOT_HASH='bcd6c2f4be018612ac76a71b58749a5edab1e02de7d145a22d9b9aa6e6a89129'
39 39
 RIOT_DOWNLOAD_URL="https://github.com/vector-im/riot-web/releases/download/v${RIOT_VERSION}"
40 40
 RIOT_ONION_PORT=8115
41 41
 RIOT_ONION_HOSTNAME=

+ 189
- 2
src/freedombone-app-scuttlebot 查看文件

@@ -35,10 +35,17 @@ IN_DEFAULT_INSTALL=0
35 35
 SHOW_ON_ABOUT=0
36 36
 SHOW_ICANN_ADDRESS_ON_ABOUT=0
37 37
 
38
+SCUTTLEBOT_DOMAIN_NAME=
39
+SCUTTLEBOT_CODE=
38 40
 SCUTTLEBOT_VERSION='10.4.6'
39 41
 SCUTTLEBOT_PORT=8010
42
+SCUTTLEBOT_ONION_PORT=8623
43
+GIT_SSB_PORT=7718
44
+NGINX_GIT_SSB_PORT=7719
40 45
 
41 46
 scuttlebot_variables=(MY_USERNAME
47
+                      SCUTTLEBOT_DOMAIN_NAME
48
+                      SCUTTLEBOT_CODE
42 49
                       DEFAULT_DOMAIN_NAME
43 50
                       SYSTEM_TYPE)
44 51
 
@@ -91,7 +98,13 @@ function add_user_scuttlebot {
91 98
 }
92 99
 
93 100
 function install_interactive_scuttlebot {
94
-    echo -n ''
101
+    if [[ $ONION_ONLY != "no" ]]; then
102
+        SCUTTLEBOT_DOMAIN_NAME='scuttlebot.local'
103
+        write_config_param "SCUTTLEBOT_DOMAIN_NAME" "$SCUTTLEBOT_DOMAIN_NAME"
104
+    else
105
+        function_check interactive_site_details
106
+        interactive_site_details scuttlebot
107
+    fi
95 108
     APP_INSTALLED=1
96 109
 }
97 110
 
@@ -180,9 +193,18 @@ function restore_remote_scuttlebot {
180 193
 
181 194
 function remove_scuttlebot {
182 195
     firewall_remove ${SCUTTLEBOT_PORT}
196
+    firewall_remove ${GIT_SSB_PORT}
197
+
198
+    if [ $SCUTTLEBOT_DOMAIN_NAME ]; then
199
+        nginx_dissite ${SCUTTLEBOT_DOMAIN_NAME}
200
+        rm /etc/nginx/sites-available/${SCUTTLEBOT_DOMAIN_NAME}
201
+    fi
183 202
 
203
+    systemctl stop git_ssb
184 204
     systemctl stop scuttlebot
205
+    systemctl disable git_ssb
185 206
     systemctl disable scuttlebot
207
+    rm /etc/systemd/system/git_ssb.service
186 208
     rm /etc/systemd/system/scuttlebot.service
187 209
     systemctl daemon-reload
188 210
 
@@ -191,15 +213,142 @@ function remove_scuttlebot {
191 213
     if [ -d /etc/scuttlebot ]; then
192 214
         rm -rf /etc/scuttlebot
193 215
     fi
216
+    if [ -f /usr/bin/git-ssb-create ]; then
217
+        rm /usr/bin/git-ssb-create
218
+    fi
194 219
 
195 220
     remove_completion_param install_scuttlebot
196 221
     sed -i '/scuttlebot /d' $COMPLETION_FILE
197 222
 }
198 223
 
224
+function git_ssb_script {
225
+    if [[ "$1" == "mesh" ]]; then
226
+        git_ssb_script_name=$rootdir/usr/bin/git-ssb-create
227
+    else
228
+        git_ssb_script_name=/usr/bin/git-ssb-create
229
+    fi
230
+    echo '#!/bin/bash' > $git_ssb_script_name
231
+    echo 'reponame="$1"' >> $git_ssb_script_name
232
+    echo '' >> $git_ssb_script_name
233
+    echo 'if [[ "$reponame" != "" ]]; then' >> $git_ssb_script_name
234
+    echo '  mkdir $reponame' >> $git_ssb_script_name
235
+    echo '  cd $reponame' >> $git_ssb_script_name
236
+    echo '  git init' >> $git_ssb_script_name
237
+    echo '  git ssb create ssb $reponame' >> $git_ssb_script_name
238
+    echo '  git push --tags ssb master' >> $git_ssb_script_name
239
+    echo 'fi' >> $git_ssb_script_name
240
+    echo 'exit 0' >> $git_ssb_script_name
241
+    chmod +x $git_ssb_script_name
242
+}
243
+
244
+function scuttlebot_git_setup {
245
+    if [[ "$1" == "mesh" ]]; then
246
+        if [ ! -d $rootdir/usr/local/lib/node_modules/git-ssb/node_modules/git-ssb-web/highlight ]; then
247
+            mkdir $rootdir/usr/local/lib/node_modules/git-ssb/node_modules/git-ssb-web/highlight
248
+        fi
249
+        if [ ! -f $rootdir/usr/local/lib/node_modules/git-ssb/node_modules/highlight.js/styles/foundation.css ]; then
250
+            echo $'Could not find foundation.css'
251
+            exit 347687245
252
+        fi
253
+        cp $rootdir/usr/local/lib/node_modules/git-ssb/node_modules/highlight.js/styles/foundation.css $rootdir/usr/local/lib/node_modules/git-ssb/node_modules/git-ssb-web/highlight/foundation.css
254
+
255
+        git_ssb_nginx_site=$rootdir/etc/nginx/sites-available/git_ssb
256
+        echo 'server {' > $git_ssb_nginx_site
257
+        echo "  listen $NGINX_GIT_SSB_PORT default_server;" >> $git_ssb_nginx_site
258
+        echo "  server_name P${PEER_ID}.local;" >> $git_ssb_nginx_site
259
+        echo '' >> $git_ssb_nginx_site
260
+        echo '  access_log /dev/null;' >> $git_ssb_nginx_site
261
+        echo '  error_log /dev/null;' >> $git_ssb_nginx_site
262
+        echo '' >> $git_ssb_nginx_site
263
+        echo '  add_header X-XSS-Protection "1; mode=block";' >> $git_ssb_nginx_site
264
+        echo '  add_header X-Content-Type-Options nosniff;' >> $git_ssb_nginx_site
265
+        echo '  add_header X-Frame-Options SAMEORIGIN;' >> $git_ssb_nginx_site
266
+    else
267
+        if [ ! $SCUTTLEBOT_DOMAIN_NAME ]; then
268
+            exit 7357225
269
+        fi
270
+
271
+        if [ ! -d /usr/local/lib/node_modules/git-ssb/node_modules/git-ssb-web/highlight ]; then
272
+            mkdir /usr/local/lib/node_modules/git-ssb/node_modules/git-ssb-web/highlight
273
+        fi
274
+        if [ ! -f /usr/local/lib/node_modules/git-ssb/node_modules/highlight.js/styles/foundation.css ]; then
275
+            echo $'Could not find foundation.css'
276
+            exit 347687245
277
+        fi
278
+        cp /usr/local/lib/node_modules/git-ssb/node_modules/highlight.js/styles/foundation.css /usr/local/lib/node_modules/git-ssb/node_modules/git-ssb-web/highlight/foundation.css
279
+
280
+        git_ssb_nginx_site=/etc/nginx/sites-available/${SCUTTLEBOT_DOMAIN_NAME}
281
+        function_check nginx_http_redirect
282
+        nginx_http_redirect $SCUTTLEBOT_DOMAIN_NAME "index index.html"
283
+        echo 'server {' >> $git_ssb_nginx_site
284
+        echo '  listen 443 ssl;' >> $git_ssb_nginx_site
285
+        echo '  listen [::]:443 ssl;' >> $git_ssb_nginx_site
286
+        echo "  server_name $SCUTTLEBOT_DOMAIN_NAME;" >> $git_ssb_nginx_site
287
+        echo '' >> $git_ssb_nginx_site
288
+        function_check nginx_compress
289
+        nginx_compress $SCUTTLEBOT_DOMAIN_NAME
290
+        echo '' >> $git_ssb_nginx_site
291
+        echo '  # Security' >> $git_ssb_nginx_site
292
+        function_check nginx_ssl
293
+        nginx_ssl $SCUTTLEBOT_DOMAIN_NAME
294
+
295
+        function_check nginx_disable_sniffing
296
+        nginx_disable_sniffing $SCUTTLEBOT_DOMAIN_NAME
297
+    fi
298
+
299
+    echo '' >> $git_ssb_nginx_site
300
+    echo '  root /usr/local/lib/node_modules/git-ssb/node_modules/git-ssb-web;' >> $git_ssb_nginx_site
301
+    echo '' >> $git_ssb_nginx_site
302
+    echo '  location = / {' >> $git_ssb_nginx_site
303
+    echo "    proxy_pass http://localhost:${GIT_SSB_PORT};" >> $git_ssb_nginx_site
304
+    echo '    proxy_set_header X-Real-IP $remote_addr;' >> $git_ssb_nginx_site
305
+    echo '    proxy_set_header Host $host;' >> $git_ssb_nginx_site
306
+    echo '    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;' >> $git_ssb_nginx_site
307
+    echo '    proxy_http_version 1.1;' >> $git_ssb_nginx_site
308
+    echo '    proxy_set_header Upgrade $http_upgrade;' >> $git_ssb_nginx_site
309
+    echo '    proxy_set_header Connection upgrade;' >> $git_ssb_nginx_site
310
+    echo '  }' >> $git_ssb_nginx_site
311
+    echo '}' >> $git_ssb_nginx_site
312
+
313
+    if [ $SCUTTLEBOT_ONION_HOSTNAME ]; then
314
+        echo '' >> $git_ssb_nginx_site
315
+        echo 'server {' >> $git_ssb_nginx_site
316
+        echo "  listen 127.0.0.1:${SCUTTLEBOT_ONION_PORT} default_server;" >> $git_ssb_nginx_site
317
+        echo "  server_name ${SCUTTLEBOT_ONION_HOSTNAME};" >> $git_ssb_nginx_site
318
+        echo '' >> $git_ssb_nginx_site
319
+        echo '  access_log /dev/null;' >> $git_ssb_nginx_site
320
+        echo '  error_log /dev/null;' >> $git_ssb_nginx_site
321
+        echo '' >> $git_ssb_nginx_site
322
+        echo '  add_header X-XSS-Protection "1; mode=block";' >> $git_ssb_nginx_site
323
+        echo '  add_header X-Content-Type-Options nosniff;' >> $git_ssb_nginx_site
324
+        echo '  add_header X-Frame-Options SAMEORIGIN;' >> $git_ssb_nginx_site
325
+        echo '' >> $git_ssb_nginx_site
326
+        echo '  root /usr/local/lib/node_modules/git-ssb/node_modules/git-ssb-web;' >> $git_ssb_nginx_site
327
+        echo '' >> $git_ssb_nginx_site
328
+        echo '  location = / {' >> $git_ssb_nginx_site
329
+        echo "    proxy_pass http://localhost:${GIT_SSB_PORT};" >> $git_ssb_nginx_site
330
+        echo '    proxy_set_header X-Real-IP $remote_addr;' >> $git_ssb_nginx_site
331
+        echo '    proxy_set_header Host $host;' >> $git_ssb_nginx_site
332
+        echo '    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;' >> $git_ssb_nginx_site
333
+        echo '    proxy_http_version 1.1;' >> $git_ssb_nginx_site
334
+        echo '    proxy_set_header Upgrade $http_upgrade;' >> $git_ssb_nginx_site
335
+        echo '    proxy_set_header Connection upgrade;' >> $git_ssb_nginx_site
336
+        echo '  }' >> $git_ssb_nginx_site
337
+        echo '}' >> $git_ssb_nginx_site
338
+    fi
339
+    nginx_ensite git_ssb
340
+}
341
+
199 342
 function mesh_install_scuttlebot {
343
+    SCUTTLEBOT_ONION_HOSTNAME=
344
+
345
+    get_npm_arch
346
+
200 347
     cat <<EOF > $rootdir/usr/bin/install_scuttlebot
201 348
 #!/bin/bash
202
-npm install -g scuttlebot@${SCUTTLEBOT_VERSION}
349
+npm install --arch=$NPM_ARCH -g scuttlebot@${SCUTTLEBOT_VERSION}
350
+npm install --arch=$NPM_ARCH -g git-ssb
351
+npm install --arch=$NPM_ARCH -g git-remote-ssb
203 352
 EOF
204 353
     chroot "$rootdir" /bin/chmod +x /usr/bin/install_scuttlebot
205 354
     chroot "$rootdir" /usr/bin/install_scuttlebot
@@ -234,6 +383,9 @@ EOF
234 383
     echo '' >> $rootdir/etc/systemd/system/scuttlebot.service
235 384
     echo '[Install]' >> $rootdir/etc/systemd/system/scuttlebot.service
236 385
     echo 'WantedBy=multi-user.target' >> $rootdir/etc/systemd/system/scuttlebot.service
386
+
387
+    scuttlebot_git_setup mesh
388
+    git_ssb_script mesh
237 389
 }
238 390
 
239 391
 function install_scuttlebot {
@@ -245,6 +397,9 @@ function install_scuttlebot {
245 397
         exit 528253
246 398
     fi
247 399
 
400
+    npm install -g git-ssb
401
+    npm install -g git-remote-ssb
402
+
248 403
     if [ ! -d /etc/scuttlebot ]; then
249 404
         mkdir -p /etc/scuttlebot
250 405
     fi
@@ -270,6 +425,24 @@ function install_scuttlebot {
270 425
     echo '[Install]' >> /etc/systemd/system/scuttlebot.service
271 426
     echo 'WantedBy=multi-user.target' >> /etc/systemd/system/scuttlebot.service
272 427
 
428
+    echo '[Unit]' > /etc/systemd/system/git_ssb.service
429
+    echo 'Description=Git SSB (SSB git web interface)' >> /etc/systemd/system/git_ssb.service
430
+    echo 'After=syslog.target' >> /etc/systemd/system/git_ssb.service
431
+    echo 'After=network.target' >> /etc/systemd/system/git_ssb.service
432
+    echo 'After=scuttlebot.target' >> /etc/systemd/system/git_ssb.service
433
+    echo '' >> /etc/systemd/system/git_ssb.service
434
+    echo '[Service]' >> /etc/systemd/system/git_ssb.service
435
+    echo 'Type=simple' >> /etc/systemd/system/git_ssb.service
436
+    echo 'User=scuttlebot' >> /etc/systemd/system/git_ssb.service
437
+    echo 'Group=scuttlebot' >> /etc/systemd/system/git_ssb.service
438
+    echo "WorkingDirectory=/etc/scuttlebot" >> /etc/systemd/system/git_ssb.service
439
+    echo "ExecStart=/usr/bin/git ssb web --public localhost:$GIT_SSB_PORT" >> /etc/systemd/system/git_ssb.service
440
+    echo 'Restart=always' >> /etc/systemd/system/git_ssb.service
441
+    echo 'Environment="USER=scuttlebot"' >> /etc/systemd/system/git_ssb.service
442
+    echo '' >> /etc/systemd/system/git_ssb.service
443
+    echo '[Install]' >> /etc/systemd/system/git_ssb.service
444
+    echo 'WantedBy=multi-user.target' >> /etc/systemd/system/git_ssb.service
445
+
273 446
     chown -R scuttlebot:scuttlebot /etc/scuttlebot
274 447
 
275 448
     # files gw_name myhostname mdns4_minimal [NOTFOUND=return] dns
@@ -279,6 +452,9 @@ function install_scuttlebot {
279 452
     systemctl enable scuttlebot.service
280 453
     systemctl daemon-reload
281 454
     systemctl start scuttlebot.service
455
+    systemctl enable git_ssb.service
456
+    systemctl daemon-reload
457
+    systemctl start git_ssb.service
282 458
 
283 459
     sleep 3
284 460
 
@@ -309,6 +485,17 @@ function install_scuttlebot {
309 485
     systemctl restart scuttlebot.service
310 486
 
311 487
     firewall_add scuttlebot ${SCUTTLEBOT_PORT}
488
+    firewall_add git_ssb ${GIT_SSB_PORT}
489
+
490
+
491
+    SCUTTLEBOT_ONION_HOSTNAME=$(add_onion_service scuttlebot 80 ${SCUTTLEBOT_ONION_PORT})
492
+    scuttlebot_git_setup
493
+    git_ssb_script
494
+
495
+    function_check create_site_certificate
496
+    create_site_certificate ${SCUTTLEBOT_DOMAIN_NAME} 'yes'
497
+
498
+    systemctl restart nginx
312 499
 
313 500
     if ! grep -q "scuttlebot version:" ${COMPLETION_FILE}; then
314 501
         echo "scuttlebot version:${SCUTTLEBOT_VERSION}" >> ${COMPLETION_FILE}

+ 1
- 1
src/freedombone-app-smilodon 查看文件

@@ -28,7 +28,7 @@
28 28
 # You should have received a copy of the GNU Affero General Public License
29 29
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
30 30
 
31
-VARIANTS='full full-vim social'
31
+VARIANTS=''
32 32
 
33 33
 IN_DEFAULT_INSTALL=0
34 34
 SHOW_ON_ABOUT=1

+ 2
- 2
src/freedombone-app-xmpp 查看文件

@@ -645,9 +645,9 @@ function xmpp_onion_addresses {
645 645
     echo '  ["jabber-germany.de"] = "dbbrphko5tqcpar3.onion";' >> $filename
646 646
     echo '  ["kode.im"] = "ihkw7qy3tok45dun.onion";' >> $filename
647 647
     echo '  ["im.koderoot.net"] = "ihkw7qy3tok45dun.onion";' >> $filename
648
-    echo '  ["adb-centralen.se"] = "37x6i3wgr2jyublb.onion";' >> $filename
648
+    echo '  ["adb-centralen.se"] = "qai7jjjnhbrdiexf.onion";' >> $filename
649 649
     echo '  ["joelpurra.se"] = "37x6i3wgr2jyublb.onion";' >> $filename
650
-    echo '  ["nordberg.se"] = "37x6i3wgr2jyublb.onion";' >> $filename
650
+    echo '  ["nordberg.se"] = "qai7jjjnhbrdiexf.onion";' >> $filename
651 651
     echo '  ["jabber.lqdn.fr"] = "jabber63t4r2qi57.onion";' >> $filename
652 652
     echo '  ["jabber.otr.im"] = "5rgdtlawqkcplz75.onion";' >> $filename
653 653
     echo '  ["otromundo.cf"] = "arauemwe2utqqzye.onion";' >> $filename

+ 2
- 2
src/freedombone-image 查看文件

@@ -69,7 +69,7 @@ TEMPBUILD_DIR=~/.tmp_${PROJECT_NAME}_build
69 69
 VMDEBOOTSTRAP_REPO=git://git.liw.fi/vmdebootstrap
70 70
 VMDEBOOTSTRAP_VERSION=0.8
71 71
 MAKEFILE=${PROJECT_NAME}-image-makefile
72
-IMAGE_SIZE=7.8G
72
+IMAGE_SIZE=7.9G
73 73
 IMAGE_SIZE_SPECIFIED=
74 74
 IMAGE_NAME='full'
75 75
 
@@ -544,7 +544,7 @@ if [[ $VARIANT == 'meshclient' || $VARIANT == 'meshusb' ]]; then
544 544
     fi
545 545
 
546 546
     if [ ! $IMAGE_SIZE_SPECIFIED ]; then
547
-        IMAGE_SIZE=7.5G
547
+        IMAGE_SIZE=7.9G
548 548
     fi
549 549
 fi
550 550
 

+ 68
- 17
src/freedombone-image-customise 查看文件

@@ -99,7 +99,8 @@ INSECURE='no'
99 99
 MESH_DESKTOP_BACKGROUND_IMAGE=/usr/local/share/${PROJECT_NAME}_mesh_initial_background.png
100 100
 
101 101
 # The browser application to use
102
-BROWSER=midori
102
+BROWSER=firefox
103
+BROWSER_OPTIONS='-url'
103 104
 
104 105
 MESH_INSTALL_DIR=/var/lib
105 106
 
@@ -587,7 +588,8 @@ cd /etc/patchwork
587 588
 npm install --arch=$NPM_ARCH --build-from-source
588 589
 npm install --arch=$NPM_ARCH --save-dev electron-rebuild
589 590
 ./node_modules/.bin/electron-rebuild
590
-npm install --arch=$NPM_ARCH git-ssb
591
+npm install --arch=$NPM_ARCH -g git-ssb --registry=http://localhost:8043/
592
+#npm install --arch=$NPM_ARCH git-ssb
591 593
 EOF
592 594
     chroot "$rootdir" /bin/chmod +x /usr/bin/install_patchwork
593 595
     chroot "$rootdir" /usr/bin/install_patchwork
@@ -704,6 +706,7 @@ initialise_mesh() {
704 706
     install_web_server
705 707
     install_pelican
706 708
     mesh_install_cryptpad
709
+    #mesh_install_peertube
707 710
     if [ $ENABLE_ZERONET ]; then
708 711
         install_zeronet
709 712
     fi
@@ -787,7 +790,7 @@ function mesh_client_startup_applications {
787 790
     echo '' >> $START_DESKTOP
788 791
     echo 'INITIAL_TOX_USERNAME=""' >> $START_DESKTOP
789 792
     echo 'while [ ${#INITIAL_TOX_USERNAME} -eq 0 ]; do' >> $START_DESKTOP
790
-    echo "  data=\$(zenity --forms --title=\"$MESH_TITLE\" --text=\"$MESH_SET_USERNAME\" --separator=\",\" --add-entry=\"Username\")" >> $START_DESKTOP
793
+    echo "  data=\$(zenity --entry --title=\"$MESH_TITLE\" --text=\"$MESH_SET_USERNAME\")" >> $START_DESKTOP
791 794
     echo '  accepted=$?' >> $START_DESKTOP
792 795
     echo '  if ((accepted == 0)); then' >> $START_DESKTOP
793 796
     echo "      INITIAL_TOX_USERNAME=\$(awk -F, '{print \$1}' <<<\$data)" >> $START_DESKTOP
@@ -878,8 +881,10 @@ function configure_user_interface {
878 881
     # clipboard
879 882
     chroot "$rootdir" apt-get -yq install xclip
880 883
 
881
-    # audio recording
884
+    # multimedia recording and editing
882 885
     chroot "$rootdir" apt-get -yq install audacity
886
+    chroot "$rootdir" apt-get -yq install shotwell
887
+    chroot "$rootdir" apt-get -yq install kdenlive breeze-icon-theme
883 888
 
884 889
     # for gtk dialog entry
885 890
     chroot "$rootdir" apt-get -yq install zenity
@@ -887,6 +892,9 @@ function configure_user_interface {
887 892
     # Produce a text file on the desktop listing users on the mesh
888 893
     cat <<EOF > $rootdir/usr/bin/list-tox-users
889 894
 #!/bin/bash
895
+StrMeshUsers=\$"Mesh Users"
896
+StrUsername=\$'Username'
897
+StrToxID=\$'Tox ID'
890 898
 ethernet_connected=\$(cat /sys/class/net/eth0/carrier)
891 899
 users_list=\$(lstox | awk -F ' ' '{\$1=""; print \$0}' | sed -e 's/^[[:space:]]*//' | sort -d | uniq)
892 900
 if [ \${#users_list} -eq 0 ]; then
@@ -898,13 +906,25 @@ if [ \$no_of_users -gt 0 ]; then
898 906
     echo "\$users_list" > /tmp/Users.txt
899 907
     chown $MY_USERNAME:$MY_USERNAME /tmp/Users.txt
900 908
 
901
-    echo 'showing_users=\$(ps aux | grep $MESH_TEXT_EDITOR | grep "Users.txt")' > /home/$MY_USERNAME/showusers
902
-    echo 'if [ \${#showing_users} -eq 0 ]; then' >> /home/$MY_USERNAME/showusers
903
-    echo '    $MESH_TEXT_EDITOR /tmp/Users.txt' >> /home/$MY_USERNAME/showusers
904
-    echo 'fi' >> /home/$MY_USERNAME/showusers
905
-    echo 'exit 0' >> /home/$MY_USERNAME/showusers
906
-    chmod +x /home/$MY_USERNAME/showusers
907
-    chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/showusers
909
+    if [ ! -f /home/$MY_USERNAME/showusers ]; then
910
+        echo '#!/bin/bash' > /home/$MY_USERNAME/showusers
911
+        echo 'data=\$(' >> /home/$MY_USERNAME/showusers
912
+        echo 'cat /tmp/Users.txt | \' >> /home/$MY_USERNAME/showusers
913
+        echo "    awk -F ' ' '{" >> /home/$MY_USERNAME/showusers
914
+        echo '        for(i=1;i<=NF;i++){' >> /home/$MY_USERNAME/showusers
915
+        echo '            print \$i;' >> /home/$MY_USERNAME/showusers
916
+        echo '        }' >> /home/$MY_USERNAME/showusers
917
+        echo "}' | \\\\" >> /home/$MY_USERNAME/showusers
918
+        echo '    zenity --list \' >> /home/$MY_USERNAME/showusers
919
+        echo "     --title='\$StrMeshUsers' \\\\" >> /home/$MY_USERNAME/showusers
920
+        echo "     --column='\$StrUsername' --column='\$StrToxID' \\\\" >> /home/$MY_USERNAME/showusers
921
+        echo '     --print-column=2 --hide-column=2 --width=250 --height=400)' >> /home/$MY_USERNAME/showusers
922
+        echo 'if [ ! \$data ]; then' >> /home/$MY_USERNAME/showusers
923
+        echo '    exit 0' >> /home/$MY_USERNAME/showusers
924
+        echo 'fi' >> /home/$MY_USERNAME/showusers
925
+        echo 'echo "\$data" | xclip -selection clipboard' >> /home/$MY_USERNAME/showusers
926
+        chmod +x /home/$MY_USERNAME/showusers
927
+    fi
908 928
 
909 929
     echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/Users.desktop
910 930
     if [ \$no_of_users -lt 2 ]; then
@@ -946,7 +966,7 @@ if [ \$no_of_users -gt 0 ]; then
946 966
             echo 'Comment[it]=Editing collaborativo di documenti in tempo reale' >> /home/$MY_USERNAME/Desktop/cryptpad.desktop
947 967
             echo 'Comment[ru]=Совместное редактирование документов в режиме реального времени' >> /home/$MY_USERNAME/Desktop/cryptpad.desktop
948 968
             echo 'Comment[zh]=实时协同编辑文件' >> /home/$MY_USERNAME/Desktop/cryptpad.desktop
949
-            echo "Exec=$BROWSER http://\${HOSTNAME}.local" >> /home/$MY_USERNAME/Desktop/cryptpad.desktop
969
+            echo "Exec=$BROWSER $BROWSER_OPTIONS http://\${HOSTNAME}.local" >> /home/$MY_USERNAME/Desktop/cryptpad.desktop
950 970
             echo "Icon=/usr/share/$PROJECT_NAME/avatars/icon_cryptpad.png" >> /home/$MY_USERNAME/Desktop/cryptpad.desktop
951 971
             echo 'Terminal=false' >> /home/$MY_USERNAME/Desktop/cryptpad.desktop
952 972
             echo 'Categories=Application;' >> /home/$MY_USERNAME/Desktop/cryptpad.desktop
@@ -954,7 +974,38 @@ if [ \$no_of_users -gt 0 ]; then
954 974
             chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Desktop/cryptpad.desktop
955 975
         else
956 976
             if ! grep -q "\${HOSTNAME}.local" /home/$MY_USERNAME/Desktop/cryptpad.desktop; then
957
-                sed -i "s|Exec=.*|Exec=$BROWSER http://\${HOSTNAME}.local|g" /home/$MY_USERNAME/Desktop/cryptpad.desktop
977
+                sed -i "s|Exec=.*|Exec=$BROWSER $BROWSER_OPTIONS http://\${HOSTNAME}.local|g" /home/$MY_USERNAME/Desktop/cryptpad.desktop
978
+            fi
979
+        fi
980
+    fi
981
+
982
+    if [ -d /etc/peertube ]; then
983
+        if [ ! -f /home/$MY_USERNAME/.peertube.desktop ]; then
984
+            if [ ! -f /home/$MY_USERNAME/Desktop/peertube.desktop ]; then
985
+                echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/peertube.desktop
986
+                echo 'Name=PeerTube' >> /home/$MY_USERNAME/Desktop/peertube.desktop
987
+                echo 'Type=Application' >> /home/$MY_USERNAME/Desktop/peertube.desktop
988
+                echo 'Comment=Upload and view videos on the mesh' >> /home/$MY_USERNAME/Desktop/peertube.desktop
989
+                echo 'Comment[el]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
990
+                echo 'Comment[ar]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
991
+                echo 'Comment[ca]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
992
+                echo 'Comment[hi]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
993
+                echo 'Comment[fr]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
994
+                echo 'Comment[de]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
995
+                echo 'Comment[es]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
996
+                echo 'Comment[it]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
997
+                echo 'Comment[ru]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
998
+                echo 'Comment[zh]=' >> /home/$MY_USERNAME/Desktop/peertube.desktop
999
+                echo "Exec=$BROWSER $BROWSER_OPTIONS http://\${HOSTNAME}.local:$MESH_PEERTUBE_PORT" >> /home/$MY_USERNAME/Desktop/peertube.desktop
1000
+                echo "Icon=/usr/share/$PROJECT_NAME/avatars/icon_peertube.png" >> /home/$MY_USERNAME/Desktop/peertube.desktop
1001
+                echo 'Terminal=false' >> /home/$MY_USERNAME/Desktop/peertube.desktop
1002
+                echo 'Categories=Application;' >> /home/$MY_USERNAME/Desktop/peertube.desktop
1003
+                chmod +x /home/$MY_USERNAME/Desktop/peertube.desktop
1004
+                chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Desktop/peertube.desktop
1005
+            else
1006
+                if ! grep -q "\${HOSTNAME}.local" /home/$MY_USERNAME/Desktop/peertube.desktop; then
1007
+                    sed -i "s|Exec=.*|Exec=$BROWSER $BROWSER_OPTIONS http://\${HOSTNAME}.local:$MESH_PEERTUBE_PORT|g" /home/$MY_USERNAME/Desktop/peertube.desktop
1008
+                fi
958 1009
             fi
959 1010
         fi
960 1011
     fi
@@ -1030,7 +1081,7 @@ if [ \$no_of_users -gt 0 ]; then
1030 1081
         echo "Comment[it]=Collegarsi ad un'altra rete di maglie via internet" >> /home/$MY_USERNAME/Desktop/vpn.desktop
1031 1082
         echo 'Comment[ru]=Подключение к другой сети с сетью через Интернет' >> /home/$MY_USERNAME/Desktop/vpn.desktop
1032 1083
         echo 'Comment[zh]=通过互联网连接到另一个网状网络' >> /home/$MY_USERNAME/Desktop/vpn.desktop
1033
-        echo 'Exec=mate-terminal --full-screen -e /usr/local/bin/${PROJECT_NAME}-mesh-connect' >> /home/$MY_USERNAME/Desktop/vpn.desktop
1084
+        echo 'Exec=/usr/local/bin/${PROJECT_NAME}-mesh-connect' >> /home/$MY_USERNAME/Desktop/vpn.desktop
1034 1085
         echo 'Icon=/usr/share/$PROJECT_NAME/avatars/icon_connect.png' >> /home/$MY_USERNAME/Desktop/vpn.desktop
1035 1086
         echo 'StartupNotify=false' >> /home/$MY_USERNAME/Desktop/vpn.desktop
1036 1087
         chmod +x /home/$MY_USERNAME/Desktop/vpn.desktop
@@ -1062,7 +1113,7 @@ if [ \$no_of_users -gt 0 ]; then
1062 1113
         echo "Comment[it]=Visita un sito" >> /home/$MY_USERNAME/Desktop/sites.desktop
1063 1114
         echo "Comment[ru]=Посетите сайт" >> /home/$MY_USERNAME/Desktop/sites.desktop
1064 1115
         echo "Comment[zh]=访问网站" >> /home/$MY_USERNAME/Desktop/sites.desktop
1065
-        echo 'Exec=mate-terminal --full-screen -e /usr/local/bin/${PROJECT_NAME}-mesh-visit-site' >> /home/$MY_USERNAME/Desktop/sites.desktop
1116
+        echo 'Exec=/usr/local/bin/${PROJECT_NAME}-mesh-visit-site' >> /home/$MY_USERNAME/Desktop/sites.desktop
1066 1117
         echo 'Icon=/usr/share/$PROJECT_NAME/avatars/icon_sites.png' >> /home/$MY_USERNAME/Desktop/sites.desktop
1067 1118
         echo 'StartupNotify=false' >> /home/$MY_USERNAME/Desktop/sites.desktop
1068 1119
         chmod +x /home/$MY_USERNAME/Desktop/sites.desktop
@@ -1092,7 +1143,7 @@ if [ \$no_of_users -gt 0 ]; then
1092 1143
         echo 'Comment[it]=Visualizza o crea voci di blog' >> /home/$MY_USERNAME/Desktop/blog.desktop
1093 1144
         echo 'Comment[ru]=Просмотр или создание записей в блоге' >> /home/$MY_USERNAME/Desktop/blog.desktop
1094 1145
         echo 'Comment[zh]=查看或创建博客条目' >> /home/$MY_USERNAME/Desktop/blog.desktop
1095
-        echo 'Exec=mate-terminal --full-screen -e /usr/local/bin/${PROJECT_NAME}-mesh-blog' >> /home/$MY_USERNAME/Desktop/blog.desktop
1146
+        echo 'Exec=/usr/local/bin/${PROJECT_NAME}-mesh-blog' >> /home/$MY_USERNAME/Desktop/blog.desktop
1096 1147
         echo 'Icon=/usr/share/$PROJECT_NAME/avatars/icon_blog.png' >> /home/$MY_USERNAME/Desktop/blog.desktop
1097 1148
         echo 'StartupNotify=false' >> /home/$MY_USERNAME/Desktop/blog.desktop
1098 1149
         chmod +x /home/$MY_USERNAME/Desktop/blog.desktop
@@ -1250,7 +1301,7 @@ EOF
1250 1301
     fi
1251 1302
 
1252 1303
     # browser
1253
-    chroot "$rootdir" apt-get -yq install $BROWSER
1304
+    chroot "$rootdir" apt-get -yq install firefox-esr
1254 1305
 
1255 1306
     # help
1256 1307
     mkdir -p $rootdir/home/${MY_USERNAME}/help/images

+ 386
- 6
src/freedombone-image-mesh 查看文件

@@ -32,8 +32,8 @@ export TEXTDOMAIN=${PROJECT_NAME}-image-mesh
32 32
 export TEXTDOMAINDIR="/usr/share/locale"
33 33
 
34 34
 # The browser application to use
35
-BROWSER=midori
36
-BROWSER_OPTIONS='-p'
35
+BROWSER=firefox
36
+BROWSER_OPTIONS='-private -url'
37 37
 
38 38
 MY_USERNAME='fbone'
39 39
 PEER_ID=
@@ -88,6 +88,59 @@ SCUTTLEBOT_PORT=8010
88 88
 CRYPTPAD_PORT=9003
89 89
 CRYPTPAD_DIR=/etc/cryptpad
90 90
 
91
+PEERTUBE_DIR=/etc/peertube
92
+
93
+function run_system_query_postgresql {
94
+    query=$1
95
+    cd /etc/postgresql
96
+    sudo -u postgres psql -c "$query"
97
+}
98
+
99
+function create_password {
100
+    openssl rand -base64 32 | tr -dc A-Za-z0-9 | head -c ${1} ; echo -n ''
101
+}
102
+
103
+function enable_peertube {
104
+    if [ ! -d $PEERTUBE_DIR ]; then
105
+        return
106
+    fi
107
+
108
+    PEERTUBE_ADMIN_PASSWORD="$(create_password 10)"
109
+
110
+    if [ -d $PEERTUBE_DIR/videos ]; then
111
+        rm -rf $PEERTUBE_DIR/videos/*
112
+    fi
113
+    if [ -d $PEERTUBE_DIR/thumbnails ]; then
114
+        rm -rf $PEERTUBE_DIR/thumbnails/*
115
+    fi
116
+
117
+    systemctl restart postgresql
118
+    run_system_query_postgresql "DROP DATABASE peertube;"
119
+    run_system_query_postgresql "CREATE USER peertube WITH PASSWORD '$PEERTUBE_ADMIN_PASSWORD';"
120
+    run_system_query_postgresql "CREATE DATABASE peertube OWNER peertube;"
121
+    run_system_query_postgresql "GRANT ALL PRIVILEGES ON DATABASE peertube to peertube;"
122
+    run_system_query_postgresql "set statement_timeout to 40000;"
123
+
124
+    peertube_config_file=$PEERTUBE_DIR/config/production.yaml
125
+    sed -i "s|hostname:.*|hostname: 'P$PEER_ID.local'|g" $peertube_config_file
126
+    sed -i "s|password:.*|password: '$PEERTUBE_ADMIN_PASSWORD'|g" $peertube_config_file
127
+
128
+    peertube_nginx_file=/etc/nginx/sites-available/peertube
129
+    sed -i "s|server_name.*|server_name P$PEER_ID.local;|g" $peertube_nginx_file
130
+
131
+    chown -R peertube:peertube $PEERTUBE_DIR
132
+
133
+    # Set up the web server
134
+    ln -s /etc/nginx/sites-available/peertube /etc/nginx/sites-enabled/peertube
135
+    if [ -f /etc/nginx/sites-enabled/default ]; then
136
+        rm /etc/nginx/sites-enabled/default
137
+    fi
138
+
139
+    systemctl enable peertube
140
+    systemctl daemon-reload
141
+    systemctl start peertube
142
+}
143
+
91 144
 function enable_cryptpad {
92 145
     if [ ! -d $CRYPTPAD_DIR ]; then
93 146
         return
@@ -95,7 +148,9 @@ function enable_cryptpad {
95 148
 
96 149
     # Set up the web server
97 150
     ln -s /etc/nginx/sites-available/cryptpad /etc/nginx/sites-enabled/cryptpad
98
-    rm /etc/nginx/sites-enabled/default
151
+    if [ -f /etc/nginx/sites-enabled/default ]; then
152
+        rm /etc/nginx/sites-enabled/default
153
+    fi
99 154
 
100 155
     if [ ! -d $CRYPTPAD_DIR/customize/api ]; then
101 156
         mkdir -p $CRYPTPAD_DIR/customize/api
@@ -391,7 +446,7 @@ function show_desktop_icons {
391 446
     echo "Comment[it]=Crea una nuova identità" >> /home/$MY_USERNAME/Desktop/new_identity.desktop
392 447
     echo "Comment[ru]=Создайте новое удостоверение личности" >> /home/$MY_USERNAME/Desktop/new_identity.desktop
393 448
     echo "Comment[zh]=创建一个新的身份" >> /home/$MY_USERNAME/Desktop/new_identity.desktop
394
-    echo "Exec=mate-terminal --full-screen -e ${PROJECT_NAME}-mesh-reset" >> /home/$MY_USERNAME/Desktop/new_identity.desktop
449
+    echo "Exec=${PROJECT_NAME}-mesh-reset" >> /home/$MY_USERNAME/Desktop/new_identity.desktop
395 450
     echo "Icon=/usr/share/${PROJECT_NAME}/avatars/icon_new_identity.png" >> /home/$MY_USERNAME/Desktop/new_identity.desktop
396 451
     echo 'Terminal=false' >> /home/$MY_USERNAME/Desktop/new_identity.desktop
397 452
     echo 'Categories=Application;' >> /home/$MY_USERNAME/Desktop/new_identity.desktop
@@ -425,6 +480,324 @@ function show_desktop_icons {
425 480
     echo 'Terminal=false' >> /home/$MY_USERNAME/Desktop/social.desktop
426 481
     echo 'Categories=Application;' >> /home/$MY_USERNAME/Desktop/social.desktop
427 482
 
483
+    cp /root/${PROJECT_NAME}/img/icon_kdenlive.png /usr/share/${PROJECT_NAME}/avatars/icon_kdenlive.png
484
+    echo '#!/usr/bin/env xdg-open' > /home/$MY_USERNAME/Desktop/kdenlive.desktop
485
+    echo '# KDE Config File' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
486
+    echo '' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
487
+    echo '[Desktop Entry]' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
488
+    echo 'Name=Video Editor' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
489
+    echo 'Name[ast]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
490
+    echo 'Name[bs]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
491
+    echo 'Name[ca]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
492
+    echo 'Name[ca@valencia]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
493
+    echo 'Name[cs]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
494
+    echo 'Name[da]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
495
+    echo 'Name[de]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
496
+    echo 'Name[el]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
497
+    echo 'Name[en_GB]=Video Editor' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
498
+    echo 'Name[es]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
499
+    echo 'Name[et]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
500
+    echo 'Name[fi]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
501
+    echo 'Name[fr]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
502
+    echo 'Name[ga]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
503
+    echo 'Name[gl]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
504
+    echo 'Name[hu]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
505
+    echo 'Name[it]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
506
+    echo 'Name[ja]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
507
+    echo 'Name[km]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
508
+    echo 'Name[lt]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
509
+    echo 'Name[lv]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
510
+    echo 'Name[mr]=के-डि-एनलाइव्ह' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
511
+    echo 'Name[nb]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
512
+    echo 'Name[nds]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
513
+    echo 'Name[nl]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
514
+    echo 'Name[nn]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
515
+    echo 'Name[pl]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
516
+    echo 'Name[pt]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
517
+    echo 'Name[pt_BR]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
518
+    echo 'Name[ro]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
519
+    echo 'Name[ru]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
520
+    echo 'Name[sk]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
521
+    echo 'Name[sl]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
522
+    echo 'Name[sv]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
523
+    echo 'Name[tr]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
524
+    echo 'Name[ug]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
525
+    echo 'Name[uk]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
526
+    echo 'Name[x-test]=xxKdenlivexx' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
527
+    echo 'Name[zh_CN]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
528
+    echo 'Name[zh_TW]=Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
529
+    echo 'GenericName=Video Editor' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
530
+    echo 'GenericName[ar]=محرّر فيديوهات' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
531
+    echo 'GenericName[ast]=Editor de videu' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
532
+    echo 'GenericName[bs]=Video uređivač' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
533
+    echo 'GenericName[ca]=Editor de vídeo' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
534
+    echo 'GenericName[ca@valencia]=Editor de vídeo' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
535
+    echo 'GenericName[cs]=Editor videí' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
536
+    echo 'GenericName[da]=Videoredigering' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
537
+    echo 'GenericName[de]=Video-Editor' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
538
+    echo 'GenericName[el]=Επεξεργαστής βίντεο' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
539
+    echo 'GenericName[en_GB]=Video Editor' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
540
+    echo 'GenericName[es]=Editor de video' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
541
+    echo 'GenericName[et]=Videoredaktor' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
542
+    echo 'GenericName[fi]=Videomuokkain' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
543
+    echo 'GenericName[fr]=Éditeur vidéo' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
544
+    echo 'GenericName[ga]=Eagarthóir Físe' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
545
+    echo 'GenericName[gl]=Editor de vídeo' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
546
+    echo 'GenericName[hu]=Videoszerkesztő' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
547
+    echo 'GenericName[it]=Editor video' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
548
+    echo 'GenericName[ja]=ビデオエディタ' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
549
+    echo 'GenericName[km]=កម្មវិធី​កែសម្រួល​វីដេអូ' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
550
+    echo 'GenericName[lt]=Video redaktorius' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
551
+    echo 'GenericName[lv]=Video redaktors' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
552
+    echo 'GenericName[mr]=व्हिडीओ संपादक' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
553
+    echo 'GenericName[nb]=Videoredigeringsprogram' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
554
+    echo 'GenericName[nl]=Video-bewerker' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
555
+    echo 'GenericName[nn]=Videoredigering' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
556
+    echo 'GenericName[pl]=Edytor wideo' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
557
+    echo 'GenericName[pt]=Editor de Víde' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
558
+    echo 'GenericName[pt_BR]=Editor de Vídeo' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
559
+    echo 'GenericName[ro]=Redactor de imagini' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
560
+    echo 'GenericName[ru]=Видеоредактор' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
561
+    echo 'GenericName[sk]=Editor videa' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
562
+    echo 'GenericName[sl]=Urejevalnik videa' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
563
+    echo 'GenericName[sv]=Videoeditor' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
564
+    echo 'GenericName[tr]=Video Düzenleyici' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
565
+    echo 'GenericName[uk]=Відеоредактор' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
566
+    echo 'GenericName[x-test]=xxVideo Editorxx' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
567
+    echo 'GenericName[zh_CN]=视频编辑器' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
568
+    echo 'GenericName[zh_TW]=影像編輯器' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
569
+    echo 'Comment=Nonlinear video editor for KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
570
+    echo 'Comment[ar]=محرّر فيديوهات غير خطّيّ لكدي' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
571
+    echo 'Comment[ast]=Editor de videu non llinial pa KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
572
+    echo 'Comment[bs]=Nelinearni video uređivač za KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
573
+    echo 'Comment[ca]=Editor de vídeo no lineal per al KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
574
+    echo 'Comment[ca@valencia]=Editor de vídeo no lineal per al KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
575
+    echo 'Comment[cs]=Nelineární editor videí pro KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
576
+    echo 'Comment[da]=Ikke-lineær videoredigering til KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
577
+    echo 'Comment[de]=Nichtlinearer Video-Editor für KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
578
+    echo 'Comment[el]=Μη γραμμικός επεξεργαστής βίντεο για το KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
579
+    echo 'Comment[en_GB]=Nonlinear video editor for KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
580
+    echo 'Comment[es]=Editor no lineal de video para KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
581
+    echo 'Comment[et]=KDE mittelineaarne videoredaktor' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
582
+    echo 'Comment[fi]=Epälineaarinen videomuokkain KDE:lle' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
583
+    echo 'Comment[fr]=Éditeur vidéo non linéaire pour KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
584
+    echo 'Comment[gl]=Editor de vídeo non linear para KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
585
+    echo 'Comment[hu]=Nemlineáris videoszerkesztő a KDE-hez' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
586
+    echo 'Comment[it]=Editor di video non lineare per KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
587
+    echo 'Comment[ja]=KDE 向けノンリニアビデオエディタ' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
588
+    echo 'Comment[km]=កម្មវិធី​កែសម្រួល​វីដេអូ​មិន​លីនេអ៊ែរ​សម្រាប់ KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
589
+    echo 'Comment[lt]=Nelinijinis veido redaktorius skirtas KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
590
+    echo 'Comment[lv]=Nelineārais video redaktors KDE videi' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
591
+    echo 'Comment[mr]=केडीई करिता अरेषीय व्हिडीओ संपादक' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
592
+    echo 'Comment[nb]=Videoredigeringsprogram for KDE med dataklipping' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
593
+    echo 'Comment[nl]=Niet-lineaire video-bewerker voor KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
594
+    echo 'Comment[nn]=Program for ikkje-lineær videoredigering' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
595
+    echo 'Comment[pl]=Nieliniowy edytor wideo dla KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
596
+    echo 'Comment[pt]=Editor de vídeo não-linear para o KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
597
+    echo 'Comment[pt_BR]=Editor de vídeo não-linear para o KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
598
+    echo 'Comment[ro]=Redactor de imagini neliniar pentru KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
599
+    echo 'Comment[ru]=Нелинейный видеоредактор от KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
600
+    echo 'Comment[sk]=Nelineárny editor videa pre KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
601
+    echo 'Comment[sl]=Ne-linearni urejevalnik videa za KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
602
+    echo 'Comment[sv]=Icke-linjär videoeditor för KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
603
+    echo 'Comment[tr]=KDE için doğrusal olmayan video düzenleyici' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
604
+    echo 'Comment[ug]=KDE ئۈچۈن سىزىقسىز سىن تەھرىرلىگۈچ' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
605
+    echo 'Comment[uk]=Нелінійний редактор відео для KDE' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
606
+    echo 'Comment[x-test]=xxNonlinear video editor for KDExx' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
607
+    echo 'Comment[zh_CN]=KDE 的非线性视频编辑器' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
608
+    echo 'Comment[zh_TW]=KDE 上的非線性影像編輯器' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
609
+    echo 'Type=Application' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
610
+    echo 'Exec=kdenlive %U' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
611
+    echo "Icon=/usr/share/${PROJECT_NAME}/avatars/icon_kdenlive.png" >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
612
+    echo 'X-DocPath=kdenlive/index.html' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
613
+    echo 'X-DocPath[cs]=http://cs.wikibooks.org/wiki/Kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
614
+    echo 'Terminal=false' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
615
+    echo 'MimeType=application/x-kdenlive;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
616
+    echo 'Categories=Qt;KDE;AudioVideo;AudioVideoEditing;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
617
+    echo 'Keywords=editing;video;audio;mlt;kde;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
618
+    echo 'Keywords[ca]=edició;vídeo;àudio;mlt;kde;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
619
+    echo 'Keywords[ca@valencia]=edició;vídeo;àudio;mlt;kde;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
620
+    echo 'Keywords[da]=redigering;video;lyd;mlt;kde;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
621
+    echo 'Keywords[de]=Editing;Bearbeitung;Schnitt;Videoschnitt;Video;Audio;MLT;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
622
+    echo 'Keywords[en_GB]=editing;video;audio;mlt;kde;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
623
+    echo 'Keywords[es]=edición;video;audio;mlt;kde;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
624
+    echo 'Keywords[et]=redigeerimine;muutmine;video;audio;heli;mlt;kde;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
625
+    echo 'Keywords[fi]=editing;video;audio;mlt;kde;editointi;ääni;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
626
+    echo 'Keywords[fr]=montage;vidéo;audio;mlt;kde;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
627
+    echo 'Keywords[gl]=editing;edición;video;vídeo;audio;son;mlt;kde;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
628
+    echo 'Keywords[it]=editing;video;audio;mlt;kde;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
629
+    echo 'Keywords[nl]=bewerken;video;audio;mlt;kde;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
630
+    echo 'Keywords[nn]=redigering;video;lyd;mlt;kde;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
631
+    echo 'Keywords[pl]=edytowanie;video;wideo;filmy;audio;dźwięk;mlt;kde;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
632
+    echo 'Keywords[pt]=edição;vídeo;áudio;MLT;kde;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
633
+    echo 'Keywords[pt_BR]=edição;vídeo;áudio;mlt;kde;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
634
+    echo 'Keywords[sk]=editovanie;video;audio;mlt;kde;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
635
+    echo 'Keywords[sl]=urejanje;video;zvok;mlt;kde;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
636
+    echo 'Keywords[sv]=redigering;video;ljud;mlt;kde;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
637
+    echo 'Keywords[uk]=editing;video;audio;mlt;kde;редагування;відео;звук;аудіо;млт;кдє;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
638
+    echo 'Keywords[x-test]=xxeditingxx;xxvideoxx;xxaudioxx;xxmltxx;xxkdexx;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
639
+    echo 'Keywords[zh_CN]=editing;video;audio;mlt;kde;编辑;视频;音频;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
640
+    echo 'Keywords[zh_TW]=editing;video;audio;mlt;kde;' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
641
+    echo 'X-DBUS-ServiceName=org.kde.kdenlive' >> /home/$MY_USERNAME/Desktop/kdenlive.desktop
642
+
643
+    cp /root/${PROJECT_NAME}/img/icon_photos.png /usr/share/${PROJECT_NAME}/avatars/icon_photos.png
644
+    echo '#!/usr/bin/env xdg-open' > /home/$MY_USERNAME/Desktop/photos.desktop
645
+    echo '[Desktop Entry]' >> /home/$MY_USERNAME/Desktop/photos.desktop
646
+    echo 'Version=1.0' >> /home/$MY_USERNAME/Desktop/photos.desktop
647
+    echo 'Name[ar]=شُتْ‌وِل' >> /home/$MY_USERNAME/Desktop/photos.desktop
648
+    echo 'Name[as]=Photos' >> /home/$MY_USERNAME/Desktop/photos.desktop
649
+    echo 'Name[bn_IN]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
650
+    echo 'Name[bs]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
651
+    echo 'Name[ca]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
652
+    echo 'Name[cs]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
653
+    echo 'Name[da]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
654
+    echo 'Name[de]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
655
+    echo 'Name[el]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
656
+    echo 'Name[en_GB]=Photos' >> /home/$MY_USERNAME/Desktop/photos.desktop
657
+    echo 'Name[es]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
658
+    echo 'Name[et]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
659
+    echo 'Name[eu]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
660
+    echo 'Name[fi]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
661
+    echo 'Name[fr]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
662
+    echo 'Name[gd]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
663
+    echo 'Name[gl]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
664
+    echo 'Name[gu]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
665
+    echo 'Name[he]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
666
+    echo 'Name[hi]=शॉटवेल' >> /home/$MY_USERNAME/Desktop/photos.desktop
667
+    echo 'Name[hr]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
668
+    echo 'Name[hu]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
669
+    echo 'Name[id]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
670
+    echo 'Name[it]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
671
+    echo 'Name[ja]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
672
+    echo 'Name[kk]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
673
+    echo 'Name[kn]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
674
+    echo 'Name[ko]=샷웰' >> /home/$MY_USERNAME/Desktop/photos.desktop
675
+    echo 'Name[lt]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
676
+    echo 'Name[lv]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
677
+    echo 'Name[ml]=ഷോട്ട്‌‌വെല്‍' >> /home/$MY_USERNAME/Desktop/photos.desktop
678
+    echo 'Name[mr]=शॉटवेल' >> /home/$MY_USERNAME/Desktop/photos.desktop
679
+    echo 'Name[nb]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
680
+    echo 'Name[nl]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
681
+    echo 'Name[oc]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
682
+    echo 'Name[or]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
683
+    echo 'Name[pa]=ਸ਼ੂਟਵੈੱਲ' >> /home/$MY_USERNAME/Desktop/photos.desktop
684
+    echo 'Name[pl]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
685
+    echo 'Name[pt]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
686
+    echo 'Name[pt_BR]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
687
+    echo 'Name[ro]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
688
+    echo 'Name[ru]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
689
+    echo 'Name[sk]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
690
+    echo 'Name[sl]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
691
+    echo 'Name[sr]=Фото-бунар' >> /home/$MY_USERNAME/Desktop/photos.desktop
692
+    echo 'Name[sr@latin]=Foto-bunar' >> /home/$MY_USERNAME/Desktop/photos.desktop
693
+    echo 'Name[sv]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
694
+    echo 'Name[ta]=ஷாட்வெல்' >> /home/$MY_USERNAME/Desktop/photos.desktop
695
+    echo 'Name[te]=షాట్‌వెల్' >> /home/$MY_USERNAME/Desktop/photos.desktop
696
+    echo 'Name[tr]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
697
+    echo 'Name[uk]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
698
+    echo 'Name[vi]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
699
+    echo 'Name[zh_CN]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
700
+    echo 'Name[zh_HK]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
701
+    echo 'Name[zh_TW]=Shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
702
+    echo 'Name=Photos' >> /home/$MY_USERNAME/Desktop/photos.desktop
703
+    echo 'GenericName[af]=Foto Organiseerder' >> /home/$MY_USERNAME/Desktop/photos.desktop
704
+    echo 'GenericName[ar]=مدير الصور' >> /home/$MY_USERNAME/Desktop/photos.desktop
705
+    echo "GenericName[as]=ফ'টো ব্যৱস্থাপক" >> /home/$MY_USERNAME/Desktop/photos.desktop
706
+    echo 'GenericName[ast]=Xestor de semeyes' >> /home/$MY_USERNAME/Desktop/photos.desktop
707
+    echo 'GenericName[bg]=Мениджър на снимки' >> /home/$MY_USERNAME/Desktop/photos.desktop
708
+    echo 'GenericName[bn]=ফটো ম্যানেজার' >> /home/$MY_USERNAME/Desktop/photos.desktop
709
+    echo 'GenericName[bn_IN]=ছবি পরিচালন ব্যবস্থা' >> /home/$MY_USERNAME/Desktop/photos.desktop
710
+    echo 'GenericName[bs]=Organizator Slika' >> /home/$MY_USERNAME/Desktop/photos.desktop
711
+    echo 'GenericName[ca]=Gestor fotogràfic' >> /home/$MY_USERNAME/Desktop/photos.desktop
712
+    echo 'GenericName[cs]=Správce fotografií' >> /home/$MY_USERNAME/Desktop/photos.desktop
713
+    echo 'GenericName[da]=Billedhåndtering' >> /home/$MY_USERNAME/Desktop/photos.desktop
714
+    echo 'GenericName[de]=Fotoverwaltung' >> /home/$MY_USERNAME/Desktop/photos.desktop
715
+    echo 'GenericName[el]=Διαχειριστής εικόνων' >> /home/$MY_USERNAME/Desktop/photos.desktop
716
+    echo 'GenericName[en_GB]=Photo Manager' >> /home/$MY_USERNAME/Desktop/photos.desktop
717
+    echo 'GenericName[es]=Gestor de fotos' >> /home/$MY_USERNAME/Desktop/photos.desktop
718
+    echo 'GenericName[et]=Fotohaldur' >> /home/$MY_USERNAME/Desktop/photos.desktop
719
+    echo 'GenericName[eu]=Argazki-kudeatzailea' >> /home/$MY_USERNAME/Desktop/photos.desktop
720
+    echo 'GenericName[fi]=Valokuvien hallinta' >> /home/$MY_USERNAME/Desktop/photos.desktop
721
+    echo 'GenericName[fr]=Gestionnaire de photos' >> /home/$MY_USERNAME/Desktop/photos.desktop
722
+    echo 'GenericName[gd]=Manaidsear dhealbhan' >> /home/$MY_USERNAME/Desktop/photos.desktop
723
+    echo 'GenericName[gl]=Xestor de fotos' >> /home/$MY_USERNAME/Desktop/photos.desktop
724
+    echo 'GenericName[gu]=ફોટો સંચાલક' >> /home/$MY_USERNAME/Desktop/photos.desktop
725
+    echo 'GenericName[he]=מנהל תמונות' >> /home/$MY_USERNAME/Desktop/photos.desktop
726
+    echo 'GenericName[hi]=फ़ोटो प्रबंधक' >> /home/$MY_USERNAME/Desktop/photos.desktop
727
+    echo 'GenericName[hr]=Upravitelj fotografija' >> /home/$MY_USERNAME/Desktop/photos.desktop
728
+    echo 'GenericName[hu]=Fényképkezelő' >> /home/$MY_USERNAME/Desktop/photos.desktop
729
+    echo 'GenericName[ia]=Administrator de photos' >> /home/$MY_USERNAME/Desktop/photos.desktop
730
+    echo 'GenericName[id]=Manajer Foto' >> /home/$MY_USERNAME/Desktop/photos.desktop
731
+    echo 'GenericName[it]=Gestore di fotografie' >> /home/$MY_USERNAME/Desktop/photos.desktop
732
+    echo 'GenericName[ja]=Shotwell 写真管理ツール' >> /home/$MY_USERNAME/Desktop/photos.desktop
733
+    echo 'GenericName[kk]=Фотосуреттерді басқару қолданбасы' >> /home/$MY_USERNAME/Desktop/photos.desktop
734
+    echo 'GenericName[km]=កម្ម​វិធី​គ្រប់​គ្រង​រូប​ថត' >> /home/$MY_USERNAME/Desktop/photos.desktop
735
+    echo 'GenericName[kn]=ಫೋಟೊ ವ್ಯವಸ್ಥಾಪಕ' >> /home/$MY_USERNAME/Desktop/photos.desktop
736
+    echo 'GenericName[ko]=사진 관리자' >> /home/$MY_USERNAME/Desktop/photos.desktop
737
+    echo 'GenericName[ky]=Фотография менеджери' >> /home/$MY_USERNAME/Desktop/photos.desktop
738
+    echo 'GenericName[lt]=Nuotraukų tvarkytuvė' >> /home/$MY_USERNAME/Desktop/photos.desktop
739
+    echo 'GenericName[lv]=Fotogrāfiju pārvaldnieks' >> /home/$MY_USERNAME/Desktop/photos.desktop
740
+    echo 'GenericName[mk]=Менаџер на фотографии' >> /home/$MY_USERNAME/Desktop/photos.desktop
741
+    echo 'GenericName[ml]=ചിത്ര പാലകന്‍' >> /home/$MY_USERNAME/Desktop/photos.desktop
742
+    echo 'GenericName[mr]=छायाचित्र व्यवस्थापक' >> /home/$MY_USERNAME/Desktop/photos.desktop
743
+    echo 'GenericName[nb]=Fotobehandler' >> /home/$MY_USERNAME/Desktop/photos.desktop
744
+    echo 'GenericName[nl]=Fotobeheerder' >> /home/$MY_USERNAME/Desktop/photos.desktop
745
+    echo 'GenericName[oc]=Gestionari de fòtos' >> /home/$MY_USERNAME/Desktop/photos.desktop
746
+    echo 'GenericName[or]=ଫୋଟୋ ପରିଚାଳକ' >> /home/$MY_USERNAME/Desktop/photos.desktop
747
+    echo 'GenericName[pa]=ਫੋਟੋ ਮੈਨੇਜਰ' >> /home/$MY_USERNAME/Desktop/photos.desktop
748
+    echo 'GenericName[pl]=Menedżer zdjęć' >> /home/$MY_USERNAME/Desktop/photos.desktop
749
+    echo 'GenericName[pt]=Gestor de fotografias' >> /home/$MY_USERNAME/Desktop/photos.desktop
750
+    echo 'GenericName[pt_BR]=Organizador de fotos' >> /home/$MY_USERNAME/Desktop/photos.desktop
751
+    echo 'GenericName[ro]=Administrator de fotografii' >> /home/$MY_USERNAME/Desktop/photos.desktop
752
+    echo 'GenericName[ru]=Менеджер фотографий' >> /home/$MY_USERNAME/Desktop/photos.desktop
753
+    echo 'GenericName[sk]=Správca fotografií' >> /home/$MY_USERNAME/Desktop/photos.desktop
754
+    echo 'GenericName[sl]=Upravljalnik fotografij' >> /home/$MY_USERNAME/Desktop/photos.desktop
755
+    echo 'GenericName[sr]=Управник фотографија' >> /home/$MY_USERNAME/Desktop/photos.desktop
756
+    echo 'GenericName[sr@latin]=Upravnik fotografija' >> /home/$MY_USERNAME/Desktop/photos.desktop
757
+    echo 'GenericName[sv]=Bildhanterare' >> /home/$MY_USERNAME/Desktop/photos.desktop
758
+    echo 'GenericName[ta]=புகைப்பட அடுக்கு' >> /home/$MY_USERNAME/Desktop/photos.desktop
759
+    echo 'GenericName[te]=ఫోటో నిర్వాహకం' >> /home/$MY_USERNAME/Desktop/photos.desktop
760
+    echo 'GenericName[th]=ตัวจัดการภาพถ่าย' >> /home/$MY_USERNAME/Desktop/photos.desktop
761
+    echo 'GenericName[tr]=Fotoğraf Yöneticisi' >> /home/$MY_USERNAME/Desktop/photos.desktop
762
+    echo 'GenericName[uk]=Впорядник фотографій' >> /home/$MY_USERNAME/Desktop/photos.desktop
763
+    echo 'GenericName[vi]=Trình quản lý ảnh' >> /home/$MY_USERNAME/Desktop/photos.desktop
764
+    echo 'GenericName[zh_CN]=照片管理器' >> /home/$MY_USERNAME/Desktop/photos.desktop
765
+    echo 'GenericName[zh_HK]=相片管理員' >> /home/$MY_USERNAME/Desktop/photos.desktop
766
+    echo 'GenericName[zh_TW]=相片管理員' >> /home/$MY_USERNAME/Desktop/photos.desktop
767
+    echo 'GenericName=Photo Manager' >> /home/$MY_USERNAME/Desktop/photos.desktop
768
+    echo 'Comment[cs]=Roztřiďte si své fotografie' >> /home/$MY_USERNAME/Desktop/photos.desktop
769
+    echo 'Comment[da]=Organisér dine billeder' >> /home/$MY_USERNAME/Desktop/photos.desktop
770
+    echo 'Comment[de]=Ihre Fotos organisieren' >> /home/$MY_USERNAME/Desktop/photos.desktop
771
+    echo 'Comment[es]=Organice sus fotos' >> /home/$MY_USERNAME/Desktop/photos.desktop
772
+    echo 'Comment[fi]=Hallitse kuviasi' >> /home/$MY_USERNAME/Desktop/photos.desktop
773
+    echo 'Comment[gd]=Cuir rian air na dealbhan agad' >> /home/$MY_USERNAME/Desktop/photos.desktop
774
+    echo 'Comment[he]=ארגון התמונות שלך' >> /home/$MY_USERNAME/Desktop/photos.desktop
775
+    echo 'Comment[hr]=Organizirajte svoje fotografije' >> /home/$MY_USERNAME/Desktop/photos.desktop
776
+    echo 'Comment[hu]=Rendszerezze a fényképeit' >> /home/$MY_USERNAME/Desktop/photos.desktop
777
+    echo 'Comment[id]=Organisasikan foto Anda' >> /home/$MY_USERNAME/Desktop/photos.desktop
778
+    echo 'Comment[kk]=Фотосуреттеріңізді реттеңіз' >> /home/$MY_USERNAME/Desktop/photos.desktop
779
+    echo 'Comment[kn]=ನಿಮ್ಮ ಚಿತ್ರಗಳನ್ನು ವ್ಯವಸ್ಥಿತವಾಗಿ ಜೋಡಿಸಿ' >> /home/$MY_USERNAME/Desktop/photos.desktop
780
+    echo 'Comment[ko]=사진을 정리합니다.' >> /home/$MY_USERNAME/Desktop/photos.desktop
781
+    echo 'Comment[lv]=Organizē savas fotogrāfijas' >> /home/$MY_USERNAME/Desktop/photos.desktop
782
+    echo 'Comment[pl]=Organizowanie zdjęć' >> /home/$MY_USERNAME/Desktop/photos.desktop
783
+    echo 'Comment[pt]=Organize as suas fotografias' >> /home/$MY_USERNAME/Desktop/photos.desktop
784
+    echo 'Comment[pt_BR]=Organize suas fotos' >> /home/$MY_USERNAME/Desktop/photos.desktop
785
+    echo 'Comment[sk]=Organizuje vaše fotografie' >> /home/$MY_USERNAME/Desktop/photos.desktop
786
+    echo 'Comment[sr]=Организујте ваше фотографије' >> /home/$MY_USERNAME/Desktop/photos.desktop
787
+    echo 'Comment[sr@latin]=Organizujte vaše fotografije' >> /home/$MY_USERNAME/Desktop/photos.desktop
788
+    echo 'Comment[sv]=Organisera dina bilder' >> /home/$MY_USERNAME/Desktop/photos.desktop
789
+    echo 'Comment[uk]=Впорядкуйте ваші фотографії' >> /home/$MY_USERNAME/Desktop/photos.desktop
790
+    echo 'Comment=Organize your photos' >> /home/$MY_USERNAME/Desktop/photos.desktop
791
+    echo "Icon=/usr/share/${PROJECT_NAME}/avatars/icon_photos.png" >> /home/$MY_USERNAME/Desktop/photos.desktop
792
+    echo 'Exec=shotwell %U' >> /home/$MY_USERNAME/Desktop/photos.desktop
793
+    echo 'Terminal=false' >> /home/$MY_USERNAME/Desktop/photos.desktop
794
+    echo 'Type=Application' >> /home/$MY_USERNAME/Desktop/photos.desktop
795
+    echo 'MimeType=x-content/image-dcf;' >> /home/$MY_USERNAME/Desktop/photos.desktop
796
+    echo 'Categories=Graphics;Photography;GNOME;GTK;' >> /home/$MY_USERNAME/Desktop/photos.desktop
797
+    echo 'X-GIO-NoFuse=true' >> /home/$MY_USERNAME/Desktop/photos.desktop
798
+    echo 'X-GNOME-Gettext-Domain=shotwell' >> /home/$MY_USERNAME/Desktop/photos.desktop
799
+    echo 'X-GNOME-FullName=Shotwell Photo Manager' >> /home/$MY_USERNAME/Desktop/photos.desktop
800
+
428 801
     #echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/audio.desktop
429 802
     #echo 'Name=Audio/Music' >> /home/$MY_USERNAME/Desktop/audio.desktop
430 803
     #echo 'Type=Application' >> /home/$MY_USERNAME/Desktop/audio.desktop
@@ -680,7 +1053,11 @@ function setup_ipfs {
680 1053
     TOX_ID='none'
681 1054
     if [ -d /home/$MY_USERNAME/Desktop ]; then
682 1055
         if [ ! -d /home/$MY_USERNAME/Public ]; then
683
-            mkdir /home/$MY_USERNAME/Public
1056
+            mkdir -p /home/$MY_USERNAME/Public/Videos
1057
+            mkdir -p /home/$MY_USERNAME/Public/Music
1058
+            mkdir -p /home/$MY_USERNAME/Public/Podcasts
1059
+            mkdir -p /home/$MY_USERNAME/Public/Documents
1060
+            mkdir -p /home/$MY_USERNAME/Public/Pictures
684 1061
             echo $'Files within this directory will be publicly visible on the network' > /home/$MY_USERNAME/Public/README.txt
685 1062
             chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Public
686 1063
             ln -s /home/$MY_USERNAME/Public /home/$MY_USERNAME/Desktop/Public
@@ -915,10 +1292,11 @@ function initialise_scuttlebot_pub {
915 1292
     systemctl daemon-reload
916 1293
     systemctl start scuttlebot.service
917 1294
 
918
-    sleep 3
1295
+    sleep 10
919 1296
 
920 1297
     if [ ! -d /etc/scuttlebot/.ssb ]; then
921 1298
         echo $'Scuttlebot config not generated' >> /var/log/${PROJECT_NAME}.log
1299
+        systemctl status scuttlebot -l >> /var/log/${PROJECT_NAME}.log
922 1300
         exit 73528
923 1301
     fi
924 1302
 
@@ -943,6 +1321,7 @@ function initialise_scuttlebot_pub {
943 1321
     echo '}' >> /etc/scuttlebot/.ssb/config
944 1322
     chown scuttlebot:scuttlebot /etc/scuttlebot/.ssb/config
945 1323
     systemctl restart scuttlebot.service
1324
+    echo "scuttlebot pub started" >> /var/log/${PROJECT_NAME}.log
946 1325
 }
947 1326
 
948 1327
 # whether to reset the identity
@@ -1038,6 +1417,7 @@ if [ -f $MESH_INSTALL_SETUP ]; then
1038 1417
     initialise_scuttlebot_pub
1039 1418
     setup_ipfs
1040 1419
     enable_cryptpad
1420
+    enable_peertube
1041 1421
     mesh_amnesic
1042 1422
     make_root_read_only
1043 1423
 

+ 20
- 16
src/freedombone-mesh-batman 查看文件

@@ -71,6 +71,8 @@ TOX_PORT=33445
71 71
 TRACKER_PORT=6969
72 72
 LIBREVAULT_PORT=42345
73 73
 TAHOELAFS_PORT=50213
74
+GIT_SSB_PORT=7718
75
+NGINX_GIT_SSB_PORT=7719
74 76
 
75 77
 # Ethernet bridge definition (bridged to bat0)
76 78
 BRIDGE=br-mesh
@@ -178,6 +180,7 @@ function stop {
178 180
     iptables -D INPUT -p udp --dport $LIBREVAULT_PORT -j ACCEPT
179 181
     iptables -D INPUT -p tcp --dport $TAHOELAFS_PORT -j ACCEPT
180 182
     # SSB/Scuttlebot/Patchwork
183
+    iptables -D INPUT -p tcp --dport $GIT_SSB_PORT -j ACCEPT
181 184
     iptables -D INPUT -p udp --dport 8008 -j ACCEPT
182 185
     iptables -D INPUT -p tcp --dport 8008 -j ACCEPT
183 186
     iptables -D INPUT -p udp --dport 8010 -j ACCEPT
@@ -450,26 +453,27 @@ function start {
450 453
     iptables -A INPUT -p udp --dport $LIBREVAULT_PORT -j ACCEPT
451 454
     iptables -A INPUT -p tcp --dport $TAHOELAFS_PORT -j ACCEPT
452 455
     # SSB/Scuttlebot/Patchwork
456
+    iptables -A INPUT -p tcp --dport $GIT_SSB_PORT -j ACCEPT
453 457
     iptables -A INPUT -p udp --dport 8008 -j ACCEPT
454 458
     iptables -A INPUT -p tcp --dport 8008 -j ACCEPT
455 459
     iptables -A INPUT -p udp --dport 8010 -j ACCEPT
456 460
     iptables -A INPUT -p tcp --dport 8010 -j ACCEPT
457
-    if [[ "$ethernet_connected" != "0" ]]; then
458
-        # vpn over the internet
459
-        iptables -A INPUT -p tcp --dport 653 -j ACCEPT
460
-        iptables -A INPUT -p udp --dport 653 -j ACCEPT
461
-        iptables -A INPUT -i ${EIFACE} -m state --state NEW -p tcp --dport 1194 -j ACCEPT
462
-        iptables -A INPUT -i tun+ -j ACCEPT
463
-        iptables -A FORWARD -i tun+ -j ACCEPT
464
-        iptables -A FORWARD -i tun+ -o ${EIFACE} -m state --state RELATED,ESTABLISHED -j ACCEPT
465
-        iptables -A FORWARD -i ${EIFACE} -o tun+ -m state --state RELATED,ESTABLISHED -j ACCEPT
466
-        iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o ${EIFACE} -j MASQUERADE
467
-        iptables -A OUTPUT -o tun+ -j ACCEPT
468
-        echo 1 > /proc/sys/net/ipv4/ip_forward
469
-        sed -i 's|# net.ipv4.ip_forward|net.ipv4.ip_forward|g' /etc/sysctl.conf
470
-        sed -i 's|#net.ipv4.ip_forward|net.ipv4.ip_forward|g' /etc/sysctl.conf
471
-        sed -i 's|net.ipv4.ip_forward.*|net.ipv4.ip_forward=1|g' /etc/sysctl.conf
472
-    fi
461
+    # vpn over the internet
462
+    # Note: the vpn firewall settings are needed in order for Patchwork
463
+    # to discover local peers
464
+    iptables -A INPUT -p tcp --dport 653 -j ACCEPT
465
+    iptables -A INPUT -p udp --dport 653 -j ACCEPT
466
+    iptables -A INPUT -i ${EIFACE} -m state --state NEW -p tcp --dport 1194 -j ACCEPT
467
+    iptables -A INPUT -i tun+ -j ACCEPT
468
+    iptables -A FORWARD -i tun+ -j ACCEPT
469
+    iptables -A FORWARD -i tun+ -o ${EIFACE} -m state --state RELATED,ESTABLISHED -j ACCEPT
470
+    iptables -A FORWARD -i ${EIFACE} -o tun+ -m state --state RELATED,ESTABLISHED -j ACCEPT
471
+    iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o ${EIFACE} -j MASQUERADE
472
+    iptables -A OUTPUT -o tun+ -j ACCEPT
473
+    echo 1 > /proc/sys/net/ipv4/ip_forward
474
+    sed -i 's|# net.ipv4.ip_forward|net.ipv4.ip_forward|g' /etc/sysctl.conf
475
+    sed -i 's|#net.ipv4.ip_forward|net.ipv4.ip_forward|g' /etc/sysctl.conf
476
+    sed -i 's|net.ipv4.ip_forward.*|net.ipv4.ip_forward=1|g' /etc/sysctl.conf
473 477
 
474 478
     systemctl restart avahi-daemon
475 479
 

+ 39
- 56
src/freedombone-mesh-blog 查看文件

@@ -41,6 +41,13 @@ CURRENT_BLOG_INDEX=/home/$USER/.blog-index
41 41
 BLOG_EDITOR='pluma'
42 42
 DEFAULT_BLOG_TITLE=$"Freedombone Blog"
43 43
 
44
+function remove_bad_blog_links {
45
+    current_theme=$1
46
+    if [ -f $BLOG_PATH/themes/$current_theme/static/css/style.css ]; then
47
+        sed -i '/googleapi/d' $BLOG_PATH/themes/$current_theme/static/css/style.css
48
+    fi
49
+}
50
+
44 51
 function ipfs_publish {
45 52
     DIR_TO_CHECK=/home/$USER/Public
46 53
     if [ ! -d $DIR_TO_CHECK ]; then
@@ -146,22 +153,16 @@ function delete_blog {
146 153
         return
147 154
     fi
148 155
 
149
-    dialog --title $"Delete the previous blog entry" \
150
-           --backtitle $"Freedombone Mesh" \
151
-           --defaultno \
152
-           --yesno $"\nAre you sure that you wish to delete the previous blog entry?" 8 60
153
-    sel=$?
154
-    case $sel in
155
-        0) rm $LAST_BLOG_ENTRY
156
-           if [ $CURRENT_INDEX -gt 0 ]; then
157
-               CURRENT_INDEX=$PREVIOUS_INDEX
158
-               echo "$CURRENT_INDEX" > $CURRENT_BLOG_INDEX
159
-           else
160
-               rm -f $CURRENT_BLOG_INDEX
161
-           fi
162
-           regenerate_blog
163
-           ;;
164
-    esac
156
+    if ! zenity --question --title=$'Delete the previous blog entry' --text=$"\nAre you sure that you wish to delete the previous blog entry?" --ok-label=No --cancel-label=Yes --width=300; then
157
+        rm $LAST_BLOG_ENTRY
158
+        if [ $CURRENT_INDEX -gt 0 ]; then
159
+            CURRENT_INDEX=$PREVIOUS_INDEX
160
+            echo "$CURRENT_INDEX" > $CURRENT_BLOG_INDEX
161
+        else
162
+            rm -f $CURRENT_BLOG_INDEX
163
+        fi
164
+        regenerate_blog
165
+    fi
165 166
 }
166 167
 
167 168
 function change_theme {
@@ -171,48 +172,41 @@ function change_theme {
171 172
         THEMES+=("$THEME_NAME")
172 173
     done
173 174
 
174
-    themelist=""
175 175
     n=1
176
-    theme_index=0
177 176
     curr_theme_index=
178 177
     if [ -f /home/$USER/.blog-theme-index ]; then
179 178
         curr_theme_index=$(cat /home/$USER/.blog-theme-index)
180 179
     fi
180
+    if [ -f /tmp/.blog-themes ]; then
181
+        rm /tmp/.blog-themes
182
+    fi
181 183
     for a in "${THEMES[@]}"
182 184
     do
183
-        is_selected='off'
184
-        if [ $curr_theme_index ]; then
185
-            if [ $n -eq $curr_theme_index ]; then
186
-                is_selected='on'
187
-            fi
188
-        else
189
-            if [[ "$a" == 'nice-blog' ]]; then
190
-                is_selected='on'
191
-            fi
192
-        fi
193
-
194
-        themelist="$themelist $n $a $is_selected"
185
+        echo "$n $a" >> /tmp/.blog-themes
195 186
         n=$[n+1]
196
-        theme_index=$[theme_index+1]
197 187
     done
198 188
 
199
-    data=$(tempfile 2>/dev/null)
200
-    trap "rm -f $data" 0 1 2 5 15
201
-    dialog --backtitle $"Freedombone Mesh" \
202
-           --title $"Select Blog Theme" \
203
-           --radiolist $'Choose:' \
204
-           80 40 20 $themelist 2> $data
189
+    CHOSEN_THEME_INDEX=$(
190
+    cat /tmp/.blog-themes | \
191
+        awk -F ' ' '{
192
+        for(i=1;i<=NF;i++){
193
+            print $i;
194
+        }
195
+}' | \
196
+        zenity --list \
197
+           --title=$'Select Blog Theme' \
198
+           --column=$'Index' --column=$'Theme' \
199
+           --print-column=1 --hide-column=1 --width=300 --height=400)
200
+    rm /tmp/.blog-themes
201
+    if [ ! $CHOSEN_THEME_INDEX ]; then
202
+        exit 1
203
+    fi
205 204
 
206
-    sel=$?
207
-    case $sel in
208
-        1) exit 1;;
209
-        255) exit 1;;
210
-    esac
211
-    CHOSEN_THEME_INDEX=$(cat $data)
212 205
     echo "$CHOSEN_THEME_INDEX" > /home/$USER/.blog-theme-index
213 206
     CHOSEN_THEME_INDEX=$((CHOSEN_THEME_INDEX - 1))
214 207
 
215 208
     CHOSEN_THEME=${THEMES[$CHOSEN_THEME_INDEX]}
209
+    remove_bad_blog_links $CHOSEN_THEME
216 210
     if grep -q "THEME=" $BLOG_PATH/pelicanconf.py; then
217 211
         sed -i "s|THEME=.*|THEME='themes/${CHOSEN_THEME}'|g" $BLOG_PATH/pelicanconf.py
218 212
     else
@@ -222,29 +216,18 @@ function change_theme {
222 216
 }
223 217
 
224 218
 function menu_blog {
225
-    data=$(tempfile 2>/dev/null)
226
-    trap "rm -f $data" 0 1 2 5 15
227
-    dialog --backtitle $"Freedombone Mesh" \
228
-           --title $"Blogging" \
229
-           --radiolist $"Choose an operation:" 19 50 12 \
230
-           1 $"View a blog" on \
231
-           2 $"New blog entry" off \
232
-           3 $"Edit the previous blog entry" off \
233
-           4 $"Delete the previous blog entry" off \
234
-           5 $"Change theme" off \
235
-           6 $"Exit" off 2> $data
219
+    data=$(zenity --list 1 $"View a blog" 2 $"New blog entry" 3 $"Edit the previous blog entry" 4 $"Delete the previous blog entry" 5 $"Change theme" --column="id" --title $"Blogging" --column=$"Choose an operation:" --hide-column=1 --print-column=1 --height=250)
236 220
     sel=$?
237 221
     case $sel in
238 222
         1) exit 1;;
239 223
         255) exit 1;;
240 224
     esac
241
-    case $(cat $data) in
225
+    case $data in
242 226
         1) view_blog;;
243 227
         2) new_blog;;
244 228
         3) edit_blog;;
245 229
         4) delete_blog;;
246 230
         5) change_theme;;
247
-        6) break;;
248 231
     esac
249 232
 }
250 233
 

+ 8
- 25
src/freedombone-mesh-connect 查看文件

@@ -152,8 +152,7 @@ function mesh_setup_vpn {
152 152
     chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/vpn.tar.gz
153 153
 
154 154
     if [ -f vpn.tar.gz ]; then
155
-        dialog --title $"Generate VPN client keys" \
156
-               --msgbox $"\nNew VPN client keys have been generated in the /home/fbone directory.\n\nYou can find it by selecting \"Places\" then \"Home Directory\" on the top menu bar. Transmit the vpn.tar.gz file to whoever is running the other mesh network so that they can connect to yours.\n\nThey should uncompress vpn.tar.gz to their /home/fbone directory, forward port $VPN_MESH_TLS_PORT then connect using your IP address or domain name." 15 70
155
+        zenity --info --title $"Generate VPN client keys" --text $"\nNew VPN client keys have been generated in the /home/fbone directory.\n\nYou can find it by selecting \"Places\" then \"Home Directory\" on the top menu bar. Transmit the vpn.tar.gz file to whoever is running the other mesh network so that they can connect to yours.\n\nThey should uncompress vpn.tar.gz to their /home/fbone directory, forward port $VPN_MESH_TLS_PORT then connect using your IP address or domain name." --width 600
157 156
     fi
158 157
 }
159 158
 
@@ -164,15 +163,11 @@ function connect_to_mesh {
164 163
         connect_title=$"Connect from $(cat $HIDDEN_SERVICE_PATH) to another mesh network"
165 164
     fi
166 165
 
167
-    data=$(tempfile 2>/dev/null)
168
-    trap "rm -f $data" 0 1 2 5 15
169
-    dialog --title "$connect_title" \
170
-           --backtitle $"Freedombone Mesh" \
171
-           --inputbox $'Enter the IP address or domain name of the other mesh.' 10 60 2>$data
166
+    data=$(zenity --entry --title "$connect_title" --text $'Enter the IP address or domain name of the other mesh')
172 167
     sel=$?
173 168
     case $sel in
174 169
         0)
175
-            ip_or_domain=$(<$data)
170
+            ip_or_domain="$data"
176 171
             if [ ${#ip_or_domain} -gt 1 ]; then
177 172
                 if [[ "$ip_or_domain" == *'.'* ]]; then
178 173
 
@@ -188,9 +183,7 @@ function connect_to_mesh {
188 183
                     fi
189 184
 
190 185
                     if [ $connect_failed ]; then
191
-                        dialog --title $"Connect to another mesh network" \
192
-                               --msgbox $"\nObtain the vpn.tar.gz file from the other mesh administrator, uncompress it into the /home/fbone directory and also forwarded port $VPN_MESH_TLS_PORT from your internet router to this system." 10 50
193
-                        rm $data
186
+                        zenity --info --title $"Connect to another mesh network" --text $"\nObtain the vpn.tar.gz file from the other mesh administrator, uncompress it into the /home/fbone directory and also forwarded port $VPN_MESH_TLS_PORT from your internet router to this system." --width 400
194 187
                         exit 1
195 188
                     fi
196 189
 
@@ -204,27 +197,17 @@ function connect_to_mesh {
204 197
             fi
205 198
             ;;
206 199
     esac
207
-
208
-    rm $data
209 200
 }
210 201
 
211
-data=$(tempfile 2>/dev/null)
212
-trap "rm -f $data" 0 1 2 5 15
213
-dialog --backtitle $"Freedombone Mesh" \
214
-       --title $"Connect to another mesh network" \
215
-       --radiolist $"Choose an operation:" 10 75 2 \
216
-       1 $"Connect to another mesh network" on \
217
-       2 $"Generate VPN keys for another mesh network to connect to me" off 2> $data
202
+data=$(zenity --list 1 $"Connect to another mesh network" 2 $"Generate VPN keys for another mesh network to connect to me" --column="id" --title $"Connect to another mesh network" --column=$"Choose an operation:" --hide-column=1 --print-column=1 --width=500 --height=100)
218 203
 sel=$?
219 204
 case $sel in
220 205
     1) exit 1;;
221 206
     255) exit 1;;
222 207
 esac
223
-case $(cat $data) in
224
-    1) rm $data
225
-       connect_to_mesh;;
226
-    2) rm $data
227
-       mesh_setup_vpn;;
208
+case $data in
209
+    1) connect_to_mesh;;
210
+    2) mesh_setup_vpn;;
228 211
 esac
229 212
 
230 213
 exit 0

+ 1
- 1
src/freedombone-mesh-reset 查看文件

@@ -33,7 +33,7 @@ export TEXTDOMAINDIR="/usr/share/locale"
33 33
 
34 34
 MESH_INSTALL_COMPLETED=/root/.mesh_setup_completed
35 35
 
36
-if ! zenity --question --title='New Identity' --text="Do you want to reset your identity? This will reset ALL data for this peer, and you will not be able to recover it." --ok-label=No --cancel-label=Yes --width=300; then
36
+if ! zenity --question --title=$'New Identity' --text=$"Do you want to reset your identity? This will reset ALL data for this peer, and you will not be able to recover it." --ok-label=No --cancel-label=Yes --width=300; then
37 37
     sudo batman stop
38 38
     sudo pkill qtox
39 39
     sudo pkill firefox

+ 54
- 35
src/freedombone-mesh-visit-site 查看文件

@@ -34,8 +34,8 @@ export TEXTDOMAINDIR="/usr/share/locale"
34 34
 IPFS_URL='http://127.0.0.1:8080/ipns'
35 35
 
36 36
 # The browser application to use
37
-BROWSER=midori
38
-BROWSER_OPTIONS='-p'
37
+BROWSER=firefox
38
+BROWSER_OPTIONS='-url'
39 39
 
40 40
 # An optional suffix to be appended to the URL
41 41
 SUFFIX=$1
@@ -49,42 +49,61 @@ if [ ! -f $USERS_FILE ]; then
49 49
     exit 0
50 50
 fi
51 51
 
52
-data=$(tempfile 2>/dev/null)
53
-trap "rm -f $data" 0 1 2 5 15
54
-dialog --title $"Visit IPFS site" \
55
-    --backtitle $"Freedombone mesh" \
56
-    --inputbox $"Enter the username or Tox ID for the site you wish to visit" 8 70 2>$data
57
-sel=$?
58
-case $sel in
52
+USERS_FILE_LINES=$(wc -l $USERS_FILE | awk -F ' ' '{print $1}')
53
+
54
+if [ $USERS_FILE_LINES -gt 200 ]; then
55
+    # If there are more than a Dunbar number of peers then ask for the peer name or ID
56
+    data=$(zenity --entry --title="Visit IPFS site" --text="Enter the username or Tox ID for the site you wish to visit")
57
+    sel=$?
58
+    case $sel in
59 59
     0)
60
-        TOX_USERNAME_OR_ID=$(<$data)
61
-        if [ ${#TOX_USERNAME_OR_ID} -gt 0 ]; then
62
-            if ! grep -q "$TOX_USERNAME_OR_ID" $USERS_FILE; then
63
-                TOX_ID="$TOX_USERNAME_OR_ID"
64
-            else
65
-                TOX_ID=$(cat "$USERS_FILE" | grep "$TOX_USERNAME_OR_ID" | head -n 1 | sed "s|$TOX_USERNAME_OR_ID ||g" | sed -e 's/^[[:space:]]*//')
66
-            fi
60
+            TOX_USERNAME_OR_ID="$data"
61
+            if [ ${#TOX_USERNAME_OR_ID} -gt 0 ]; then
62
+        if ! grep -q "$TOX_USERNAME_OR_ID" $USERS_FILE; then
63
+                    TOX_ID="$TOX_USERNAME_OR_ID"
64
+        else
65
+                    TOX_ID=$(cat "$USERS_FILE" | grep "$TOX_USERNAME_OR_ID" | head -n 1 | sed "s|$TOX_USERNAME_OR_ID ||g" | sed -e 's/^[[:space:]]*//')
66
+        fi
67 67
 
68
-            if [ ${#TOX_ID} -gt 5 ]; then
69
-                if ! grep -q "$TOX_ID" $IPFS_USERS_FILE; then
70
-                    dialog --title $"Visit IPFS site" \
71
-                           --backtitle $"Freedombone mesh" \
72
-                           --msgbox $"An IPFS site was not found for the user '$TOX_USERNAME_OR_ID'" 8 60
73
-                    exit 3
74
-                fi
75
-                IPFS_FULL_URL=${IPFS_URL}/$(cat "$IPFS_USERS_FILE" | grep $TOX_ID | head -n 1 | awk -F ':' '{print $2}')
76
-                clear
77
-                echo $'Opening browser. Please wait...'
78
-                pkill $BROWSER
79
-                setsid sh -c "$BROWSER $BROWSER_OPTIONS $IPFS_FULL_URL$SUFFIX" > /dev/null 2>&1 < /dev/null &
68
+        if [ ${#TOX_ID} -gt 5 ]; then
69
+                    if ! grep -q "$TOX_ID" $IPFS_USERS_FILE; then
70
+            zenity --info --title $"Visit a site" --text $"An IPFS site was not found for the user '$TOX_USERNAME_OR_ID'" --width 500
71
+            exit 3
72
+                    fi
73
+                    IPFS_FULL_URL=${IPFS_URL}/$(cat "$IPFS_USERS_FILE" | grep $TOX_ID | head -n 1 | awk -F ':' '{print $2}')
74
+                    pkill $BROWSER
75
+                    setsid sh -c "$BROWSER $BROWSER_OPTIONS $IPFS_FULL_URL$SUFFIX" > /dev/null 2>&1 < /dev/null &
80 76
 
81
-                # Need to wait a while for the browser to begin opening
82
-                sleep 3
83
-            fi
84
-        else
85
-            exit 1
77
+                    # Need to wait a while for the browser to begin opening
78
+                    sleep 3
86 79
         fi
87
-    ;;
88
-esac
80
+            else
81
+        exit 1
82
+            fi
83
+        ;;
84
+    esac
85
+else
86
+    # If there are a relatively small number of users then choose from a list
87
+    TOX_ID=$(
88
+    cat $USERS_FILE | \
89
+        awk -F ' ' '{
90
+        for(i=1;i<=NF;i++){
91
+            print $i;
92
+        }
93
+}' | \
94
+        zenity --list \
95
+           --title='Visit the site of another user' \
96
+           --column='Username' --column='Tox ID' \
97
+           --print-column=2 --hide-column=2 --width=300 --height=400)
98
+    if [ ! $TOX_ID ]; then
99
+        exit 0
100
+    fi
101
+    IPFS_FULL_URL=${IPFS_URL}/$(cat "$IPFS_USERS_FILE" | grep $TOX_ID | head -n 1 | awk -F ':' '{print $2}')
102
+    pkill $BROWSER
103
+    setsid sh -c "$BROWSER $BROWSER_OPTIONS $IPFS_FULL_URL$SUFFIX" > /dev/null 2>&1 < /dev/null &
104
+
105
+    # Need to wait a while for the browser to begin opening
106
+    sleep 3
107
+fi
89 108
 
90 109
 exit 0

+ 29
- 0
src/freedombone-utils-nodejs 查看文件

@@ -127,6 +127,35 @@ function mesh_install_nodejs {
127 127
     $mesh_install_nodejs_prefix npm install --arch=$NPM_ARCH -g n@${NODEJS_N_VERSION} --save
128 128
     $mesh_install_nodejs_prefix n --arch $N_ARCH ${NODEJS_VERSION}
129 129
     cp $rootdir/root/npm $rootdir/usr/bin/npm
130
+
131
+    # deliberate second install of npm
132
+    $mesh_install_nodejs_prefix npm install --arch=$NPM_ARCH -g npm@${NPM_VERSION} --save
133
+    if [ -f $rootdir/usr/local/bin/npm ]; then
134
+        cp $rootdir/usr/local/bin/npm /usr/bin/npm
135
+    fi
136
+    cp $rootdir/usr/bin/npm $rootdir/root/npm
137
+
138
+    # check the version numbers
139
+    cat <<EOF > $rootdir/usr/bin/test_nodejs_install
140
+#!/bin/bash
141
+node_version=\$(node -v)
142
+if [[ "\$node_version" != "v${NODEJS_VERSION}" ]]; then
143
+    echo $"nodejs version expected to be ${NODEJS_VERSION} but found \$node_version"
144
+    exit 1
145
+fi
146
+npm_version=\$(npm -v)
147
+if [[ "\$npm_version" != "${NPM_VERSION}" ]]; then
148
+    echo $"npm version expected to be ${NPM_VERSION} but found \$npm_version"
149
+    exit 2
150
+fi
151
+EOF
152
+    chmod +x $rootdir/usr/bin/test_nodejs_install
153
+    chroot "$rootdir" /usr/bin/test_nodejs_install
154
+    if [ ! "$?" = "0" ]; then
155
+        echo $"nodejs version numbers did not match. Architecture is $NPM_ARCH."
156
+        exit 76835282
157
+    fi
158
+    rm $rootdir/usr/bin/test_nodejs_install
130 159
 }
131 160
 
132 161
 function remove_nodejs {

+ 23
- 3
src/freedombone-utils-postgresql 查看文件

@@ -30,6 +30,7 @@
30 30
 
31 31
 # Set this when calling backup and restore commands
32 32
 USE_POSTGRESQL=
33
+POSTGRESQL_PACKAGES='postgresql-9.6 postgresql-contrib-9.6 postgresql-client'
33 34
 
34 35
 function store_original_postgresql_password {
35 36
     if [ ! -f /root/.postgresqloriginal ]; then
@@ -48,7 +49,26 @@ function get_postgresql_password {
48 49
     fi
49 50
 }
50 51
 
52
+function mesh_install_postgresql {
53
+    chroot "$rootdir" apt-get -yq install $POSTGRESQL_PACKAGES
54
+
55
+    if [ ! -d $rootdir/etc/postgresql ]; then
56
+        echo $"ERROR: postgresql does not appear to have installed."
57
+        exit 78352
58
+    fi
59
+
60
+    if [ ! -f $rootdir/usr/bin/psql ]; then
61
+        echo $"ERROR: psql command does not appear to have installed."
62
+        exit 835290
63
+    fi
64
+}
65
+
51 66
 function install_postgresql {
67
+    if [[ $VARIANT == "mesh"* ]]; then
68
+        mesh_install_postgresql
69
+        return
70
+    fi
71
+
52 72
     if [[ $(is_completed $FUNCNAME) == "1" ]]; then
53 73
         return
54 74
     fi
@@ -64,7 +84,7 @@ function install_postgresql {
64 84
     fi
65 85
     ${PROJECT_NAME}-pass -u root -a postgresql -p "$POSTGRESQL_PASSWORD"
66 86
 
67
-    apt-get -yq install postgresql-9.6 postgresql-contrib-9.6 postgresql-client
87
+    apt-get -yq install $POSTGRESQL_PACKAGES
68 88
     apt-get -yq remove --purge apache2-bin*
69 89
     if [ -d /etc/apache2 ]; then
70 90
         rm -rf /etc/apache2
@@ -72,12 +92,12 @@ function install_postgresql {
72 92
     fi
73 93
 
74 94
     if [ ! -d /etc/postgresql ]; then
75
-        echo $"ERROR: postgresql does not appear to have installed. $CHECK_MESSAGE"
95
+        echo $"ERROR: postgresql does not appear to have installed."
76 96
         exit 78352
77 97
     fi
78 98
 
79 99
     if [ ! -f /usr/bin/psql ]; then
80
-        echo $"ERROR: psql command does not appear to have installed. $CHECK_MESSAGE"
100
+        echo $"ERROR: psql command does not appear to have installed."
81 101
         exit 835290
82 102
     fi
83 103
 

+ 19
- 0
src/meshavahi 查看文件

@@ -68,6 +68,25 @@ function ipfs_publish {
68 68
 
69 69
     NEW_STAT=$(stat -t $DIR_TO_CHECK)
70 70
 
71
+    # include some subdirectories
72
+    for dir in $DIR_TO_CHECK/*/
73
+    do
74
+        REALLY_NEW_STAT="$NEW_STAT$(stat -t $dir)"
75
+        NEW_STAT="$REALLY_NEW_STAT"
76
+
77
+        for dir2 in "$dir"/*/
78
+        do
79
+            REALLY_NEW_STAT="$NEW_STAT$(stat -t $dir2)"
80
+            NEW_STAT="$REALLY_NEW_STAT"
81
+
82
+            for dir3 in "$dir2"/*/
83
+            do
84
+                REALLY_NEW_STAT="$NEW_STAT$(stat -t $dir3)"
85
+                NEW_STAT="$REALLY_NEW_STAT"
86
+            done
87
+        done
88
+    done
89
+
71 90
     if [ "$OLD_STAT" != "$NEW_STAT" ]; then
72 91
         su -c "echo \$($IPFS_COMMAND add -rq /home/$MY_USERNAME/Public | tail -n 1) > $IPFS_PUBLIC" - $MY_USERNAME
73 92
         echo "$NEW_STAT" > $OLD_STAT_FILE

+ 14
- 13
website/EN/app_mediagoblin.html 查看文件

@@ -3,10 +3,10 @@
3 3
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4 4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5 5
 <head>
6
-<!-- 2016-12-26 Mon 11:03 -->
6
+<!-- 2017-12-03 Sun 12:49 -->
7 7
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8 8
 <meta name="viewport" content="width=device-width, initial-scale=1" />
9
-<title></title>
9
+<title>&lrm;</title>
10 10
 <meta name="generator" content="Org mode" />
11 11
 <meta name="author" content="Bob Mottram" />
12 12
 <meta name="description" content="How to use Mediagoblin"
@@ -71,6 +71,7 @@
71 71
   pre.src-fortran:before { content: 'Fortran'; }
72 72
   pre.src-gnuplot:before { content: 'gnuplot'; }
73 73
   pre.src-haskell:before { content: 'Haskell'; }
74
+  pre.src-hledger:before { content: 'hledger'; }
74 75
   pre.src-java:before { content: 'Java'; }
75 76
   pre.src-js:before { content: 'Javascript'; }
76 77
   pre.src-latex:before { content: 'LaTeX'; }
@@ -188,7 +189,7 @@
188 189
 @licstart  The following is the entire license notice for the
189 190
 JavaScript code in this tag.
190 191
 
191
-Copyright (C) 2012-2013 Free Software Foundation, Inc.
192
+Copyright (C) 2012-2017 Free Software Foundation, Inc.
192 193
 
193 194
 The JavaScript code in this tag is free software: you can
194 195
 redistribute it and/or modify it under the terms of the GNU
@@ -248,7 +249,7 @@ for the JavaScript code in this tag.
248 249
 </center>
249 250
 
250 251
 <p>
251
-With Mediagoblin you can host video and audio content in a similar manner to the proprietary systems such as YouTube and SoundCloud. This system supports free media formats such as <i>webm</i>, <i>ogv</i> and <i>ogg</i>.
252
+With Mediagoblin you can host video and audio content in a similar manner to the proprietary systems such as YouTube and SoundCloud. This system supports free media formats such as <i>webm</i>, <i>ogv</i> and <i>ogg</i>. Another similar system which might be better fitted for small servers is <a href="./app_peertube.html">PeerTube</a>, since it uses webtorrent to distribute video files. Webtorrent will only work with WebRTC enabled browsers though.
252 253
 </p>
253 254
 
254 255
 <p>
@@ -263,9 +264,9 @@ When hosting media files you should take into consideration that since anyone on
263 264
 </div>
264 265
 </div>
265 266
 
266
-<div id="outline-container-orgc887b0f" class="outline-2">
267
-<h2 id="orgc887b0f">Installation</h2>
268
-<div class="outline-text-2" id="text-orgc887b0f">
267
+<div id="outline-container-org9311cd2" class="outline-2">
268
+<h2 id="org9311cd2">Installation</h2>
269
+<div class="outline-text-2" id="text-org9311cd2">
269 270
 <p>
270 271
 Log into your system with:
271 272
 </p>
@@ -290,9 +291,9 @@ After the install has completed go to <b>Security settings</b> and select <b>Cre
290 291
 </div>
291 292
 
292 293
 
293
-<div id="outline-container-orga0efefa" class="outline-2">
294
-<h2 id="orga0efefa">Initial setup</h2>
295
-<div class="outline-text-2" id="text-orga0efefa">
294
+<div id="outline-container-orgefeb8cc" class="outline-2">
295
+<h2 id="orgefeb8cc">Initial setup</h2>
296
+<div class="outline-text-2" id="text-orgefeb8cc">
296 297
 <p>
297 298
 If you have just obtained a Lets Encrypt certificate as above then go to <b>About</b> on the administrator control panel and you should see your Mediagoblin domain listed there along with an onion address. You can then navigate to your site in a browser.
298 299
 </p>
@@ -308,9 +309,9 @@ You should repeat that for however many accounts you want on the system and then
308 309
 </div>
309 310
 
310 311
 
311
-<div id="outline-container-org1e39c39" class="outline-2">
312
-<h2 id="org1e39c39">File formats</h2>
313
-<div class="outline-text-2" id="text-org1e39c39">
312
+<div id="outline-container-org801bff8" class="outline-2">
313
+<h2 id="org801bff8">File formats</h2>
314
+<div class="outline-text-2" id="text-org801bff8">
314 315
 <p>
315 316
 It's a good idea to upload videos in <i>webm</i> format. In that case Mediagoblin will skip the transcoding step (which can take hours for videos of non-trivial length) and the whole process will be quicker. Transcoding just converts whatever file format you submit into a standard resolution and file type. On your local system you can convert a video to webm with:
316 317
 </p>

+ 8
- 8
website/EN/app_peertube.html 查看文件

@@ -3,7 +3,7 @@
3 3
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4 4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5 5
 <head>
6
-<!-- 2017-12-01 Fri 10:41 -->
6
+<!-- 2017-12-03 Sun 12:48 -->
7 7
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8 8
 <meta name="viewport" content="width=device-width, initial-scale=1" />
9 9
 <title>&lrm;</title>
@@ -249,7 +249,7 @@ for the JavaScript code in this tag.
249 249
 </center>
250 250
 
251 251
 <p>
252
-This is a video hosting system similar to Mediagoblin but using <a href="https://webtorrent.io/">webtorrent</a> to help distribute the files to or between clients. This should be more practical for situations where a video becomes popular because the load is then spread across the network, with performance increasing with the number of nodes.
252
+This is a video hosting system similar to Mediagoblin but using <a href="https://webtorrent.io/">webtorrent</a> to help distribute the files to or between clients. This should be more practical for situations where a video becomes popular because the load is then spread across the network, with performance increasing with the number of nodes. However, the torrenting aspect of it only works with WebRTC enabled browsers and so this means it's unlikely to fully work with a Tor browser. Without WebRTC then from a user point of view it's effectively the same thing as Mediagoblin.
253 253
 </p>
254 254
 
255 255
 <div class="org-center">
@@ -260,9 +260,9 @@ This is a video hosting system similar to Mediagoblin but using <a href="https:/
260 260
 </div>
261 261
 </div>
262 262
 
263
-<div id="outline-container-org89b3d26" class="outline-2">
264
-<h2 id="org89b3d26">Installation</h2>
265
-<div class="outline-text-2" id="text-org89b3d26">
263
+<div id="outline-container-orgd4e2d94" class="outline-2">
264
+<h2 id="orgd4e2d94">Installation</h2>
265
+<div class="outline-text-2" id="text-orgd4e2d94">
266 266
 <p>
267 267
 Log into your system with:
268 268
 </p>
@@ -282,9 +282,9 @@ Select <b>Add/Remove Apps</b> then <b>peertube</b>. You will then be asked for a
282 282
 </div>
283 283
 </div>
284 284
 
285
-<div id="outline-container-orgc6d8e67" class="outline-2">
286
-<h2 id="orgc6d8e67">Initial setup</h2>
287
-<div class="outline-text-2" id="text-orgc6d8e67">
285
+<div id="outline-container-org50ab03b" class="outline-2">
286
+<h2 id="org50ab03b">Initial setup</h2>
287
+<div class="outline-text-2" id="text-org50ab03b">
288 288
 <p>
289 289
 Navigate to your site and select <b>Signup</b> to create a new account. By default the maximum number of accounts on your system is limited to a small number so that millions of random internet users can't then begin uploading dubious content. After that it's pretty straightforward.
290 290
 </p>

+ 21
- 21
website/EN/mesh_images.html 查看文件

@@ -3,7 +3,7 @@
3 3
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4 4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5 5
 <head>
6
-<!-- 2017-11-10 Fri 13:13 -->
6
+<!-- 2017-12-09 Sat 23:07 -->
7 7
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8 8
 <meta name="viewport" content="width=device-width, initial-scale=1" />
9 9
 <title>&lrm;</title>
@@ -246,13 +246,13 @@ for the JavaScript code in this tag.
246 246
 
247 247
 <center><h1>Mesh Network: Images</h1></center>
248 248
 
249
-<div id="outline-container-org6d0027e" class="outline-2">
250
-<h2 id="org6d0027e">Pre-built Disk Images</h2>
251
-<div class="outline-text-2" id="text-org6d0027e">
249
+<div id="outline-container-org59e2a01" class="outline-2">
250
+<h2 id="org59e2a01">Pre-built Disk Images</h2>
251
+<div class="outline-text-2" id="text-org59e2a01">
252 252
 </div>
253
-<div id="outline-container-orgaaf029b" class="outline-3">
254
-<h3 id="orgaaf029b">Writing many images quickly</h3>
255
-<div class="outline-text-3" id="text-orgaaf029b">
253
+<div id="outline-container-org58cbb17" class="outline-3">
254
+<h3 id="org58cbb17">Writing many images quickly</h3>
255
+<div class="outline-text-3" id="text-org58cbb17">
256 256
 <p>
257 257
 There may be situations where you need to write the same disk image to multiple drives at the same time in order to maximize rate of deployment. In the instructions given below the <b>dd</b> command is used for writing to the target drive, but to write to multiple drives you can use a tool such as <a href="https://wiki.gnome.org/Apps/MultiWriter">GNOME MultiWriter</a>.
258 258
 </p>
@@ -280,9 +280,9 @@ The MultiWriter tool is also available within mesh client images, so that you ca
280 280
 </p>
281 281
 </div>
282 282
 </div>
283
-<div id="outline-container-orgc0ddf07" class="outline-3">
284
-<h3 id="orgc0ddf07">Client images</h3>
285
-<div class="outline-text-3" id="text-orgc0ddf07">
283
+<div id="outline-container-orgbec0fc8" class="outline-3">
284
+<h3 id="orgbec0fc8">Client images</h3>
285
+<div class="outline-text-3" id="text-orgbec0fc8">
286 286
 <div class="org-center">
287 287
 
288 288
 <div class="figure">
@@ -301,7 +301,7 @@ wget https://freedombone.net/downloads/current/freedombone-meshclient-i386.img.x
301 301
 wget https://freedombone.net/downloads/current/freedombone-meshclient-i386.img.xz.sig
302 302
 gpg --verify freedombone-meshclient-i386.img.xz.sig
303 303
 sha256sum freedombone-meshclient-i386.img.xz
304
-376668ae375518af268d67b9ccb7ab7b2c2787b445c125f61487ff97950092e8
304
+3e88205461bb2061dc172ff0a1e65e5cae1013f8f7dc26c6d5cbe1c986c98555
305 305
 unxz freedombone-meshclient-i386.img.xz
306 306
 sudo dd <span class="org-variable-name">if</span>=/dev/zero <span class="org-variable-name">of</span>=/dev/sdX <span class="org-variable-name">bs</span>=1M <span class="org-variable-name">count</span>=8
307 307
 sudo dd <span class="org-variable-name">bs</span>=1M <span class="org-variable-name">if</span>=freedombone-meshclient-i386.img <span class="org-variable-name">of</span>=/dev/sdX <span class="org-variable-name">conv</span>=fdatasync
@@ -322,7 +322,7 @@ wget https://freedombone.net/downloads/current/freedombone-meshclient-insecure-i
322 322
 wget https://freedombone.net/downloads/current/freedombone-meshclient-insecure-i386.img.xz.sig
323 323
 gpg --verify freedombone-meshclient-insecure-i386.img.xz.sig
324 324
 sha256sum freedombone-meshclient-insecure-i386.img.xz
325
-81098572ac522b543f2c015dd0819d27c290b93b771efc9de6e93742e3981daf
325
+09c059664daf56d210134735d37e8117bb7b755acc8b9b253cdfa42052249ccb
326 326
 unxz freedombone-meshclient-insecure-i386.img.xz
327 327
 sudo dd <span class="org-variable-name">if</span>=/dev/zero <span class="org-variable-name">of</span>=/dev/sdX <span class="org-variable-name">bs</span>=1M <span class="org-variable-name">count</span>=8
328 328
 sudo dd <span class="org-variable-name">bs</span>=1M <span class="org-variable-name">if</span>=freedombone-meshclient-insecure-i386.img <span class="org-variable-name">of</span>=/dev/sdX <span class="org-variable-name">conv</span>=fdatasync
@@ -331,16 +331,16 @@ sudo dd <span class="org-variable-name">bs</span>=1M <span class="org-variable-n
331 331
 </div>
332 332
 </div>
333 333
 
334
-<div id="outline-container-org8eb2396" class="outline-3">
335
-<h3 id="org8eb2396">Router images</h3>
336
-<div class="outline-text-3" id="text-org8eb2396">
334
+<div id="outline-container-org6f3a05a" class="outline-3">
335
+<h3 id="org6f3a05a">Router images</h3>
336
+<div class="outline-text-3" id="text-org6f3a05a">
337 337
 <p>
338 338
 Routers are intended to build network coverage for an area using small and low cost hardware. You can bolt them to walls or leave them on window ledges. They don't have any user interface and their only job is to haul network traffic across the mesh and to enable peers to find each other via running bootstrap nodes for Tox and IPFS. Copy the image to a microSD card and insert it into the router, plug in an Atheros wifi dongle and power on. That should be all you need to do.
339 339
 </p>
340 340
 </div>
341
-<div id="outline-container-orgd7fdd98" class="outline-4">
342
-<h4 id="orgd7fdd98">Beaglebone Black</h4>
343
-<div class="outline-text-4" id="text-orgd7fdd98">
341
+<div id="outline-container-org0387979" class="outline-4">
342
+<h4 id="org0387979">Beaglebone Black</h4>
343
+<div class="outline-text-4" id="text-org0387979">
344 344
 <div class="org-center">
345 345
 
346 346
 <div class="figure">
@@ -377,9 +377,9 @@ There is still a software freedom issue with the Beaglebone Black, but it doesn'
377 377
 </div>
378 378
 </div>
379 379
 
380
-<div id="outline-container-org6584d9d" class="outline-2">
381
-<h2 id="org6584d9d">Building Disk Images</h2>
382
-<div class="outline-text-2" id="text-org6584d9d">
380
+<div id="outline-container-org0db60a2" class="outline-2">
381
+<h2 id="org0db60a2">Building Disk Images</h2>
382
+<div class="outline-text-2" id="text-org0db60a2">
383 383
 <p>
384 384
 It's better not to trust images downloaded from random places on the interwebs. Chances are that unless you are in the web of trust of the above GPG signatures then they don't mean very much to you. If you actually want something trustworthy then build the images from scratch. It will take some time. Here's how to do it.
385 385
 </p>

+ 82
- 50
website/EN/mesh_usage.html 查看文件

@@ -3,7 +3,7 @@
3 3
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4 4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5 5
 <head>
6
-<!-- 2017-10-27 Fri 14:28 -->
6
+<!-- 2017-12-09 Sat 17:57 -->
7 7
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8 8
 <meta name="viewport" content="width=device-width, initial-scale=1" />
9 9
 <title>&lrm;</title>
@@ -247,30 +247,38 @@ for the JavaScript code in this tag.
247 247
 <center><h1>Mesh Network: How to use it</h1></center>
248 248
 
249 249
 <ul class="org-ul">
250
-<li><a href="#org6a43d4d">Boot trouble</a></li>
251
-<li><a href="#org03f4d8a">Set the Date</a></li>
252
-<li><a href="#org55f29f9">Check network status</a></li>
253
-<li><a href="#org802070f">Connecting to the internet</a></li>
254
-<li><a href="#orgd9dffae">Connecting two meshes over the internet via a VPN tunnel</a></li>
255
-<li><a href="#org62a60b3">Mobile devices (phones, etc)</a></li>
256
-<li><a href="#org216d212">Chat System</a></li>
257
-<li><a href="#orgfe4d63b">Collaborative document editing</a></li>
258
-<li><a href="#org76f234d">Social Network</a></li>
259
-<li><a href="#org6154f04">Sharing Files</a></li>
260
-<li><a href="#orga4dae6b">Blogging</a></li>
250
+<li><a href="#orgdec778b">Boot trouble</a></li>
251
+<li><a href="#org92b8992">Set the Date</a></li>
252
+<li><a href="#org5854462">Check network status</a></li>
253
+<li><a href="#orga9a6d4b">Connecting to the internet</a></li>
254
+<li><a href="#org5fe4cbd">Connecting two meshes over the internet via a VPN tunnel</a></li>
255
+<li><a href="#org0f9ab05">Mobile devices (phones, etc)</a></li>
256
+<li><a href="#orgf44bf0d">Chat System</a></li>
257
+<li><a href="#org6940994">Collaborative document editing</a></li>
258
+<li><a href="#orgdcb8a5f">Social Network</a></li>
259
+<li><a href="#orga1bfc4a">Sharing Files</a></li>
260
+<li><a href="#orgfbceae4">Blogging</a></li>
261 261
 </ul>
262 262
 
263 263
 <p>
264 264
 When you first boot from the USB drive the system will create some encryption keys, assign a unique network address to the system and then reboot itself. When that's done you should see a prompt asking for a username. This username just makes it easy for others to initially find you on the mesh and will appear in the list of users.
265 265
 </p>
266 266
 
267
+<div class="org-center">
268
+
269
+<div class="figure">
270
+<p><img src="images/mesh_initial_login.jpg" alt="mesh_initial_login.jpg" />
271
+</p>
272
+</div>
273
+</div>
274
+
267 275
 <p>
268 276
 After a minute or two if you are within wifi range and there is at least one other user on the network then you should see additional icons appear on the desktop, such as <i>Other Users</i> and <i>Chat</i>.
269 277
 </p>
270 278
 
271
-<div id="outline-container-org6a43d4d" class="outline-2">
272
-<h2 id="org6a43d4d">Boot trouble</h2>
273
-<div class="outline-text-2" id="text-org6a43d4d">
279
+<div id="outline-container-orgdec778b" class="outline-2">
280
+<h2 id="orgdec778b">Boot trouble</h2>
281
+<div class="outline-text-2" id="text-orgdec778b">
274 282
 <p>
275 283
 If the system doesn't boot and reports an error which includes <b>/dev/mapper/loop0p1</b> then reboot with <b>Ctrl-Alt-Del</b> and when you see the grub menu press <b>e</b> and manually change <b>/dev/mapper/loop0p1</b> to <b>/dev/sdb1</b>, then press <b>Ctrl-x</b>. If that doesn't work then reboot and try <b>/dev/sdc1</b> instead.
276 284
 </p>
@@ -280,9 +288,9 @@ After the system has booted successfully the problem should resolve itself on su
280 288
 </p>
281 289
 </div>
282 290
 </div>
283
-<div id="outline-container-org03f4d8a" class="outline-2">
284
-<h2 id="org03f4d8a">Set the Date</h2>
285
-<div class="outline-text-2" id="text-org03f4d8a">
291
+<div id="outline-container-org92b8992" class="outline-2">
292
+<h2 id="org92b8992">Set the Date</h2>
293
+<div class="outline-text-2" id="text-org92b8992">
286 294
 <p>
287 295
 On the ordinary internet the date and time of your system would be set automatically via NTP. But this is not the internet and so you will need to manually ensure that your date and time settings are correct. You might need to periodically do this if your clock drifts. It's not essential that the time on your system be highly accurate, but if it drifts too far or goes back to epoch then things could become a little confusing in regard to the order of blog posts.
288 296
 </p>
@@ -292,9 +300,9 @@ On the ordinary internet the date and time of your system would be set automatic
292 300
 </p>
293 301
 </div>
294 302
 </div>
295
-<div id="outline-container-org55f29f9" class="outline-2">
296
-<h2 id="org55f29f9">Check network status</h2>
297
-<div class="outline-text-2" id="text-org55f29f9">
303
+<div id="outline-container-org5854462" class="outline-2">
304
+<h2 id="org5854462">Check network status</h2>
305
+<div class="outline-text-2" id="text-org5854462">
298 306
 <p>
299 307
 Unlike with ordinary wifi, on the mesh you don't get a signal strength icon and so it's not simple to see if you have a good connection.
300 308
 </p>
@@ -317,9 +325,9 @@ When you are finished close the window and then select the <i>Network Restart</i
317 325
 </p>
318 326
 </div>
319 327
 </div>
320
-<div id="outline-container-org802070f" class="outline-2">
321
-<h2 id="org802070f">Connecting to the internet</h2>
322
-<div class="outline-text-2" id="text-org802070f">
328
+<div id="outline-container-orga9a6d4b" class="outline-2">
329
+<h2 id="orga9a6d4b">Connecting to the internet</h2>
330
+<div class="outline-text-2" id="text-orga9a6d4b">
323 331
 <div class="org-center">
324 332
 
325 333
 <div class="figure">
@@ -350,9 +358,9 @@ Where <i>myclient.ovpn</i> comes from your VPN provider and with the password "<
350 358
 </p>
351 359
 </div>
352 360
 </div>
353
-<div id="outline-container-orgd9dffae" class="outline-2">
354
-<h2 id="orgd9dffae">Connecting two meshes over the internet via a VPN tunnel</h2>
355
-<div class="outline-text-2" id="text-orgd9dffae">
361
+<div id="outline-container-org5fe4cbd" class="outline-2">
362
+<h2 id="org5fe4cbd">Connecting two meshes over the internet via a VPN tunnel</h2>
363
+<div class="outline-text-2" id="text-org5fe4cbd">
356 364
 <div class="org-center">
357 365
 
358 366
 <div class="figure">
@@ -372,7 +380,7 @@ In your home directory on a system connected via ethernet to an internet router
372 380
 <div class="org-center">
373 381
 
374 382
 <div class="figure">
375
-<p><img src="images/mesh_connect.jpg" alt="mesh_connect.jpg" />
383
+<p><img src="images/mesh_connect.png" alt="mesh_connect.png" />
376 384
 </p>
377 385
 </div>
378 386
 </div>
@@ -387,9 +395,9 @@ From a deep packet inspection point of view the traffic going over the internet
387 395
 </div>
388 396
 </div>
389 397
 
390
-<div id="outline-container-org62a60b3" class="outline-2">
391
-<h2 id="org62a60b3">Mobile devices (phones, etc)</h2>
392
-<div class="outline-text-2" id="text-org62a60b3">
398
+<div id="outline-container-org0f9ab05" class="outline-2">
399
+<h2 id="org0f9ab05">Mobile devices (phones, etc)</h2>
400
+<div class="outline-text-2" id="text-org0f9ab05">
393 401
 <div class="org-center">
394 402
 
395 403
 <div class="figure">
@@ -419,11 +427,27 @@ On some android devices you may need to move the downloaded APK file from the <b
419 427
 </p>
420 428
 </div>
421 429
 </div>
422
-<div id="outline-container-org216d212" class="outline-2">
423
-<h2 id="org216d212">Chat System</h2>
424
-<div class="outline-text-2" id="text-org216d212">
430
+<div id="outline-container-orgf44bf0d" class="outline-2">
431
+<h2 id="orgf44bf0d">Chat System</h2>
432
+<div class="outline-text-2" id="text-orgf44bf0d">
425 433
 <p>
426
-Ensure that you're within wifi range of at least one other mesh peer (could be a router or client) and then you should see that the <i>Chat</i> and <i>Other Users</i> icons appear. Select the users icon and you should see a list of users on the mesh. Select the <i>Chat</i> icon and once you are connected you should see the status light turn green. If after a few minutes you don't get the green status light then try closing and re-opening the Tox chat application. Select the plus button to add a friend and then copy and paste in a Tox ID from the users list.
434
+Ensure that you're within wifi range of at least one other mesh peer (could be a router or client) and then you should see that the <i>Chat</i> and <i>Other Users</i> icons appear. Select the users icon and you should see a list of users on the mesh.
435
+</p>
436
+
437
+<div class="org-center">
438
+
439
+<div class="figure">
440
+<p><img src="images/mesh_peerslist.png" alt="mesh_peerslist.png" />
441
+</p>
442
+</div>
443
+</div>
444
+
445
+<p>
446
+Selecting a user followed by the Ok button will copy their Tox ID to the clipboard.
447
+</p>
448
+
449
+<p>
450
+Now select the <i>Chat</i> icon and once you are connected you should see the status light turn green. If after a few minutes you don't get the green status light then try closing and re-opening the Tox chat application. Select the plus button to add a friend and then paste in a Tox ID.
427 451
 </p>
428 452
 
429 453
 <div class="org-center">
@@ -480,9 +504,9 @@ At present video doesn't work reliably, but text and voice chat do work well.
480 504
 </div>
481 505
 </div>
482 506
 
483
-<div id="outline-container-orgfe4d63b" class="outline-2">
484
-<h2 id="orgfe4d63b">Collaborative document editing</h2>
485
-<div class="outline-text-2" id="text-orgfe4d63b">
507
+<div id="outline-container-org6940994" class="outline-2">
508
+<h2 id="org6940994">Collaborative document editing</h2>
509
+<div class="outline-text-2" id="text-org6940994">
486 510
 <p>
487 511
 The mesh system includes the ability to collaboratively edit various sorts of documents using CryptPad. CryptPad is an almost peer-to-peer system in that it is designed for a client/server environment but that the server aspect of it is very minimal and limited to orchestrating the connected clients. With CryptPad installed on each mesh peer it effectively enables peer-to-peer collaborative editing. Documents are ephemeral and forgotten unless they're exported or copy-pasted to permanent storage.
488 512
 </p>
@@ -513,9 +537,9 @@ If you have the chat system running you can then copy and paste the URL for your
513 537
 </div>
514 538
 </div>
515 539
 
516
-<div id="outline-container-org76f234d" class="outline-2">
517
-<h2 id="org76f234d">Social Network</h2>
518
-<div class="outline-text-2" id="text-org76f234d">
540
+<div id="outline-container-orgdcb8a5f" class="outline-2">
541
+<h2 id="orgdcb8a5f">Social Network</h2>
542
+<div class="outline-text-2" id="text-orgdcb8a5f">
519 543
 <p>
520 544
 Patchwork is available as a social networking system for the mesh. Like all social network systems it has a stream of posts and you can follow or unfollow other users. You can also send private messages to other users with end-to-end encryption.
521 545
 </p>
@@ -550,9 +574,9 @@ The Secure Scuttlebutt protocol which Patchwork is based upon is intended to be
550 574
 </div>
551 575
 </div>
552 576
 
553
-<div id="outline-container-org6154f04" class="outline-2">
554
-<h2 id="org6154f04">Sharing Files</h2>
555
-<div class="outline-text-2" id="text-org6154f04">
577
+<div id="outline-container-orga1bfc4a" class="outline-2">
578
+<h2 id="orga1bfc4a">Sharing Files</h2>
579
+<div class="outline-text-2" id="text-orga1bfc4a">
556 580
 <p>
557 581
 You can make files publicly available on the network simply by dragging and dropping them into the <i>Public</i> folder on the desktop. To view the files belonging to another user select the desktop icon called <i>Visit a site</i> and enter the username or Tox ID of the other user.
558 582
 </p>
@@ -567,17 +591,17 @@ You can make files publicly available on the network simply by dragging and drop
567 591
 </div>
568 592
 </div>
569 593
 
570
-<div id="outline-container-orga4dae6b" class="outline-2">
571
-<h2 id="orga4dae6b">Blogging</h2>
572
-<div class="outline-text-2" id="text-orga4dae6b">
594
+<div id="outline-container-orgfbceae4" class="outline-2">
595
+<h2 id="orgfbceae4">Blogging</h2>
596
+<div class="outline-text-2" id="text-orgfbceae4">
573 597
 <p>
574
-To create a blog post select the <i>Blog</i> icon on the desktop and then use the up and down cursor keys, space bar and enter key to add a new entry. Edit the title of the entry and add your text. You can also include photos if you wish - just copy them to the <b>CreateBlog/content/images</b> directory and then link to them as shown.
598
+To create a blog post select the <i>Blog</i> icon on the desktop and then select <b>New blog entry</b> and <b>Ok</b>. Edit the title of the entry and add your text. You can also include photos if you wish - just copy them to the <b>CreateBlog/content/images</b> directory and then link to them as shown.
575 599
 </p>
576 600
 
577 601
 <div class="org-center">
578 602
 
579 603
 <div class="figure">
580
-<p><img src="images/mesh_new_blog.jpg" alt="mesh_new_blog.jpg" />
604
+<p><img src="images/mesh_blog.png" alt="mesh_blog.png" />
581 605
 </p>
582 606
 </div>
583 607
 </div>
@@ -603,8 +627,16 @@ To finish your blog entry just select <i>Save</i> and then close the editor. On
603 627
 </div>
604 628
 
605 629
 <p>
606
-You can also visit other blogs, edit or delete your previous entry and also change your blog theme.
630
+You can also visit other blogs, edit or delete your previous entry and change your blog theme.
607 631
 </p>
632
+
633
+<div class="org-center">
634
+
635
+<div class="figure">
636
+<p><img src="images/mesh_select_blog_theme.png" alt="mesh_select_blog_theme.png" />
637
+</p>
638
+</div>
639
+</div>
608 640
 </div>
609 641
 </div>
610 642
 </div>