Install Oracle Virtualbox 6, Extension Pack and VBoxManage on Windows 10Linux Leech2019-06-26 | How to install Oracle Virtualbox 6.0, virtualbox extension pack and configure system path so vboxmanage works on the command line.
We compare both of the dockerfiles that are used to create their corresponding docker images.
We then create containers from each of these image files and make some modifications to each of the containers. With both of the containers running we look at the resource usage of each and also how we can obtain the output from each of our running containers.
We finish off by using SSH to operate docker on a Synology NAS and startup a modified container from one of our iperf3 images so that we can run a bandwidth test from our Synology NAS to our local machine.
Android Screen Recording: How To Record and Control Your Android Phone - Windows 10 youtu.be/MWKqus1XbGQ
In this video we record an Android phone's screen and the phone's audio, without using a USB cable or an aux cable plugged into your windows 10 computers line-in to get sound from your phone.
Content: 0:00 Intro 0:30 Connect to phone 1:04 Add Android phone screen to OBS source 2:40 Capture phone audio 4:04 Test Recording 5:45 A few Issues 6:40 Outro
Blog: http://www.linuxleech.com Twitter: http://www.twitter.com/linuxleech Facebook: http://www.facebook.com/linuxleechAndroid Screen Recording: How To Record and Control Your Android Phone - Windows 10Linux Leech2020-08-08 | Record and control your android phone from your Windows 10 computer. There are plenty of tools that accomplish the task of Android screen recording but most of them have low frame-rates, watermarks, capped resolution and limited recording time. The tool that we use in this video does none of this and can be used totally free without any of the above limitations.
In this video we install scrcpy to record and control our Android phone from a Windows 10 computer. This is a method of recording an Android device that works with NON-Rooted Android devices and gives us a huge amount of control over the recordings. We can lock the rotation of the device, limit frame-rate scale the resolution, enter text and commands from the controlling computers keyboard send files and install apk files simple by dragging and dropping the files onto the scrcpy window and a whole load more. Scrcpy also does not watermark your recordings or limit the resolution or duration like some other android screen recorders.
0:00 Intro 0:22 Download scrcpy 0:59 Extract scrcpy to Windows 10 computer 1:52 Add scrcpy to system path 3:30 Start ADB server 4:30 Enable developer options and USB debugging on phone 5:28 Connect phone to Windows 10 computer 6:15 Run scrcpy 7:00 Record android phone screen 8:30 Control and record android phone using WiFi 11:32 Record android screen over WiFi 13:23 Stopping and Starting the ADB server 15:10 Closing comments 15:53 Outro
In this video we cover how to stream audio from your android phone over Bluetooth to a Windows 10 PC. This used to be possible with Windows 7 using third part apps as Windows 7 supported A2DP sink. For some reason Microsoft removed it from Windows 10 but this feature is now back in Windows 10 with the release of the Windows 2004 feature update.
You will also need to download the "Bluetooth Audio Receiver" app from Microsoft store.
0:00 Intro 0:36 Update Windows 10 to feature update release 2004 01:18 Pair phone with PC over Bluetooth 02:26 Get phone to output audio over Bluetooth 02:53 Download and install Bluetooth Audio Receiver 03:24 Open audio connection to phone 03:50 Play audio from phone to Windows 10 PC audio test 04:40 Closing comments
Blog: http://www.linuxleech.com Twitter: http://www.twitter.com/linuxleech Facebook: http://www.facebook.com/linuxleechIperf3 On Synology NAS Using Docker APPLinux Leech2020-07-16 | In this video we setup iperf3 for testing network bandwidth on a Synology NAS using docker. The docker container that we use, can be started as an iperf3 server using the Synology docker app. It will run continuously until you stop the container from within the app.
If you don't want to run this iperf3 container as a server you can override it's default behaviour by starting the container from the command-line with your chosen iperf3 options.
Blog: http://www.linuxleech.com Twitter: http://www.twitter.com/linuxleech Facebook: http://www.facebook.com/linuxleechControl and Record Android From PC - LinuxLinux Leech2020-06-28 | In this video we build and install scrcpy to control and record the screen of an Android phone from a Linux PC. We start by connecting to the Android phone using a USB cable followed by connecting over WiFi for a totally wireless solution.
Within the build directory that we just created: ../configure --with-sdlabi=2.0 --enable-sdl --enable-opengl --enable-virglrenderer --enable-system --enable-modules --audio-drv-list=pa --target-list=x86_64-softmmu --enable-kvm --enable-gtk
Once configuration has completed run make to compile QEMU make
Install qemu-utils to get qemu-img: sudo apt install qemu-utils
Make our virtual hard disk: qemu-img create -f qcow2 Android9.img 12G
Add your user to kvm group: sudo adduser $USER kvm
Add a udev rule for KVM in /lib/udev/rules.d/99-kvm.rules KERNEL=="kvm", GROUP="kvm", MODE="0666"
Create our first virtual machine to install android x86 in: ./x86_64-softmmu/qemu-system-x86_64 -boot d -cdrom "android-x86_64-9.0-r2.iso" -enable-kvm -smp 2 -device virtio-vga,virgl=on -net nic -net user,hostfwd=tcp::5555-:22 -cpu host -soundhw es1370 -m 2048 -display sdl,gl=on -hda Android9.img
After installation boot the VM without the cd-rom drive and tell QEMU to boot from the disk that we created: ./x86_64-softmmu/qemu-system-x86_64 -boot c -enable-kvm -smp 2 -device virtio-vga,virgl=on -net nic -net user,hostfwd=tcp::5555-:22 -cpu host -soundhw es1370 -m 2048 -display sdl,gl=on -hda Android9.img
To see if virgl is working within the VM: Inside of the android vm open terminal emulator and type:
dmesg | grep virgl
------------------------------------------------------------------------------- To remove all of the work we have done from your system. To remove qemu 3.1.1.1 just delete the qemu3.1.1.1 directory. remove the dependencies sudo apt remove -y build-essential libepoxy-dev libdrm-dev libgbm-dev libx11-dev libvirglrenderer-dev libpulse-dev libsdl2-dev libgtk-3-dev
There are a number of reason why a disk might be read-only the most common is, you do not have the correct permissions. In this specific instance the issue is the way Windows 10 shuts down, or doesn't.
Windows 10 has a feature called fast start-up. What this does is put your computer into some kind of hibernation state when you click shutdown, instead of actually shutting down your machine. If you click restart instead of shutdown your computer actually restarts.
This Windows 10 feature can cause error messages like "Unable to create steam library, HDD "Read-Only"" to occur when you are using your Linux OS.
In this video we go through all of the steps needed to disable Windows 10 fast start-up.
Blog: http://www.linuxleech.com Twitter: http://www.twitter.com/linuxleech Facebook: http://www.facebook.com/linuxleechInstall Android 9 Pie X86 in Virtualbox - 2020Linux Leech2020-05-14 | In this video we go through the process of creating a virtual machine with Virtualbox, for Android 9.0 Pie X86. Followed by installing Android 9.0 Pie X86 within our newly created and configured Virtualbox virtual machine. With working audio and internet/network connection.
Blog: http://www.linuxleech.com Twitter: http://www.twitter.com/linuxleech Facebook: http://www.facebook.com/linuxleech #android #virtualboxVirtualbox 6 Performance Trick to Get More Video MemoryLinux Leech2019-06-27 | In this video we increase a Virtualbox virtual machines vram from 128MB to 256MB using vboxmanage. Once you have changed the vram setting using vboxmanage modifyvm you will notice that the slider within the GUI settings for your VM now allows you to increase the vram up to 256MB.
After increasing the vram of our virtual machine we start it and check to see if the virtual machine can actually see the extra vram.
Blog: http://www.linuxleech.com Twitter: http://www.twitter.com/linuxleech Facebook: http://www.facebook.com/linuxleechNautilus File Manager Scripts - Adding Superpowers to your File BrowserLinux Leech2019-06-21 | Nautilus scripts allow you to add extra functionality to the Nautilus file browser. We first created the directory to hold our Nautilus scripts then proceeded to write a very simple script that resizes any selected images and save a copy of them to the same directory as the original images. We then went over some of the things that you need to be aware of when creating your own scripts.
You can create directories within your Nautilus script directory so that you can organise your scripts into sub categories. This will translate to sub items in your right click menu with the name of the corresponding directory. This is useful if you end up utilising a large number of Nautilus scripts. Personally I haven't found the need to use this feature as I have never gone above 10 Nautilus scripts.
Blog: http://www.linuxleech.com Twitter: http://www.twitter.com/linuxleech Facebook: http://www.facebook.com/linuxleechInstall FFmpeg on Windows 10 - 2019Linux Leech2019-06-20 | How to Install FFmpeg on Windows 10 Easy and Fast. In this video we install FFmpeg on Windows 10 first we download and extract a static build of FFmpeg we then add our downloaded FFmpeg build to our system path so we are able to run it from any directory on our Windows 10 system simply by typing FFmpeg and not the full path to our FFmpeg binary.
Download link: The download procedure has changed slightly you will need to download a specific zip file from the github link below:
We finish off with testing our newly installed instance of FFmpeg by changing the scale of a 4k video to 1080p. One thing to note about this static build of FFmpeg is that it comes with support for nvidia nvenc hardware accelerated encoders and Intel quick sync. So if you have a modern NVIDIA graphics card that has nvenc or a modern Intel CPU with support for quick sync you will be able to utilise those to dramatically accelerate video encoding tasks with FFmpeg.
In this video we start off by simulating a bash for loop and converting the flac test files sequentially using ffmpeg to demonstrate that only one CPU core is used to transcode the group of flac files to mp3 files using this method. Leaving all of the other CPU cores essentially idling.
We then modify the python script with one simple change to use all of the available CPU cores to convert our flac files to mp3 files and this gives us a massive speed boost, we cut down the transcode time significantly. Finally we increase our transcode speed even more by using variable bit rate (VBR) mp3 files instead of creating constant bit rate (CBR) mp3 files.
This allowed use to increase our transcode speed to over 725%🔥 ( yes you read that right, Seven hundred and twenty five percent speed increase ) faster than our bash for loop method.
We could probably get this speed increase go a little higher if we were to use asycio instead of a thread pool as this would eliminate the thread creation overhead and thread banging wouldn't occur. I may test this in the future but I think over 725%🔥 speed increase is pretty good for a 20 minutes rough python script.
Would be interesting to see how fast this would be on a 64 core AMD Threadripper.🔥
In this video we go over how to reverse a video independent of the audio so the audio will play normally while the video is reversed. We then move on to reversing the audio as well. Finally we get to working with a video file that contains multiple audio tracks.
Using a complex filtergraph (filter_complex) we reverse the video and one of the audio streams then map the output to a new file that contains the reversed video stream, the reversed second audio stream and the original first audio stream that has not been reversed. Resulting in an output file that has reversed video, the first audio track playing as normal and the second audio track playing in reverse.
The hardware accelerated encoder used (h264_nvenc) in this video requires a current nvidia GPU that supports nvenc and was chosen as it is significantly faster at encoding video compared to libx264. Also ffmpeg needs to be compiled with nvenc support in order to use this encoder.
If your machine does not have this hardware and/or your ffmpeg install is not compiled with support for this hardware you can use any other encoder that you do have to encode your reversed video. This video will show you how to view the encoders that you have available in your ffmpeg install youtu.be/lW7DQaWjus4 You could also not explicitly set an encoder, as ffmpeg does have defaults that it will fall back to.
Blog: http://www.linuxleech.com Twitter: http://www.twitter.com/linuxleech Facebook: http://www.facebook.com/linuxleechFFMPEG Add Audio to Video - Single and MultitrackLinux Leech2019-05-29 | FFMPEG Add Audio to Video - Single and Multitrack How to add one or many audio tracks to a video using ffmpeg. In this video we go over how to add audio from an mp3 file source or from a video source and copy the audio over to a new video that doesn't have an audio track.
We follow on by adding a second audio track to a video making it a dual audio track movie and changing the order of the audio tracks within the video.
Finally we change which audio track is marked as default, this has the effect of being the audio track that video player chooses to play.
Blog: http://www.linuxleech.com Twitter: http://www.twitter.com/linuxleech Facebook: http://www.facebook.com/linuxleech Google+: http://www.gplus.to/linuxleechFFMPEG - Split Video into Separate ClipsLinux Leech2019-05-23 | Auto cut video into clips - In this Video we go through how to use FFMPEG to split a video into separate clips of varying lengths. We start with making a single short sub-clip of a video and progress on to producing a short script that will cut up an entire video of any length into individual 10 second video clips.
In this video we go over the real difference between sourcing and running a shell script in BASH and how exporting environment variables from one script can give you access to them in another.
In this video we go over the files and methods that you need to edit, add or remove directories from you path variable. We also cover how to make changes that will be applied system wide to all users or just one specific user on your Linux machine. We also go over why and how the path variable is exported.
I am fully aware of the right click menu "emoji picker" but that doesn't work in Gnome terminal, and doesn't cover all of the possible Unicode characters that are available to you.
You can use this method to type any other Unicode characters.
We go over two method to do this. The first is to use dconf editor to do it graphically and the second method is on the command line using gsettings.
The fractional UI scaling feature is experimental in gnome 3.32 and can be enabled for both Wayland and X11.
Before the release of gnome 3.32 which is included in Ubuntu 19.04 the only options in the display setting for scaling were very coarse and limited to 2x and 3x scaling. But with fractional UI scaling you now have a more granular set of choices for you HiDPI display.
As nohup is part of the GNU coreutils, if you have the ls command you will have nohup.
Lets say that you want to run a command or script on a remote machine over SSH. If for any reason you loose connection to that machine, whatever you are running will terminate.
You might be thinking, well I can just use a multiplexer like screen or tmux, and you would be correct. Either of these will solve this issue. The only problem is tmux and screen might not be installed and you may not have the ability to install one of them. This is where nohup comes in. All you need to do is prefix your command, shell script or pipeline with nohup, run it as a background job with ampersand "&" and you are done.
Blog: http://www.linuxleech.com Twitter: http://www.twitter.com/linuxleech Facebook: http://www.facebook.com/linuxleech Google+: http://www.gplus.to/linuxleechJobs Command in LinuxLinux Leech2019-04-11 | Jobs Command in Linux In this video we go over the jobs command and how to control jobs in the terminal. We cover all of the ways that you can control command line jobs in Linux as-well as how to use nohup for hangup immune background jobs. We also cover bg and fg usage to bring jobs to the foreground or send jobs to the background. We also cover how to use kill to send different kill signals to background jobs.
At it's simplest a job is a single command. Like ls. A job could also be something more complex like a pipeline, this would also be classified as a job or even a shell script.
In this video we test the performance of the empty file creation methods used in "7 ways to create empty files" The shell script test took 60 days to run and produced some surprising results.
Blog: http://www.linuxleech.com Twitter: http://www.twitter.com/linuxleech Facebook: http://www.facebook.com/linuxleech Google+: http://www.gplus.to/linuxleechRandom Number Variable in BASH - Linux CommandsLinux Leech2019-04-03 | Random Number Variable in BASH - Linux Commands In this video we go over how to generate random numbers in bash using the random builtin variable. The random variable doesn't act like any normal variable in BASH. Assigning a number to the random variable seeds the variables random number generator instead of storing it.
As the random variable generates pseudorandom numbers, by controlling the seed value you can actually predict the numbers that the random variable will produce. The first example that we go over is how to produce random numbers that are within a range of 0-10 and 1.10. We expand on this in the second example by restricting the numbers produced to be a binary random choice of either 0 or 1. Following on we create a dice roll by restricting the range of random numbers to be 1-6. In the next example we shift the range to start at 1000 instead of zero or one and restrict the upper limit to 1500.
The final example illustrates a method to create numbers larger than the largest number the random variable is capable of producing which is 32,767. We generate 6 digit random numbers but the same method can be used to produce much larger numbers.
Blog: http://www.linuxleech.com Twitter: http://www.twitter.com/linuxleech Facebook: http://www.facebook.com/linuxleech Google+: http://www.gplus.to/linuxleechRun Shell Script on Login - Programs and Apps Too - UbuntuLinux Leech2019-04-02 | Run Shell Script on Login - Programs and Apps Too - Ubuntu We start off in the GUI by launching a program when we login then move on to see how gnome does this, and look at the files and directories involved. Finishing with a dot desktop file that we create manually to run a shell script. To create the dot desktop file we use a helper tool called desktop-file-edit which allows us to set our desktop file key value pairs with command line arguments. Desktop-file-edit also uses another tool to validate our dot desktop file before it creates it to make sure it is correct, the validation tool is desktop-file-validate.
Some common uses for tee include downloading files and computing hashes, while the file is downloading. So you can confirm against a provided hash that the file wasn't corrupted during download. Another common use for tee is to watch the output of your command pipeline while you are also saving the output to a file for later reference. Watching logs is like clock watching, sometimes you just need a summary of the data in your pipeline once it completes doing whatever it is doing. You can use tee for this too. So at the end of your pipeline if you pipe into tee you can save the output for later reference and pipe on to some other utilities to calculate a summary, like count the number of lines processed etc.
Blog: http://www.linuxleech.com Twitter: http://www.twitter.com/linuxleech Facebook: http://www.facebook.com/linuxleech Google+: http://www.gplus.to/linuxleechNamed Pipes - Inter-Process Communication LinuxLinux Leech2019-03-21 | Named Pipes - Inter-Process Communication Linux In this video we go over named pipes using mkfifo. Starting with a brief explanation of FIFO ( first in first out ) and LIFO ( last in first out ). Followed by examples of how to use named pipes and some of the pitfalls that you would encounter such as broken pipe errors and blocked pipes. We also cover having multiple processes writing to a single named pipe at the same time and the reason why having multiple readers of a named pipe is not such a good idea unless you are using a named pipe as a queue.
Named pipes are not frequently used but do have a certain efficiency going for them. As the data that is sent through a named pipe is stored in memory the main benefit is speed. So for any process that you would normally think of using a temporary file you could probably use a named pipe instead.
Blog: http://www.linuxleech.com Twitter: http://www.twitter.com/linuxleech Facebook: http://www.facebook.com/linuxleech Google+: http://www.gplus.to/linuxleechProcess Substitution in BASH - Commands for LinuxLinux Leech2019-03-12 | Process Substitution in BASH - Commands for Linux Process substitution allows you to run a single command or many commands in a subshell. You can then choose to either read from or write to your subshell. By using process substitution you can replace a lot of workflows that would normally require you to create temporary files and have multiple command lines. You can accomplish most of these types of flows using process substitution, and all on a single command line.
One thing to remember when using process substitution is that you need to treat each process substitution in the same way that you would treat a file. For example you cannot provide echo with a file path and expect it to print out the content of the file. If you use echo in this way it will just print out the path to the file descriptor that was used for you process substitution.
In this video we cover a few examples using process substitution the first example shows you how to produce a side by side listing of two different directories using pr, ls and process substitution. The second example uses diff to show us the files that are in one directory and not in the other.
In the final example we use md5sum to hash text that is written to our process substitution and demonstrate how the commands within our process substitution perceive this data.
Blog: http://www.linuxleech.com Twitter: http://www.twitter.com/linuxleech Facebook: http://www.facebook.com/linuxleechStderr Stdout and Stdin - How to Redirect them - Commands for LinuxLinux Leech2019-03-05 | Stderr Stdout and Stdin - How to Redirect them - Commands for Linux This video will show you how to redirect standard input, standard output and standard error also known as the standard streams. Throughout this video we go over redirecting standard error( stderr ) and standard output ( stdout ) to files so that you can have both outputting to the same file or separate files. We also cover redirecting stdin.
There are many reasons to redirect stdout and stderr. An example of this would be you are dealing with a program or utility that spams a large amount of output to the screen but you are only interested in error to diagnose some problem. You could trawl through the output searching for errors, but this is time consuming it would be a much better idea for you to just redirect stdout to /dev/null and you will be left with only error displayed within your terminal.
Redirection of these three standard file descriptors is common to see in bash scripts along with using exec to make your own file descriptors and is just another handy tool to have at your disposal.
Just remember if you are redirecting stdout, stderr or both to a file and you want to keep the output from previous redirection make sure you append with double greater than signs as this will stop you from clobbering data that was previously written to your file.
#emptyfileCommand Separators - Commands for LinuxLinux Leech2019-02-26 | What are command separators ?
In this video we go over command separators and command grouping. We explore the uses of the semicolon delimiter the significance of the newline character, grouping commands within parentheses to fork a sub shell, creating multiple background jobs on a single line using ampersand and escaping end of line characters to create multi line command lines. We also cover some of the pitfalls you may encounter while using these techniques.
#commandseparation #commandgroupingPython Typewriter - Make your Computer Sound like an Old Typewriter - Linux - Part TwoLinux Leech2019-02-24 | Python Typewriter - Make your Computer Sound like an Old Typewriter - Linux - Part Two Part two of the linux typewriter.
#linuxtypewriter #linuxleechPython Typewriter - Make your Computer Sound like an Old Typewriter - LinuxLinux Leech2019-02-24 | Python Typewriter - Make your Computer Sound like an Old Typewriter - Linux In this video we look at one way to make your keyboard sound like an old antique typewriter.
We start off working out how we can read keystrokes from our keyboard and finish up with a python script that is able to read keystrokes globally.
In case you are wondering, yes I am fully aware of Xlib and I am aware that I misspelled typewriter for the directory name.
#linuxtypewriter #linuxleechCron Grandfather Clock with Python - LinuxLinux Leech2019-02-21 | Cron Grandfather Clock with Python - Linux In this tutorial we make our computer toll and chime like an old grandfather clock every hour on the hour using the crontab and Python in linux.
To accomplish this we write a small python script that gets the current time and uses the hours field to work out how many times the chime needs to play. This is preceded by the customary ringing associated with grandfather clocks.
A simple cron job is used to run our script hourly. All of the code and sound effects used in this tutorial are available on github.
When resizing panes whether it is in height or width the first step is to make sure that the pane you wish to resize is the pane in focus. I.E the keyboard cursor must be on the pane you wish to resize.
To resize the width of a pane ctrl + a : Then type: resize -h 40 This will resize the horizontal width of the pane to 40 characters.
When resizing the height of a pane no flags need to be provided. To resize the height of a pane ctrl + a : Then type: resize 30
This will resize the vertical height of your pane to 30 characters.
You can also provide the unit of size as a percentage. This will be a percentage of the size of your terminal window or your screen in the case you are using a full-screen terminal.
Percentage examples: To resize the width of a pane to 40 percent ctrl + a Then type: resize -h 40%
To resize the height of a pane to 30 percent: ctrl + a Then type: resize 30%
Note: I am aware that when I resize the horizontal width to 50% in the tutorial It doesn't split the screen equally down the middle. This is an artifact of the size and style of font used. Screen does accept percentage units and will split you terminal down the middle if you set the horizontal width of a pane to 50%.