LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-15-2007, 12:07 PM   #1
krisykc
LQ Newbie
 
Registered: Mar 2007
Location: India
Distribution: Fedora Core 5
Posts: 2

Rep: Reputation: 0
Running an executable file from a user created interface


My project deals with accessing ntfs partitions in linux using an interface. I have created an interface using Glade. But the problem is i dont know how to provide a link from the interface for executing the programs. Is this possible. I am new to programming in linux please try to help me as soon as possible.
Thank You.
 
Old 03-15-2007, 12:25 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Your program should simply be able to read() the mounted ntfs filesystem, just as it would do so for any other part of the file system. Do you have some particular application that you want to launch, which performs ntfs-specific work? If so, you will probably need to use fork()/exec()/wait(). See the man pages for these system calls, and if you have more specific questions about these, come back here to ask.
--- rod.
 
Old 03-15-2007, 12:41 PM   #3
krisykc
LQ Newbie
 
Registered: Mar 2007
Location: India
Distribution: Fedora Core 5
Posts: 2

Original Poster
Rep: Reputation: 0
I have the programs that are needed to perform the operations on ntfs partitions. i intend to execute these programs using the buttons that i have created in my interface. for eg. if i click a button named NTFSDIR it should execute the program ntfsdir which displays the contents of the partition.
 
Old 03-15-2007, 01:54 PM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Okay then, in your event handler code for the button(s) or other widgets, you will need to fork() a new process, launch the requisite application(s) using one of the exec() family of system calls, and then wait() for the process to complete. Consult your local man pages for the details on these functions.

--- rod.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Make newly created file executable Black Chaos Linux - General 3 08-03-2006 10:53 AM
help: Executable file is modified when it is running. dongb Linux - General 1 12-29-2005 12:19 AM
help: Executable file is modified when it is running. dongb Red Hat 1 12-28-2005 10:51 AM
every file is created executable oopsnic Fedora 4 08-15-2005 02:38 AM
Linux Executable File Help (created from a .c file) MattG1981 Linux - Newbie 7 06-06-2004 04:54 PM


All times are GMT -5. The time now is 05:03 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration