​
Showing posts with label live. Show all posts
Showing posts with label live. Show all posts

Tuesday, 25 July 2017

Create a live system ISO for your Ubuntu based Linux machines using Systemback

Create a live system ISO for your Ubuntu based Linux machines using Systemback


Jack Wallen introduces you to an easy way to create live ISO images of your currently running Linux system with Systemback.
Systemback
You have that Linux desktop or server precisely how you want it and are interested in either creating a spot-on backup or a live ISO that you can then install on other (similar) hardware. How do you do it? You could go through the process of learning a number of commands to take care of the process, or you could install and use a handy tool called Systemback.
The Systemback tool allows you to create restore points, backups, and live images of a running system. Currently, it only works for Ubuntu derivatives based on 14.04, 14.10, and 15.04. It does, however, work like a champ (and does so quite easily).
I want to show you how to install and quickly make a live image of your current Linux system.

Installation

You wont find Systemback in the standard repositories, so you must first add the repo with the command:
sudo add-apt-repository -y ppa:nemh/systemback
Now, update apt with the command:
sudo apt-get update
Finally, install Systemback with the command:
sudo apt-get install systemback
Youll have to okay the dependencies before the install will begin. The dependencies will vary, based on what you have installed.
At this point, you should be able to start Systemback from the Unity Dash or your desktop start menu. You can also start Systemback from the command line with:
sudo systemback
You are now ready to create a live ISO.

Usage

Using Systemback is quite easy. From the main window (Figure A), select the location to house the ISO image (by clicking the ... button under Storage Location).
Figure A
Figure A
The Systemback main window.
Click the Live system create button and, in the new window (Figure B), give the live system a name, change the storage location (this location will need to have more than 4 GB of available space), and click Create new. You can optionally include user data files by checking the associated box.
Figure B
Figure B
Creating the live ISO image.
Note: If your .sblive file is larger than 4 GB, the conversion to a ISO is not possible. This is a file system limitation.
Depending on the size of your installation, the process will take some time to complete, so grab a cup of coffee or administer a server or two. After its installed, you should find an .sblive image in the defined storage location ready to convert to ISO. This image can either be written to a USB device or used to create a live ISO image. From the Created Live images window, select the image you want to convert, and then click Convert to ISO. When this process is completed, youll find the .iso file in the storage location ready to be written to disk. With that disk, you can then install the live image on other machines.
The best time to use Systemback is on a close-to-newly installed system. This is simply because of the file system size limitation. If youve installed too many applications on the system, the size will reach beyond 4 GB, and you wont be able to convert it. You can, however, still create restore points for a system. To create a restore point, first make sure youve selected a Storage directory, and then click the Create New button.
Once youve created a restore point, you can then go back to that restore point by simply selecting it from the left side of the window (Figure C) and then clicking System Restore on the right side.
Figure C
Figure C
Restoring from a restore point.
In the resulting window (Figure D), select the type of restore you want to do, if you want to include user configuration files, and click Next. This will begin the restore process.
Figure D
Figure D
Restore point options.
Systemback is a great way to create live images based on a pre-existing system and restore points in case you need to roll a Linux machine backward.
Do you administer or use Linux machines? If so, what do you use for your Linux backup/restore systems? Share your experience in the discussion thread below.

Source: http://www.techrepublic.com/article/create-a-live-system-iso-for-your-ubuntu-based-linux-machines-using-systemback/
{ Read More }


Wednesday, 12 July 2017

Créer un Live Wallpaper sous Android

