FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 12-16-2009, 01:27 AM
Jatin Davey
 
Default Working of .Deb Files , Compare with .exe files in Windows

Hi all

I am new to ubuntu. When i download any apps on the internet to be
installed on ubuntu i get to download .deb packages. I know that these
are the files that have the required application. I want to know the
following:

1. What are the contents of any .deb pacakage in general ?
2. What happens when it is installed ? (Where are the files installed ,
Directories)
3. Any application under linux is launched using a script which is
similar to an exe file in windows , based on this i want to know whether
an application can be installed anywhere and in any directory and it can
be launched from there without having to set environment variables.

Any pointers to all this would help.

Thanks
Jatin

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-16-2009, 03:07 AM
Res
 
Default Working of .Deb Files , Compare with .exe files in Windows

On Wed, 16 Dec 2009, Jatin Davey wrote:

> Hi all
>
> I am new to ubuntu. When i download any apps on the internet to be
> installed on ubuntu i get to download .deb packages. I know that these
> are the files that have the required application. I want to know the
> following:
>
> 1. What are the contents of any .deb pacakage in general ?
> 2. What happens when it is installed ? (Where are the files installed ,
> Directories)

Ok, for a newbie, the simplest method is apt-get install mc

load mc and hit enter on the deb file, it will reveal its contents and
where it wants to put them


> 3. Any application under linux is launched using a script which is
> similar to an exe file in windows , based on this i want to know whether
> an application can be installed anywhere and in any directory and it can
> be launched from there without having to set environment variables.

you can run any script from anywhere if you execute it with full pathname
providing the partition is not read only.
eg: /usr/local/tmp/a/b/c/d/e/f/g/h/runme


--
Res

"What does Windows have that Linux doesn't?" - One hell of a lot of bugs!

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-16-2009, 05:21 AM
Andrew Farris
 
Default Working of .Deb Files , Compare with .exe files in Windows

On Wed, 2009-12-16 at 07:57 +0530, Jatin Davey wrote:
> Hi all
>
> I am new to ubuntu. When i download any apps on the internet to be
> installed on ubuntu i get to download .deb packages. I know that these
> are the files that have the required application. I want to know the
> following:

First of all, if you're installing programs, it's usually best to use
the software repositories (through USC or Synaptic). If what you want
isn't in there, you can also try to find a PPA (package repository) and
subscrie to it, provided you trust the package source (just google for
<application_name> PPA). Launchpad hosts lots of PPAs, and in my
experience they're perfectly safe, despite all the warnings. If you
absolutely can't get the software eitger of those ways, then a .deb is
the next best thing.

> 1. What are the contents of any .deb pacakage in general ?

.deb files are basically just an archive (they can actually be opened
with the standard archive manager). They typically contain 2 archives
(both gzipped), a data file, and a control archive.

The control archive contains what's called a 'control file' that
basically has all the essential info about the package, such as it's
name, what service it provides, it's category, any programs it conflicts
with/depends on, the maintainer, etc... and scripts that can be run as
the program is installed/removed. I've also seen MD5 checksum files in
the control archives before.

The data archive contains all the program data (i.e. sources, binaries,
libraries, art, etc...) which is all arranged in a false directory
structure that mimics where everything is intended to be when the
install is done. I.e. if the program is going to store some data under
the shared folder, and have it's binary in the standard executable path,
then it may contain a directory structure something like this:
(within data.tar.gz)
./usr/bin/executable
./usr/share/library.so
.usr/share/icon.png
etc...

There are tools that help with making these so you don't actually have
to archive everything yourself. Here's a link to a simple guide on how
to create .deb formatted packages... it's an interesting read if you
want to learn how the package is structured/built, even if you don't
plan on doing so yourself:
http://www.linuxfordevices.com/c/a/Linux-For-Devices-Articles/How-to-make-deb-packages/

> 2. What happens when it is installed ? (Where are the files installed ,
> Directories)

As would indicate from my last point above, the data file is basically
copied verbatim to the root directory (which is why you need root access
to install software). I believe it fails if there's conflicts with
preexisting data where it's trying to copy, but I'm not sure about that.

