Saturday, April 27, 2024
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 747  / 3 Years ago, thu, august 5, 2021, 3:37:51

Possible Duplicate:

How to change the Ubuntu source code






I'm not very familiar with Ubuntu or Linux, but I'm a programmer, and some people told me that you can just go ahead and modify your system.



So my question is, how do you go on about that?
For instance, If I'm interested in modifying the behavior of the button or the desktop icons, or whatever it is:




  • How do I get the source code? I guess I need the package name and download it. But how can I get the package name? Let's say I want the button package, where do I look to get the package name? is there a list on a website or a help file?

  • Once I modify it, how can I replace the original with the new one?



P.S. I had some troubles finding the right tags, feel free to edit them


More From » package-management

 Answers
2

OK, far too general a question, but roughly...



First you figure out which package supplies the software you want to alter (ubuntu is made up of hundreds of separate software packages and there's a number of different ways to figure out which one supplies each installed program/file) then:



apt-get source <packagename>


This will download the source code and unpack it in a subfolder under the current location.



E.g. if I want to change the behaviour of the Rhythmbox music player:



apt-get source rhythmbox


Edit the source code as you please. How to build and run, debug etc. really depends on the program... language, build system, type of software etc. Mostly, linux software projects all use makefiles. There should also be a variety of README files in the root of each source tree explaining how to handle that particular project.



Once you are happy with your changes, to build a replacement package that you can install, you create a new version and run a command (supplied by installing the devscripts package) to build the installable "deb" files. You will find a "debian" folder in the root of the package source code. Edit the file debian/changelog creating a new entry with a new version number and describing your changes. Now run the command debuild to build a new package.



You can use the PPA system in Ubuntu's Launchpad to create your own software repositories and upload your changed source packages there (using debuild -S then dput to upload the .changes file) to be built automatically for all supported architectures and installable by anybody that wants to add your repository to their list.



There's a lot more to it of course, but that is a typical (and "traditional") workflow. I vaguely recall a project called Ground Control that was trying to make it all more point-and-clicky.


[#34426] Friday, August 6, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
brasiplacar

Total Points: 314
Total Questions: 124
Total Answers: 97

Location: Dominican Republic
Member since Wed, Mar 17, 2021
3 Years ago
;