[myHD Beta 1] First release + kodi + PlexMediaPlayer +++

myHD is an isolated (namespace (mnt, IPC, PID)) Ubuntu environment to run Ubuntu application displayed as ASUSTOR Asportal / Xorg applications.
Post Reply
User avatar
father.mande
Posts: 1817
youtube meble na wymiar Warszawa
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

[myHD Beta 1] First release + kodi + PlexMediaPlayer +++

Post by father.mande »

Hi,

................................................PLEASE TAKE TIME TO READ THIS TOPIC TOTALLY ....................................
====== myHD is an isolated (namespace (mnt, IPC, PID)) Ubuntu environment to run Ubuntu application displayed as ASUSTOR Asportal / Xorg applications
====== myHD use HDMI output (display and sound) through Asportal Window Manager, Xorg to manage Keyboard and mouse, Video Acceleration API compatible
icon
icon
myhd-enable.png (11.89 KiB) Viewed 3141 times
FIRST
==== READ CAREFULLY the install procedure
TARGET : test the installation part ... and play with myHD internal APKG proposed :
... kodi17.6 (possible to cp your actual .kodi), kodi18 R.C. 2 or + (unstable build), plexmediaplayer 2.20.0 or +, Vlc 2.2.27, Chrome (last stable from Chrome PPA), Netflix (Chrome direct App. call, Test ... in fact a Xterm INSIDE myHD
===== PLEASE REFER TO SPECIFIC POST for each Applications ... WE PROPOSE MANUAL LAUNCH to understand problems (if needed)

COMMANDS TO KNOW :
myHD ... use for lot of usage including backup, update (apt-get update; apt-get dist-upgrade), set various options
myHD_root [command in quote] ... enter as root in myHD isolated environment or execute in myHD the command or script ...
myHD_user USER_NAME [command in quote] ... enter as user ... only user available after install is : astr user / password : asusfr1 ; please change by security I don't use it)
myHD_apkg ... manage myHD APKG's (install, remove, create, etc.)

[Name]
myHD

[Version]
BETA 1 : v 0.7
... myHD APKG and internal tools (Application are Asportal application even running in a separate environment)
... Ubuntu 16.04 (18.04 postponed due to "old" video acceleration API in Xorg / Asportal)
... Pre-installed applications
... ... Kodi18 (directly from Kodi PPA (Ubuntu package) ... .kodi settings will be in astr Home folder
... ... Kodi17.6 (from Ubuntu source but rebuild in a private folder to be able to cohabit with kodi18 ... .kodi is in astr Home / mykodi17 folder (so separate)
... ... Plex Media Player ... build by me based on last code source from Plex
... ... Chrome (actually v74)
... ... Netflix as Chrome application
... ... PrimeVideo as Chrome application
... ... Vlc
... myHD_apkg GENERATOR for APKG ... in myHD (require only 3 files ... read (when available) how-to and add your own application APKG appear as Asportal APKG
... support of Autorun (Asportal)
... INTERNAL UPDATE (apt-get)
... ... so for Ubuntu application (kodi18) no need to wait a new APKG ... it's immediately accessible
... ... all security update are immediately available
... myHD is secure
... ... myHD run in an isolated environment ... on start it DON'T have access to your DATA no more to A.D.M. part YOU MUST add share you want to use
... ... myHD use it's own process identifier ... so a list of process (ps -eaf) display internal PID not real A.D.M. PID
... ... myHD use it's own IPC (inter process) environment so can't be use to see the A.D.M. IPC
... ... myHD SHARE network with A.D.M. ... so same i.P. and same Port list (take care if you have server in myHD to don't be in conflict with A.D.M. port in used
... ... Application in myHD run as a standard user ( astr ) so be sure to have correct access to folder and files ... a clone astr exist (created) in A.D.M. to verify easily
... ... myHD is ready for multi-user (so each with it's own settings) BUT without login in Asportal ... it's not easily used at this time ...
... ... myHD is ready for multi-task ... BUT Asportal window manager hide decoration and button bar, force full screen and don't have a taskbar ... so this is not used and can reduce the capabilities of myHD

[How it works]
... myHD REQUIRE Internet access during installation phase
... AT FIRST START in background ... myHD install the environment : Ubuntu 16.04 ... SO BE PATIENT ... SO BE PATIENT ... and if you don't have pre-downloaded and have slow network SO BE EXTREMELY PATIENT
... ... you can follow this stage by reading a log /tmp/start_myHD.log ... up to the latest message (Init alsa)
... THEN a first myHD APKG (test ... (a Xterm inside myHD) is installed ... when all works as expected, you can disable it)
BEST PRACTICE : it's possible to pre-download the Ubuntu environment to reduce (drastically if your network is slow) the installation time) shell script is provide here after

... When installation process if finish our can :
1 ... add the shared resource you want to use in myHD ( myHD add_include_folder )
2 ... restart to validate it
3 ... add Asportal APKG for myHD (myHD_apkg) just install for pre-generated one's or generate then install ...

... now configure and play ...

[Installation Procedure]
PRE-DOWNLOAD environment (optional but good practice)
... get the shell script :
The attachment pre_download_myHD.tar is no longer available
... put this file in Public shared folder
... open a ssh console (admin or root / your password)
cd /share/Public
tar xf pre_download_myHD.tar

... this create pre_download_myHD.sh shell script
rm -f pre_download_myHD.tar not used anymore
... now execute the shell ... it create a folder /share/Public/myHD_delivery and download the required files (with checksum control)
./pre_download_myHD.sh
... after some time (depend of your network bandwidth ... it's all result is like this (size can be changed when release will be available)

Code: Select all

# ll /share/Public/myHD_delivery
total 1777492
drwxr-xr-x    2 root     root        4.0K Dec 14 19:00 ./
drwxrwxrwx   36 root     administ    4.0K Dec 15 18:27 ../
-rw-r--r--    1 root     root         346 Dec 14 16:55 delivery_1604.list
-rw-r--r--    1 root     root        9.1K Dec 14 16:51 myHD_1604_delivery_scripts.tgz
-rw-r--r--    1 root     root      867.9M Dec 14 19:00 myHD_delivery_1604.tgz
-rw-r--r--    1 root     root      256.0M Dec 14 16:55 myHD_delivery_1604_aa
-rw-r--r--    1 root     root      256.0M Dec 14 16:56 myHD_delivery_1604_ab
-rw-r--r--    1 root     root      256.0M Dec 14 16:57 myHD_delivery_1604_ac
-rw-r--r--    1 root     root       99.9M Dec 14 16:58 myHD_delivery_1604_ad
STANDARD INSTALL :
get the .apk (in Download section)
install using "App Central" Manual Install (or in a console using apkg)
... REMEMBER install is short ... BUT real install continue in background ... follow it by reading log (cat /tmp/start_myHD.log or tail -f) ... up to last message like this (in this case with pre-downloaded files):

Code: Select all

 # tail -f /tmp/start_myHD.log
Run only after boot / reboot / update of myHD
myHD start ... requested
Download Ubuntu if not yet available
Ubuntu Not installed ... download and install
/usr/bin/wget
file myHD_delivery_1604.tgz exist and are at the good version
file myHD_1604_delivery_scripts.tgz exist and are at the good version
myHD_delivery_1604.tgz is already downloed and at good version
Downloaded ... continue ...
Downloaded and installed ... nothing to do ...
seems all run as well
get keys from Asportal / get sound def.
myHD astr user exist ...
Now start jchroot in background
now start in background a survey to manage a clean exit
time to do extra works in myHD
set keys and files for user astr
set keys and files for user admin
Background interface to solve some launch problems (like AppImage)
Start background interface for user astr
Start background interface for user admin
Init alsa
^C
NOW you can add shared folder to myHD ... for ex.
myHD add_include_folder /share/Media
myHD add_include_folder /share/Music

etc. etc.
restart myHD to be able to use (read/write/delete etc.) it
myHD restart (now really short)
Install the applications :
Application name are WITHOUT MH- this prefix is added by myHD to identify easily myHD application in Asportal / App. Central
ex.
myHD_apkg install kodi18
... if application is not generated do :
myHD_apkg create kodi18
myHD_apkg install kodi18

... status installed / generated or just defined :
myHD_apkg status

AT END you can (and must do it regularly) ... update Ubuntu and Ubuntu packages
myHD apt_upgrade_package

[Uninstall procedure]
... due to the architecture just remove myHD don't remove all
... please use in a console command :
myHD uninstall_myHD
... ... it's an interactive script (but with default ... so not blocking)
... ... this command stop myHD
... ... test if ALL resources (share, etc.) are free (so no risk of unwanted remove)
... ... suppress ALL myHD application APKG installed (and check)
... ... suppress Ubuntu environment ... ask for (Yes is default)
... ... then all is clean remove itself by calling apkg command provide by Asustor
... BUT if you remove (to quickly) the myHD APKG ... shells script are provide (and saved with Ubuntu environment) to complete the uninstall
... ... one removing only the myHD application APKG, the second removing ALL as the myHD uninstall_myHD ... do

[Tests for Beta tester]
Try different command
Try including some folder to myHD
Try applications (install yours, test manually first and try create a APKG with 2 files (see example and real) with the APKG generator When doc. is ready ...
Try changing language ... use Ubuntu command locale-gen, export LANG, etc.
etc. etc.
only limit is ... if the install works as expected ... :roll: :roll: :mrgreen:

[Know bugs]
... due to function not implemented in kernel 4.4 used by Asustor
... ... some actions are limited (NameSpace enter)
... ... Chrome in myHD MUST run without sandbox (so a notification appear) (always due to problem to enter in namespace with this kernel)
... ... AND due to Chrome not working by default (without --no-sandbox) PlexMediaPlayer can't call the default browser ... so require to use TV mode (upper right button) to permit registration (I will work on workaround)

[Download]

APKG myHD 0.7 : https://www.father-mande.ovh/phpBB3/vie ... =33&t=1784 (bottom of the page)

Sorry this need lot of documentation (it's a complete / complex system by itself ... I will write it A.S.A.P. )

Have fun and thanks for your help.
Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
Post Reply

Return to “myHD”