Either way, after that the package installer writes a little note in the
package database that you have a new application, and records the
locations of all the files you installed, and i believe it copies any
uninstaller scripts present to another place (dunno where). If you want
to view what files a particular package installed, you can go to
Synaptic, search for your package, then Right-Click > Properties >
Installed Files. Gdebi (the graphical package installer) will provide a
list for you when you when you attempt to install a .deb file by itself,
under the 'Included Files' tab.

> 3. Any application under linux is launched using a script which is
> similar to an exe file in windows , based on this i want to know whether
> an application can be installed anywhere and in any directory and it can
> be launched from there without having to set environment variables.

this depends on your definition of 'script'... it also depends on where
you launch from. most every program I've ever seen on linux installs at
least a link to /usr/bin/ so you can launch anything from the terminal.
in fact, the .desktop launchers that are in the menus, and on your
panel, are actually just little text files that specify a terminal
command to run, along with an icon and other conveniences. Even so,
many/most programs are just directly-executed binaries.

As for running programs from any directory...it all depends on the
program. if the program is looking for files in explicitly named places
(such as /usr/lib/) that it placed there, but you installed it to a
non-standard place, then chances are it won't work. The bets thing to do
though is to try it. sometimes it will work just fine, sometimes you can
get it to work with a little fiddling, sometimes it won't work at all.
If you're feeling adventurous, and the program is not a compiled binary,
you can sometimes simply modify the program to look in a different
location for files it's missing, but that's a little more difficult.

Anyway, I hope that helps...sorry for the long reply.

--
Andrew
_____________________________
Registered Linux User: 473690
Registered Ubuntu User: 22747


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-16-2009, 09:40 AM
Jatin Davey
 
Default Working of .Deb Files , Compare with .exe files in Windows

Andrew Farris wrote:
> On Wed, 2009-12-16 at 07:57 +0530, Jatin Davey wrote:
>
>> Hi all
>>
>> I am new to ubuntu. When i download any apps on the internet to be
>> installed on ubuntu i get to download .deb packages. I know that these
>> are the files that have the required application. I want to know the
>> following:
>>
>
> First of all, if you're installing programs, it's usually best to use
> the software repositories (through USC or Synaptic). If what you want
> isn't in there, you can also try to find a PPA (package repository) and
> subscrie to it, provided you trust the package source (just google for
> <application_name> PPA). Launchpad hosts lots of PPAs, and in my
> experience they're perfectly safe, despite all the warnings. If you
> absolutely can't get the software eitger of those ways, then a .deb is
> the next best thing.
>
>
>> 1. What are the contents of any .deb pacakage in general ?
>>
>
> .deb files are basically just an archive (they can actually be opened
> with the standard archive manager). They typically contain 2 archives
> (both gzipped), a data file, and a control archive.
>
> The control archive contains what's called a 'control file' that
> basically has all the essential info about the package, such as it's
> name, what service it provides, it's category, any programs it conflicts
> with/depends on, the maintainer, etc... and scripts that can be run as
> the program is installed/removed. I've also seen MD5 checksum files in
> the control archives before.
>
> The data archive contains all the program data (i.e. sources, binaries,
> libraries, art, etc...) which is all arranged in a false directory
> structure that mimics where everything is intended to be when the
> install is done. I.e. if the program is going to store some data under
> the shared folder, and have it's binary in the standard executable path,
> then it may contain a directory structure something like this:
> (within data.tar.gz)
> ./usr/bin/executable
> ./usr/share/library.so
> .usr/share/icon.png
> etc...
>
> There are tools that help with making these so you don't actually have
> to archive everything yourself. Here's a link to a simple guide on how
> to create .deb formatted packages... it's an interesting read if you
> want to learn how the package is structured/built, even if you don't
> plan on doing so yourself:
> http://www.linuxfordevices.com/c/a/Linux-For-Devices-Articles/How-to-make-deb-packages/
>
>
>> 2. What happens when it is installed ? (Where are the files installed ,
>> Directories)
>>
>
> As would indicate from my last point above, the data file is basically
> copied verbatim to the root directory (which is why you need root access
> to install software). I believe it fails if there's conflicts with
> preexisting data where it's trying to copy, but I'm not sure about that.
>
> Either way, after that the package installer writes a little note in the
> package database that you have a new application, and records the
> locations of all the files you installed, and i believe it copies any
> uninstaller scripts present to another place (dunno where). If you want
> to view what files a particular package installed, you can go to
> Synaptic, search for your package, then Right-Click > Properties >
> Installed Files. Gdebi (the graphical package installer) will provide a
> list for you when you when you attempt to install a .deb file by itself,
> under the 'Included Files' tab.
>
>
>> 3. Any application under linux is launched using a script which is
>> similar to an exe file in windows , based on this i want to know whether
>> an application can be installed anywhere and in any directory and it can
>> be launched from there without having to set environment variables.
>>
>
> this depends on your definition of 'script'... it also depends on where
> you launch from. most every program I've ever seen on linux installs at
> least a link to /usr/bin/ so you can launch anything from the terminal.
> in fact, the .desktop launchers that are in the menus, and on your
> panel, are actually just little text files that specify a terminal
> command to run, along with an icon and other conveniences. Even so,
> many/most programs are just directly-executed binaries.
>
> As for running programs from any directory...it all depends on the
> program. if the program is looking for files in explicitly named places
> (such as /usr/lib/) that it placed there, but you installed it to a
> non-standard place, then chances are it won't work. The bets thing to do
> though is to try it. sometimes it will work just fine, sometimes you can
> get it to work with a little fiddling, sometimes it won't work at all.
> If you're feeling adventurous, and the program is not a compiled binary,
> you can sometimes simply modify the program to look in a different
> location for files it's missing, but that's a little more difficult.
>
> Anyway, I hope that helps...sorry for the long reply.
>
>
Excellent Explanation. I get a good idea about the linux filesystem
hierarchy. Thanks Andrew. And Dont be sorry for a long reply. If things
are to be understood with long replies then it is for the good.

