Share your terminal screen

I came to this thought of sharing my terminal while preparing for a presentation for git commands. You may be here because of some other requirements. But I found it a very simple and fantastic way of sharing screen. So, lets start the tutorial:

Requirements: tmux and open-ssh

We will be using two computers connected to the same network which will be sharing their terminals.

Steps:

  1. On computer 1, open terminal and type
    tmux
  2. Now, on computer 2, open terminal and start a ssh connection to computer 1 by typing
    ssh computer1_username@IP_address_or_computer_name
  3. Now fireup tmux on computer 2 by using step 1 in the same terminal and list the sessions by typing
    tmux ls

    tmux Sessions are basically like work environments which can be used to save your work going on terminal, separate different sessions like home, work, play etc., dettach and attach to the same sessions without any work loss etc.

    Now, you will be getting an output where all the work sessions will be listed like this one: (not probably like this one, but let’s take this as an example)

    0: 1 windows (created Thu Feb  9 13:54:01 2017) [80x23] (attached)
  4. Now, connect to the session which you want to show on your screen. In my case, it will the zeroth one. So, I will be using the following command to attach my session to it:
    tmux attach-session -t 0
  5. Ta-dah! Now type anything on your computer 1 and it will be shown on computer 2 and vice-versa.

Tell me in your comments, how do you feel about this trick.

Also, if you are getting any problem, let me know.

Thanks!

Grub is not visible [Dual Booting Ubuntu 16.04 alongside Windows 10]

After installing Ubuntu, many people come with this problem – Why the hell my laptop is still loading windows 10 in its first place?

Well, I also came with this problem. I was installing Ubuntu 16.04 alongside Windows 10 x64 that came preloaded with my laptop. I followed this article for installing it. But after a successful install, when I restarted my laptop, Windows 10 loaded up in its first place. Now, I have to run Ubuntu from BIOS boot devices by pressing esc. I tried changing the default boot order to Ubuntu in boot option in BIOS setting, but still after every restart it automatically changed to Windows, thinking what kind of sorcery is this.

After lots of searching over Internet, I found this solution that worked in my case.

  • First, turn off the fast startup in Windows 10 as it causes file system corruption which in turn causes odd boot issues and then restart. It solves most of the cases.
  • If that doesn’t work, try re-registering GRUB with your firmware’s NVRAM from windows 10 command prompt. Open an Administrator Command Prompt window and type
    bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi
    

    If you’re booting with Secure Boot active, change grubx64.efi to shim.efi (or maybe it’s shimx64.efi in Linux, check the contents of /boot/efi/EFI/ubuntu to see what’s there). Doing this in Windows is more reliable than other methods because some users have reported that some versions of Windows repeatedly re-register themselves as the default boot loader if the default is set outside of Windows.

  • Another solution is to use Boot Repair. This tool automatically fixes certain types of boot problems.

The second one worked in my case. Tell me your solution in the comment section.