2

I am trying to figure out how I can edit an application's source code. The application came from the Ubuntu Software Center, so I do not know if there is a specific folder were all the apps are so I can edit one. Any suggestions? Thanks!

3
  • Edit the source code of a compiled program? If you look for configuration files, synaptic has a list of installed files for every installed package.
    – Earthliŋ
    Apr 9, 2013 at 23:47
  • @user1205935 - could you tell me how to do that?
    – 0101011
    Apr 10, 2013 at 0:32
  • I don't use the software center, but in the package manager synaptic, you can right-click on an installed package and select "Properties". Under the "Installed Files" tab you find all files that were installed for that package with their location on your computer.
    – Earthliŋ
    Apr 10, 2013 at 0:40

2 Answers 2

3

Use apt-get source pkgname from the command line. Doesn't matter what language it's in --as long as the package is open source and in the repositories

1

Your ability to edit the application's code depends on if it was compiled or not. If it was written in a language like C, it would be impossible to do so. If, however, the application was written in a language like Python or with HTML/JavaScript, it is quite simple. The best way I have found to find this sort of thing out is to open up a terminal and try the following:

 which <program name> #This may or may not be successful. For Google Chrome, you would say "google-chrome" instead of "chrome." Try again if at first you don't succeed.
 gedit <whatever the previous command spits out>

If gedit does not show plain text, than you are out of luck. It it does, than you have found "main" file for the program and will be able to work from there.

1
  • 1
    It's misleading to say that it's impossible to edit a compiled application's source code. You download the source code, edit it, and compile it. Both systemwide and user-specific configuration files remain intact. A remarkable consistency of user experience can be maintained across the rebuilding and reinstallation of software. And the technique in Ian B.'s answer facilitates starting from the exact same source version, with an essentially equivalent build infrastructure, from which the built (compiled) and packaged software was produced. Apr 10, 2013 at 7:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .