Results 1 to 4 of 4

Thread: Nautius/kernel boundary?

  1. #1
    Join Date
    Nov 2011
    Beans
    5

    [SOLVED] Nautius/kernel boundary?

    Hi,

    I have a Nautilus/linux question.

    Where is the boundary between the user-level and kernel-level code in the Nautilus source code? For example, when I double-click a text file, there is inevitably a call to sys_execve with '/usr/bin/gedit' as an argument. What if I wanted to dump a message in /var/log/syslog every time I double-clicked to execute an app? I know I can modify the kernel so that the execve system call does a 'printk', but what if I wanted to do it at the user-level?

    Any pointers to relevant code/readme's will be greately appreciated!
    Last edited by thenilly; December 2nd, 2011 at 09:00 PM. Reason: solved

  2. #2
    Join Date
    Apr 2006
    Beans
    370

    Re: Nautius/kernel boundary?

    Nautilus probably does something like:
    Code:
    app = g_file_query_default_handler(file)
    g_app_info_launch(app, file, ctx)
    In the end, it runs g_spawn_async (or a related function), which eventually calls fork and execv(e). Those last functions are wrappers in the C library (ie glibc) that make the syscalls.

  3. #3
    Join Date
    Nov 2011
    Beans
    28

    Re: Nautius/kernel boundary?

    Hi,

    I might be wrong but I don't think there's any boundary, cause Nautilus don't use "kernel-mode code" : it uses Glibc, which itself calls Linux syscalls, which triggers kernel code.

  4. #4
    Join Date
    Nov 2011
    Beans
    5

    Re: Nautius/kernel boundary?

    Thanks. This definitely points me in the right direction.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •