How to setup Google Play Game Services in LibGDX using Android Studio

Hands down, one of the most nerve wracking API integration I’ve ever done! Mostly due to the jargon-filled Google documentation and the lack of  libGDX-specific tutorials. Hopefully, this post would give you more clarity to implement the same.

1) Create a new Game Service

Head over to your dashboard and select Game services

Note: You don’t need to have your game added under All applications in order to test Play Services.

Click on Add new game. Choose I don’t use any Google APIs in my game yet tab and Fill out your game name and category.

  • Game details: Make sure to fill in all mandatory fields like description, graphic assets etc.
  • Linked apps: Choose Android, fill in the package name ( This package name should match with the one in your AndroidManifest file ) To properly authorize your app, follow my guide
  • Events: This is not mandatory, leave it for now.
  • Achievements: It is mandatory that you have at least 5 achievements in your game. If you don’t plan on having them just leave them unimplemented in your game but make sure to fill these up and obtain the tick mark.
  • Leaderboards: You can add as many leaderboards as you want depending upon your game.
  • Testing: Make sure you have filled in all the necessary fields and the game service is ready to be tested. Add testers: Only the users you specify will be able to use the game service when it is unpublished, make sure to add an account other than your dev account as the dev account may not work sometimes.
  • Publishing: It’s better to publish it with the whole game when it’s ready. You can still test all the features with the test accounts.

 

2) Install Play Services packages

Untitled-9

Open up SDK Manager in Android Studio, ( Click the button next to the AVD manager in the top toolbar ) click Launch Standalone SDK Manager

Scroll down to the Extras section and make sure these 2 packages are installed and updated to the latest :

  • Google Play services
  • Google Repository

 

3) Add BaseGameUtils Library

Didn’t we just add the Play services packages, what is this for?

This repository contains a lot of sample projects including libraries, each one implementing a different play service. So that means they’ve written all the code  for you! You don’t have to talk to the API and handle all those lousy exceptions, you just have to add it as a library module for your project and call the necessary methods. Good job Google 😀

Here’s the repository, Clone it or Download it as ZIP.

Extract it inside your project folder. Inside the extracted folder, open the  BasicSamples folder and you’d find all the sample projects. These are only for reference, you essentially need the libraries folder.

Open Android Studio, goto File > New > Import Module

Point the Source directory to BasicSamples\libraries\BaseGameUtils

 

4) Add dependencies

Now that we’ve added all the necessary packages and libraries, we need to explicitly tell our build system ( Gradle ) to compile them. In the project tree on the left, under Gradle Scripts,

Open the build.grade(Project: <Project name>) file, add these 2 lines

project(":android") {
    ...
    dependencies {
        ...
        compile 'com.google.android.gms:play-services-games:8.4.0'
        // 8.4 is the latest as of now, keep it updated
        compile project(':BaseGameUtils')
        ...
    }
    ...
}

If you are using other play-services APIs, add them in the dependencies list. But if the number of method references in your app exceeds the 65K limit, your app may fail to compile, in that case you need to enable multidex support.

Open the build.gradle(Module: android) file, add these 2 lines

android {
    defaultConfig {
        ...
        multiDexEnabled true
        ...
    }
}

dependencies {
  ...
  compile 'com.android.support:multidex:1.0.0'
  ...
}

Let Gradle sync the project.

 

5) Update Android Manifest

We’ve linked our project with the play services api, but our game still doesn’t know which game service to connect to and obviously the game would have to access the google play game servers over the internet. For that, in the Android Manifest file, we need to pass in the details of our game service and obtain permission to access the internet.

Go back to your dashboard. Open up Game services > Leaderboards and click on Get resources. This will pop-up a window with XML content, copy  it. Inside your android Project, go to res > values and create a new Values XML File, name it ids and paste the contents inside it. It’ll look something like this.

<?xml version="1.0" encoding="utf-8"?>
<resources>
  <string name="app_id">767948611622</string>
  <string name="achievement_dum_dum">CgkIpsC36qwWEAIQAw</string>
  <string name="leaderboard_highest">CgkIpsC36qwWEAIQAA</string>