Thanks
Jatin

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-16-2009, 11:09 PM
NoOp
 
Default Working of .Deb Files , Compare with .exe files in Windows

On 12/16/2009 02:40 AM, Jatin Davey wrote:
> Andrew Farris wrote:
..
>> Anyway, I hope that helps...sorry for the long reply.
>>
>>
> Excellent Explanation. I get a good idea about the linux filesystem
> hierarchy. Thanks Andrew. And Dont be sorry for a long reply. If things
> are to be understood with long replies then it is for the good.
>
> Thanks
> Jatin
>

Also please bookmark and review:
https://help.ubuntu.com/
https://help.ubuntu.com/9.10/index.html
https://help.ubuntu.com/9.10/switching/index.html
https://help.ubuntu.com/community
https://help.ubuntu.com/community/CommonQuestions
https://help.ubuntu.com/community/Applications

Just about everything regarding Ubuntu is located there, with helpful
beginner guides. You can also search in the same manner as you would on
Google (the site actually uses a private google search engine).
For example, if I search for '.deb files' I find:
https://help.ubuntu.com/community/InstallingSoftware
and that will give you a very good overview of how to install software.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-16-2009, 11:21 PM
Paul Schulz
 
Default Working of .Deb Files , Compare with .exe files in Windows

Hi Jatin,

I have some 'short' answers for you :-) just in case you wanted specifics

On Wed, Dec 16, 2009 at 12:57 PM, Jatin Davey <daveyjatin@gmail.com> wrote:
> Hi all
>
> I am new to ubuntu. When i download any apps on the internet to be
> installed on ubuntu i get to download .deb packages. I know that these
> are the files that have the required application. I want to know the
> following:
>
> 1. What are the contents of any .deb pacakage in general ?

If you have the .deb (eg. package-1.2.3_amd64.deb) then you can get a
list of the files that it contains, and where they will be installed,
with:

dpkg -c package-1.2.3_amd64.deb

> 2. What happens when it is installed ? (Where are the files installed ,
> Directories)

- These files are copied to your system
- Some installation scripts are run for the package
(pre-install, post-install)
- An index of the installed files in also saved so that a package can be
removed cleanly as well.

Be aware, that packages are installed using administration privileges.
This means that (in general) anything can be done to to fix/break your
system at this time... hence why packages are digitally signed.