Créer un Live Wallpaper sous Android



  • Un live wallpaper a un contenu dynamique, ce qui permet d�avoir des animations. C�est donc � vous de g�rer les diff�rentes �tapes de dessin sur le wallpaper. Pour cela, on utilise les deux classes Runnable et Handler.

    Le handler envoi le runnable (ici drawer) dans le messageQueue associ� � l�UI Thread afin qu�il soit ex�cut�. Ce runnable se charge de dessiner sur le wallpaper gr�ce � la m�thode draw() qu�on expliquera plus tard. R�p�ter plusieurs fois ce m�canisme nous permet d�avoir une animation.

    Quand le wallpaper doit s�arr�ter, la variable visible (qui stocke la visibilit� actuelle du wallpaper) passe � false dans les m�thodes onSurfaceDestroyed()�et �onVisibilityChanged() ce qui stoppera l�animation (m�thode handler.removeCallbacks(drawer).)

    Quand le wallpaper devient visible, la variable visible passe � true dans la m�thode �onVisibilityChanged() , ce qui relance l�animation du wallpaper (m�thode handler.post(drawer).)

    Voyons maintenant comment on dessine sur le wallpaper, la m�thode facilitant cette op�ration est la m�thode draw() :

    private void draw() {
    SurfaceHolder holder = getSurfaceHolder();
    Canvas canvas = null;
    try {
    canvas = holder.lockCanvas();
    if (canvas != null) {
    float x = (width * random.nextFloat());
    float y = (height * random.nextFloat());
    drawImage(canvas, x, y);
    }
    } finally {
    if (canvas != null)
    holder.unlockCanvasAndPost(canvas);
    }
    handler.removeCallbacks(drawer);
    if (visible) {
    //On re-poste le runnable apr�s un petit laps de temps
    handler.postDelayed(drawer, 4000);
    }
    }


    La m�thode qui permet de dessiner l�image dans le canvas est d�crite ci-dessous�:

    private void drawImage(Canvas canvas, float x, float y) {
    canvas.drawColor(Color.WHITE);
    canvas.drawBitmap(androidPic, x-(androidPic.getWidth()/2), y-(androidPic.getHeight()/2), null);
    }


    Sans oublier de d�clarer la variable qui repr�sente l�image qu�on veut dessiner�:

    Bitmap androidPic = BitmapFactory.decodeResource(getResources(), R.drawable.android);


    Explications :

    Nous avons utilis� un Canvas, ce qui nous permet de dessiner de mani�re r�p�titive sur la Surface du wallpaper. Cette surface est fournie par la classe ��SurfaceView��.

    Afin de manipuler cette surface on utilise l�interface SurfaceHolder. On obtient le canvas grace � la m�thode lockCanvas(), puis on dessine sur un point du canvas avec la m�thode drawImage().Ce point est obtenu al�atoirement gr�ce � ses coordonn�s (x,y).

    Enfin la m�thode unlockCanvasAndPost(canvas) est appel� pour que le canvas soit d�ssin� sur la surface du wallpaper.

    Gestion des �v�nements tactiles�:


    Cela se fait gr�ce � la m�thode onTouchEvent(MotioEvent event), cette m�thode poss�de le m�me comportement que la m�thode draw(), sauf que cette fois les coordonn�es du point o� s�effectue le dessin sont obtenus � l�endroit ou l�interaction utilisateur est effectu�e.

    @Override
    public void onTouchEvent(MotionEvent event) {
    float X = event.getX();
    float Y = event.getY();
    SurfaceHolder holder = getSurfaceHolder();
    Canvas canvas = null;
    try {
    canvas = holder.lockCanvas();
    if (canvas != null) {
    canvas.drawColor(Color.WHITE);
    drawImage(canvas, X, Y);
    }
    } finally {
    if (canvas != null)
    holder.unlockCanvasAndPost(canvas);
    }
    handler.removeCallbacks(drawer);
    if (visible) {
    handler.postDelayed(drawer, 4000);
    }
    super.onTouchEvent(event);
    }

    Ce qui donnera :
    import java.util.Random;
    import android.graphics.Bitmap;
    import android.graphics.BitmapFactory;
    import android.graphics.Canvas;
    import android.graphics.Color;
    import android.os.Handler;
    import android.service.wallpaper.WallpaperService;
    import android.view.MotionEvent;
    import android.view.SurfaceHolder;

    public class MyLiveWallpaper extends WallpaperService {

    private static Random random = new Random() ;

    @Override
    public Engine onCreateEngine() {
    return new LiveWallpaperEngine();
    }

    private class LiveWallpaperEngine extends Engine {

    private final Handler handler = new Handler();
    private final Runnable drawer = new Runnable() {
    @Override
    public void run() {
    draw();
    }
    };

    private boolean visible = true;
    private int width;
    private int height;
    Bitmap androidPic = BitmapFactory.decodeResource(getResources(), R.drawable.android);

    public LiveWallpaperEngine() {
    handler.post(drawer);
    }

    @Override
    public void onCreate(SurfaceHolder surfaceHolder) {
    super.onCreate(surfaceHolder);
    setTouchEventsEnabled(true);
    }

    @Override
    public void onDestroy() {
    super.onDestroy();
    handler.removeCallbacks(drawer);
    }

    @Override
    public void onSurfaceCreated(SurfaceHolder holder) {
    super.onSurfaceCreated(holder);
    }

    @Override
    public void onSurfaceChanged(SurfaceHolder holder, int format, int width, int height) {
    this.width = width;
    this.height = height;
    super.onSurfaceChanged(holder, format, width, height);
    }

    @Override
    public void onSurfaceDestroyed(SurfaceHolder holder) {
    super.onSurfaceDestroyed(holder);
    this.visible = false;
    handler.removeCallbacks(drawer);
    }

    @Override
    public void onVisibilityChanged(boolean visible) {
    this.visible = visible;
    if (visible) {
    handler.post(drawer);
    } else {
    handler.removeCallbacks(drawer);
    }
    }

    @Override
    public void onTouchEvent(MotionEvent event) {
    float X = event.getX();
    float Y = event.getY();
    SurfaceHolder holder = getSurfaceHolder();
    Canvas canvas = null;
    try {
    canvas = holder.lockCanvas();
    if (canvas != null) {
    canvas.drawColor(Color.WHITE);
    drawImage(canvas, X, Y);
    }
    } finally {
    if (canvas != null)
    holder.unlockCanvasAndPost(canvas);
    }
    handler.removeCallbacks(drawer);
    if (visible) {
    handler.postDelayed(drawer, 4000);
    }
    super.onTouchEvent(event);
    }

    private void draw() {
    SurfaceHolder holder = getSurfaceHolder();
    Canvas canvas = null;
    try {
    canvas = holder.lockCanvas();
    if (canvas != null) {
    float x = (width * random.nextFloat());
    float y = (height * random.nextFloat());
    drawImage(canvas, x, y);
    }
    } finally {
    if (canvas != null)
    holder.unlockCanvasAndPost(canvas);
    }
    handler.removeCallbacks(drawer);
    if (visible) {
    //On re-poste le runnable apr�s un petit laps de temps
    handler.postDelayed(drawer, 4000);
    }
    }

    // Permet de dessiner limage dans le canvas
    private void drawImage(Canvas canvas, float x, float y) {
    canvas.drawColor(Color.WHITE);
    canvas.drawBitmap(androidPic, x-(androidPic.getWidth()/2), y-(androidPic.getHeight()/2), null);
    }
    }
    }


    Derni�re �tape, on d�clare notre service dans l�AndroidManifest.xml avec l�action ��android.service.wallpaper.WallpaperService�� et la permission ��android.permission.BIND_WALLPAPER�� qui autorise l�utilisation du Live Wallpaper.
    Notons aussi l�ajout de la balise uses-feature , qui indique � Google Play que votre application contient un Live Wallpaper, pour que celle�ci soit visible qu�aux utilisateurs ayant un device supportant les live wallpapers.

    ?xml version="1.0" encoding="utf-8"?
    manifest
    package="com.tuto.android"
    android_versionCode="1"
    android_versionName="1.0"

    uses-sdk android_minSdkVersion="10" /
    uses-feature android_name="android.software.live_wallpaper"/uses-feature

    application
    android_label="@string/app_name"
    android_icon="@drawable/ic_launcher"

    service
    android_label="@string/my_live_wallpaper"
    android_name=".MyLiveWallpaper"
    android_permission="android.permission.BIND_WALLPAPER"
    intent-filter
    action android_name="android.service.wallpaper.WallpaperService"/action
    /intent-filter
    meta-data android_name="android.service.wallpaper"
    android_resource="@xml/mywallpaper"/meta-data
    /service
    /application

    /manifest

    Sans oublier le String.xml�:
    ?xml version="1.0" encoding="UTF-8"?
    resources

    string name="app_name"Live Wallpaper/string
    string name="my_live_wallpaper"My Live Wallpaper/string
    string name="wallpaper_description"My first live wallpaper/string

    /resources


    Remarque�:


    Pour g�rer les pr�f�rences de votre wallepaper, cr�ez une Pr�f�renceActivity qui permettra de d�finir les configurations de votre fond d��cran. La r�cup�ration des valeurs de vos pr�f�rences s�effectue � l�aide des SharedPreference. Pour cela, ajoutez les lignes suivantes � votre ��wallpaper.xml��:

    android:settingsActivity="MyPreferenceActivity"/


    sans oublier de d�clarer votre activit� dans l�AndroidManifest.xml.

    Lancez maintenant votre application, s�lectionnez le Live Wallpaper que vous avez cr�� afin d�obtenir le r�sultat suivant�:



  • Cr�er un Live Wallpaper sous Android


    Conclusion


    Voila, j�esp�re que cet article vous � permis de mieux comprendre comment fonctionnent les live wallpapers,le code du projet est disponible ici.
    Maintenant place � votre imagination pour cr�er vos propre fond d��cran anim�s.

