13 January 2019

Tutorials I've written

We are in this world to help each other, and what better place than the Internet for sharing knowledge. This page contains a curated list of tutorials I've written which you may find useful.

Technical



Fun Projects



Volunteering



General Everyday How-to's


Say thank you or donate

06 January 2019

Removing metadata from photos



When you take a photo with modern digital cameras or your smartphone camera, there is a lot of information (EXIF data) that the device embeds into the photo that can be viewed in the image properties. When you share the photo with other people, if you don't want them to see that data, you can remove it with certain tools.

An internet search for "How to remove exif data from photo" will lead you to a lot of tools.


  • GIMP users: Just open the image in GIMP, choose "Export as" and when exporting the file, uncheck the "Save EXIF data" option.
  • Ubuntu users: Simply open a terminal in the folder that contains the images you want to remove exif data from and type  mogrify -strip *.jpg to remove exif data from all jpg files. Else instead of "*.jpg", specify the particular filename.


Unable to copy files from computer/laptop to phone SD Card / internal memory


It can be puzzling when you encounter an error that simply says that a file can't be copied from your computer to your phone.

It could simply be one of the following issues:
1. The filename has special characters like a comma or colon which is not supported by your phone's operating system as a filename.
2. The filename may be too long, and long filenames may not be supported by the phone's operating system.

Simply change the filename to something that contains just alphanumeric characters and you'll be able to copy it. 

03 January 2019

How to reduce the brightness of your monitor to lesser than what the operating system allows



Yet another reason to love Linux.
Sometimes you really need the brightness of your monitor to be lower than it already is, and I've found the best solution is to use xrandr. It's installed by default in Ubuntu.

First, you need to know which device is connected to your display (even if you are using a laptop).
Type:

xrandr -q


You'll get an output that looks something like this:

Screen 0: minimum 8 x 8, current 1366 x 768, maximum 32767 x 32767
DP1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 256mm x 144mm
   1366x768      60.06*+
   1360x768      59.80    59.96 
   1280x720      60.00 
   1024x768      60.00 
   1024x576      60.00 
   960x540       60.00 
   800x600       60.32    56.25 
   864x486       60.00 
   640x480       59.94 
   720x405       60.00 
   680x384       60.00 
   640x360       60.00 
HDMI1 disconnected (normal left inverted right x axis y axis)
VGA1 disconnected (normal left inverted right x axis y axis)


Look for the one that says "connected", and use that in the next command.
Type:


xrandr --output DP1 --brightness 0.5



And tadaah!!! The brightness goes to 50% lesser than what it was.
Enjoy!!!



Create aliases

Still better, create these two aliases in ~/.bash_aliases.

alias br='xrandr --output eDP1 --brightness 0.5'
alias brightness='xrandr --output eDP1 --brightness '

Now you can just type br or brightness 0.3 or brightness 0.6 etc. instead of typing the entire command.


Update: Oct 2019: Redshift can be manually controlled and can even alter gamma. So rather than use xrandr, use Redshift: https://nrecursions.blogspot.com/2018/03/alternative-to-flux-for-ubuntu-is.html 
 
Update 2022: At least from Ubuntu 22.04 and Windows 10 onward, there's no need of installing redshift or similar apps, since the OS comes pre-installed with a NightLight app. Even Android has it.