All tech and Linux blog, under the flag of open source world....

July 13, 2020

Mounting NTFS drive (windows) in Linux






Mounting Windows drive can be hassle in Linux as windows now defaults to Hibernation rather than shutting down which will create corrupted NTFS for other OSes to boot from.
You might face errors such as:
> Can't mount, windows is hibernated
Or simply not being able to paste anything in the ntfs drive and reading it only.

to solve this boot into windows and save any unsaved files and while shutting down hold "Shift" button to force complete shutdown.

Then head over to your Linux Distro and make sure that you have ntfs-3g drivers installed. (usually they are default installed), unmount the windows partition then run this command:
sudo ntfs-3g -o remove_hiberfile /dev/sdxX /mount-point
Note: replace /dev/sdxX with the path to your windows partition. you can find this in gnome disks.

Note2: replace /mount-point to your default mount point, usually /mnt.

This will terminate the hibernation session. now you can access windows files in your mount point location. if you  can unmount it in  gnome disks again and remount it so you can access it from gnome files.
Share:

May 20, 2020

Virtual camera with v4l2loopback for meetings


 Setting up a virtual camera in Linux is fairly, virtual camera makes you play a video as a video input from a webcam, or screen share, most use cases are when you want to share multiple screens but your video chat client has limitations.

To start:

Get v4l2loopback module from here.

Note: to run the module you need kerenl-devel and kernel-headers, the package name might vary depending on your distro.

unzip the tar, open a terminal in the directory and run the following commands.
sudo make 
sudo make && sudo make install  
sudo depmod -a 
Congrats, the module is now installed, if you encounter errors, do a  "sudo make clean"  and retry. Note that if you do a kernel update you should rebuild this for the given kernel.
to enable the module:
sudo modprobe v4l2loopback exclusive_caps=1
Now there must be a fake webcam detected in your system, to test this run:
v4l2-ctl --list-devices
if you see devices other than the system webcam that is your virtual camera. now to run a video from it you need "ffmpeg". install it from your package manager then to input a desired video to the fake webcam run:
sudo ffmpeg -re -i /path/to/Video -map 0:v -f v4l2 /dev/videoX
Note: you should put the rename the videoX device as the fake dummy device name in previous list command. (for example for me /dev/video0 is my webcam and /dev/video1 is the fake camera so I rename X to 1)

To cast your screen use the following ffmpeg command:

ffmpeg -f x11grab -r 15 -s 1920x1080 -i :0.0+0,0 -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/videoX

Note: Keep the module and the ffmpeg running or the video chat app won't detect it and it will not work!

Note2: change the screen resolution to the one you are using. And it is preferred to use Xorg as your window manager!

Tested Clients for usage: 

  • Zoom
  • Google Meet
  • Jitsi
  • Bluejeans
Others might work to but I haven't tested them. Comment below and I answer your issues ASAP.
Share:

May 1, 2020

Using Tor system wide in Fedora

Tor Project


 If you like to be anonymous and not be visible by hackers and much more, you will like Tor, the concept is that your data travels through nodes and encrypted layer by layer, this can be achieved by both Tor Browser and system wide Tor.
 If you have apps that are not very secure you can try tor system wide to get a layer of protection.

Installation:

The required Packages are "torsocks", and standalone "tor" bundle from dnf.
sudo dnf install tor
sudo dnf install torsocks

Running: 

When the required packages are downloaded and installed you can now start tor by running
systemctl start tor
But we are not done yet, you need to assign a proxy in order to make tor function, so we head over to settings => network => proxy => set to manual

and use the configuration as shown:

Well done, check if tor is functional by visiting "check.torproject.org"

To revert back to local network, run
systemctl stop tor
and revert your proxy settings back to disabled.
Share:

April 12, 2020

Analyzing and measuring Linux boot time in detail

The grub menu
 My boot times were slow so I tried a quick method to measure the boot time and boot services through systemd, this method works on most distributions including Fedora and Ubuntu, you just need the Terminal to start the process.
 Just type in the command:
systemd-analyze plot > plot.svg
Almost instantly the report will be generated in an svg file in your home partition, here is mine:




See this in action:


Share:

March 21, 2020

Best online teaching platforms for schools and Teachers






 Because of the recent Covid-19 outbreak many schools started to conduct their teaching online, and I've tested some of the popular platforms to see which one is better.

 Video call platforms tested:

  • Zoom Video calls
  • Bluejeans
  • Microsoft teams
  • Skype
  • Meet Hangouts

