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

Adding “Subscribe” button to Firefox for quick and easy RSS Feed link creation. Configuring Akregator as a default Feed reader.

Hi there.

I like to use RSS feed reader for stuff that I follow like for example YouTube channels, forum threads, blogs or even e-bay searches. Sometimes (often) website does not provide a subscription button. What to do? How to live? Well there is a simple solution for Firefox users. Add “Subscribe” button to the toolbar. How?

1) Right click on the toolbar (somewhere on a free space between buttons and choose “Customize“.

Adding

2) “Customize Toolbar” window will pop up.

Adding

3) Find the “Subscribe” button. Left click on it, hold and drag the mouse pointer to the chosen place on a toolbar till You will see a black line to the left of it. Release the left click.

Adding

4) Visit Your favorite Youtube channel or other page You would like to subscribe to (like a blog or a forum thread) and click on the “Subscribe” button on the toolbar.

Adding

IF the button is “grayed out” it means that the website does not provide RSS Feed (shame on You Twitter!) and in this case it’s a bummer… If however the button is “clickable” You are few clicks away from Your personal happiness ;)… You can now either copy the link and use it in some terminal RSS Feed reader ie. Newsbeuter OR You can set it up with some gui tool like Akregator.

Setting up with Akregator is easy.

1) Unfold the “Live Bookmarks” dropdown menu and click on “Choose Application”.

Configuring Akregator as a default Feed reader step 001

2) File browser window will pop up. Navigate to /usr/bin/ find akregator executable, click on it and then click Open.

Configuring Akregator as a default Feed reader step 002

3) Unfold the “Live Bookmarks” dropdown menu and click on “akregator”.

Configuring Akregator as a default Feed reader step 003

It is optional to tick the box “Always use akregator to subscribe to feed” – if You choose to do so next time You will click the “Subscribe” button on a toolbar the link will be sent straight to Akregator.

4) Click “Subscribe Now”.

Configuring Akregator as a default Feed reader step 004

5) Akregator will inform You that a new feed was added. You can now go thru the latest news from the channel that You chose to add.

Configuring Akregator as a default Feed reader step 005

That’s it. You are all done. “Subscribe” button is in place. Akregator is configured as a default RSS Feed reader.

Cheers.

Andrzej

P.S. You can use this method to customize toolbar with other buttons too. You can move, add and remove most of the toolbar elements. Mess around with it till You get what You want :).

[SOLVED] Piwigo: Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/html/images/admin/include/themes.class.php on line 697

Hi there.

Sometime ago I have noticed that Piwigo is throwing this error:

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/html/images/admin/include/themes.class.php on line 697

flooding the screen when I was logged in as administrator and messing with the Administration settings (and not only). It caused absolutely nothing beside the flood of error messages. I searched for help and could not find anything. It was weird since I had error_reporting set to false in /etc/php/php.ini. Olgierd helped me by pointing out line 104 in file common.inc.php (@ini_set(‘display_errors’, true);) in the Piwigo installation folder.

In my case the file was located in the:

/var/www/html/images/include/common.inc.php

but general rule of thumb is:

./include/common.inc.php

inside Your Piwigo installation folder.

Use Your favorite text editor (as root) and change the line from:

@ini_set(‘display_errors’, true);

@ini_set(‘display_errors’, false);

and then restart the httpd service.

Few days ago after upgrading from Piwigo 2.6.0 to 2.6.1 error was back and I had to search for the solution in my IM logs which was a major PITA – hence this post. I suppose this will be something I will have to deal with after some (if not each) upgrades but now that I have easy access to a solution and I know what needs to be done I see no problem with that.

Thanks Olgierd.

Cheers.

Andrzej

Bitlbee 3.2.1 compiled against minimal installation of libpurple and patched so it retains gadu-gadu contacts upon Bitlbee server restart.

Hi.

Previous patch for Bitlbee stopped working so I have joined Bitlbee irc channel and asked for help. Dx picked up the challenge and wrote a new patch (15 minutes or so… Lawd I wish I had a brain so I could hack the code like that…)

More to the story + some useful info can be found here.

Cheers.

Andrzej

P.S. If You want to encrypt Your Bitlbee traffic use Stunnel :).

System logs indicates that one of my local machines keeps poking my other machine on port 21817/udp. WTF?!

Hi folks.

Noticed weird entries in journalctl:

