Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-09-2008, 12:10 PM   #1
LQ Newbie
Registered: May 2008
Posts: 2

Rep: Reputation: 0
running user apps in kerenl mode


My aim is to edit an ethernet device driver file so as to call a bin file in /usr/sbin. I am working in an ATMEL board. How can I call a user app when in kernel mode? Is there anything as sweet and short as a sytem() call (no high hopes)? If not so, any work-arounds that you can suggest?

Old 05-09-2008, 01:16 PM   #2
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora, PCLinuxOS
Posts: 582

Rep: Reputation: 65
I think you are asking how you can edit a file which is owned by user 'root' or some other user that you don't have privilege to edit. Right?

If that's what you need to do, and you know the superuser (root) password, you can use the su command to temporarily become root. You'll be prompted for the password for root. Be careful. You'll have awesome power until you execute exit to return to mere mortal status.

Alternately, if the /etc/sudoers file is configured correctly (as it always is on Ubuntu), you can use the sudo command on each command. You'll be prompted for your own password, (not root's). Naturally, you can use whatever editor is installed: emacs, vi, vim, nano, joe, nedit, etc. e.g.:

sudo nano filename
Old 05-09-2008, 08:56 PM   #3
Registered: Apr 2008
Location: argentina
Distribution: Arch
Posts: 86

Rep: Reputation: 22
I think this is near what you're looking for: a framework for user-space device on Linux
Old 05-10-2008, 02:21 AM   #4
LQ Newbie
Registered: May 2008
Posts: 2

Original Poster
Rep: Reputation: 0
no root privilege needed


I think I've been misunderstood. I am compiling the ethernet device-driver statically while building the kernel itself. The device-driver activates a function when the ethernet link is up. At this point I want to call a dhcp function for dynamically assigning an IP to my board. This dhcpc bin file is in /bin/udhcpc file in my initial ram disk. Whatever calls to the user space I need to do, should be precompiled while building the kernel. So, my question is, how can I call this bin fiel in kernel mode? And I am not into building modules.



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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel panic while running user mode linux nlatha Linux - Software 3 03-25-2006 12:51 AM
Running GUI apps frm terminal while logged in as normal user muttley Debian 3 08-08-2004 12:39 AM
root apps running on X under regular user?? nny0000 Slackware 3 02-05-2004 03:09 PM
Running root apps in X using regular user? nny0000 Slackware 10 01-15-2004 01:23 PM
Running apps under another user Vlackmar Linux - General 1 03-06-2002 03:25 AM

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

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