LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices



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

Rep: Reputation: 0
running user apps in kerenl mode



Hi,

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?

Thanks
Maas
 
Old 05-09-2008, 01:16 PM   #2
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora, Arch
Posts: 572

Rep: Reputation: 64
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
fbianconi
Member
 
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
http://svn.xiph.org/trunk/fusd/README
 
Old 05-10-2008, 02:21 AM   #4
at91sam9263
LQ Newbie
 
Registered: May 2008
Posts: 2

Original Poster
Rep: Reputation: 0
no root privilege needed

Hi,

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.

Thanks
Maas
 
  


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 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 05:58 PM.

Main Menu
Advertisement
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