</resources>

Open up AndroidManifest.xml and add these 4 lines

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
    ...
    <application>
        ...
        <meta-data android:name="com.google.android.gms.games.APP_ID" android:value="@string/app_id" />
        <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
    </application>
    ...
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>

 

6) Implementation

Now that everything is set up, we are ready to implement play services. Since all our game classes are inside the libGDX core project, we can’t directly call these methods because these are Android methods. So we create an interface inside our core project and implement this interface inside the Android Project. Makes sense ?

So inside the core Project, create a new interface and call it PlayServices. In this example we will implementing these basic play game services.

public interface PlayServices
{
    public void signIn();
    public void signOut();
    public void rateGame();
    public void unlockAchievement();
    public void submitScore(int highScore);
    public void showAchievement()
    public void showScore();
    public boolean isSignedIn();
}

Inside the android Project, open up the default Activity, in my case it is called AndroidLauncher.java

Declare these 2 members inside the class

private GameHelper gameHelper;
private final static int requestCode = 1;

Inside the onCreate() method, initialize these members

gameHelper = new GameHelper(this, GameHelper.CLIENT_GAMES);
gameHelper.enableDebugLog(false);

GameHelper.GameHelperListener gameHelperListener = new GameHelper.GameHelperListener()
{
    @Override
    public void onSignInFailed(){ }

    @Override
    public void onSignInSucceeded(){ }
};

gameHelper.setup(gameHelperListener);

Now we want play services to start automatically when the game begins and stop when the game exits, also we need to handle exceptions when the user fails to sign in. This is where the BaseGameUtil libraries come in, it takes care of all this, we just have to override our Activity methods and pass it on to them.

 @Override
    protected void onStart()
    {
        super.onStart();
        gameHelper.onStart(this);
    }

    @Override
    protected void onStop()
    {
        super.onStop();
        gameHelper.onStop();
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data)
    {
        super.onActivityResult(requestCode, resultCode, data);
        gameHelper.onActivityResult(requestCode, resultCode, data);
    }

Now, let’s implement the interface we created.

public class AndroidLauncher extends AndroidApplication implements PlayServices

Define the implemented methods like this.

    @Override
    public void signIn()
    {
        try
        {
            runOnUiThread(new Runnable()
            {
                @Override
                public void run()
                {
                    gameHelper.beginUserInitiatedSignIn();
                }
            });
        }
        catch (Exception e)
        {
             Gdx.app.log("MainActivity", "Log in failed: " + e.getMessage() + ".");
        }
    }

    @Override
    public void signOut()
    {
        try
        {
            runOnUiThread(new Runnable()
            {
                @Override
                public void run()
                {
                    gameHelper.signOut();
                }
            });
        }
        catch (Exception e)
        {
            Gdx.app.log("MainActivity", "Log out failed: " + e.getMessage() + ".");
        }
    }

    @Override
    public void rateGame()
    {
        String str = "Your PlayStore Link";
        startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(str)));
    }

    @Override
    public void unlockAchievement()
    {
        Games.Achievements.unlock(gameHelper.getApiClient(),
         getString(R.string.achievement_dum_dum));
    }

    @Override
    public void submitScore(int highScore)
    {
        if (isSignedIn() == true)
        {
            Games.Leaderboards.submitScore(gameHelper.getApiClient(),
             getString(R.string.leaderboard_highest), highScore);
        }
    }

    @Override
    public void showAchievement()
    {
        if (isSignedIn() == true)
        {
            startActivityForResult(Games.Achievements.getAchievementsIntent(gameHelper.getApiClient(),
             getString(R.string.achievement_dum_dum)), requestCode);
        }
        else
        {
            signIn()
        }
    }

    @Override
    public void showScore()
    {
        if (isSignedIn() == true)
        {
            startActivityForResult(Games.Leaderboards.getLeaderboardIntent(gameHelper.getApiClient(),
             getString(R.string.leaderboard_highest)), requestCode);
        }
        else
        {
            signIn()
        }
    }

    @Override
    public boolean isSignedIn()
    {
        return gameHelper.isSignedIn();
    }