> 3. Any application under linux is launched using a script which is
> similar to an exe file in windows , based on this i want to know whether
> an application can be installed anywhere and in any directory and it can
> be launched from there without having to set environment variables.

Not if it is deb packaged. It is design to do onto you system in a
particular way.
If you want to put it somewhere else, then you have the following options:

- Complie the program from source yourself.
- Rebuild the package yourself

> Any pointers to all this would help.

Good questions.. just filling in some detail that you may (or may
not) be interested in.

Cheers,
Paul

>
> Thanks
> Jatin
>
> --
> ubuntu-users mailing list
> ubuntu-users@lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-17-2009, 04:25 AM
Jatin Davey
 
Default Working of .Deb Files , Compare with .exe files in Windows

NoOp wrote:
> On 12/16/2009 02:40 AM, Jatin Davey wrote:
>
>> Andrew Farris wrote:
>>
> ..
>
>>> Anyway, I hope that helps...sorry for the long reply.
>>>
>>>
>>>
>> Excellent Explanation. I get a good idea about the linux filesystem
>> hierarchy. Thanks Andrew. And Dont be sorry for a long reply. If things
>> are to be understood with long replies then it is for the good.
>>
>> Thanks
>> Jatin
>>
>>
>
> Also please bookmark and review:
> https://help.ubuntu.com/
> https://help.ubuntu.com/9.10/index.html
> https://help.ubuntu.com/9.10/switching/index.html
> https://help.ubuntu.com/community
> https://help.ubuntu.com/community/CommonQuestions
> https://help.ubuntu.com/community/Applications
>
> Just about everything regarding Ubuntu is located there, with helpful
> beginner guides. You can also search in the same manner as you would on
> Google (the site actually uses a private google search engine).
> For example, if I search for '.deb files' I find:
> https://help.ubuntu.com/community/InstallingSoftware
> and that will give you a very good overview of how to install software.
>
>
>
Thanks Noop. The links are very useful piece of learning for a newbie
like me.

Thanks
Jatin

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-17-2009, 04:27 AM
Jatin Davey
 
Default Working of .Deb Files , Compare with .exe files in Windows

Paul Schulz wrote:
> Hi Jatin,
>
> I have some 'short' answers for you :-) just in case you wanted specifics
>
> On Wed, Dec 16, 2009 at 12:57 PM, Jatin Davey <daveyjatin@gmail.com> wrote:
>
>> Hi all
>>
>> I am new to ubuntu. When i download any apps on the internet to be
>> installed on ubuntu i get to download .deb packages. I know that these
>> are the files that have the required application. I want to know the
>> following:
>>
>> 1. What are the contents of any .deb pacakage in general ?
>>
>
> If you have the .deb (eg. package-1.2.3_amd64.deb) then you can get a
> list of the files that it contains, and where they will be installed,
> with:
>
> dpkg -c package-1.2.3_amd64.deb
>
>
>> 2. What happens when it is installed ? (Where are the files installed ,
>> Directories)
>>
>
> - These files are copied to your system
> - Some installation scripts are run for the package
> (pre-install, post-install)
> - An index of the installed files in also saved so that a package can be
> removed cleanly as well.
>
> Be aware, that packages are installed using administration privileges.
> This means that (in general) anything can be done to to fix/break your
> system at this time... hence why packages are digitally signed.
>
>
>> 3. Any application under linux is launched using a script which is
>> similar to an exe file in windows , based on this i want to know whether
>> an application can be installed anywhere and in any directory and it can
>> be launched from there without having to set environment variables.
>>
>
> Not if it is deb packaged. It is design to do onto you system in a
> particular way.
> If you want to put it somewhere else, then you have the following options:
>
> - Complie the program from source yourself.
> - Rebuild the package yourself
>
>
>> Any pointers to all this would help.
>>
>
> Good questions.. just filling in some detail that you may (or may
> not) be interested in.
>
> Cheers,
> Paul
>
>
>> Thanks
>> Jatin
>>
>> --
>> ubuntu-users mailing list
>> ubuntu-users@lists.ubuntu.com
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>>
>>
>
>
Thanks Paul. The answers you gave were specific to what i wanted to
know. Slowly i am getting to understand the linux filesystem and its
working. Thanks for the help.

Thanks
Jatin

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 08:00 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org