Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8559245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:59:44+00:00 2026-06-11T15:59:44+00:00

I am developing a GTK+ application for Linux that is launched from another GTK+

  • 0

I am developing a GTK+ application for Linux that is launched from another GTK+ application using fork() and then execvp().

What I’m noticing is that the exec()’d application is taking around 10-15 seconds to complete the call to gtk_widget_show_all(). After this period of time, the widgets and window appear and the application runs perfectly.

So the invocation of the application looks like this:

main_gtk_ app -> fork() -> execvp( secondary_gtk_app ). secondary_gtk_app takes a long time to display window and widgets.

However, if I run the application directly, not exec()’d from the GTK+ application, from the command-line there is no delay in the gtk_widget_show_all() call.

Invocation:

shell command line: ./secondary_gtk_app ( start from command line , no delay in showing window and widgets ).

Does anybody know what might be causing this behavior? Or a way to perhaps reduce the length of time spent in gtk_widget_show_all()?

EDIT: After some research, it appears a large portion of the delay has to do with GTK+ doing some font initialization. If I run fc-cache -f which creates the font caches for the Fontconfig system on the embedded device before hand, the secondary_gtk_app loads in about 2 seconds. So it’s related to font handling.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T15:59:46+00:00Added an answer on June 11, 2026 at 3:59 pm

    Generally speaking, Gtk applications are not recommended to do fork(), but use the g_spawn_* function family instead.

    Of course, you can call fork() if you really want or need, but you will have to take care at least of one important point: close all the file descriptors befor calling exec*(). If you fail to do this, the child process will inherit many (all) of the parent fds.

    Note that a graphical application has at least one fd connecting it to the X11 server. And maybe even more…

    For more details that you will ever want to know, you can see the source of the g_spawn_*() functions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing cross platform(Windows, Linux) desktop application using Mono and Gtk#. Application will
iam developing one application.In that i need to get the music files from the
I am developing a GTK based application which has to support clipboard. For that
I'm developing an application with Gtk and Glade. My impression is that it's common
Developing an application using SWT to work in both Linux and Windows. I created
I'm developing an application that shall receive images from a camera device and display
I'm developing an application using python gtk+ and glade. My glade file format is
i am developing a Gtk# based application which uses a custom widget derived from
Iam developing one application.In that iam placing the radio buttons(uiimageview) on table view and
While developing an application using gwt in ecliplse crashed. Now the server is running

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.