Anna University Results November - December 2011 available with your GPA only for Credit System
Anna University Results Nov - Dec 2011
Exam Results 2012
Exam Results 2012 | Inspirational Quotes |
Friday, December 23, 2011
Anna University AU Chennai Nov/Dec 2011 Results Announcing Date - Tentative Date | November/December 2011 AU Results Announcing Date | Nov - Dec 2011 Results Anna University,Chennai | Anna University Nov/Dec 2011 Results | WHEN WILL BE THE ANNA UNIVERSITY 3RD SEMESTER, 5TH SEMESTER, 7TH SEMESTER RESULTS ANNOUNCED?
Labels:
Anna University Results
Tuesday, October 11, 2011
GUI Programming Using Qt Designer
GUI Programming Using Qt Designer
Aim :
Learn to write GUI programs using FOSS tools like Qt,GTK,Gambas, etc. in Linux.
Introduction :
GUI programming on Linux is based on the X Window system. X provides windowing on computer displays and manages keyboard, pointing device control functions and touch-screens. X provides the basic framework, or primitives, for building such GUI environments: drawing and moving windows on the display and interacting with a mouse, keyboard or touchscreen. X uses GUI toolkits to help the development of GUI programs. GUI toolkit is a set of widgets for use in designing applications with graphical user interfaces (GUIs). GUI toolkits can be based on different languages. The most commonly used languages are C/C++. Often the toolkits provide higher level language bindings which allow the user to program GUIs using an easier to use higher level language like Python, Ruby etc. There are two popular GUI toolkits which are widely used today. They are Qt and GTK+. Qt is written in C++ while GTK+ is written in C. Both toolkits provide bindings in a wide variety of languages. For users who are familiar with Visual basic, Gambas is a full-featured object language and development environment built on a BASIC interpreter which runs on top of the X window system. It in turn relies on the underlying GUI toolkits (both Qt and GTk+). This exercise consists of developing GUI programs using the Qt toolkit.
Description :
We will learn to setup their systems to develop using Qt and write 5 programs and test their results. The programs are of increasing complexity and introduce the students to more and more concepts. All the programs will be purely code drive, ie. the user interface is developed entirely using C++ code. None of the visual GUI builders will be used for these exercises.
Pre-requisites:
Qt Designer Installation :
Step 1:
Goto Terminal window
Step 2 :
Enter into root user account.
$su
Password : <your password>
Step 3 :
Install Qt Development Tool using following Command
# yum install qt-devel
Step 4 :
Install Qt Demo using following Command
# yum install qt-demos
Step 5 :
Install Qt Examples using following Command
# yum install qt-examples
Step 6 :
Install Qt Documents using following Command
# yum install qt-doc
Step 7 :
Install GCC C++ Compiler tool using following Command
# yum install gcc-c++
Step 8 :
Now you can goto Applications -> Programming -> Qt4 Designer
Use this Qt Designer Tool to develop the GUI Application …
You can also use Qt Demo and Qt Assitant for example help
Step 9 :
Now you can develop GUI application using Qt Designer
Simple Example GUI Application :
Example :
Menus and Toolbars
· This program will display a menu which can be used to close the program.
· we have 3 files as part of the program:
1. mymenu.h
2. mymenu.cpp
3. main.cpp
· Create a new directory “qtmenu” for the program.
# mkdir qtmenu
· Go to the newly created directory “qtmenu”.
# cd qtmenu
· Create the “mymenu.h“ file in the qtmenu directory.
# sudo gedit mymenu.h
Type the following code in geditor
// mymenu.h
#include <QMainWindow>
class MyMenu : public QMainWindow
{
public:
MyMenu(QWidget *parent = 0);
};
· Create the “mymenu.cpp“ file in the qtmenu directory.
# sudo gedit mymenu.cpp
Type the following code in geditor
//mymenu.cpp
#include "mymenu.h"
#include <QMenu>
#include <QMenuBar>
#include <QApplication>
MyMenu::MyMenu(QWidget *parent)
: QMainWindow(parent)
{
//create the quit action object
QAction *quit = new QAction("&Quit", this);
//create the file menu
QMenu *file;
file = menuBar()->addMenu("&File");
9
CS2406-Lab Manual - NRCFOSS/AU-KBC Centre, Anna University Chennai
//add the quit action to the new menu
file->addAction(quit);
//connect the triggered signal from the quit action menu
//to the global quit method which closes the application
connect(quit, SIGNAL(triggered()), qApp, SLOT(quit()));
}
· Create the “main.cpp” file in the qtmenu directory.
# sudo gedit main.cpp
Type the following code in geditor
//main.cpp
#include "mymenu.h"
#include <QDesktopWidget>
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MyMenu window;
window.setWindowTitle("My menu");
window.show();
return app.exec();
}
· Once the file has been saved, use the following commands to compile and execute the program.
# qmake-qt4 –project
# qmake-qt4
# make
· To run this GUI program goto “qtmenu” directory and Click “qtmenu.exe” File
· On running the program we get a window with a menu “ File -> Quit” which allows us to close the program.
· On running the program we get a window with a menu “ File -> Quit” which allows us to close the program.
Hope this will be helpful for you!!!
Stay tuned for updates. If you find any problem or have any suggestions for improvements, you can always mail me.
All the best for Your Exam !!!!!
All the best for Your Exam !!!!!
By M.Baran Mahamood
Labels:
CSE - VII SEM,
Open Source Lab - CS2406
Monday, August 22, 2011
Sharing Files/Folders between Windows XP and Fedora Linux
Sharing Files/Folders between Windows XP and Fedora Linux :
This brief tutorial will show you how to easily enable file sharing between Windows XP and Fedora 14, codename Laughlin. When you enable file sharing between the two systems, both machines will be able to view and access shares from each other. While Windows uses SMB (Server Message Block) Fedora uses Samba to share files with Windows.
Getting started:
To get started, logon to Windows XP and click Start –> then right click
‘My Computer’ and select ‘Properties’.
Then select ‘Computer Name’ tab and click ‘Change’
Enter the Computer and Workgroup name and click OK. Make sure all systems use the same Workgroup name. You will have to restart your computer for the change to take effect.
After restarting, click Start –> Control Panel.
Select Security Center –> Windows Firewall.
When Windows Firewall opens, select ‘Exceptions’ tab and check the box to enable File and Printer Sharing. Close out when done.
Next, logon to Fedora and go to System –> Administration –> Add/Remove Software.
Then search for and install system-config-samba. Install all additional packages when prompted.
system-config-samba
After installing, go to System –> Administration –> Samba.
Then select Preferences –> Server Settings.
Enter the Workgroup name here and click OK.
Select Preferences –> Samba Users.
Edit or Add User to samba database and click OK.
To create shares, click File –> Create Add Shares, then select the folder you wish to share and check
- Writable
- Visible
Then select ‘Access’ tab and give users access to the shares, then click OK to save.
Next, go to System –> Administration –> Firewall.
Select ‘Samba’ under ‘Trusted Services’ and enable Samba.
Next, select ‘ICMP’ and enable ‘Echo Reply (pong) and Echo Request (ping)’
After that go to Applications –> System Tools –> Terminal and run the command below
su -c 'chkconfig smb on'
Restart your computer and if everything is setup correctly, you should be able to view shares from either system.
After doing all these setup make sure Firewall should be Turn off on both the system.In Fedora Linux goto the Places->Network then click Windows Network then click PENGUIN.
You will see the shared Workgroups as follows
In Windows goto the My Network Places then click View Workgroup Computers on the left pane
You will see the shared Workgroups as follows
Hope this will be helpful for you!!!
Stay tuned for updates. If you find any problem or have any suggestions for improvements, you can always mail me.
By M.Baran Mahamood
Labels:
CSE - VII SEM,
Open Source Lab - CS2406
Sunday, August 21, 2011
Installing Samba Software package
Installing Samba Software Package :
Aim:
To know the how to install the packages like Samba
1. Samba Installation and Configuration
1.1 Introduction to Samba
Samba can be used with Linux to provide transparent access between machines running Linux and machines running Windows. Samba itself runs on a Linux machine and makes shared files and printers available to Windows machines, as if they are available on a
Window machine or server. Thus, Samba has several practical applications which can
generally be categorized as follows:
1. Using a Linux server as a simple peer-to-peer server. There is no user authentication involved and no need for passwords.
2. Using a Linux server as a member server on an existing Windows NT domain. The existing Windows domain controller will use NT authentication tools to control file permissions and access.
3. Using a Linux server as a primary domain controller with its own user authentication and control mechanisms.
Which of these three applications of Samba is used, determines how Samba is configured on the Linux machine.
1.2 Installing Samba
$ su -
Enter Password:
(Here enter the root password)
To install Samba package type the following command in the Terminal
$ yum install samba
In order to make Samba Service start automatically whenever the system boots, type
chkconfig --levels 235 smb on
To check the samba service running status type the following
$ /etc/init.d/smb status
To Start the Samba service
$ /etc/init.d/smb start
To Restart the Samba service
$ /etc/init.d/smb restart
Creating a normal user
$ useradd samba-test
1.3 Configuring samba :
Creating a normal user
$ useradd samba-test
Setting the password
$ passwd samba-test
Changing password for user samba-test.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
Adding the user to access samba shares with a password
$ smbpasswd -a samba-test
New SMB password:
Retype new SMB password:
Added user samba-test.
Login into the samba as using the smbclient to add the files and folders to share with windows.
$ smbclient \\\\localhost\\samba-test –U samba-test
Here enter smb password for login
Enter samba-test's password:
You gets the following output to see the what are files you are sharing
Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.5.8-68.fc15]
smb: \>
In this to see what are files you sharing enter ‘ls’ command
smb: \> ls
. D 0 Tue Aug 9 19:08:44 2011
.. D 0 Tue Aug 9 19:08:44 2011
.bash_logout H 18 Wed Jun 22 19:19:05 2011
.mozilla DH 0 Wed Feb 9 03:52:39 2011
.bash_profile H 193 Wed Jun 22 19:19:05 2011
.gnome2 DH 0 Tue Feb 8 14:08:01 2011
.bashrc H 124 Wed Jun 22 19:19:05 2011
56633 blocks of size 2097152. 7531 blocks available
To see the where your current directory located enter the ‘pwd‘ command
smb: \> pwd
Current directory is \\localhost\samba-test\
To create a folder in sharing folder enter following command
smb: \> mkdir test
To check created directory enter the following command
smb: \> ls
. D 0 Tue Aug 9 19:10:50 2011
.. D 0 Tue Aug 9 19:08:44 2011
.bash_logout H 18 Wed Jun 22 19:19:05 2011
.mozilla DH 0 Wed Feb 9 03:52:39 2011
.bash_profile H 193 Wed Jun 22 19:19:05 2011
.gnome2 DH 0 Tue Feb 8 14:08:01 2011
test D 0 Tue Aug 9 19:10:50 2011
.bashrc H 124 Wed Jun 22 19:19:05 2011
56633 blocks of size 2097152. 7532 blocks available
If you want to come out from samba client enter the ‘exit’
smb: \> exit
How to access the shared files from windows.
Open the samba location from windows as following.
Start-> Run..
Enter the IP Address of fedora linux machine as following
eg: \\192.168.1.2\
It displays log in window to log into the samba sever.
Here username and password should be what you given to while creating samba username and smb password.
eg:
username: samba-test
password:test@123
Now you can see the what are files shared.
Note :
Error :
NT_STATUS_ACCESS_DENIED
If you get the above error then execute the following command
$ setsebool –P samba_enable_home_dirs 1
(or)
$ setsebool –P samba_enable_home_dirs=on
Hope this will be helpful for you!!!
Stay tuned for updates. If you find any problem or have any suggestions for improvements, you can always mail me.
By M.Baran Mahamood
Labels:
CSE - VII SEM,
Open Source Lab - CS2406
Subscribe to:
Posts (Atom)