Notes on installing thunder Xware in Ubuntu 14.04
Thunder has never been out of the Linux version, and wine does not want to get it. Although there are a variety of btsoftware in Linux, I found that the speed is far below the speed of thunder, and even some resources cannot be found. Some dedicated links of thunder cannot be used (forgive me for my 2 m small water pipes, but I like watching American TV series ). With the emergence of various TV boxes and smart routes, Thunder has made a remote download, namely Xware. Remote download is actually a simple thunder core mounted on the TV box and vro, and then controlled through the webpage provided by thunder to achieve download. Because most TV boxes are Android systems and intelligent routing is also the core of android or Linux systems, Thunder must provide various versions of Xware to support various devices, including a glibc 32bit version. This version supports running in most Linux systems (32 or 64-bit.
To run Xware, there are several conditions:
1. Download Xware
2. Run Xware
3. Bind 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 product release, download the latest glibc_32 version. For example, xware1.0.31_x86_32_glibc.zip. Download:
------------------------------------------ Split line ------------------------------------------
Free in http://linux.bkjia.com/
The username and password are both www.bkjia.com
The specific download directory is in/July 6, 14.04,/July 16,/Ubuntu, and Xware/
For the download method, see
------------------------------------------ Split line ------------------------------------------
Download the package and decompress it to the directory, for example, Xware1.0.31. The file is as follows:
Bkjia @ bkjia :~ /Xware1.0.31 $ ls-lh
Total usage 4.2 M
-Rwxrwxr-x 1 bkjia 4.1 M 2014 EmbedThunderManager
-Rwxrwxr-x 1 bkjia 24 K February August 27 2014 ETMDaemon
-Rwxrwxr-x 1 bkjia 111 K 2014 portal
-Rwxrwxr-x 1 bkjia 23 K 2014 vod_httpserver
It is easy to run xware. Enter the current directory and run./portal. The output is as follows:
Bkjia @ bkjia :~ /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/bkjia/Xware1.0.31
Execv:/home/bkjia/Xware1.0.31/lib/ETMDaemon.
Getting xunlei service info...
Connect 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...
Connect 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 depends on your network conditions. Sometimes try again... N multiple times to connect to the thunder server. You just need to run it again after it cannot be connected.
Then you need to bind your device to the web version of thunder remote control. Log on to THE http://yuancheng.xunlei.com (register one without an account), and then run THE code (the active code is: xxxbbb) above, here IS xxxbbb. Enter this code and the thunder you just run will be bound to the remote download.
Then there is the familiar thunder interface.
Now, Thunder is basically running. But there is another problem, where is the downloaded file. Remote download is just a Web client, and it cannot know the hard disk on your computer. It can only communicate with the thunderbolt running on a computer to understand the space and disks on the computer. However, the original intention of xware development is not for computers, but for various boxes and routes. These devices have almost no hard disks or only a small fixed space. They cannot be downloaded. But they are all linux core, and many devices also provide USB interfaces to Connect USB flash drives and mobile hard drives. Almost all these devices are mounted to the/media directory. Therefore, xware only detects writable devices mounted to the/media directory. For example, if I plug my USB flash drive into my computer and click Create in remote download, we can see that Thunder has detected my USB flash drive and automatically created some necessary folders in it.
Bkjia @ bkjia :~ $ Df
File System 1K-blocks available in use % 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
None 3771696 652 3771044 1%/run/shm
None 102400 64 102336 1%/run/user
/Dev/sda7 26866740 5797352 19681564 23%/home
/Dev/sda1 307032 37920 269112 13%/boot/efi
/Dev/sdb1 7135728 4606340 2529388 65%/media/bkjia/APACER
Bkjia @ bkjia :~ $ Ls/media/bkjia/APACER-lh
Total usage 48 K
Drwx ------ 2 bkjia 4.0 K December 13 22:18 GHO
Drwx ------ 3 bkjia 4.0 K March 13 23:22 system_tools
Drwx ------ 2 bkjia 4.0 K Aug 17 20:57 TDDOWNLOAD
Drwx ------ 2 bkjia 4.0 K Aug 17 20:57 ThunderDB
I'm sure I want to download it directly to my hard disk. Then we can use mount -- bind to mount a folder to/media so that Thunder can download it. Yes, that's right. Everything is OK. But there is another problem. If I am downloading, I suddenly need to use a USB flash drive. When I got to my computer, thunder directly created two folders on the USB flash drive. There is no other way for thunder to ignore my USB flash drive. It is only necessary to cancel the write permission on the USB flash drive. But I still need to copy something into the USB flash drive. Therefore, we had to create a user for thunder and then use this user to run thunder. In this way, Thunder has no write permission on my USB flash drive.
Create a user named thunder first
Sudo useradd -- no-create-home -- user-group thunder
Then change the directory of xware to thunder, so that thunder has the permission to run xware (just give the permission through sudo)
Su chown thunder: thunder-R Xware1.0.31
Create a directory for mounting and a directory for downloading. These directories are also owned by thunder. Otherwise, they do not have the permission to write. Your current user has the permission to read the downloaded directory. Otherwise, you cannot view the downloaded content. What is the purpose?
Sudo mkdir/home/bkjia/TDDOWNLOAD-p
Sudo mkdir/media/thunder/TDDOWNLOADS-p
Sudo chown thunder: thunder/home/bkjia/TDDOWNLOAD
Sudo chown thunder: thunder/media/thunder/TDDOWNLOADS
Then we mount the downloaded directory to another directory.
Sudo mount -- bind/home/bkjia/TDDOWNLOAD/media/thunder/TDDOWNLOADS/
Run thunder again with the thunder user (first obtain the root permission, and then switch to the thunder user, you can avoid entering the thunder password, because you just didn't create a password for thunder and entered nothing wrong)
Sudo su thunder-c./portal
In this way, thunder will detect the/media/thunder/TDDOWNLOADS directory and put the downloaded content in/home/bkjia/TDDOWNLOAD. Now, if you click "new" to see the remaining space, the mounting is successful.
After all, you can download the file. But since it is in linux, you have to write a script.
#! /Bin/sh
XWARE_DIR =./Xware1.0.31
USERNAME = "thunder"
DOWN_DIR =/home/bkjia/TDDOWNLOAD
MOUNT_DIR =/media/thunder/TDDOWNLOADS
If [$ #-gt 0];
Then
# Add parameter-s to disable
Su $ USERNAME-c "$ XWARE_DIR/portal-s"
Code = $?
If [$ code-eq 0];
Then
Umount $ MOUNT_DIR
Echo "xware stop sucess ..."
Else
Echo "xware stop fail, code $ code"
Fi
Else
# Start by default when no parameters are added
Su $ USERNAME-c $ XWARE_DIR/portal
Code = $?
If [$ code-eq 0];
Then
Mount -- bind $ DOWN_DIR $ MOUNT_DIR
Echo "xware start sucess ..."
Else
Echo "xware start fail, code $ code"
Fi
Fi
In this way, put the file on the top layer of Xware1.0.31, named xware. sh. This script will automatically mount the folder or unmount the folder. root permission is required.
Run sudo./xware. sh
Disable sudo./xware. sh-s