Asynchronous learning  platforms tested:

  • Google Classroom
  • Edmodo
  • MoodleCloud
I conducted the test between 5 teachers and many found the Bluejeans, Google classroom combo to be easier for students and more versatile. The downside for both platforms is that Bluejeans is paid. (Although relatively cheap), and google classroom quizzes can not be timed (but you can create a quiz in another platform and share the link.)

Here you can see the overall comparison:




Share:

March 7, 2020

Linux package managers, safe and secure

Package managers are built into all of Linux Distributions
 In this widely accessible internet and the security breaches happening daily, not to mention Adware, Malware and Spyware apps which are found on most computers today.
 Package managers help to minimize this by creating a standard which the installation files and application should look like, applications go through a lot of process to get added to a repository. Each Repository has it's own rules for apps, for example the Licence, Code, the amount of resources etc...

Advantages of package managers: 

  • Fast and reliable: They are certified not to contain any errors, major slowdowns or system errors.
  • Secure: You can be sure that they do not contain any problems that put your data at risk.
  • Updates: You get updates fast and without any hesitation, with lower data consumption, less chance of corruption or error. 
  • Support: Any package will be supported out of the box, no system modifications needed, any needed modules, drives, and libraries will be installed.
  • Growth: Usually good distributions come with a good package manager, this plays a major role in a distributions success since your daily job is tied to them
  • Modular: You can remove and unnecessary app or library to be removed without touching other applications. 

Why windows lacks security:

 Windows lacks a lot of security since there is no major application manager, and any .exe file that you get might contain ANY threats, for example installing a notification update in browser, change your homepage, disable your Anti-virus, Encrypting or removing your files.
 Microsoft tried to solve this issue by creating Windows Store, but it was a big failure, since not so many developers moved their creation to the Windows Store (due to high amount of money Microsoft gets to showcase the app in their store). 
Microsoft store is also a revenue gain for the company because the advertisement of apps you see on Windows is what makes Windows free to download and of course they just want to fill their wallets compared to Linux Distributions which you are the manager of your own.


Why Snap and Flatpak are terrible:

Snap and Flatpak are two major package managers that usually users add them alongside their default distribution, I and many more are voting against it, most of the package maintained there are poorly managed, most app developers use it for their badly developed apps that are not accepted by the default distributions are pushed there, so they are not build around the standards. Snap itself has also some issues, snaps packages all of their dependencies along with the program. So a program that uses libPNG will come with its own copy of libPNG. This is good for reliability and simplicity but it introduces several problems.
The installs are much bigger and most of the size is wasted space. Duplicate libraries of things you already have. Second problem, you don't really know what the libraries inside the snap are. They may be out of date, they may even by incompatible with your system in some way.
Snaps also auto-update and that brings issues too. If you don't want that update right now or if it contains bugs. You're getting it anyway, you have no say in the matter.
alongside all this Snap requires a Daemon, which means it uses resources all the time.

Some Facts about package managers:


  • Orphaned packages are packages which their administrator is not supporting them anymore, usually distributions quickly find a new package administrator. (Admins control all the mentioned above in the app)
  • Popular package managers include: DNF, Pacman, Zypper, DPKG.
  • Repositories which contain the packages on the cloud have mirrors, to deliver the best performance to you. for example, if you live in turkey and the main server is in germany, there are copies of that server all around the world which your distro will use the fastest and closest one to make your installs and updates much faster.
Share:

February 8, 2020

Learning the Linux command line with OvertheWire

Linux terminal running
  I can say that after switching to Linux, looking at the terminal was frustrating, I would avoid it at all costs, that's why I switched to "Celluloid" a gnome made FFmpeg video player. After dealing with a lot of problems and must usages of the terminal I essentially learnt the commands to progress my work in Linux.
 Recently p4r4xor, introduced to me this really fun game to do and learn, hosted by overthewire, which puts you through different tasks to learn how to manage a server, crack some and memorize some commands.
 The game is developed in a way which will put you through different challanges that increases your productivity and strength and it is established through an SSH connection to the server.





There are different modes as you go, for example bandit sneaks through the files to find information.

The website: https://overthewire.org/wargames/
it's suggested to play as a bandit if you are a beginner.



here I have done the Bandit challange till level 5 with the methods to solve:

Share:

Labels