Azitech

Azimout's Linux weblog

Archive for the ‘Howto’ Category

Connect to WPA2 wifi from Linux server

leave a comment »

If you have a terminal-only, no-GUI linux server that you need to connect to a WPA2 PSK network, here’s what you need to add to /etc/network/interfaces:

auto wlan0

iface wlan0 inet dhcp

wpa-ssid {myssid}

wpa-psk {mywpapsk}

dns-nameservers 8.8.8.8

To calculate your 256-bit WPA PSK from your ASCII passphrase, run the following command:

wpa_passphrase ssid passphrase

Be warned, the result is 32 characters long.

Advertisements

Written by azimout

28/01/2015 at 20:20

Posted in Howto

Migrating from one Google account to another

leave a comment »

Here’s the steps I followed and difficulties I recently encountered while migrating from one Google account to another:

Emails

You need to enable POP3 on the source account and then have the target account import them. This can take several hours days if (like me) you have accumulated many thousands of emails over several years. It will import all past email and then continue to import email arriving at the source account in the future.

One issue is that you lose the labels structure you had assigned to emails in the source Gmail account.

If you have enabled 2-step authentication on the source account (as you should), you’ll need to create an “application specific password” to give to the target Gmail account.

You’ll then have to change all your newsletter and mailing list subscriptions to point to the new address, and let all your contacts know that they should from now on contact you at your new address.

Contacts

This one is totally straightforward; you export to a CSV file and import on the new account. All info is maintained, including groups.

Calendars

Export all calendars into a ZIP file containing one iCal file per calendar. Create calendars on target account, import iCal files one-by one.

If you shared any of them with other users, you’ll need to share them again; in that case, tell the other users to remove the old instance of each shared calendar, otherwise they’ll see duplicate events.

If other users shared calendars with you, they’ll need to share them again.

Drive

Unfortunately, the only way seems to be to download everything, and then upload it again on the target account.

Google+

Profile: you’ll need to re-introduce this.

Photos: use Google Takeout to download them, then upload them again

Circles/People: Use Google Takeout, as described here

Posts: I haven’t found a way to migrate those.

Maps

Re-introduce your starred places manually.

Youtube

Video Uploads: if you no longer have the originals, download each from Video Manager. Then upload each video anew.

Subscriptions: there seems to be no way to export your subscriptions. Just subscribe again, one-by-one.

Playlists, liked/favourite videos: Lists have to be public or unlisted, not private. Share them with yourself via email, then save them in your new profile.

Chrome Sync

Just sign out of the old account and sign into the new one. Bookmarks, passwords etc will remain in the browser when you sign out of the old account, and will then be imported into the new account when you sign into it.

Play Store

It is not possible to transfer purchased apps to another account.

Keep

You’ll need to reintroduce each note. You can email  to yourself the larger ones

Written by azimout

21/10/2014 at 18:05

Posted in Howto

Installing Epson Stylus SX424W under Linux

leave a comment »

Out of the box, if you tell Ubuntu to add a network printer, it will find it (give it 5-10 seconds to search) and recognise its make and model. However, if you press proceed, it will get stuck searching for the driver.

The solution is to go to download.ebz.epson.net/dsc/search/01/search/?OSC=LX and search not for SX424W, but for SX420. Then download the correct driver for your system (.rpm or .deb, x86 or x64) and install it. There’s one driver for the printer and another one for the scanner.

After that, repeat the “add network printer” wizard.

Written by azimout

29/08/2014 at 07:39

Posted in Howto

Rotate videos from the command line

leave a comment »

To rotate a video from the command line, use avconv (contained in the libav-tools package), which used to be called ffmpeg.

For a single file, type:

avconv -i original.mp4 -vf "transpose=1" rotated.mp4

Written by azimout

10/02/2014 at 09:45

Posted in Howto

Nagios

with 2 comments

Here’s how you can set up a Nagios server in order to monitor a publicly accessible website and get an email notification when it’s down.

On the monitoring server:

Now create a .cfg file under /etc/nagios3/conf.d with the following contents:

define host {
        use             generic-host
        host_name       xxx
        alias           xxx
        address         xxx
        }
define service {
        use             generic-service
        host_name       xxx
        service_description     HTTP
        check_command   check_http
        }

(replace all instances of xxx with the appropriate values)

Now restart Nagios: sudo service nagios3 restart

Any notifications will be emailed to root@localhost

References:

Written by azimout

22/09/2013 at 20:06

Posted in Howto

How to install request tracker in Ubuntu

leave a comment »

  • sudo apt-get install request-tracker4 rt4-db-mysql rt4-apache2 libapache2-mod-fcgid
  • sudo cp /etc/request-tracker4/apache2-fcgid.conf /etc/apache2/sites-available/rt4
  • sudo a2ensite rt4; sudo service apache2 restart

To edit RT’s configuration, don’t edit directly the file /etc/request-tracker4/RT_SiteConfig.pm. Instead, change the files (or add one) under /etc/request-tracker4/RT_SiteConfig.d/*, then run sudo update-rt-siteconfig

Written by azimout

03/07/2013 at 10:17

Posted in Howto

Submenus in Drupal with Superfish

leave a comment »

If your Drupal theme does not support submenus, you will not see them even if you add them to your menu, enable them and activate the “show as expanded” option on the parent menu item.

The solution is Superfish (based on the jQuery Superfish plugin). In order to install it in Drupal, do the following:

Now go to your Drupal administration interface, find Superfish under modules and configure the number of menu blocks you want it to add. I set it to one as that’s all I need.

Then, go to Structure – Blocks, disable the Main Menu, enable your Superfish menu and click on “configure” next to it, then set its title to <none> and menu parent as the main menu.

Written by azimout

21/03/2013 at 21:46

Posted in Howto