Jan 14 00:38:25 wishmasus.loc kernel: Shorewall:net2fw:DROP:IN=docketh1 OUT= MAC=00:xx:yy:xz:Zs:Ss SRC=OtherLocalMachine DST=MyMachine LEN=151 TOS=0x00 PREC=0x00 TTL=64 ID=24209 DF PROTO=UDP SPT=21817 <<<<< SOURCE PORT IT TRIED TO REACH DPT=37647 LEN=131

I hate to see stuff like this especially if I don’t know where it comes from so I went to the machine that traffic came from and ran (as root):

netstat -lnp | grep 21817

just to find out that…

tcp 0 0 0.0.0.0:21817 0.0.0.0:* LISTEN 664/skype
udp 0 0 0.0.0.0:21817 0.0.0.0:* 664/skype

somebody left Skype running…

Ports can vary…

tcp 0 0 0.0.0.0:37647 0.0.0.0:* LISTEN 1956/skype
udp 0 0 0.0.0.0:37647 0.0.0.0:* 1956/skype

and it does not have to be Skype… but if You have a funny messages from shorewall in Your system journal – You can try searching for the source of them if You have access to the machine that sends them…

Cheers.

Andrzej

Listing all / gathering information about currently connected bluetooth devices.

Hi there.

SO I was working on my Arch Linux powered Asus V1S laptop this morning and I have noticed that my bluetooth had 1 connected client device…

Connected Bluetooth Device Info

I was almost sure that it wasn’t one of my devices so I got curious / little worried.

How can You list all the current bluetooth connections? The answer was simple although it took me a bit to figure it out:

hcitool con

It will list all the MAC addresses of the devices Your adapter is currently connected to / with:

Connections:
> ACL ZZ:AA:TT:PP:88:33 handle 42 state 1 lm MASTER

Now if You want to know more about any of those devices use this command:

hcitool info ZZ:AA:TT:PP:88:33

Just don’t forget to replace devices MAC address ZZ:AA:TT:PP:88:33 with the MAC address of the connected device.

[andrzejl@wishmasus ~]$ hcitool info ZZ:AA:TT:PP:88:33
Requesting information …
BD Address: ZZ:AA:TT:PP:88:33
OUI Company: Nokia BLAH BLAH
Device Name: AndrzejL_Blah

MOAR BLAH
[andrzejl@wishmasus ~]$

Turns out it was one of my devices that was connected… 😉

Command hcitool can be used for many other things. To find out more read:

hcitool --help

and

man hcitool

Cheers.

Andrzej

‘HALP I locked meself out of bitlbee’ aka resetting Your bitlbee password.

Hi there.

Yes… I did it… 2 days ago I have locked myself out of my own bitlbee account :). Easy fix if You have root on the machine that the bitlbee server runs on tho.

Get root:

su

Stop the bitlbee service. In Arch Linux that would be done with:

systemctl stop bitlbee

Move Yourself to where bitlbee stores the accout xml files.

cd /var/lib/bitlbee

List the content of the folder and filter listing for xml files.

ls ./ | grep -i xml

You will get something like:

yourbitlbeelogin.xml

obviously instead of yourbitlbeelogin You will see Your actual login for Your bitlbee server.

Now generate new md5 hash for Your new password:

bitlbee -x hash yournewpassword

Replace yournewpassword with Your actual new password for bitlbee server. Terminal will spit out something like:

7EcI4byy9MgrAPiK9

Write it down / copy it – whatever floats Your boat.

Use mcedit / nano / vi / emacs / joe – whatever suits You and open yourbitlbeelogin.xml.

mcedit ./yourbitlbeelogin.xml

First line will look somewhat like this:

user nick=”yourbitlbeelogin” password=”md5hashofyouroldbitlbeepassword” version=”1″

Remove the md5hashofyouroldbitlbeepassword bit and replace it with the new md5 hash that You have just generated for yournewpassword so it looks like this:

user nick=”yourbitlbeelogin” password=”7EcI4byy9MgrAPiK9″ version=”1″

Save the file and re-start Your bitlbee service.

systemctl start bitlbee

Use yournewpassword to log into the bitlbee server.

Because bitlbee uses Your password (or its hash – not sure) to create hashes of passwords for Your accounts (jabber / gadu-gadu / msn etc.) after manually editing that .xml file You won’t be able to log into any of those accounts – they will reject Your passwords as incorrect. You need to re-set all the account passwords. Use:

account tag set password

on all Your accounts (luckily I only had 2) diconnect and reconnect back to the bitlbee server.

Tada… All is bitlbee with the world again.

Cheers.

Andrzej