want to built autopatcher for linux

Status
Not open for further replies.

subratabera

Just another linux lover.
Here is something interesting for your project -->

*jan.netcomp.monash.edu.au/xscript/shellprogramming2.html

It says -->
Scripting and command languages are important programming paradigms that many computing students need to learn. However, they are usually presented in a terminal-based environment, which is foreign to students used to a windows GUI environment. This paper discusses "scriptlets" - small windows applications that are designed to be used in shell scripts. It shows how these can be used to teach shell programming constructs, while giving a GUI flavour to the lessons. Student reaction is also discussed.
 
Last edited:
OP
gary4gar

gary4gar

GaurishSharma.com
tech_your_future said:
It's taking too long to open here. Is it possible to host on maybe sourceforge.net?
sourceforge.net or googlecode.com??

which is better
__________
subratabera said:
Here is something interesting for your project -->

*jan.netcomp.monash.edu.au/xscript/shellprogramming2.html

It says -->
thanx for this.
but i want to use gtk. can u find some tut's on passing commands from gtk to the shell??
 
Last edited:

mehulved

18 Till I Die............
I haven't seen googlecode as such. Just been through it breifly.
But, sourceforge is the best AFAIK. Maybe someone else has more idea. I have personally never seen any problems with sourceforge.
 
OP
gary4gar

gary4gar

GaurishSharma.com
this is the project page
*code.google.com/p/popi/


All those intereated in joining the project do pm me your gmail id so that i can send u a invite

also this is the project discussion group
Here are the essentials:

* Group name: popi development discussion
* Group home page: *groups.google.co.in/group/popi-devel?hl=en
* Group email address popi-devel@googlegroups.com
 

subratabera

Just another linux lover.
Here is something that can be useful for your project...

Copy the following code in a ".sh" file and make that file executable.

#project POPI (test) by Subrata Bera
#01-01-2007

#First make a temp file
STDOUT=`mktemp`

#Check user
WHOAMI=`/usr/bin/whoami`

#Uncomment if root access required
#if [ "$WHOAMI" != "root" ] ; then
# echo "You must be the root user to run POPI."
# exit 1
#fi

#Function for checking installed softwares
rpmCheck() {
rpm -q $1 > /dev/null 2>&1
}

#THE REAL CODE
#zenity is a program that will display GTK+ dialogs, and
#return (either in the return code, or on standard output)
#the users input.

zenity --title "POPI" \
--width=600 \
--height=418 \
--list \
--checklist \
--multiple \
--column " " \
--column "Item" \
--column "Description" \
FALSE "Get user name" "Prints the user name in the terminal..." \
FALSE "List files" "Lists files in the current directory..." \
FALSE "Check for Amarok" "Check whether Amarok is installed or not..." \
FALSE "Say Hello" "Displays a dialog box saying Hello..." \
> $STDOUT

#'/usr/bin/gnome-terminal'

if grep "Get user name" $STDOUT >/dev/null ; then
zenity --info --title "User Name" --text $WHOAMI
fi

if grep "List files" $STDOUT >/dev/null ; then
ls -l | zenity --list --title "File list" --text "List of all files in the current directory.." --column "Files"
fi

if grep "Check for Amarok" $STDOUT > /dev/null ; then
if rpmCheck amarok ; then
zenity --info --title "Amarok" --text "Amarok installed"
else
zenity --info --title "Amarok" --text "Amarok is not installed"
fi
fi

if grep "Say Hello" $STDOUT >/dev/null ; then
zenity --info --title "Hello" --text "Hello $WHOAMI"
fi

This will give you a graphical window that a user can interact without knowing anything about the shell script...

Hope this helps...
Waiting for comments...
 
Last edited:

mediator

Technomancer
Excellent!! Thats perfect for GUI installation. Nice work @subratabera

@gary all u need to do now is make install scripts for individual packages!!
 

subratabera

Just another linux lover.
Thanks @mediator. I think this is the easiest way to present a GUI with shell interaction...And AFAIK it works on any latest distro...
 
OP
gary4gar

gary4gar

GaurishSharma.com
great work on your part subratabera!
meanwhile i have prepared a GUI user interface using gtk+
school will upload it here


then with a vote of all members we can use between zenity or GTK+
 

subratabera

Just another linux lover.
tech_your_future said:
Will GTK work with those who have installed only KDE?
And zenity too?

Here is a possible answer...

Create GUI dialogs for GNOME and KDE

GNOME --> zenity, GTK+
KDE --> kdialog

Both have almost same functionality. We first have to check the installed DE and then run the script accordingly...
 
Last edited:
OP
gary4gar

gary4gar

GaurishSharma.com
see the problem with zenity is it just dialog box but we need more than that as in future we can have seacurity updates, tweaks & many other things which will need to be categaoriesed.
 
Status
Not open for further replies.
Top Bottom