But how can the core Project reference these methods ? For that we need to pass an object of this activity to the core Project class. Here MainGame is my core Project class, I’m passing an object of AndroidLauncher which is my default Activity.

initialize(new MainGame(this), config);

Now inside the MainGame class, we create a constructor to pass this reference to the interface PlayServices

public static PlayServices playServices;

public MainGame(PlayServices playServices)
{
    this.playServices = playServices;
}

My MainGame class has minimal functionality, it only sets the MainMenu screen, and I want to be able to call the PlayServices functions from the MainMenu screen. To do that, pass the object of MainGame when you set the screen.

setScreen(new MainMenu(this));

In the MainMenu class, create an object of MainGame and use a constructor to pass this reference

public static MainGame game;

public MainMenuScreen(MainGame game)
{
    this.game = game;
}

Now using this object you can call any of the PlayServices interface methods like this.

game.playServices.signIn();
game.playServices.signOut();
game.playServices.rateGame();
game.playServices.unlockAchievement();
game.playServices.submitScore(score);
game.playServices.showScore();
game.playServices.showAchievement();
game.playServices.isSignedIn();

 

If you have any doubts, leave them in the comments section below.

Advertisements

How to obtain SHA1 Signing certificate fingerprint from Android Studio

Untitled-8

I’m pretty sure that looking at this pop-up for the first time would be intimidating. This is a simple method to extract the SHA1 fingerprint right from Android Studio without using keytool. If you have no idea what I’m talking about, read along and understand the whole process.

Steps to obtain the SHA1 fingerprint is at the end of this post.

 

What is a signing certificate ?

268751

Android requires that all apps be digitally signed with a certificate before they can be installed. Think of it like labeling your app as your own. You make a label with your name and stick it on your app, this ensures you are the rightful developer of the app. Only with the same signing certificate you can roll out future updates for your app, and for that reason you should never lose this certificate.

To further protect your app, this certificate is coupled with a digital key so that it remains reasonably unhackable.

 

What is a key store ?

The key store is basically a file containing all your cryptographic keys. All your certificates and corresponding keys are saved in this file encrypted.

There are 2 types of keystores

  1. Debug key store : This key store is generated by the Android SDK so that you don’t have to sign the app each time you deploy it for testing.
  2. Release key store : However you cannot use the debug key store when you want to publish the app. You have to generate your own release keystore and sign your app with a release key to publish your app.

 

How to create a release key  ?

Open up Android Studio. Goto Build > Generate Signed APK

First let’s create a new key store. Click on Create new

Untitled-5

A new dialogue box pops-up.

Untitled-6

Key store path: Make sure you give a secure location. You do not want to lose it. I repeat, you do not want to lose it!

Key store Password: This password is for the key store file, remember you can use the same keystore for storing all your keys for your various app(s). So this is like a master password.

Key Alias: Name this as <your app name>+’Key’ or something. This is specific to this signing key for this app. ( This is the equivalent of a  key in a hashtable )

Key Password: This password is specific to this signing key for this app. You can very well use the same password used for the keystore.

Validity: Give it say, 100 years!

Certificate: You are required to fill in at least one entry in this.

Click OK and proceed with the build.

Untitled-7

Make sure you choose the Build Type as release and click Finish

 

Deploy in release mode

Untitled-9

The release key signed APK is generated, but this does not deploy it on the device/emulator like it normally would. To do that, Goto File > Project Structure

In the left, under Modules, choose android

Untitled-10

Choose the Signing tab, click on the green + button and fill in the details, which you gave when you created the release key. The default configuration name is config. Let it be.

Go to Build Types, Choose release

Untitled-14

In the Signing Config option, choose config. Click on OK.

To use the release signing key when deploying the app, click on the tiny square found at the bottom left of Android Studio and choose Build Variants

Untitled-13

In the Build Variants sidebar, choose release. From now on, whenever you deploy the app, the signed version  with your release key is pushed on to the device/emulator.

But when you deploy it for the first time, you will encounter this error.

Untitled-18

This is because of the conflicting signatures for the same package. Click on OK and the release build will be pushed.

 

