Fixing broken Firefox preferences (side menu plus a question mark in a yellow square).

Hi there.

I am using Firefox Nightly 32.0a1 and all of the sudden I have noticed this problem:

Fixing_broken_Firefox_preference_window_001.png

when trying to open the preferences…

Possibly You have the same problem. Fix it.

1) Close Firefox completely (as in all windows).
1) Open ~/.mozilla/firefox/XXXXXXXXXX.default/ where the “XXXXXXXXXX” is a random string.
2) Find and open file prefs.js in your favorite text editor.
3) Find and remove this line:

user_pref("browser.cache.memory.enable", false);

4) Save the file.
5) Reopen browser and test the preferences window.

There – that fixed it for me.

Fixing_broken_Firefox_preference_window_002.png

Cheers.

Andrzej

Block annoyances on HealthierSmoker.ie using Adblock Plus.

Block annoyances on HealthierSmoker.ie using Adblock Plus.

Add those to the filters:

www.healthiersmoker.ie##div.gray_box
www.healthiersmoker.ie##div.testimonial_wrap
www.healthiersmoker.ie/modules/homeslider/gray_pager.png
www.healthiersmoker.ie/modules/homeslider/images/*.jpg
www.healthiersmoker.ie/themes/healthiersmoker/img/slider_bg.png
healthiersmoker.ie/video/index.html

Cheers.

Andrzej

Block annoyances on Twitter using Adblock Plus

Block annoyances on Twitter using Adblock Plus

Add those to the filters:

twitter.com##*#WhoToFollow*#
twitter.com##*#cookieTooltip*#
twitter.com##*#js-recommended-followers*#
twitter.com##*#recommended-similar-users
twitter.com##*#recommended_users
twitter.com##*.Footer module
twitter.com##*.ProfileWTFAndTrends
twitter.com##*.trends
twitter.com##*.wtf-module
twitter.com##div.Footer.module.roaming-module
twitter.com##div.dashboard.dashboard-right

Cheers.

Andrzej

Google Chrome / Chromium and the self signed SSL certificates.

Hi there!

Here is a simple step by step instruction how to add self-signed SSL cert to Chrome / Chromium so it does not warn all the time.

Remember that You should use this method for PRIVATE small self hosted projects (like my site) that You trust. Don’t EVER use it to “fix” SSL Certificate issues for Your bank, ebay, paypal account etc. Those should be signed by a trusted certificate authority and they should never cause a browser to go mental like this. If a browser warns about Your banks cert being untrusted it could mean a lot of trouble.

So lets say You are seeing this each time You are visiting my site. Follow the next 20 steps to make this warning go away.

Chrome_Chromium_And_A_Self_Signed_SSL_Certificate_001.png

01. Step 01.

Chrome_Chromium_And_A_Self_Signed_SSL_Certificate_002.png

02. Step 02.

Chrome_Chromium_And_A_Self_Signed_SSL_Certificate_003.png

03. Step 03.

Chrome_Chromium_And_A_Self_Signed_SSL_Certificate_004.png

04. Step 04.

Chrome_Chromium_And_A_Self_Signed_SSL_Certificate_005.png

05. Step 05.

Chrome_Chromium_And_A_Self_Signed_SSL_Certificate_006.png

06. Step 06.

Chrome_Chromium_And_A_Self_Signed_SSL_Certificate_007.png

07. Step 07.

Chrome_Chromium_And_A_Self_Signed_SSL_Certificate_008.png

08. Step 08.

Chrome_Chromium_And_A_Self_Signed_SSL_Certificate_009.png

09. Step 09.

Chrome_Chromium_And_A_Self_Signed_SSL_Certificate_010.png

10. Step 10.

Chrome_Chromium_And_A_Self_Signed_SSL_Certificate_011.png

11. Step 11.

Chrome_Chromium_And_A_Self_Signed_SSL_Certificate_012.png

12. Step 12.

Chrome_Chromium_And_A_Self_Signed_SSL_Certificate_013.png

13. Step 13.

Chrome_Chromium_And_A_Self_Signed_SSL_Certificate_014.png

14. Step 14.

Chrome_Chromium_And_A_Self_Signed_SSL_Certificate_015.png

15. Step 15.

Chrome_Chromium_And_A_Self_Signed_SSL_Certificate_016.png

16. Step 16.

Chrome_Chromium_And_A_Self_Signed_SSL_Certificate_017.png

17. Step 17.

Chrome_Chromium_And_A_Self_Signed_SSL_Certificate_018.png

18. Step 18.

Chrome_Chromium_And_A_Self_Signed_SSL_Certificate_019.png

19. Step 19.

Chrome_Chromium_And_A_Self_Signed_SSL_Certificate_020.png

20. Step 20.

Chrome_Chromium_And_A_Self_Signed_SSL_Certificate_021.png

See? That wasnt’s so hard.

Remember that You should use this method for PRIVATE small self hosted projects (like my site) that You trust. Don’t EVER use it to “fix” SSL Certificate issues for Your bank, ebay, paypal account etc. Those should be signed by a trusted certificate authority and they should never cause a browser to go mental like this. If a browser warns about Your banks cert being untrusted it could mean a lot of trouble.

Cheers.

Andrzej

Convert .pdf file from color to grayscale with 1 command.

Hi there.

Convert .pdf file from color to grayscale with 1 command:

gs
-sOutputFile=./output.pdf
-sDEVICE=pdfwrite
-sColorConversionStrategy=Gray
-dProcessColorModel=/DeviceGray
-dCompatibilityLevel=1.4
-dNOPAUSE
-dBATCH
./input.pdf

And You’re all done. Change the input.pdf and output.pdf to your needs.

Cheers.

Andrzej

PS.

[root@wishmasus andrzejl]# which gs
/sbin/gs
[root@wishmasus andrzejl]# pacman -Q --owns /sbin/gs
/sbin/gs is owned by ghostscript 9.14-1
[root@wishmasus andrzejl]#

Creating a crafted YouTube URL that points to a specific time of the video.

Hi there.

Sometimes You do not want to share the entire video with a friend / co-worker. Lets say its a long video and you just want them to see a specific part of the it starting lets say at 57 minutes and 25 seconds. You can craft the YouTube URL so when they click on it it will take them to that specific time frame.

Example.

Recently I was “Gimping” again. I took a photo of Leo Laporte and Steve Gibson and I have selected / copied their heads. After that I took a photo of Jean-Luc Picard and William Riker

Picard_Steve_Riker_Leo_001.png

and after a bit of “manipulation”…

Picard_Steve_Riker_Leo_002.png

I got a result. Picard’s and Riker’s faces were replaced with the Security Now “team” heads.

Picard_Steve_Riker_Leo_003.png

“Ok ok but what does some gimped picture has to do with a YouTube link time line…”… Glad that You have asked. I have Twitted link to the image to Steve and he thought it was good enough to mention it in the Security Now podcast video that I will use as an example here. “Ok so now stop bragging and show me the url crafting thingie.”. Ok ok I am sorry I will get to the point…

Let’s say that the video’s URL is:

https://www.youtube.com/watch?v=3FTEY2hXJcQ

And You want to start watching it starting from the 57 minute and 25 seconds. Add:

#t=57m25s

to the end of the url so it looks like this:

https://www.youtube.com/watch?v=3FTEY2hXJcQ#t=57m25s

and You’re done…

Person that will click on such a link will be taken to the time stamp chosen by You…

You can of course choose different time. Just change (or add) values accordingly…

Simple. Effective. Worth mentioning / remembering…

Cheers.

Andrzej

How to get rid of the “Qt Warning – invalid keysym: dead_actute”

Hi there.

After upgrade / starting smplayer I have noticed this warning:

[andrzejl@wishmasus ~]$ smplayer
“Qt Warning – invalid keysym: dead_actute”
This is SMPlayer v. 14.3.0 running on Linux

After a bit of investigation I have found this.

Basically:

a) open this file as root: /usr/share/X11/locale/en_US.UTF-8/Compose
b) search thorough it for the phrase:

dead_actute

c) replace the phrase with:

dead_acute

d) save the file.

There. Fixed. Enjoy.

Cheers.

Andrzej

Due to the openssl heartbleed bug I have issued new (self-signed) openssl cert.

Hi there.

Yes. The warning that You just saw was caused by the new self-signed ssl cert. Why did I changed / re-issued it? Because of the openssl bug.

This server is (for a couple of days now – Install Date : Tue 08 Apr 2014 05:44:41 IST) using openssl 1.0.1.g-1 (fixed) version of the package. I have however decided to issue a new cert just in case the previous private keys have leaked. I have also changed all the passwords. Just a precaution I guess…

Is Your site affected? Test it here, here, here, here and here.

I did…

Andrzejl No Ip Org 30303 Heartbleed Test Results

Andrzejl No Ip Org 30303 Heartbleed Test Results

I have also decided that since I have (few months ago) upgraded to Apache 2.4 (finally!) it was time to re-test the SSL config against the Qualys SSL Labs standards and took their test… Results are even better then before… ;)…

Again – only the self signed SSL cert lowered my grade to F. Sometime in the future when I will change by broadband provider and I will get (almost) static IP I will buy a proper domain and I will get a proper SSL Certificate. For now – this will do JUST FINE.

On more positive note… As You can see on the screenshot from the Qualys SSL Test below my server is supporting Forward Secrecy with all the TLS 1.2 compatible (other suites are not allowed in my server config) browsers which means that even if someone was constantly listening / recording the traffic AND they stole / sniffed out the private keys the encrypted packets they have are still fairly safe…

SSL Labs Dot Com Test Result 002 Apache 24

Cheers.

Andrzej

Systemd 210 “Failed to execute operation: There’s already a shutdown or sleep operation in progress.”

Hi there!

Today I have upgraded all my machines as usual and I have noticed a weird behavior on IBM Thinkpad 600E. Its a very old machine I know but nonetheless ArchLinux 32 bit with LXDE on top works quite well on it so I continue using it as a spare machine.

What was the weird behaviour? Well after upgrade / reboot it wouldn’t reboot anymore. It would tell me:

Failed to execute operation: There’s already a shutdown or sleep operation in progress

and the command:

journalctl -b -l -x --no-pager | grep -i suspend

would return:

Mar 04 20:02:47 wishthinkpad.loc systemd-logind[175]: Suspending…
Mar 04 20:02:47 wishthinkpad.loc systemd[1]: Starting Suspend…
— Subject: Unit systemd-suspend.service has begun with start-up
— Unit systemd-suspend.service has begun starting up.
Mar 04 20:02:47 wishthinkpad.loc systemd-sleep[183]: Suspending system…
— Subject: System sleep state suspend entered
— The system has now entered the suspend sleep state.

So I have joined #systemd IRC channel on Freenode and asked for help. Very nice people… After explaining what the problem was I was asked if the laptop’s lid was closed… AND indeed it is… Permanently…

IBM Thinkpad 600E

This old lappy has a screen problem BUT it has a power on switch on a side (I don’t need to open the lid to power the machine up) so I used this fact – I have closed the lid and placed an external screen on top of it. This way this old bugger will live longer and the bigger screen means (at least for me) better picture. I like it this way. Anyway… I was told:

20:47 < poettering> AndrzejL: i made the lid switch suspend a lot more aggressive in 210, to deal with laptops where one accidentally could hit the power button while in a backpack or so, on laptops where the power button is on the outside of the chassis, reachable with closed lid. In that case we want the machine to resuspend quickly

I was quickly presented with a fix:

20:49 < poettering> AndrzejL: yupp, edit /etc/systemd/logind.conf
20:49 < poettering> AndrzejL: change HandleLidSwitch to “ignore”

So I have ssh-ed into Thinkpad, su-ed to root and used mcedit to edit the /etc/systemd/logind.conf file. The option HandleLidSwitch was #-ed out so I had to un# it and change the value from suspend to ignore, save the file and reboot or restart logind. After reboot – no more problems.

I was also told:

21:03 < poettering> AndrzejL: in 211 all this should work out-of-the-box anyway
21:03 < poettering> AndrzejL: with no reconfiguration necessary…
21:04 < poettering> AndrzejL: and 211 should happen soonish if all goes well

Thank You kindly poettering for Your time, patience and for the provided help.

I doubt that many others will get caught by this but I am writing it down just in case / for future use.

Cheers.

Andrzej