Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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!

share|improve this question
    
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 '13 at 23:47
    
@user1205935 - could you tell me how to do that? –  0101011 Apr 10 '13 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 '13 at 0:40
add comment

2 Answers 2

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

share|improve this answer
add comment

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.

share|improve this answer
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. –  Eliah Kagan Apr 10 '13 at 7:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.