how i can modify soruce code of program installed?

News and discussion about development of the Debian OS itself

how i can modify soruce code of program installed?

Postby rgomar90 » 2020-06-06 20:50

what to do to change the program source code

For example how can modify a soruce of the Rhythmbox progam; what are the steps?.

Thank You. Sorry for my english.
rgomar90
 
Posts: 1
Joined: 2020-06-06 20:31

Re: how i can modify soruce code of program installed?

Postby eriefisher » 2020-06-06 21:22

First thing you need to do is download the source code. You can likely find it on git or something. You should also be able to get it through apt with the deb-src repo. Your sources.list should have a deb-src line but that's usually for installing from source as the package it debianized.
____________________________________________
There's a manual?
Siduction
Debian Sid
Xfce4 4.14
User avatar
eriefisher
 
Posts: 112
Joined: 2008-06-04 03:49
Location: Ontario's South Coast

Re: how i can modify soruce code of program installed?

Postby cuckooflew » 2020-06-06 23:52

    1.Lack of English skills is no excuse for not doing any searches, and you can do those searches in your own language, in order to find tutorials in your language. Do you really expect some one to write a full tutorial just for you, here ? I will give you a hint, and then you will start learning to do your own searches by trying it your self, you can use english or your own language, that is your choice. Use these key words:
    Code: Select all
    How to view and edit the source code of a program

    Copy / paste them into your favourite search engine.
    2.Read and follow one of the many tutorials all ready written. Here is one I found for you:
    https://www.makeuseof.com/tag/how-to-view-edit-the-source-code-of-an-open-source-app/
    3.For Rythmbox as a example, use key words:
    Code: Select all
    how to modify a source code of the Rhythmbox program
    Copy /paste into your search engine. As you can see , just by looking at the results, there is a lot to be said about this, and there are also various plug ins that have various names, so a lot depends on exactly what part of rythmbox you want to modify,..
    4. The main part of it is here:https://gitlab.gnome.org/GNOME/rhythmbox
    Simply download it, and have fun. You can use any text editor you want to do your edits. But, I suggest learning how to write code, mostly C (GTK) and use a compiler, I guess this should actually be the first step, but also maybe you all ready know , if you don't: Keywords:
    Code: Select all
    how to write or modify C programs , GTK and compile them
    , any of the many tutorials will do.
That is all for now, there is much more, but I am thinking this might be a "help me with my home work" question, and will leave the rest to you. Besides , nobody likes a long drawn out post, ...but I can not think of a simpler way to put it. Sorry
Please Read.. What we expect you have already Done.
Does any one know about this ?
Users browsing this forum: Google Knows, and
My grand father knows all about everything:
…one flew east, one flew west,
One flew over the cuckoo’s nest.
cuckooflew
 
Posts: 403
Joined: 2018-05-10 19:34
Location: Some where out west

Re: how i can modify soruce code of program installed?

Postby pylkko » 2020-06-07 06:09

If you want to modify the source code of the version that you have installed, then using apt to install the source code is the best way. You can use git or download the source code of many programs, and even get newer or alternative versions of software like this. However, the source the Debian uses is likely patched by Debian to some extent. That means Debian has added some minor adjustmments to the code, to optimize it on Debian. You can read about using apt to install source here:

https://wiki.debian.org/apt-src

The next step is you need to have the toolchain and compiler for source code. Rhytmbonx and all GNOME software are written in C and they use many GNOME libraries. SO you need a c compiler, which almost every linux distribution comes with. There are also packages that are in Python, or other languages. After you make the modification to the code, you need to compile it and preferably make a .deb package. After this, install it. There is a post on this forum called "how to compile a package the smart way". You should read that.

With GNOME packages there is also a very easy way to get started. You can install a programming IDE called GNOME builder. This is an IDE that can be used to write C, C++, Python or many other languages. It also, however comes with ready-made templates for GNOME programs, if you want to make your own (things like documentation and file trees and libraries are utilized in a standard way). In addition to starting a new project it allows you to open the projects of other GNOME software. So you can just start editing Rhythmbox by selecting that from the list when you make a new project.
User avatar
pylkko
 
Posts: 1739
Joined: 2014-11-06 19:02


Return to Debian Development

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable