Running an executable file from a user created interface
Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.