LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Backtrack: kPackageKit (https://www.linuxquestions.org/questions/linux-newbie-8/backtrack-kpackagekit-4175423167/)

hitmen 08-21-2012 01:29 AM

Backtrack: kPackageKit
 
I installed some programs using KPackageKit.
However, I am not exactly sure where the package went.

Eventually, I found this:

root@bt:/usr/share/doc/libibus-qt1# ls
changelog.Debian.gz copyright

Can anyone tell me what the red and green colour stands for?
Why are there 2 dots in the changelog.Debian.gz

Sorry I am not very familiar with linux other than basic linux commands.

redfox2807 08-21-2012 02:13 AM

Unlike in Windows a package content is spread over the whole file system. Executable usually go to /usr/bin, global config files to /etc, icons to /usr/share, etc. One of the advantages of this way is that you can start any program from console by just typing it's executable name.

That's just the colors for the ls command defined in /etc/DIR_COLORS. Apparently you have the red color defined for archives. green usually means that the file is executable.

Actually number of dots doesn't mean anything. File extensions are pretty much optional in linux. They are used often for user convenience, but unlike Windows, the OS itself doesn't need them. In your example the second dot identifies a gzip archive, the first one is just a separator.

hitmen 08-21-2012 02:22 AM

Thanks for reply.

However,
root@bt:~# cat /etc/DIR_COLORS
cat: /etc/DIR_COLORS: No such file or directory

What am I supposed to do? -> Q1

Also, how do I check if a package has already been installed by the OS or if I have to install it manually? -> Q2

root@bt:/usr/share/doc/ibus-pinyin# bunzip2 changelog.Debian.gz
bunzip2: Can't guess original name for changelog.Debian.gz -- using changelog.Debian.gz.out
bunzip2: changelog.Debian.gz is not a bzip2 file. -> Q3 What is wrong?

redfox2807 08-21-2012 02:59 AM

There might be .dir_colors file in your home directory. "man dir_colors"

1. If the packages installed successfully then nothing. If it's from a repository added to your sources.list, it will be updated alone with the rest of the system. If not, you will have to update it manually by installing a newer version either via kpackagekit, or via dpkg, apt-get, or anything else that works with the dpkg/apt system.

2. The OS never installs any packages you don't request. It only updates those already presenting. If you don't have the program needed installed then install it via apt-get or any GUI package manager.

3. Exactly what the output says: "changelog.Debian.gz is not a bzip2 file." Try "gunzip changelog.Debian.gz"

hitmen 08-21-2012 05:54 AM

Perhaps I should phrase q2 clearly.

How do I know whether it has been successfully installed?
Where is it installed? Under which folder? I dont want to search all the toolbars.

Is there a log file stating the programs I have previously installed?
Thanks.
Sorry me noob.

Help! I do no understand man pages:

found in a system default shell initialization file, like /etc/profile or /etc/csh.cshrc. (See also dircolors(1).) Usually, the
file used here is /etc/DIR_COLORS and can be overridden by a .dir_colors file in one's home directory.

However,

root@bt:~# cd /etc/DIR_COLORS
bash: cd: /etc/DIR_COLORS: No such file or directory

what to do?

redfox2807 08-21-2012 06:55 AM

q2: As I told you there's no such a thing as a 'program directory' in Linux. All the files of a program are spread out across the file system.
To make it clearer I'll take Synkron as example. It's a small Qt-based synchronization utility. The package contains the executable file that is installed in /usr/bin/, icons that are installed into /usr/share/icons/synkron, documentation (/usr/share/doc/synkron and /usr/share/doc/Synkron-version), and .desktop file (/usr/share/applications). The latter is a text file that represents a program in application menus, on desktops, panels, etc of different DE/WM (makes the same work as windows' shortcut). In short there's no "Program Files" folder you're probably searching for.

The information about the installation you receive at the end of every installation no matter what program you use for that. In your case if kpackagekit in the end didn't say anything about installation errors, missing dependencies or something, the installation was successful.

I'm not aware if there's any logs for apt and dpkg command or their front-ends as I never was in need of those. To find out if a package is installed you can use apt-cache. Here's a quick how-to for apt/dpkg commands.
Either you can just use the package manager (it might be called Software Center or something similar - I don't remember the exact name) provided in Kubuntu and search for the package of interest.

The simplest way to find out whether a program (not a package) is installed or not is to press Alt+F2 in KDE, that is the default DE in Kubuntu, and to start typing the program name. It should appear there if it's installed.


Regarding the other question please explain what do you want to do with that file? If you want to change the colors you just have to edit the .dir_colors in your home directory. If it doesn't exist just create it. FYI the files starting with dots are concidered as hidden files in Linux. By default file managers don't show them. The ls command needs argument '-a' to make them show up.

hitmen 08-21-2012 08:16 AM

Well, I just wish to know which colors correspond to which files since I am a linux noob.

And maybe I should give an example

After
dpkg -i google-chrome-stable_current_i386.deb

my google chrome was installed.
However, it appeared under my Internet tab without me knowing.
Is there a way to check what the installer will do?

redfox2807 08-21-2012 10:41 AM

I've checked my Kubuntu installation. It really has neither /etc/DIR_COLORS nor ~/.dir_colors. Using color output for ls is set in ~/.bashrc as an alias of 'ls' to 'ls --color=auto'. You can read this to learn more about colors. This link gives a bash command to visualize the output for different types of files.

If by Internet tab you mean the Internet section of the application menu, the .desktop file is responsible for it. Don't understand your concerns about it. It will be gone when you uninstall the application also without letting you know. To see contents of a package (installed or not) you can either use 'dpkg -c /path/to/package/package.deb' or just decompress the deb file (it's actually a regular archive) into some directory and see what's inside. A package might have pre- or/and post-installation scripts. To understand what actually such a package does you have to be able understand the script.


All times are GMT -5. The time now is 10:11 AM.