What is a SHA1 fingerprint ?

SHA1 stands for Secure Hash Algorithm One. A one-way cryptographic function that can be used to act as a ‘signature’ for a sequence of bytes. It is very unlikely that 2 different byte sequences would produce the same value (though not impossible). So instead of shipping the app with the entire key store and uploading a copy of it to the playstore, we use this cryptographic signature to easily validate the authenticity. Read more about SHA1 here.

 

Obtain the SHA1 fingerprint

Important : Run your app in release mode once before proceeding.

Click on Gradle ( or SBT ) found on the top right of Android Studio. First time you open it, it’ll be blank, click on the refresh button and it’ll list the name of your project ( My project name is Segments ).

Untitled-15

Expand the tree like this and double click on Signing Report

Untitled-16

Voila! you find the SHA1 fingerprint of both the release key and the debug key.

Untitled-17

You can even use the debug key SHA1 for testing Google API services. Just make sure that the app accessing this API is signed with the same key as that provided to authorize the app.

 

An unexpected error occurred. Please try again later. (480000x)

You might get this error when you submit the SHA1 fingerprint, this happens when you use the same fingerprint+package combination as a new linked app. Go to your developer console and delete any duplicates projects that you may find. Deletion takes 7 days though.

 

How to create BOSS boot animations for Android

Boot animation is the first thing you stare at when you power ON your Android device, so what’s a BOSS Android without a BOSS boot animation ? 😀

Here’s an example of what I created.

This is a tutorial on how to create boot animations from scratch using Adobe AfterEffects.

You could also use any of these alternative methods and proceed to Step 2.

  • Convert a video into boot animation [ here ]
  • Convert a GIF into boot animation [ here ]
  • Use a static image as boot animation

 

STEP 1 : CREATE YOUR BOOTANIMATION

Figure out the screen resolution of your Android. Create a new composition in AfterEffects with that specific resolution. Set the required duration for the animation.

1

Create your animation. Here’s a basic guide to animating in AfterEffects.

2

Here’s the interesting part, the boot animation is not stored in Android as a video file, rather it is saved frame by frame as image files.