{ Read More }


Sunday, 18 June 2017

Copy Files to XBMC Live with sFTP and FileZilla

Copy Files to XBMC Live with sFTP and FileZilla


Here is a quick guide to connecting to XBMC Live via sFTP using FileZilla.  This will enable you to copy files to and from your XBMC Live installation.  By default XBMC Live installs an SSH server so you dont need to do any configuration on the actual XBMC box.

First you need to install FileZilla, if you are on Ubuntu just search for it in the Software Center or if you are using OSX or Windows you can download it here.

Next you need the IP address of your XBMC box, you can find this out by going to Settings->System Info->Summary



Now you have the IP address of your XBMC box open FileZilla and enter the following settings:

Host: your XBMC box IP address
Username: the username you chose during XBMC installation
Password: the password you chose during XBMC installation
Port: 22



*NOTE: if you did not do a HDD install of XBMC Live and are running it off a memory stick use the default XBMC Live credentials.
Username: xbmc
Password: xbmc

You can now easily copy files to and from you XBMC Live box.
{ Read More }


Saturday, 6 May 2017

Create Ubuntu Live USB With Persistant Storage With uSbuntu Live Creator

Create Ubuntu Live USB With Persistant Storage With uSbuntu Live Creator


You can create a LIVE USB with Ubuntu 8.10 or 9.04 with persistent storage so that the work can be saved on the USB as is not the case in Live CD�s and Live USB.It can create LIVE Bootable USB from Disk Images (ISO), CD, or Download the Distro.It supports Ubuntu, Kubuntu, Xubuntu, Mint or CrunchBang.You can also load from the created LIVE USB in Windows with a special portable version of Virtual Box.All the data stored in the usb persistent storage are hidden and the data is stored in a special file called casper-rw.

