XORG and Logitech Marble Trackball
Every version of xorg is different, and requires changing options for this.You may need to adjust some parts, such as "Identifier", "Driver" and "Device," according to distro. In xorg, you may need to make sure "Identifier" matches that in the 'Section "ServerLayout"' at the top of xorg.conf.
Back up your XF86Config-4 or xorg.conf before editing; if you bork it, you may not be able to start x. You can either fix it using vi, or boot with a live cd and fix it from there. Vi is quicker, if you spend a few minutes familiarising yourself with the basics.
XFree86 (XFree86 4.3.0, Debian Sarge, various 2.6.8 kernels):
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "Emulate3Buttons" "true"
Option "Buttons" "7"
Option "DragLockButtons" "6 1"
Option "ZAxisMapping" "4 5"
Option "EmulateWheel" "True"
Option "EmulateWheelButton" "7"
EndSection
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "Emulate3Buttons" "true"
Option "Buttons" "7"
Option "DragLockButtons" "6 1"
Option "ZAxisMapping" "4 5"
Option "EmulateWheel" "True"
Option "EmulateWheelButton" "7"
EndSection
Emulate3Buttons allows clicking both the left and right big buttons to emulate a middle-click.
DragLockButtons set to "6 1" makes clicking the left small button lock the left big button, so you can drag, as in highlighting text or using the scrollbar; clicking the left small button again releases the lock.
EmulateWheel and EmulateWheelButton means you can use the trackball as a scrollwheel by holding down the small right button.
Xorg (xorg.conf) requires a somewhat different configuration.
xorg 6.8.2 Vector SOHO 5.1.1, 2.6.13 kernel, :
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "CorePointer"
Option "Name" "Logitech USB Trackball"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
#Option "Emulate3Buttons" "true"
Option "Buttons" "5"
Option "DragLockButtons" "4 1"
#Option "ZAxisMapping" "4 5"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "5"
EndSection
Identifier "Mouse0"
Driver "mouse"
Option "CorePointer"
Option "Name" "Logitech USB Trackball"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
#Option "Emulate3Buttons" "true"
Option "Buttons" "5"
Option "DragLockButtons" "4 1"
#Option "ZAxisMapping" "4 5"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "5"
EndSection
alternative xorg configuration, which does the same thing on another distro:
Section "InputDevice"
Driver "mouse"
Identifier "Mouse[1]"
Option "Buttons" "5"
Option "Device" "/dev/input/mice"
# Option "Emulate3Buttons" "on"
Option "EmulateWheel" "on"
Option "EmulateWheelButton" "5"
Option "Name" "Logitech Marble Trackball"
Option "Protocol" "ExplorerPS/2"
Option "Vendor" "Logitech"
# Option "ZAxisMapping" "4 5"
Option "DragLockButtons" "4 1"
EndSection
Driver "mouse"
Identifier "Mouse[1]"
Option "Buttons" "5"
Option "Device" "/dev/input/mice"
# Option "Emulate3Buttons" "on"
Option "EmulateWheel" "on"
Option "EmulateWheelButton" "5"
Option "Name" "Logitech Marble Trackball"
Option "Protocol" "ExplorerPS/2"
Option "Vendor" "Logitech"
# Option "ZAxisMapping" "4 5"
Option "DragLockButtons" "4 1"
EndSection
Note that in both of these, I've commented out the "ZAxisMapping" line. Although I tried "Buttons" "7" and even "9", xorg never saw the small buttons until I commented out "ZAxisMapping" at which point they show as "4" and "5". So, I mapped them to "EmulateWheelButton" and "DragLockButtons".
"Emulate3Buttons" is also not used.
Also, you can enable horizontal scrolling using the trackball with this line:
Option "XAxisMapping" "6 7"This doesn't work with the mozilla smoothwheel extension.
To double check what number the button clicks are read as, open a konsole and type "xev" — then click in the little box.
xorg 6.9
VectorLinux 5.8 Standard Gold
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "CorePointer"
Option "Name" "Logitech USB Trackball"
Option "Protocol" "auto"
Option "Device" "/dev/mouse"
Option "DragLockButtons" "8 1"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "9"
EndSection
Identifier "Mouse0"
Driver "mouse"
Option "CorePointer"
Option "Name" "Logitech USB Trackball"
Option "Protocol" "auto"
Option "Device" "/dev/mouse"
Option "DragLockButtons" "8 1"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "9"
EndSection
BLAG (60001) didn't list the mouse at the top, so added it:
Section "ServerLayout"
Identifier "single head configuration"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Configured Mouse" "CorePointer"
EndSection
and then use:Identifier "single head configuration"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Configured Mouse" "CorePointer"
EndSection
Section "InputDevice"
# Identifier and driver
Identifier "Configured Mouse"
Driver "mouse"
Option "Name" "Logitech USB Trackball"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "DragLockButtons" "8 1"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "9"
EndSection
# Identifier and driver
Identifier "Configured Mouse"
Driver "mouse"
Option "Name" "Logitech USB Trackball"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "DragLockButtons" "8 1"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "9"
EndSection
xorg 7.2
Slackware 12 (X -version shows 1.3.0)
xorg 7+ introduces a new problem. The small right button (9) also sends a "left-click" event, though this isn't registered in xev. As a result, as you scroll, links are haphazardly activated. The following seems to work so far, but note it varies slightly among distros: make sure the Identifier is correct (matches that listed at the top of the file), as well as the driver:
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "CorePointer"
Option "Name" "Logitech USB Trackball"
# Option "Protocol" "auto"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/mouse"
Option "DragLockButtons" "8 1"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "9"
Option "EmulateWheelTimeout" "1"
Option "ZAxisMapping" "4 5"
EndSection
Giving "EmulateWheelTimeout" a value of 1 ms seems to have solved it ... so far.Identifier "Mouse0"
Driver "mouse"
Option "CorePointer"
Option "Name" "Logitech USB Trackball"
# Option "Protocol" "auto"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/mouse"
Option "DragLockButtons" "8 1"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "9"
Option "EmulateWheelTimeout" "1"
Option "ZAxisMapping" "4 5"
EndSection
From x.org's Mouse (4) manual page:
#Option "EmulateWheelTimeout" "integer" Specifies the time in
milliseconds the EmulateWheelButton must be pressed before wheel
emulation is started. If the EmulateWheelButton is released before this
timeout, the original button press/release event is sent. Default: 200.
And for two mice, a regular PS/2 mouse and a Logitech Marble Trackball, on Xorg 7.2:
First, edit the Server Layout section to add an extra mouse, by including a line for each mouse:
Section "ServerLayout"
Identifier "X.org Configured"
InputDevice "Mouse0" "SendCoreEvents"
# InputDevice "Mouse1" "CorePointer"
InputDevice "Mouse1" "AlwaysCore"
EndSection
Identifier "X.org Configured"
InputDevice "Mouse0" "SendCoreEvents"
# InputDevice "Mouse1" "CorePointer"
InputDevice "Mouse1" "AlwaysCore"
EndSection
Naturally, you will also have lines for your monitor and keyboard here!
and then edit the mouse sections:
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Name" "Fellowes PS/2"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mouse0"
Option "ZAxisMapping" "4 5"
Option "ChordMiddle" "true"
Option "SendCoreEvents" "true"
Option "Emulate3Buttons" "false"
EndSection
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "CorePointer" "true"
Option "Name" "Logitech USB Trackball"
Option "Protocol" "auto"
Option "Device" "/dev/input/mouse1"
Option "ZAxisMapping" "4 5"
Option "DragLockButtons" "8 1"
Option "EmulateWheel" "true"
Option "EmulateWheelInertia" "8"
Option "EmulateWheelTimeout" "1"
Option "EmulateWheelButton" "9"
### Option "XAxisMapping" "6 7" #borks smoothwheel
Option "SendCoreEvents" "true"
Option "Emulate3Buttons" "true"
Option "Resolution" "800"
Option "Samplerate" "500"
EndSection
Identifier "Mouse0"
Driver "mouse"
Option "Name" "Fellowes PS/2"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mouse0"
Option "ZAxisMapping" "4 5"
Option "ChordMiddle" "true"
Option "SendCoreEvents" "true"
Option "Emulate3Buttons" "false"
EndSection
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "CorePointer" "true"
Option "Name" "Logitech USB Trackball"
Option "Protocol" "auto"
Option "Device" "/dev/input/mouse1"
Option "ZAxisMapping" "4 5"
Option "DragLockButtons" "8 1"
Option "EmulateWheel" "true"
Option "EmulateWheelInertia" "8"
Option "EmulateWheelTimeout" "1"
Option "EmulateWheelButton" "9"
### Option "XAxisMapping" "6 7" #borks smoothwheel
Option "SendCoreEvents" "true"
Option "Emulate3Buttons" "true"
Option "Resolution" "800"
Option "Samplerate" "500"
EndSection
The "Resolution" and "Samplerate" options aren't necessary (I just happen to be playing with them while writing this):
Option "SampleRate" "integer"
Sets the number of motion/button events the mouse sends per second. Setting this is only supported for some mice, including some Logitech mice and some PS/2 mice on some platforms. Default: whatever the mouse is already set to.
Option "Resolution" "integer"
Sets the resolution of the device in counts per inch. Setting this is only supported for some mice, including some PS/2 mice on some platforms. Default: whatever the mouse is already set to.
However, the "Emulate3Buttons" options (false for the mouse, true for the trackball) are, otherwise emulate3buttons will be disabled for the trackball, when the mouse's wheel is clicked.
You may also wish to try "auto" for the protocol, instead of "IMPS/2". And of course for a different type mouse, some of the options may be different.
All in all, my trackball works much better in GNU/Linux than it did in Windows; it's more configurable simply by using xorg.conf than it ever was with Logitech's proprietary mouse software. And Logitech's marble trackball is excellent.
optimise png filesize with pngcrush
pngcrush: a command line png optimising tool.basic usage:
pngcrush inputimage.png outputimage.pnga simple batch-processing script (will optimise all png images in a directory; the old ones will be replaced, so make sure you're comfortable with this):
#!/bin/bash
pngcrush -d crushed_down_pix *.png
mv -f ./crushed_down_pix/*.png ./
rm -rf crushed_down_pix
Typical optimisation in my experience: 3% to 20%, with ranges from 0% to 65%.
pngcrush -d crushed_down_pix *.png
mv -f ./crushed_down_pix/*.png ./
rm -rf crushed_down_pix
various screen resolution tweaks
screen resolutionFirst, make sure the lines for refresh, etc, in xorg.conf are correct according to your monitor's manual! If they're wrong, your display may be incorrect (wrong size), may not work, or your monitor can be damaged!
You may want to tweak the DisplaySize settings: this is just an example:
DisplaySize 376 301
If the display size is off, the dpi may be off as well If the size isn't correct (stuck at 600x800, for example) make sure that the HorizSync and VertRefresh rates are set correctly. They should match the settings given in your monitor's manual.
Also, check the 'Section "Screen"' and make sure the size given is what you want. Look at this part:
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1024x768" "800x600" "640x480"
Viewport 0 0
Depth 24
Modes "1024x768" "800x600" "640x480"
If the first set of numbers is incorrect, add a new first set:
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x1024" "1024x768" "800x600" "640x480"
Viewport 0 0
Depth 24
Modes "1280x1024" "1024x768" "800x600" "640x480"
dpi (dots per inch)
This assumes you've got your xorg.conf set correctly for your monitor.
Debian sarge:
this is what I think I did for kde/ kdm:
/etc/kde3/kdm/Xservers
edit the ":0 local@tty1 ..." line to add -dpi 96 so it looks something like this:
:0 local@tty1 /usr/X11R6/bin/X -ac -dpi 96 -nolisten tcp
In VectorLinux 5.8 RC2, I edited /opt/kde/share/config/kdm/kdmrc, so that the line for ServerArgsLocal read:
ServerArgsLocal=-dpi 96 -nolisten tcp
and then ran Vasm super-user mode to set kdm as my default window manager.
(This was after installing KDE, of course.)
To check, use these commands:
xdpyinfo | grep resolution
xdpyinfo | grep dimensions
xdpyinfo | grep dimensions
The first should give, with the line above:
resolution: 96x96 dots per inch
Depending on distro/desktop, the files may be different. See also:
/etc/X11/xdm/Xservers
/opt/kde/share/config/kdm/Xservers
(both of those are from Vector 5.1.1)
/etc/kde/kdm/kdmrc (BLAG 60001, with KDE installed)
Your success with this may also depend on your video drivers. I only use Free ones.
Finally, the startx script (probably /usr/bin/startx ... )may be edited, to add -dpi 96 -nolisten tcp to the serverargs lines. As always, back up first.
/etc/hosts, /etc/hosts.allow and /etc/hosts.deny
You can use /etc/hosts for blocking ads/obnoxiousness here just as in windows. Don't replace it with a windahz hosts file; edit it to add entries: the top localhost lines aren't the same. That's it!There are two more types of hosts files: /etc/hosts.allow and /etc/hosts.deny
These don't use the hosts file format, and are different animals; instead they specify who can and who can't connect to services. Example:
hosts.allow:
ALL: 127.0.0.1
and hosts.deny:
ALL: ALL EXCEPT localhost:DENY
This allows only localhost to access services. Obviously, how you set this will vary depending on your needs.
man hosts.allow or man hosts_access, followed by some scroogling, should get you started on those two.
Stop MARK in /var/log/messages
This is just syslog telling you it's still awake. Stop it from doing so by editing in Slackware & VL /etc/rc.d/rc.syslog-m 0 turns it off
-m 60 is once per hour etc; v man syslog
Konsole and .bashrc
If ignores it (for example, prompt tweaks), first try putting this in your ~/.bash_profile:if [ -f ~/.bashrc ]; then source ~/.bashrc; fi.
If it still doesn't work, put this in /etc/profile:
if [ -f ~/.bash_profile ]; then source ~/.bash_profile; fi
I've read that (in some cases) editing the menu entry for konsole to read konsole -ls is necessary.
chroot (in vectorlinux)
You need to do this as root.For VL 5.8: mount the vl cd image
# mount -o loop /path/to/vl58.iso /mnt/loop
make a chroot directory: a directory in which to set up the chroot system. You'll need space. copy over these files:
- veclinux/required/veclinux.tlz
- veclinux/required/vlconfig.tlz
- veclinux/required/vlconfig2.tlz
- veclinux/optional/X11.tlz
- veclinux/optional/dev.tlz
# lzma -d -c veclinux.tlz | tar x
...
Alternatively, avoid copying the files by cding into the chroot directory, and doing # lzma -d -c /path/to/package.tlz | tar x
Then enter the chroot environment: # chroot . /bin/bash
at that point, you're not using your regular install's bash.
Set up the libs and font to avoid compile borkage:
# ldconfig
# fc-cache
(I found most of this in a couple posts in the VL forum.)
If it gripes about compiling ("compiler cannot create executable"), check your CFLAGS and set them correctly. If that doesn't work, check your LDFLAGS: gcc pre-4 doesn't seem to like gcc 4's -Wl,--hash-style=gnu in my experience. If necessary, I would set them to simply -Wl or -Wl,-O1 for gcc pre-4. Obviously, the GCC version I'm referring to is the one in the chroot, not the one in the distro from which you are accessing chroot. If not required, the Gentoo Documentation recommends against setting LDFLAGS.
Also, it may be helpful to install requiredbuilder for packaging, if you want dependency tracking — though it's woefully slow, and when packaging for myself, I never use it.
A chroot how-to for Slackware is here.
A chroot environment provides a clean space to create packages, avoiding unnecessary dependencies caused by all the extra/upgraded stuff you've installed.
misc
locale settings:/etc/profile.d/lang.sh
/etc/profile.d/lang.csh
Locales for some other apps which don't respect kde settings can be set in ~/.bash_profile:
export LANG=en_GB.UTF-8
Note that LC_ALL seems to override all others.
In VL, prompt's extra stuff (frequently used, etc) is set in /etc/profile.d/vasm.sh ... just comment out what you don't want.
ipv6
turn it off:/etc/modprobe.d/aliases:
alias ipv6 off
alias net-pf-10 off
alias net-pf-10 ipv6 off
/etc/modprobe.d/blacklist:
blacklist ipv6
Monitor standby from keyboard button
(useful for keyboards with extra buttons)First, get the keycode for the extra button using xev: run xev from console, get key-click value.
for me, is 223
then, map with xmodmap to an unused key (the higher, unused F key numbers are useful here): for example:
xmodmap -e 'keycode 223=F20'
and put in ~/.kde/env/keymod.sh along with others; (wonder if .bashrc wouldn't do as well or .bash_profile, for non-kde users?) then, make this shell script file in ~/bin or wherever:
#!/bin/bash
xset -display ":0" dpms force standby
And enter it in the kmenu, setting up keyboard shortcut there.xset -display ":0" dpms force standby
There's undoubtedly a way to modify this for non-kde use.
I've found sometimes it still wants to "bounce back" on in a second or two, so I've changed the script to:
#!/bin/bash
xset dpms force off
sleep 1
xset dpms force off
xset dpms force off
sleep 1
xset dpms force off
(Actually, a script in ~/bin isn't necessary; you can edit the kmenu to add an application, and enter the command directly there.)
However, there seems to be a problem with this, if you're using alternate keyboard layouts in KDE. In my experience, switching layouts unsets the keymods set in ~/.kde/env/keymod.sh. One solution is to not use the KDE settings nor the keyboard layout applet button. Instead, go into the KDE keyboard layout settings and copy the commands for the various layouts you wish to use, but don't enable them. Then, place each in a shell script, followed by the command to execute the keymod script:
setxkbmap -model your-model -layout your-layout && ~/.kde/env/keymod.sh
These can be executed either from run command, or (if you've got a couple spare keys) can be mapped to keyboard shortcuts.
You can also have a spare keyboard light indicate when you're using an alternate layout: add
&& xset led 3
to the alternate layout script, and
&& xset -led 3
to the regular one.
Again, a shell script isn't really necessary; you can enter the command directly in the kmenu edit thingy, and add a keyboard shortcut there.
GIMP plugins
Get them: Gimp Plugin RegistryInstallation varies. Some are easily installable by opening a terminal in the directory with the plugin and typing:
gimptool-2.0 --install plugin-name
kaleidoscope (kaleidoscope.c) is one example; dcamnoise is another.
Others, like refocus-it-2.0.0, require the usual ./configure, make, and # make install
tweaking the kernel
best performance comes from not only recompiling for your box but also patching using a performance patchset like that of Con Kolivas. Some distros (including VectorLinux, Yoper) offer a ck-patched kernel; if so, and if you don't want to compile your own, grab the ck kernel.After extracting the vanilla sources from kernel.org or eu.kernel.org (all 2.6.x versions can be found here or here), apply the patches: cd into the extracted source, do
bzcat path/to/kolivas-patch.bz2 | patch -p1
Since the ck patch also patches the extraversion number in the Makefile, it may fail there if using an updated source (2.6.21.1 instead of 2.6.21). This is unimportant; you'd probably want to manually edit that anyway. I like to indicate the ck patch and the compile date here.
Here is how I compile a kernel in VectorLinux and Slackware:
$ make mrproper
(good to clean tree)
copy old working .config if available into the source, then
$ make oldconfig
$ make menuconfig
$ make bzImage
# cp arch/i386/boot/bzImage /boot/vmlinuz-version-number
$ make modules
# make modules_install
# cp System.map /boot/System.map-version-number
# cp .config /boot/config-version-number
I use the same procedure in BLAG, except here, I also do in /boot, after copying the kernel over:
# mkinitrd initrd-version.img version
example, for kernel vmlinuz-2.6.21.7-ck2-20071024,
# mkinitrd initrd-2.6.21.7-ck2-20071024.img 2.6.21.7-ck2-20071024
Depending on configuration, you may or may not need an initrd.img in Slackware: see /boot/README.initrd
update grub's menu.lst (or edit lilo.conf and run lilo) & boot into the new kernel
In Debian, after configuring the kernel:
make-kpkg clean
make-kpkg --initrd kernel-image
and then install it.
schedtool allows further performance enhancements with a ck kernel.
use schedtool -D -e command to set task to low priority; excellent for compiling or for tar. I use an alias in ~/.bashrc for that: alias tar='schedtool -D -e tar'
A few things I like to configure (obviously, these will vary according to your hardware/needs and kernel version):
- first, I always patch with the ck patchset
- try to disable what I don't need (some things aren't obvious and I've compiled more than one kernel which refused to boot because of inadvertently leaving something out)
- set processor type
- disable generic x86 support
- set number of CPUs; and enable hyperthreading; (also look at multicore support)
- enable high memory support for ≥ 1 GB ram
- use voluntary preemption
- enable cpu frequency scaling, including ondemand, performance and conservative governors
see what's available with:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
and set what you want with
echo governor-name > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
there are many more knobs here for you to adjust
I like, on a desktop with a 2.8GHz processor:
scaling_governor ondemand
scaling_min_freq 2100000
up_threshold 45
sampling_rate 500000
- enable various io schedulers; I use cfq as default for my discs (this can be changed in a ck kernel by:
echo cfq > /sys/block/device/queue/scheduler.
See what's available with:
cat /sys/block/device/queue/scheduler where device is hda, etc.) - enable the tickless kernel: CONFIG_NO_HZ CONFIG_TICK_ONESHOT and CONFIG_HIGH_RES_TIMERS under processor type and features
- enable tcp advanced congestion control, with a number of options.
You can then change them with:
echo control-name > /proc/sys/net/ipv4/tcp_congestion_control
I like westwood; part of the fun is researching the available options, which you can see by:
cat /proc/sys/net/ipv4/tcp_available_congestion_control - enable CONFIG_SECURITY_CAPABILITIES (set "Default Linux Capabilities" built-in; also enable "Enable different security models"; this is needed for full dnsmasq uid-switching)
CFLAGS are set in the Makefile; alternatively, you could use CFLAGS_KERNEL and CFLAGS_MODULE. However, opinion seems divided on the advisability of optimising them.
There's a good, up to date (Slackware 12) tutorial at Slackware Linux Basics.
A good reference is Custom Linux Kernels Trim Fat and Tune Performance.
Some people see no point to this: as always, it's up to you to decide.
image processing from the command line
change the image's comment:convert -comment "whatever-you-want" input output
the input and output can be the same file.
mogrify doesn't require an output file, but changes the original image:
mogrify -comment "whatever-you-want" *.png
will work to change the comment on a batch of images.
resize:
mogrify -geometry 16x16 filename
or:
convert -sample 8x8 input output
rotate:
mogrify -rotate 270 filename
This rotates the image 270 degrees, or -90 degrees
convert to another file type:
mogrify -format format filename
example:
mogrify -format xpm ./*.png
This converts all png images in the directory to xpm format.
See what formats are available with:
identify -list format
There are a vast number of other things you can do with mogrify; mogrify -help and man mogrify
Also see Graphics from the command line, which has some great tips; ImageMagick: Command-line Tools and ImageMagick: Command-line Options. And, in case you missed it, pngcrush for reducing png filesize.
Use the Scroogle search engine in Konqueror
Open the "Select Search Engines" dialogue, click "New", and make an entry for Scroogle, using:http://www.scroogle.org/cgi-bin/nbbw.cgi?Gw=\{@}&ie=UTF-8@oe=UTF-8
for the url. That's it!
And for Scroogling over SSL, make an entry called "Scroogle SSL" and use this for the url:
https://ssl.scroogle.org/cgi-bin/nbbw.cgi?Gw=\{@}&ie=UTF-8@oe=UTF-8
Why Scroogle? No cookies, no search-term records, access log deleted within 48 hours. Search page here, main page here.
Customise the image in the KDE logout screen
Change the picture in /usr/share/apps/ksmserver/pics (path may vary depending on where KDE is installed in your distro).It should be the same size as the default one; make a backup of the original shutdownkonq.png in case you want to go back to it. (I kind of like the default one in KDE 3.5.7 ...)
Change Konqueror's throbber
Replace kde.png in the selected icon set's actions directory. (/usr/share/icons/[icon-set]/[size]x[size]/actions/kde.png in Slackware 12) with an image of your choosing. A quick look at the original will indicate the format: it's a filmstrip type png image, whose width matches that of the icons and whose height is determined by the number of frames. Technically, you should have one for 16px, 22px, 32px and 48px, but in practice you can get away with just having one to match the icon size you're using. Remember to make a backup of the originals!Note that some icon themes have their own throbber included. Crystal (which is usually the default), slick and kdeclassic (I think this throbber is from KDE 2) are three examples. The kdeartwork package is worth looking into ... and search for "throbber" at kde-look.
Use the older version of Kate with KDE 3.5
After using Kate extensively in earlier versions, I found KDE 3.5 unusable because of the changes in Kate (useless sessions added, projects removed, etc). I considered switching to Vim; I considered running Crimson Editor in Wine. I almost ended up just staying with Debian Sarge and KDE 3.3.2, which I would probably have done if I hadn't figured out a way to use the older Kate in newer versions of KDE.Fortunately, I found it is possible to use the older, fully-functional version of Kate in KDE 3.5.x.
I compile standalone Kate and Kate addons packages, in Vector and Slackware. You need to get the 3.3.2 kdebase and kdeaddons source packages from the Slackware repositories:
ftp://slackware.osuosl.org/pub/slackware/slackware-10.1/source/kde/
ftp://slackware.osuosl.org/pub/slackware/slackware-10.1/patches/source
or:
ftp://ftp.gwdg.de/pub/linux/slackware/slackware-10.1/source/kde/
ftp://ftp.gwdg.de/pub/linux/slackware/slackware-10.1/patches/source
Here are my Slackware buildscripts for compiling the standalones:
kate-2.3.2-buildscripts.tar.bz2
Source is not included! These scripts are for Slackware 12; I've also compiled it for VectorLinux 5.8, with different scripts. You should edit the KDE.options, local.options and the SlackBuilds to suit yourself, and make sure the prefix matches that of your distro (previously, KDE was in /opt/kde instead of /usr). Build Kate first, install it, then compile the Kateaddons package. I don't have any tips for packaging the old versions in other distros.
You could use KDE 3.4.x sources instead of 3.3.2, but I see no advantages to doing so. In my experience, the bugs still exist, and performance is slightly faster and smoother with the Kate from KDE 3.3.2. Slackware 10.2 has KDE 3.4.2.
There are a few problems with this. When using the tab bar extension, history (File > Open Recent) doesn't usually remember recently opened files (I believe this bug existed in KDE 3.4.x as well, even before Kate was utterly borked.) File > Open with causes Kate to crash. Selecting from the File > Open with > Other ... dialogue seems to work. Yeah, it's slightly buggy, but at least it works and retains most of the functionality of pre-3.5 Kate.
I make no guarantees that this will work for you or that it won't bork your system: the risk is entirely with you. "I ain't no guru." If you wish (for some odd reason) to go back to the current version of Kate, reinstalling kdebase and kdeaddons should do it; but, I haven't tested that.
pygtk and compiling gimp
You go to compile GIMP (in Slackware 12) and it gripes, "No pygtk found!" So you install pygtk ... and still configure says there's no pygtk! Wtf! Try installing pycairo, pygobject and then installing pygtk. I got them at http://www.slacky.eu.ᛏ
gtkam doesn't work with Canon cameras (PowerShot)
As best I can tell, this isn't a problem with gtkam. It's a bug in libgphoto2, and fixing it requires editing a source file and recompiling libgphoto2. Yeah, that sucks, but at least you can do it (easier to fix than to find the fix, as I can tell you!).The source file that needs changing is camlibs/canon/usb.c and the value to be changed is
CANON_FAST_TIMEOUT 75
It should be raised to a higher value; I find that
CANON_FAST_TIMEOUT 375
works. Other values have been suggested, as high as 750 and as low as 150: Scroogle search for CANON_FAST_TIMEOUT. 150 did not work for me.
Alternatively, use a cardreader: they are relatively inexpensive. Sandisk seems to be reliable and works well under GNU+Linux ...
ᛏ
Cups (http://localhost:631/) 404 not found ...
... but http://localhost:631/admin works. Maybe the images, favicon and styles for those pages are missing too. Wtf?Look in your cups configuration file (probably /etc/cups/cupsd.conf) and see if DocumentRoot is there. If not, add this:
DocumentRoot /usr/doc/cups
or whatever is appropriate for your installation.
ᛏ
All information, themes, and builds provided "as is without warranty of any kind … . The entire risk … is with you."