Showing posts with label Tutorials. Show all posts
Showing posts with label Tutorials. Show all posts

Saturday, 3 September 2011

Changing GNOME 3 wallpaper

I have been using fedora with gnome 3 for many months.Even though GNOME 3 is a great release,its has some rough edges too.In this example I will explain how to change the wallpaper in regular interval(say 1 minute interval).Here I am using perl script to accomplish my goal.You can also use python to do the same.Following are the steps
  1. Create a directory(ex: /home/senan/wallpaper) and copy all the images to it or you can use the default wallpaper directory
  2. we will store the image names in array
  3. Then we will pick an image randomly and set it as wallpaper using gsettings every 10 seconds
use the following perl script to do the above things

#!/usr/bin/perl -w
#
# Author      : Prabhendu V Senan
# Description : This is a perl script for changing the Gnome wallpaper in a specified time interval
# File Name   : change_wall.pl
#

# Directory containing the wallpaper images
$wallDir = '/home/senan/wallpaper';

# Wallpaper change interval time

$interval = 10;

# First check whether the directory containing images exists or not

unless(-d $wallDir)
{
  print "There is no such $wallDir directory \n";
  exit();
}

# Parse the directory,get all the image filenames and fill it into an array

@images = `find $wallDir -type f | grep [jJ]*[pP][nN]*[eE]*[gG]`;

chomp(@images);

#if the directory has no images,Exit()

if(@images == 0)
{
  print "No Images found in $wallDir \n";
  exit();
}

my $nowShowin;

while(1)
{
   $nowShowing = $images[rand(@images)];
  `gsettings set org.gnome.desktop.background picture-uri "file:///$nowShowing"`;
   sleep($interval);
}

To run the script: Copy and paste it into your favourite text editor.
  1.  Save the file(ex:wallChange.pl
  2.  Make it executable(ex: chmod +x wallChange.pl)
  3.  CD to script dir and run the script :-)
  4.  To run the script during start up:Open gnome-session-properties->Add->Browse the script and add :-) 
  5. Restart your computer



Saturday, 9 July 2011

Using a Wi-Fi powered laptop as an Access point for sharing internet connection


In this blog post I am going to explain how we can use a Wi-Fi enabled laptop as an Access point for sharing internet .All you need is a Wi-Fi enabled laptop, a wired internet connectivity(idea netsetter, mobile modem, wired broadband).I am using  my Nokia E71 modem for setting up a Wi-Fi network on Windows 7 home premium

Step 1:

Connect your device to computer and establish a connection to internet.

Step 2:

Go to network and sharing center. For that right click the network icon on the taskbar 











In that open window select change adapter settings(top left corner of the window)








Right click the appropriate adapter and select properties. Since I am using E71, am going to take the properties for Nokia E71USB Modem. If you are using Idea Internet choose it



















Make sure that Allow other network users to connect through this computers internet Connection is Checked (Sometimes it will show a message about username and password, don’t worry just click ok).
Select Home Networking Connection: as Wireless Network Connection (It’s just blow the checkbox)
Now Click Ok button to finish adapter settings

Step 3:

If the connection is active, it will show a warning since the connection is active the settings can be applied only next time when the connection is active. Just disconnect and reconnect the device

Step 4:

Now we are going to create an Ad-Hoc network. For that do the following
Open Network and Sharing Center as Before









Click set up a new connection or network














Scroll down to bottom and Select Set up a wireless ad hoc network and Click next and again next
















Choose a name for the Network (any name), Security type and Security key. Here I chose No authentication (anybody having a Wi-Fi device can connect).If you want to control access then choose another security type. Make sure that save this network is checked, otherwise changes will be lost in next reboot
Click next and close the wizard

Step 5:

Now switch on your laptops Wi-Fi. Click on the network icon in the taskbar. You will see something like this


















Click Dragon Fly and click Connect button. We are done. Now it’s the time to check whether it is working properly or not. Connect to internet if your connection is not active. Take another wifi powered device and scan for network. Then connect to internet using the “Dragon Fly” access point
Happy Browsing J