uSbuntu Live Creator will also create a portable(no installation) version of VirtualBox, that can be launched by running Launch_usb.exe located in the Portable-VirtualBox folder in your USB Drive, so that you can launch ubuntu right in windows.

Features :

  • Create bootable USB device from Ubuntu, Kubuntu, Xubuntu, Mint or CrunchBang
  • Enable persistency of your data
  • Launch Ubuntu directly in Windows with a special Portable VirtualBox
  • Hides created files on the drive.

Steps to create a Bootable Ubuntu USB Drive :

  • Prepare your USB, ie., Format the drive with FAT32 or FAT partition
  • Download and launch the uSbuntu Live Creator and choose a USB key or drive in the list
  • Select a ISO file or CD of Ubuntu/Kubuntu/Xubuntu 8.10 or 9.04
  • Choose the size of persistency data.
  • Check the options you want
  • Click the thunder to start the creation

Next, launch Portable Virtual Box and from the Boot Options you can start Ubuntu in

  • Persistent Mode (your data will be persistent)
  • Live Mode (all your data will be discarded after reboot)
  • Install (to install Ubuntu on your hard drive)
  • Integrity Check (check the files on your key)
  • Memory Test (can diagnose RAM problems)

The data on your Ubuntu can be backed up by simply copying the �casper-rw file� in your Windows OS.

