Saturday, November 26, 2016

Gimp and rule of thirds guides

Ever wanted to use rule of thirds guides in gimp?

Here is a simple guide that works just fine: http://registry.gimp.org/node/13536

Friday, November 25, 2016

Realtek gigabit usb ethernet card with usb hub

Just got this ethernet/hub combo and I was unable to make it work. I was getting the following error:

[ 265.335354] usb 1-1.1.3: Manufacturer: Realtek
[  265.335358] usb 1-1.1.3: SerialNumber: 00E14C3600C8
[  265.428826] usb 1-1.1.3: reset high-speed USB device number 19 using ehci-pci
[  265.567413] r8152 1-1.1.3:1.0 eth1: v1.08.2
[  267.113732] r8152 1-1.1.3:1.0 enx00e14c3600c8: renamed from eth1
[  267.139576] IPv6: ADDRCONF(NETDEV_UP): enx00e14c3600c8: link is not ready
[  267.197045] IPv6: ADDRCONF(NETDEV_UP): enx00e14c3600c8: link is not ready

and no connectivity.

After some digging, I discovered that my network card is a Realtek 0bda:8153, this card is supported by the driver r8152 that already existed in my system.

Some more digging brought this on surface: https://bugzilla.redhat.com/show_bug.cgi?id=1236679

In short it seems that tlp tries to save power for me by blocking my network card. The solution is to add the following

USB_BLACKLIST="0bda:8153" in /etc/default/tlp and reconnect the card. After that everything works as expected.



Typing the € symbol in a linux system

For infrequent users:

If you use English (US) keyboard layout and you don't want to change it, the the fastest way would be to use Ctrl+Shift+U key combination and then type 20ac followed by Space(or Enter) which will turn into .


The Xorg solution:

In your keyboard layout settings choose Options -> Add currency signs to certain keys then choose the key you can use to activate that option by changing the option Key to choose 3rd level (or 4th depending on which level your currency symbol is. you can get the full keycodes by using xmodmap -pke in console)
For this you can choose use Win key, its useless in Linux anyway, so you might as well find some use for it.



The console solution:

xmodmap -e "keycode 13 = 4 EuroSign 4 EuroSign"
xmodmap -e "keycode 13 = 4 dollar 4 dollar"
xmodmap -pke > .xmodmap
xmodmap .xmodmap

Now if you want, for example, to change the $ sign (which you can type it using Shift+4 shortcut when you have an US English keyboard) with sign, you can use the following command in terminal in terminal:
From now you can type using Shift+4 shortcut.
To switch back to $ sign, use:
To get this change for every session, create a file called .xmodmap, with the following command:
Then, create a file called .xinitrc in your home directory, containing the following line/command:
In the same mode you can set any other key combination to type symbol. Use xmodmap -pke command to see all keycodes and their map assignment.

Monday, October 31, 2016

Presenting pdf with next slide and timer

Finding a tool that is not heavy weight in order to do presentations is not as easy as it seems.
But on Ubuntu pdf-presenter-console dies the job quite well.
Just provide a pdf.
The pdf can be easily generated by markdown using pandoc or your pdf generator of choice.

The project name is pdfpc and can be found on github

Saturday, October 29, 2016

An alternative to lens flare correction

If your lens tends to create monochromatic spherical flares, one of mine does, then you can get rid of the flare by selecting it, going to levels, selecting the color channel (blue in my case) and fiddle a bit with the middle slider.
That can help you sort out the flare without an issue.

Lens flare correction with gimp

Got a photo that has flare?

It can be corrected with gimp. Check out this article. I am copying the text here so it wont dissappear if the post goes away.

After purchasing a glorious new Nikon D40X Digital SLR Camera online today, I was inspired to fix up a couple images.
So, I was trying to get rid of the obvious flaw in the following picture, and I found a pretty easy way to do it with GIMP.
Now, I’m no expert at GIMP or anything, but all I did was select the region in question using the lasso, like so:
Then, I used the Colors -> Components -> Channel Mixer tool to bend it to my will (make sure you grow your selection to encompass the whole flare using the Select -> Grow tool):
Notice how in the preview window the blemish isn’t visible?  That’s what you want.  Now, hit OK.
So, now all we have is a little bit of a color/contrast issue.  Let’s fix that up with the Colors -> Color Balance tool:
Now, if you look closely, you can still see just a tiny bit of brightness, but that’s alright with me – it’s much better than the blue crap.  Here’s the end result:
And there you have it: how to remove those annoying lens flares with GIMP.

Sunday, October 16, 2016