Rendering the composition :

  • Set the Output Module format as PNG Sequence 
  • Output To a new folder with the naming sequence as [#####].png

3
 

STEP 2 : PACKAGING THE BOOT ANIMATION

After rendering the composition, the output folder will contain the animation stripped down to each frame as PNG images. Rename the output folder to folder1. If you want a part of the animation to loop, put those frames into another folder named folder2. Now place the folder(s) into another folder named bootanimation. i.e :


bootanimation
 ├───folder1 ( Main animation )
 └───folder2 ( Part that must loop )

 
To package the boot animation. Download this tool ( Windows binary ). MAC / UNIX users may use WINE.

Open the Boot Animation Creator. Choose the folder bootanimation.

4

Set the properties. Select the first line and click on edit.11

Now choose the appropriate resolution and framerate as set in the AfterEffects composition. 8

Click on Add loop and choose folder1.

6

If the number of loops is set to 0, that part will keep looping.

7

Click on next and save exactly as bootanimation.zip. Preview the animation using this tool. You could also create a shutdown animation, follow the same steps and save exactly as shutdownanimation.zip. But mind you, shutdown animations wouldn’t last as long as boot animations, so make it short.
 

STEP 3 : INSTALLING THE BOOT ANIMATION

There are 3 ways to install the boot animation

  1. Using a root file explorer ( ROOT )
  2. Using ADB ( WITHOUT ROOT )
  3. Flashing a new ROM with the boot animation ( RECOVERY )

I recommend not to use 3rd party apps to install boot animations!
 

USING ROOT FILE EXPLORER

I recommend using ES file explorer. Press menu and set Root Explorer ON

Screenshot_2015-08-02-10-22-29

Place the bootanimation.zip in your phone storage, copy and replace it with the file in /system/media

Screenshot_2015-08-02-10-23-18

Long press the new bootanimation.zip and select properties.

Screenshot_2015-08-02-10-23-41

Tap on Change next to Permissions and set it like this

Screenshot_2015-08-02-10-23-47

You’re done ! Reboot the device to view the new boot animation.
 

USING ADB

Navigate to your adb binary folder and place the bootanimation.zip file there. Hold shift and right-click, open command window here. ( Here’s a noob guide to setting up basic adb )

Type the command :


adb push bootanimation.zip /data/local
adb reboot

 

FLASHING A NEW ROM WITH THE BOOT ANIMATION

Open up your ROM ZIP file and replace the bootanimation.zip file present in System > Media and flash the new ROM.
 
 
Leave a comment if you have any doubts. No matter how noob the question is, I’ll be glad to help 🙂

How to root Lava Iris X8

The other day I bought a new LAVA Iris X8 specifically for Android development and guess what, I rooted the device on the first day 😀

Here’s my rooted X8.

Untitled6
This is the most safest and noob-friendly method to root your X8. Yes, I have tested this method on my own device and I did not soft-brick it in the process. Screenshot_2015-04-01-21-44-32 > Will I receive the official Lollipop update ( as promised by LAVA ) even after I root my X8 ?                                                                                                                                       Yes, you will receive the update, but you’d probably lose root access after you install the update. But don’t worry, I will post a rooting tutorial right after the update is released.

> Will I void my phone’s warranty if I root my device ?                                                          Well, of course you will void your warranty 😀

DISCLAIMER :: I have tested this rooting method on my device, but I will not be responsible if you mess something up :/

Here we go,

STEP 1 : ENABLE USB-DEBUGGING IN YOUR PHONE

Goto Settings > About phone and keep tapping Build number until a toast message pops-up saying ” You are now a developer  ” Now, go back to Settings and you will find a new entry Developer options, inside it check USB debugging option. Untitled-3

STEP 2 : INSTALL ADB DRIVERS IN YOUR COMPUTER

I recommend using XP / Vista / 7 for this, because it is cumbersome to setup the drivers in Windows 8 / 8.1 and in most cases, the drivers would not get installed properly. Download the Driver package here This contains all the VCOM,USB and ADB drivers ( all that you need ), most of which are common to all Mediatek ( Your phone’s processor ) devices. After you download the rar file, extract it. Now goto Device Manager

  •  Right-click on My Computer > Properties > Device Manager

Under Other devices or Ports, you will find an entry of your device with the exclamation symbol like this.

  •  Right-click > Update Driver software

04-devmgr Choose the Browse option and locate the extracted folder, Windows will automatically identify the driver and install it. 05-browse

STEP 3 : INSTALL KINGO ROOT IN YOUR COMPUTER ( Download here )
Step 4 : CONNECT THE PHONE TO THE COMPUTER VIA USB AND ROOT

Make sure the computer has an active internet connection. Open the Kingo root application, it will automatically recognize the device and starts installing the necessary dependency drivers. Now click on ROOT, it will automatically start downloading the necessary root files and does everything for you. It takes a couple of minutes, the phone might do some reboots in the process, don’t panic ! On completion, it’ll say “Root succeeded” and you will find a new Kingo root icon in the app drawer.

Step 5 : INSTALL SUPERSU ( IF KINGO ROOT FAILS TO INSTALL IT )

Although Kingo root succeeded, it failed to install SuperSU in my X8. If you can’t find SuperSU in your app-drawer, follow this step. Download SuperSU from the playstore. Screenshot_2015-04-01-22-02-17 SuperSU prompts you to install it. Choose Normal mode, phone reboots after the installation is complete Untitled-5 After rebooting, SuperSU still won’t show up in the app drawer because it conflicts with the SuperSU package Kingo root tried to install, so you need to remove it.

  • Goto Settings > Apps > SuperSU > Uninstall updates

Screenshot_2015-04-01-21-46-44 Then reboot your device and you’re done. The next time an app requires root privileges, SuperSU will prompt your permission.

CUSTOM RECOVERY

Thanks to the folks at XDA, we finally have a custom recovery !

Download here ( Carliv Touch v3.3 )

You can flash the recovery by using either of these two :

  • Mobileuncle MTK tools ( without PC )
  • SP Flashtool

Mobileuncle MTK tools

  1. Place the recovery.img file in the root of your SD card.
  2. Download Mobileuncle MTK tools here
  3. Place the recovery.img file in the root of your SD card
  4. Open the application, grant root permissions
  5. Go into Recovery update, it will automatically find the recovery.img file
  6. Tap on it and choose OK for the prompt
  7. It will install the recovery and reboot into recovery

SP Flashtool

  1. Download the application here ( Windows )
  2. Just extract the ZIP file.
  3. Download Scatter-text file for the X8 here
  4. Open Flashtool.exe from the extracted folder, load the scatter-text file
  5. Choose the recovery.img file and click on Download
  6. Power-off the phone and connect the phone to the PC
  7. Wait for the magic ring to appear !
  8. Doesn’t make sense ? Follow this noob guide

To boot into recovery

  • Hold volume up + volume down + power button at OFF state
  • Use Mobileuncle MTK tools application and tap Reboot into Recovery
  • Use adb command  $ adb reboot recovery
CUSTOMIZE X8 LIKE A BOSS

Right now, there’s isn’t much development happening for the X8. I am currently working on porting a CWM recovery for this device. After a custom recovery has been ported, custom ROMs would soon be available, hopefully ! Until then, all you can do is customize the stock ROM with the Xposed Framework. Xposed framework allows you to customize the UI, system apps and provides awesome functionalities through modules that you never thought were necessary! Read here if you are interested to know how it works.

The best thing about Xposed is, it does all this without actually modifying the APKs, meaning that if you uninstall the framework, you will remove all the customizations you made. Make sure you uninstall Xposed Installer before you install the official Lollipop update from LAVA. Download Xposed here Open Xposed and tap on Install/Update in Framework ( provide root access ). Don’t panic after seeing this warning message, I’ve tested the installation on my device.

Untitled-4

The phone will reboot after the installation is complete. Xposed installer does not add any functionality by itself, you need to install modules for that. Head over to Download in Xposed Installer and choose the modules of your choice and make sure you download the Kitkat [KK] version of each module.

To use a module, enable it in Xposed Installer and reboot your device. Since we don’t have a custom recovery setup as of now ( which I am working on ). We cannot recover from soft-bricks ( Boot-loops ), so don’t install modules that may potentially soft-brick your device ! If none of the modules work, read this post

Xposed modules I’m using on my X8

  • Xui mod                          >   Awesome List animations
  • Greenify                          >   Epic battery saver
  • GravityBox                      >   UI customization
  • Tinted Status Bar            >   Change status bar color based on the app
  • Screen-off Animation      >   Well, duh !
CHANGE FONT

Download iFont from the playstore, ( provide root access ) it has a plethora of fonts lined up. Before you set a font, Goto Settings and choose the Change font mode as System mode(need ROOT) Untitled-6   Here’s a list of my Top 10 Root apps for Android, an article that featured in the 2015 February issue of the Open Source For You magazine. View here

STOCK ROM ( KITKAT 4.4.2 ) IS NOW AVAILABLE

Mirror 1 | Mirror 2

Leave a comment if you have any doubts, I’ll be glad to help 🙂

How to multi-boot like a BOSS with BURG bootloader

Fig1

If you are running multiple OSs in your machine, this would probably be the first screen you would be staring at when you turn ON your system. This is called GRUB, stands for GRand Unified Bootloader.

GRUB is a part of the GNU project. It is the default bootloader that comes with all UNIX-like OSs. GRUB provides a pretty basic menu to choose from a list of the installed OSs and the entries that come with it, such as recovery modes and memtests. Quite sadly, GRUB has remained pretty much the same over the years, it still offers the bash-like, command line interface from the stone age !

In other words, GRUB is plain boring 😀

This is where BURG comes in, the BRand-new Universal loadeR from GRUB, BURG is  a cool replacement to GRUB, it can turn your bootloader into this.

Fig2

INSTALLING BURG

First you need to add a new repository, enter the following command in the terminal

sudo add-apt-repository ppa:n-muench/burg
sudo apt-get update

Now you need to install BURG and some themes. For that type-in

sudo apt-get install burg burg-themes

 
SETTING UP BURG

When the installation proceeds, dialog boxes pop-up for configuration. Please follow these steps carefully.

Fig3

Fig4

Fig5

So now that we have successfully setup BURG, let’s clean up the BURG entries.

DISABLE MEMTEST OPTIONS

Read here if you are not sure what memtest is. To disable the memtest option, type in this command.

sudo chmod –x /etc/grub.d/20_memtest86+

Now let’s see how BURG looks like. We can emulate the BURG boot screen using this command.

sudo burg-emu

Use

  • F1 Help
  • F2 Change Theme
  • F3 Change Resolution
  • Arrow-keys to move

For now, just choose your theme, do not change the resolution. This is because, if your monitor doesn’t support that particular resolution you changed to, the next time you boot, you would get a blank screen and you would obviously freak out !

So press F3 during your next boot and choose the resolution by pressing enter, if you get a blank screen while doing so, move up/down and choose another resolution.

Fig6

In this machine, I have 3 OSs installed ( Ubuntu, Windows 8 and Linux Mint ). But you’d notice that there are 2 options each for Ubuntu and Linux Mint. Those are the recovery modes which I had mentioned at the beginning, it can be disabled easily. For that we need to edit the BURG configuration file. Open up the terminal and type- in the following command.

( Use text-editors of your choice )

sudo nano /etc/default/burg

Fig7

In this file we need to edit this line

#GRUB_DISABLE_LINUX_RECOVERY=&quot;true&quot;

You need to un-comment the line, by removing the ‘#’ character.

This file also contains the time-out period for the boot screen, if you want to change it. Locate this line and change the R-value which is in seconds .

GRUB_TIMEOUT=5

To save the changes made in nano editor

  • press ctrl-x
  • press y
  • press enter

Now we need to configure those changes into BURG and view the modified boot screen. For that type-in

sudo update-burg
sudo burg-emu

Fig10

Now the 2 extra recovery entries would be gone. That’s it. Enjoy booting with BURG !

To get more themes, visit deviantart

This article featured in the 2014 December issue of the Open Source For You magazine. View here

 

How to customize your Windows like a BOSS ( 8 / 8.1 )

Tired of looking at your same old boring Windows desktop ?

KlylB3N

Want to turn your desktop into this ?

1

or this ?

maxresdefault

It’s an obvious Yes 😀 so let’s begin.

CUSTOM THEME

Before theming your Windows, you need to disable Windows-ribbon. It’s that extra command bar below your menu in File explorer.

win8explorersearch

To disable Ribbon, Download Ribbon-disabler here ( 64-bit , 32-bit , Not-sure )

By default, Windows won’t not let you use 3rd-party themes. For that you need a patcher called UxStyle. What it does is, it disables the Windows theme signature requirements to enable 3rd-party customizations.

Download here

2013-09-24-16_12_34-UxStyle-0.2.3.0-Setup

You just need to install it.

Now that you’ve patched your windows, you need custom themes and deviantART is the best place to find custom themes, rainmeter skins, iconpacks and much more. I have tagged “Windows 8.1” in this link, if you are on Windows 8, download the appropriate theme.

Download Base for windows 8.1 , a simple elegant theme.

After you’ve downloaded the theme, unzip the file (almost all themes are zipped). Within the unzipped folder, there will be a folder named “Theme”.

Copy the contents of this folder and paste it into

C > Windows > Resources > Themes

4

After you’ve pasted it, Right-click on Desktop > Personalize . You’ll see the new theme in the “Installed Themes” group.

12

ICON PACKS

To change the Start button in Windows, Download this

To change the system icons of windows, you need a tool called IconPackager. Download here

5

RAINMETER

Rainmeter skins are like widgets in Android. There are thousands of rainmeter skins for download and they are highly customizable. First download rainmeter here

blue_themed_desktop_rainmeter_by_edulaiho-d648bzv

All the UI elements that you see in this screenshot are nothing but rainmeter skins. But loading such heavy skins takes a toll on your performance and battery ( if you’re on a laptop ), so it’s up to you. I prefer minimal rainmeter skins. You could also create simple rainmeter skins on your own easily, like the one I’ve made ! Read here. I’ll show you how to load a rainmeter skin.

After you’ve installed rainmeter, goto deviantART and download a skin. Open the .rmskin file and choose install.

Now open rainmeter, Right click on the rainmeter icon in the taskbar > Manage > Choose your installed skin and click load.

7

WINDOW EFFECTS

header

Jealous of seeing fancy window effects in Linux desktops like KDE ? Well now you can get all those effects in Windows using Windows FX5. Install the application and try out different effects ! Download here.

WINDOWS MEDIA PLAYER SKINS

Alienware Invader 1

The Alienware UI is actually a Custom skin for Windows Media Player, you can choose from a range of cool skins here.

After you’ve downloaded the skin, you need to choose the skin. For that, Right-click on the Now-Playing bar > View > Skin Chooser.

13

DOCK

14

The dock I’m using is called Rocketdock. You can download it here and install it. You can customize the dock icons and effects in it. To open the folder as a stack, you need an additional plugin called Stack docklet, you can download it here.

TASKBAR CLOCK

atomicalarmclock_trayclock

You can change the look of your taskbar clock using this application called Atomic Alarm Clock. You can download it here. Simply run the application and choose your theme.

TIPS

SPEED UP YOUR PC

  1. Remove all your Anti-Viruses and Spy-wares, use Advanced System Care Ultimate. Download here.

quicksettings

2.  Disable all animations in windows,(If you are using windows FX, this is not for you).

Press Windows key + R, then type in sysdm.cpl In the pop-up window, go to Advanced tab, Choose settings under performance, select custom and then un-check the following boxes

  • Animate controls and elements inside windows
  • Animate windows when minimizing and maximizing
  • Animations in the taskbar
  • Fade or slide menus into view
  • Fade or slide ToolTips into view
  • Fade out menu items after clicking
  • Save taskbar thumbnail previews
  • Show shadows under mouse pointer
  • Show shadows under windows
  • Show translucent selection rectangle
  • Slide open combo boxes
  • Smooth-scroll list boxes1

ALT-F4 AT YOUR FINGER TIPS

RightClickKeyboard

Ever wondered what that strange key between your Right-Alt and Right-Ctrl was ? Well, it’s called the Menu button and it functions as the Right-click mouse button. If you are like me and you never use it, you could change the key to do something useful. I find it extremely annoying to stretch my fingers to reach ALT and F4 all the time, so i changed the Menu key to F4, so that closing applications will be a breeze 😀

To remap the keyboard keys in Windows, you need an application called SharpKeys. Download here

15

Install the application, Add key > then type the Old key ( Menu Key ) and New key ( F4 ) you want to map. Then Write to registry. The changes will be active from reboot.

Enjoy !

Want you customize your Android like a BOSS ? Read post

Touchpad not working in Linux | Touchpad recognised as PS/2 Logitech wheel mouse

After weeks of research you just bought your new laptop. You go ahead and install linux. But then the touchpad does not work, so you decide to try a different linux, still it doesn’t work and Googling doesn’t seem to help.

METHOD 1

First we need to ensure the touchpad is detected. For that, unplug your USB mouse (if any) and open up a terminal / konsole (ctrl + alt + T ) and type in

xinput list

You’ll get a list of input devices

  • If you see something like synaptic touchpad, Then you just need to install the latest synaptiks driver.
  • If you see something like PS/2 Logitech wheel mouse or any mouse, follow method 2.

Go to the Software center in Linux and install Synaptiks.
Synaptiks

METHOD 2 ( WORKAROUND )

This is a workaround that I found, only the basic touchpad functions would work. Open up the terminal and type ( or simply paste this by ctrl+shift+v )

sudo nano /etc/default/grub

Locate the line GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”

3

Now you need to edit this line, be very careful !

Add a space after splash and type psmouse.proto=bare 

so the edited line looks exactly like this.

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash psmouse.proto=bare” 

Save it ( ctrl + x then press y ). Then type in

sudo update-grub

Now the touchpad should work after reboot !