Linux.Desktop.Hacks [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Linux.Desktop.Hacks [Electronic resources] - نسخه متنی

Jono Bacon, Nicholas Petreley

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید






Hack 41. Make KDE Even Easier to Use

Beautify and enhance the usability of KDE by
patching it with experiment code.

This is actually a combination
of code hacks that improve KDE in several
ways. Some of the changes are purely cosmetic, but some enhance the
usability of KDE, especially the sidebar in the Konqueror file
manager and web browser. This collection of hacks makes the
practically indecipherable design of the sidebar thoroughly
intuitive. It also makes selecting files a more pleasant experience
and spruces up a few parts of the KDE interface.

André Moreira Magalhães (http:// for KDE 3.3.1. Some
of André's patches are modified and
ported from hacks written by Aviv Bergman (


As I write this, KDE 3.3.2, a bug-fix release to KDE 3.3.1, is being
launched. I have downloaded and applied the patches to the KDE 3.3.2
source code, and they apply cleanly (though occasionally you might
receive a message that the patch was offset by a few lines, which is
a warning you can usually ignore). So far, the patches seem to work
fine with KDE 3.3.2, although I have not had the time to give KDE
3.3.2 a thorough workout. It is possible, and even likely, that an
updated patch set for KDE 3.3.2 will be available on http:// by the time you read
this.

KDE 3.4 is due to be available by mid-March 2005, and that release
might incorporate some of the hacks documented here. If not, keep an
eye on http://
for new patches for these features.

Figure 5-5 shows what Konqueror looks like before
the enhancements, and Figure 5-6 gives you an idea
of most of the changes these hacks will make to KDE 3.3.1 Konqueror.


Figure 5-5. Konqueror without enhancements


Figure 5-6. Konqueror with enhancements

I assume you already compiled and installed KDE 3.3.1. If you still
have the source code on your hard drive, this will make things
easier. If not, get the source code for the following portions of
KDE, and unpack it where you will compile it. For this example, I am
assuming you will work in the /usr/local/src
directory. You need to have the source code installed for the
following packages, which are listed in the order in which you will
compile and install them:

Qt 3.3.3

kdelibs 3.3.1

kdebase 3.3.1

kdeartwork 3.3.1


For more detailed instructions on how to build and install all of KDE
3.3.1, see http://www.kde.org/info/3.3.1.php and/or
[Hack #44] .

Once you have the preceding source code ready, download the hacks
from http:///content/show.php?content=16962.
You want to download the 16962-patches-1.0.0.tgz
file.


Keep in mind that things change quickly. From the time I wrote this
hack to the time I made the first set of revisions (just weeks
later), the URL stayed the same, but the file I download changed from
16962-patches-0.5.5.tgz to
16962-patches-1.0.0.tgz. The URLs on http://, find the category on
the left side of the page (KDE Improvements, in this case), and page
through the packages until you find the correct package. Because KDE
3.3.2 was just released at the time of this writing, it is likely
that the version of this patch set will change again when it is
adjusted for KDE 3.3.2.

André provided a number of downloads to make it easier to
patch specific Linux distributions, but this example assumes you will
download and apply the hacks to the source code for Qt 3.3.3 and KDE
3.3.1, which works for any Linux distribution with the proper
development tools. You need to log in as root, create a patch
directory, and unpack this file in the patch directory. For this
example:

$ su -
Password:
# mkdir /patches-1
# mv 16962-patches-0.5.5.tgz /patches-1
# cd /patches-1
# tar zxvf 16962-patches-0.5.5.tgz
Changelog
README
TODO
kdeartwork-3.3.1.diff
kdebase-3.3.1.diff
kdelibs-3.3.1.diff
qt-x11-free-3.3.3.dif

As noted earlier, this procedure assumes you have already unpacked
the necessary Qt 3.3.3 and KDE 3.3.1 source code in the
/usr/local/src directory. These patches are
guaranteed to work only with Qt 3.3.3 and KDE 3.3.1, so apply them to
other versions at your own risk.

Here are the commands for patching, compiling, and installing Qt,
kdelibs, kdebase, and
kdeartwork:

# cd /usr/local/src/qt-x11-free-3.3.3
# cat /patches-1/qt-x11-free-3.3.3.diff | patch -p0
# ./configure <your configure preferences>
# make
# make install
# cd /usr/local/src/kdelibs-3.3.1
# cat /patches-1/kdelibs-3.3.1.diff | patch -p0
# ./configure <your configure preferences>
# make
# make install
# cd /usr/local/src/kdebase-3.3.1
# cat /patches-1/kdebase-3.3.1.diff | patch -p0
# ./configure <your configure preferences>
# make
# make install
# cd /usr/local/src/kdeartwork-3.3.1
# cat /patches-1/kdeartwork-3.3.1.diff | patch -p0
# ./configure <your configure preferences>
# make
# make install

These commands assume the names of the directories for your Qt,
kdelibs, kdebase, and
kdeartwork source are:

/usr/local/src/qt-x11-free-3.3.3

/usr/local/src/kdelibs-3.3.1

/usr/local/src/kdebase-3.3.1

/usr/local/src/kdeartwork-3.3.1


The names of the directories in this example, such as
qt-x11-free-3.3.3, might not match yours,
depending on where you get your source code. Just substitute your
directory names for the ones in the examples.

Take note of <your
configure
preferences> following every
./configure command. This is where you can specify
the destination directory prefix, along with other configuration
parameters you find necessary. As for the prefix, some people like to
install KDE under the /opt/kde directory, others
like /usr, and so on. It's up
to you, but you should stick with whatever prefix you used when you
installed KDE 3.3.1, before making this modification. If you
installed it with the prefix /usr, the command
would look like this:

# ./configure --prefix=/usr <other preferences>

Make sure to run ./configure
--help before you actually run
./configure as part of the build process. This
command tells you about options that might be important to your
installation of KDE 3.3.1.

Provided everything has gone smoothly so far, all but one of the
enhancements should automatically be enabled and work. You have to
make one more change to enable the fancy new sidebars in addition to
the new rubber-banding effect for selecting icons. Use your favorite
editor to edit the configuration file
konqsidebartng.rc. This file is located in the
default configuration directory for KDE 3.3.1, and a copy of it is
located in a subdirectory of your home directory. Assuming you have
installed KDE to /opt/kde, you want to edit
/opt/kde/share/config/konqsidebartng.rc if you
want the changes to affect everyone who uses KDE. If you simply want
to change the sidebar for your own use, edit the configuration file
in your home directory. Assuming the home KDE configuration directory
is ~/.kde, the file you want to edit is
~/.kde/share/config/konqsidebartng.rc. The
contents of the file should look something like this:

HideTabs=false
OpenViews=services.desktop
SavedWidth=241
ShowExtraButtons=true
ShowTabsLeft=true
[filemanagement]
HideTabs=false
OpenViews=root.desktop
SavedWidth=200
ShowExtraButtons=true
ShowHeader=true
ShowTabsLeft=true
SidebarStyle=0
SingleWidgetMode=false
[webbrowsing]
HideTabs=false
SavedWidth=207
ShowExtraButtons=true
ShowHeader=true
ShowTabsLeft=true
SidebarStyle=0
SingleWidgetMode=false

Note that the SidebarStyle is set to
0 for both web browsing and file management. The
0 sets the sidebar to the default style, which is
what you are trying to replace. To change it to the new hacked style,
change 0 to 1. You can change
to the new sidebar look for the file manager, web browser, or both:

SidebarStyle=1

Start up KDE, and enjoy the new sidebar and the new look for
selecting icons.


/ 140