ubuntu14.04 Toss Thunderbolt Xware

Source: Internet
Author: User
Tags root access

Thunder has not been out of the Linux version, wine do not want to get. Linux, although there are all kinds of BT software, but I tried to find that the speed is far less than thunder, and even some resources can not be found at all. And some of the special link of Thunder, but also can not under (forgive me 2M of small water pipe, but like to watch the American drama). With the advent of various TV boxes and intelligent routing, Thunderbolt got a remote download, that is xware. Remote download is actually in the TV box, the router shelves a minimalist Thunderbolt core, and then through the thunderbolt provided by the web-side to control, to achieve the download. Since the TV box is mostly Android, smart routing is also Android or Linux core, so thunderbolt to support a variety of devices, you must provide a variety of versions of Xware, which there is a glibc 32bit version. This version can support running on most Linux systems (32 or 64 bits).

To run Xware, there are several conditions:

    1. Download Good Xware
    2. Run Xware
    3. Binding Xware
    4. mount a storage device

Xware can go to the Thunder Forum to download (http://luyou.xunlei.com/forum.php?mod=forumdisplay&fid=51&filter=typeid&typeid=1) , in the product release, download the latest version of GLIBC_32. such as Xware1.0.31_x86_32_glibc.zip. Download and unzip to the directory, such as Xware1.0.31. The files inside are as follows:

[Email protected]:~/xware1.0.31$ LS-LH
Total dosage 4.2M
-rwxrwxr-x 1 xzc xzc 4.1M August Embedthundermanager
-rwxrwxr-x 1 xzc xzc 24K August Etmdaemon
-rwxrwxr-x 1 xzc xzc 111K August Portal
-rwxrwxr-x 1 xzc xzc 23K August vod_httpserver

Running Xware is simple, go to the current directory, run./portal. Run out the output as follows:

[Email protected]:~/xware1.0.31$./portal
Initing ...
Try stopping Xunlei service first ...
Killall:ETMDaemon:no process killed
Killall:EmbedThunderManager:no process killed
Killall:vod_httpserver:no process killed
Setting Xunlei Runtime env ...
port:9000 is usable.

YOUR CONTROL PORT is:9000

Starting Xunlei service ...
ETM Path:/home/xzc/xware1.0.31
EXECV:/home/xzc/xware1.0.31/lib/etmdaemon.

Getting Xunlei service info ...
Connecting to 127.0.0.1:9000 (127.0.0.1:9000)
The active key is not valid.

Try again ... (Has tried 1 time (s)).
Getting Xunlei service info ...
Connecting to 127.0.0.1:9000 (127.0.0.1:9000)

The ACTIVE CODE is:xxxbbb

Go to http://yuancheng.xunlei.com, bind your device with the active code.
Finished.

The runtime needs to depend on your network situation, sometimes try again ... n multiple times to connect to the Thunderbolt server, there has been no connection. It's good to not even run it again.

Then need to bind your device to the Web version of Thunderbolt remote control. Login http://yuancheng.xunlei.com (register one without an account), and then run the above to get a code (the ACTIVE code IS:XXXBBB), here is xxxbbb. Enter this code and the thunderbolt you just ran is tied to the remote download.

Then, is familiar with the Thunderbolt interface

Now, the Thunder basically sort of run up. But there is one more question: Where does the downloaded file exist? Remote download is just a Web client, it has no way to know your computer hard disk situation. It can only learn how much space is on the computer and which disks are available by communicating with the Thunderbolt that runs on the computer. But the original purpose of Thunderbolt development Xware is not for the computer, but for a variety of boxes, routes used. These devices have little or no hard disk space, and there is no way to download them. But they are all Linux core, and many devices also provide USB interface to the U disk, mobile hard drive access. These devices are almost always mounted to the/media directory. So Xware only detects devices that are mounted to a writable/media directory. For example, I plug my USB stick to the computer, click on the remote download new, you can see the Thunderbolt has detected my USB flash drive, and in the inside automatically created some necessary folders.

[email protected]:~$ DF
File system 1k-blocks used with available% mount point
/dev/sda6 24475012 5982676 17226008 26%/
None 4 0 4 0%/sys/fs/cgroup
Udev 3760900 4 3760896 1%/dev
tmpfs 754340 1324 753016 1%/run
None 5120 0 5120 0%/run/lock< Br>none 3771696 652 3771044 1%/run/shm
None 102400 23% 102336 1%/run/user
/dev/sda7 26866740 5797352 19681564/ Home
/dev/sda1 307032 37920 269112 13%/boot/efi
/dev/sdb1 7135728 4606340 2529388 65%/media/xzc/apacer
[email protected]:~$ ls/media/xzc/apacer-lh
Total usage 48K
drwx------2 XZC XZC 4.0K December 22:18 GHO
drwx------3 xzc xzc 4.0K March 23:22 system_tools
DRWX------2 Xzc xzc 4.0K April 20:57 tddownload
drwx------2 xzc xzc 4.0K April 20:57 thunderd B

The use of Thunder on the computer will definitely want to download directly to the hard disk AH. Then we can use Mount--bind to attach a folder to the/media so that the Thunderbolt can be downloaded. Yes, that's right, everything is OK. But there is another problem, if I am downloading, suddenly need to use a USB stick. Received on the computer, Thunderbolt apart, directly on the U disk to create two folders, which makes me a feeling. To let thunderbolt ignore my u disk, there is no other way, only to cancel the Thunder on the U disk write permission. But I'm going to go inside and cuff something. So we had to give thunder to create a user, and then use this user to run the Thunderbolt. In this way, thunder on my U disk will not write permission.

First create a user named Thunder

sudo useradd--no-create-home--user-group Thunder

Then change the Xware directory to thunder all, so Thunder have permission to run Xware (directly through sudo to the right)

su chown thunder:thunder-r Xware1. 0.31

Then create a directory to mount and a download directory, these directories are also owned by Thunder, otherwise it does not have permission to write, how to do. And this download directory your current user also has permission to read, otherwise downloaded things you can not see, what is the use?

sudo mkdir /home/xzc/tddownload-psudomkdir /media/thunder/tddownloads-p sudo chown thunder:thunder/home/xzc/tddownloadsudochown thunder:thunder/media/ Thunder/tddownloads

Then we mount the download directory to another directory

sudo Mount --bind/home/xzc/tddownload/media/thunder/tddownloads/

Re-thunder users to run the Thunderbolt (first get root permissions, and then convert to thunder user can avoid the input Thunder password, because just did not give thunder to create a password, enter anything is wrong)

sudo su thunder-c./portal

In this way, the Thunderbolt will detect the/media/thunder/tddownloads directory, the download of things is put into the/home/xzc/tddownload. Now, if you click the new task and you see the remaining space, the Mount succeeds.

Toss to this, finally can download, but since it is under Linux, how to write a script it

#!/bin/SHXware_dir=./xware1.0.31USERNAME="Thunder"Down_dir=/home/xzc/Tddownloadmount_dir=/media/thunder/tddownloadsif[$#-GT0 ]; Then#加参数-S is offsu$USERNAME-C"$XWARE _dir/portal-s"Code=$?if[$code-eq0 ];  Then        Umount$MOUNT _dirEcho "xware stop sucess ..."    Else        Echo "xware Stop Fail,code $code"    fiElse#不加参数默认是启动su$USERNAME-C $XWARE _dir/Portal Code=$?if[$code-eq0 ];  Then        Mount--bind $DOWN _dir $MOUNT _dirEcho "xware start sucess ..."    Else        Echo "xware start Fail,code $code"    fifi

This puts the file on the upper level of the Xware1.0.31, named Xware.sh. This script automatically mounts the folder, or cancels the mount, requiring root access.

Run sudo./xware.sh

Turn off sudo./xware.sh-s

ubuntu14.04 Toss Thunderbolt Xware

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.