Downlaod uSbuntu Live Creator

{ Read More }


Thursday, 4 May 2017

Create Ubuntu Live DVD using Pinguy Builder

Create Ubuntu Live DVD using Pinguy Builder


Remastersys was one of the best tool for live DVD creation. Remastersys project seized and not available now. Now Pinguy Builder available for this purpose. Pinguy Builder developed from Remastersys source code. So Pinguy Builder is very easy to use tool for live dvd creation.

I tried to build Live DVD from Ubuntu MATE Linux. MATE Desktop available with this Ubuntu distro. MATE desktop gives classic look, not like Unity.

1. Download and install Ubuntu MATE version either 14.04 or 16.04.

2. Download Pinguy Builder package. Choose appropriate version. Read the instructions in the download page first. Pinguy Builder Version 4 works with Ubuntu 16.04 and select version 3 for Ubuntu 14.04.

3. Install Pinguy Builder.
Open terminal and install the package.

sudo su
dpkg -i pinguybuilder*

The package required dependancy files. The command execution will end with error messages. Try to install dependency files,

apt-get install -f

Pinguy Builder can find in System > Administration after installation.


4. Prepare system for Live DVD creation (Add and remove applications).
5. Build Live DVD using backup/Dist option.
{ Read More }


Saturday, 22 April 2017

Creating a Chroot from an Ubuntu Live CD USB

Creating a Chroot from an Ubuntu Live CD USB


Chroot is an operation that changes the apparent root directory for the current running process and its children. It has got many uses but most importantly, it can be used to repair a broken, non-bootable install from a Live environment. May the problem be with the boot-loader, non-configured packages etc, Chroot would at least give you an environment from where you can try to repair the broken install.

There are several other advanced uses of Chroot like testing unstable applications, creating an environment with dependency control etc. We are just discussing the simple ones here.

Creating a Chroot

If you've got a non-bootable PC and want to attempt to repair it, boot an Ubuntu Live CD/USB on that PC. Go to a Terminal and find out your '/' partition by running this command:

sudo fdisk -l

You need to figure the partition notation for your '/' drive which looks like 'sda1', 'sda2' etc. You can also start GParted from System > Administration menu or by searching the Dash in Unity, and try to find your partition there.

For creating the Chroot, you need to run these commands one-by-one:

sudo mkdir /mnt/temp
sudo mount /dev/sdXY /mnt/temp
for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt/temp$i; done
sudo cp /etc/resolv.conf /mnt/temp/etc/resolv.conf
sudo chroot /mnt/temp

Where 'sdXY' is your '/' partition.

The 4th command is meant to connect your Chroot environment to the internet but it would obviously only be successful if you've got internet access in the Live environment.

Continue Reading �
{ Read More }