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

  • Home
  • SEARCH
  • 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 741463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:38:06+00:00 2026-05-14T08:38:06+00:00

i have made a program in C using the gcc compiler. Right now it

  • 0

i have made a program in C using the gcc compiler. Right now it has no GUI components. I am compiling it with makefile and running it in the terminal. I need to deploy it so that the executable is standalone. I want the executable to have an icon and when clicked start the program in the terminal. Can anyone tell me how to do this?

  • 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-05-14T08:38:07+00:00Added an answer on May 14, 2026 at 8:38 am

    The basics

    (disclaimer: the following was tested with kubuntu, you might need to make some adjustments for your system)

    Actually there is a standard to do that, not just for Ubuntu but for any number of *nix systems. Consult: http://www.freedesktop.org/wiki/Howto_desktop_files:

    Lets assume you have your foo.bin file you want to deploy. According to the Filesystem Hierarchy Standard, a good place to put it (if you are not using a package manager) is /usr/local/bin/. You will also need an icon, I will assume your artistic talent produced foo.png, and a good place for it might be /usr/local/share/icons/.

    Now you need to create foo.desktop that might look like this:

    [Desktop Entry]
    Comment=My awesome fooish application 
    Exec=/usr/local/bin/foo.bin
    Icon=/usr/local/share/icons/foo.png
    Name=Foobar
    NoDisplay=false
    StartupNotify=false
    Terminal=1
    TerminalOptions=
    Type=Application
    

    and put it in /usr/share/applications/.

    You might be able to use your menu editor to create such a file. Look for the generated desktop file under ~/.local/share/applications/.

    This should do the trick.


    Another convention is to put everything under /opt/foo/ and create symbolic links to /usr/local/.

    Cross DE with Portland

    The Portland project provides the xdg-* command line utilities that make it easy to install the application’s icon / menu entry / resource file, in a DE (GNOME, KDE, etc) independent way.

    See the KDE & GNOME cross-desktop development tutorial on linuxuser.co.uk.

    A better way

    For deployment you should consider creating a *.deb package. (with your executable, *.desktop file and icon). There are several tutorials on this subject e.g. http://www.linuxfordevices.com/c/a/Linux-For-Devices-Articles/How-to-make-deb-packages/.

    Note that if you are using a package manager, the convention for file location becomes /usr/ instead of /usr/local/.

    Go all the way

    The next step, if you are inclined to take it, is setup your own repository, or PPA.

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

Sidebar

Ask A Question

Stats

  • Questions 534k
  • Answers 534k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It might be that you have another Firefox extension installed… May 17, 2026 at 12:53 am
  • Editorial Team
    Editorial Team added an answer Apparently the good way is to listen to the OnClick… May 17, 2026 at 12:53 am
  • Editorial Team
    Editorial Team added an answer I think the problem is with your use of Binding.ElementName.… May 17, 2026 at 12:53 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I am using a program that talks to my COMM port, but I have
I made a program using VB and I lost the source code but I
I have made a program in c and wanted to see, how much memory
If I made a program that stores strings on a text file using the
I made a cross compiling toolchain for arm-gcc, configuring binutils, newlib, gcc and gdb
How to develop program/website and minimize DB dependencies using C#.NET? For example I have
I have been playing around with Template functions, and made a little logger program.
From command line I am getting file name which I have to compile using
I made a program to connect to a device via Bluetooth and send the
I have a java program that connects to a MySql database and it's working

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.