Skip to main content

Posts

Showing posts from June, 2018

chroot

root #mount --rbind /dev /mnt/mychroot/dev root #mount --make-rslave /mnt/mychroot/dev root #mount -t proc /proc /mnt/mychroot/proc root #mount --rbind /sys /mnt/mychroot/sys root #mount --make-rslave /mnt/mychroot/sys root #mount --rbind /tmp /mnt/mychroot/tmp
chroot /mnt /bin/bash source /etc/profile env-update export PS1="(chroot) $PS1"

viewtube

viewtube.sh
------------------------------------------------------------------------------------------------------------------
#! /bin/bash

s="$(echo "$1" | sed -e "s/viewtube://")"
v="$(echo "$s" | awk -F '|' '{print $1}')"
a="$(echo "$s" | awk -F '|' '{print $2}')"
if [ "$a" = "" ]; then
   mpv --osc --fs --ytdl=yes "$v"
   #cvlc -f "$v"
else
   mpv --osc --fs --ytdl=yes --audio-file "$a" "$v"
   #cvlc -f --input-slave "$a" "$v"
fi
------------------------------------------------------------------------------------------------------------------ 
3.2 Create the viewtube protocol file in ~/.local/share/applications

viewtube.desktop

[Desktop Entry]
Name=ViewTube Protocol
Exec=/path/to/viewtube.sh %u����…