Google malware protection ?

I wanted to search for the famous “cain and abel” tool for windows on google, so I typed “cain abel” on Google, results came out…and I clicked on the url of the first result, which is “cain and abel”‘s webpage…

Then this appeared!

Who said I needed that protection/advisory ? Is Google going to filter more stuff out now ? Sad, just sad…

Terminal Problems

Terminal as a noun from Merriam-Webster Online Dictionary:

5 : a combination of a keyboard and output device (as a video display unit) by which data can be entered into or output from a computer or electronic communications system

As posted before in “to xft or not to xft ?” my favorite terminal is mrxvt (materm) and my favorite shell is zsh. I am still having problems viewing/writing greek text on mrxvt though. So I tried using some other terminals to see what fitted more my needs.

First terminal of choice, Konsole.
Nice terminal, lots of easily configured options, ability to monitor a terminal for silence or activity and so on and so on. Greek text displayed perfectly, fonts looked quite good too. The negative part of Konsole ? It’s a KDE application and since I don’t use KDE but fluxbox, it takes a decent amount of time to start with all that ksycoca stuff that need to start before I finally view….a terminal. 2-3 seconds of wait time for a just a terminal is TOO much, and I don’t want to have kdeinit started just to speed up KDE applications. I picked up fluxbox so I wouldn’t be forced to have 10 kde/gnome daemons sitting on the background and eating up my ram.

Second terminal of choice, Gnome-Terminal.
In comparison to Konsole it’s ugly. Fewer configuration options, fewer features, but displayed greek text as good as Konsole did. It also takes a lot less time to start than Konsole does. But it’s ugly. Oh, it’s ugly too.

Third terminal of choice, rxvt.
This is supposedly the base of mrxvt and urxvt. Guess what…no xft support at all. So this goes immediatly down the drain. It only works with my good old lucida-console-8859-7…I have mrxvt for that though.
Even the project’s homepage points to sourceforge. No website no extra information…nothing. Last release:

rxvt-dev 2.7.10 March 25, 2003

Shall I say old ? deprecated ? anyway…

Then I did some tests with two greek documents. I opened my xterm with my old lucida-console-iso-8859-7 font, fired up vim and typed some greek text in 2 files. In the first I picked fileencoding=iso-8859-7 and in the second fileencoding=utf-8. What I saw was that when I executed “cat filename” I only saw the contents of the first file on any of terminals (mrxvt doesn’t count :P). All this time I thought that I was using utf-8…but I guess I didn’t. In order to make sure I found agorf on IRC and asked him to “cat” them. He is using rxvt-unicoce (urxvt) and utf-8 and he could only see the second file. I installed urxvt and then I thought that it was finally time for a change. I had already the unicode flag on my gentoo USE flags, so I only had to change the locale of LC_CTYPE from LC_CTYPE=el_GR to LC_CTYPE=el_GR.utf8
I restarted Xorg…and I could now cat and read the contents of only the second filename. I am now sure I use UTF-8 on my terminals.

Now I started checking out my terminals again.
a) mrxvt
mrxvt denied reading greek text…again (what a surprise!). It does not support utf-8.
excerpt from mrxvt.faq

Q: Does mrxvt support UTF-8 locale/encoding method?

A: Not now. This is a planned work and hopefully will be supported in the next development branch (0.5.x).

I have mrxvt 0.5.1 installed and utf-8 is still not supported.

b) Konsole
displayed utf-8 text just fine.

c) Gnome-terminal
displayed utf-8 text just fine.

d) urxvt
displayed utf-8 text just fine.

e) rxvt
You must be kidding right ? What are you looking for here ? results ? …

But then I noticed something weird. While writing (not just viewing) greek (using utf-8) on the shell my terminal dissapeared, whichever that was. But it only happened when I was logged in as a user and not as root. The difference between my user and the root account on my box, is that I use zsh as user and bash as root. So I went to zsh’s site to check out their faq. I read and freaked out! Zsh can display some unicode..but zle has problems when you write unicode. DAMN! So, 2 of my favorite linux choices haven’t got proper unicode support, mrxvt and zsh. Thankfully Fluxbox recently fixed their unicode support, else that would be 3 strikes on a row…

It was time I emerged -C (that means uninstall for the non Gentoo users) Konsole, Gnome-terminal and of course rxvt. I did not need them any more. Luckilly fluxbox can provide tab support for applications so I can make up for urxvt’s lack of tabs by using fluxbox’s tab support. I am now in the process of creating a theme for urxvt that will look and behave a bit like mrxvt.

I don’t know if I am asking too much as a user or it is too soon for linux to fully adopt unicode. It looks kind of strange to me how some applications are nowdays lacking unicode support. I wonder if they’ll ever have. Maybe there are not that many non-english speaking developers for these applications to push/force/write code for/etc these applications in order to move faster implementing unicode…I don’t know what else to say.

ZSH and mrxvt developers PLEASE fix your applications as soon as possible !!!

Terminal as a adjective from Merriam-Webster Online Dictionary:

1 a : of or relating to an end, extremity, boundary, or terminus <a terminal pillar> b : growing at the end of a branch or stem <a terminal bud >
2 a : of, relating to, or occurring in a term or each term <terminal payments> b (1) : leading ultimately to death : FATAL <terminal cancer> (2) : approaching or close to death : being in the final stages of a fatal disease <a terminal patient> (3) : of or relating to patients with a terminal illness <terminal care> c : extremely or hopelessly severe <terminal boredom>
3 a : occurring at or constituting the end of a period or series : CONCLUDING <the terminal moments of life> b : not intended as preparation for further academic work <a terminal curriculum>

I think that my terminals have terminal problems…

patching grep to exclude directories from recursive search

I always wanted to be able to control which directory grep should go into and which it should not when I use the recursive (-r) option. I wanted a way to exclude some cache or other meaningless directories from it. I am using grep version 2.5.1 on gentoo linux (grep-2.5.1-r8).

I’ve just found a patch on the net that does exactly that! If you check this page: grep – Patches: patch #5051, Exclude Directories in Recursive… you can download a patch for the current grep version.

I’ll show you how to apply it on a gentoo distro. It’s really simple. I am assuming that you already use a portage overlay…say it lies inside your /usr/local/portage dir.

Lines that begin with “#” should be executed as root.
Lines that begin with “— COMMENT:” should be read and applied.

# mkdir -p /usr/local/portage/sys-apps/grep/files
# cp /usr/portage/sys-apps/grep/grep-2.5.1-r8.ebuild /usr/portage/sys-apps/grep/grep-2.5.1-r100.ebuild
# cp /usr/portage/sys-apps/grep/files/* /usr/local/portage/sys-apps/grep/files/
# vi /usr/portage/sys-apps/grep/grep-2.5.1-r100.ebuild
--- COMMENT: find the line that says KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ~ppc-macos ppc64 s390 sh sparc x86" and change it to: KEYWORDS="~x86" or your ~arch if it's another.
--- COMMENT: add this under src_unpack():
epatch “${FILESDIR}”/${PN}-2.5.1-exclude-dir.patch
# echo "=sys-apps/grep-2.5.1-r100 ~x86" >> /etc/portage/package/keywords
--- COMMENT: change ~x86 to your ~arch
--- COMMENT: download and save it as "grep-2.5.1-exclude-dir.patch"
# mv /path/to/grep-2.5.1-exclude-dir.patch /usr/local/portage/sys-apps/grep/files/
# cd /usr/local/portage/sys-apps/grep/
# ebuild grep-2.5.1-r100.ebuild digest
# emerge =sys-apps/grep-2.5.1-r100

and that’s it. The patch is applied cleanly (at least on ~x86) that I tried it and the result is this:

# mkdir -p ~/foo/bar
# mkdir -p ~/foo/zoo
# echo "test123" >> ~/foo/bar/test1.txt
# echo "test123" >> ~/foo/zoo/test2.txt
# cd ~/foo
# grep -r -n test123 *
# grep -r test123 * --exclude-dir=zoo

enjoy 🙂

slogan-artwork on a wall

Another great slogan – artwork on a wall. This is from the university I study. The “bird” is it’s symbol…

rox icons + ivman continued

I have made some significant improvements to the previous rox.panelput script I had posted . It can now handle most of the previous “problems”.

a) If the device has a Label then, the icon created has the Label name. If it doen’t it has the Device Name.
If you insert a DVD with label “TEST”…the icon will have the name TEST, if you insert your usb key or your digital camera the icon will have the name of the device.

b) It handles automatic positioning of the icons.
If you insert a DVD (device 1 – icon 1) and then your usb key (device 2 – icon 2), your usb key icon will be placed below the DVD icon. If you then insert your digital camera (device 3 – icon 3) it will be placed below the usbkey. If you then remove your usb key (device 2 – icon 2) there will be left an empty spot at “place 2” and upon the insertion of a new device, a cdrom for example that device will take “place 2” (device 4 – icon 2).

c) There is a Restore feature.
If you place rox.panelput Restore inside your window manager startup file, for example fluxbox’s .fluxbox/startup, it will clean up any unused icons left on the desktop that were not ejected-removed during the previous shutdown of your window manager. Restore will NOT remove icons from your desktop that were not created by rox.panelput script. This feature is really critical because with the older script icons were left over during restarts, hogged up the desktop and had to be manually removed. Now they are removed “automagically”.

d)Locks and checks
Many locks and checks were implemented during each stage of addition or removal of a device. They might slow down the script a bit, but add a great deal of security.

The UPDATED version of rox.panelput lies here: rox.panelput v0.34

In order to use it read the previous post: create-icons-on-rox-desktop-of-automounted-media-by-ivman
(and of course gunzip the file and place it in your binaries folder)

The only change that needs to be done is that IF you want to use the restore feature (which I strongly urge you to do so) you have to put the command:
rox.panelput Restore

somewhere before your window manager starts. Here’s my .fluxbox/startup :

rm /tmp/rox-ivman-lock.tmp
/PATH/TO/rox.panelput Restore
killall -9 ivman ; ivman &
echo > /home/CHANGEME/.ivman/mounted/devices
rox -p pinboard
exec /usr/bin/fluxbox -log ~/.fluxbox/log

If you change the paths or files inside rox.panelput then it’s almost sure that you have to change these paths too.

Please report any problems and give me any possible feed back on this.

to xft or not to xft ?

My favorite terminal is mrxvt (also refered to as materm). It has tab support, it’s pretty, and very configurable.
Since I am greek…I want to be able to both read and write greek on the terminal. Until recently I used the font:
*font:-*-lucida console-medium-r-*-*-0-*-*-*-*-*-iso8859-7
for all my terminals. This font is pretty good looking but of course not as good as an xft font.

I’ve now decided to use an xft font for my mrxvt. The problem is that I can’t find an xft font to display greek chars…so I had to keep xterm with the previous mentioned lucida-console font for greek viewing purposes. I chose “DejaVu Sans Mono” as my font of choice for mrxvt…and the results are just excellent. Output is a lot easier to read and less tiring for the eyes.

Here my full .mrxvtrc:

# ----------------------------- TAB-BAR OPTIONS ------------------------------ #
Mrxvt.bottomTabbar: True
# Only show the tab bar if there is more than one tab.
Mrxvt.autohideTabbar: False
# The number of tabs to attempt to keep visible. The width of tabs will shrink
# to keep at least these many tabs visible.
Mrxvt.minVisibleTabs: 8
# Make the terminal title the same as the active tab title.
Mrxvt.syncTabTitle: True
Mrxvt.syncTabIcon: true
# Highlight inactive tabs only when they sound a bell (and not whenever they
# produce output).
Mrxvt.highlightTabOnBell: True
# Tab bar colors
Mrxvt.itabBackground: #101010
Mrxvt.tabBackground: #000000
Mrxvt.itabForeground: #909090
Mrxvt.tabForeground: #9a9a9a
#mrxvt*tabForeground: white
#mrxvt*tabBackground: grey
#mrxvt*itabForeground: grey
#mrxvt*itabBackground: darkblue
# ---------------------- SCROLLING / SCROLLBAR OPTIONS ----------------------- #
Mrxvt.scrollBar: true
Mrxvt.scrollbarRight: true
#Mrxvt.scrollbarStyle: rxvt
mrxvt*scrollbarStyle: next
# Number of lines to save in the scroll back buffer for all tabs
mrxvt*saveLines: 32767
# Don't scroll to the bottom every time some output is produced.
Mrxvt.scrollTtyOutputInhibit: true
# Scroll to the bottom when a key is pressed.
Mrxvt.scrollTtyKeypress: true
# Scroll bar colors
Mrxvt.scrollColor: #808080
Mrxvt.troughColor: #202020
# Mrxvt.scrollbarPixmap: scrollbarbg.jpg
# ------------------------------- TRANSPARENCY ------------------------------- #
# True translucency (using Xorg's composite extension).
# Mrxvt.opacity: 75
# Mrxvt.opacityDegree: 5
# Pseudo transparency. As long as you set the background using an esetroot
# compatible program (e.g. feh), then the following will work. It is pretty
# resource friendly too :).
Mrxvt.transparent: True
Mrxvt.transparentScrollbar: True
Mrxvt.transparentTabbar: True
Mrxvt.transparentMenubar: False
# Color / degree to which the root background should be tinted.
Mrxvt.tintColor: #000000
Mrxvt.shading: 10
#Mrxvt.fading: 10
# ---------------------------------- FONTS ----------------------------------- #
Mrxvt.xft: 1
#Mrxvt.xftFont: Bitstream Vera Sans Mono
Mrxvt.xftFont: DejaVu Sans Mono
Mrxvt.xftSize: 10
Mrxvt.xftAntialias: 1
# The options below are better set using ~/.fonts.config. Mrxvt will use the
# defaults passed to the fontconfig library.
Mrxvt.xftHinting: 1
Mrxvt.xftAutoHint: 1
Mrxvt.xftGlobalAdvance: 1
# Mrxvt.xftRGBA: rgb
# Mrxvt.xftslow: 1
# Don't load a multi-char font. This will reduce the line space if your multi
# char font has different dimensions than the regular font. You might need to
# comment it out if you want to use XIM and non-english fonts.
#Mrxvt.xftNomFont: 1
# Font to use for tab bar / menus. This need not be mono-spaced ;).
Mrxvt.xftPFont: Bitstream Vera Sans
Mrxvt.xftPSize: 10
# Shadow text
# Mrxvt.textShadow: red
# Mrxvt.textShadowMode: botright
# XIM input / multi char support. To use this, you should also comment out the
# xftNomFont line above.
# Mrxvt.xftmFont: SimSun
# Mrxvt.multichar_encoding: GB
#mrxvt.preeditType: OverTheSpot
#Mrxvt.inputMethod: SCIM
mrxvt*greek_keyboard: iso
mrxvt.multichar_encoding: el_GR
#mrxvt*greektoggle_key: VoidSymbol
mrxvt.greektoggle_key: Mode_switch
# ---------------------------------- CURSOR ---------------------------------- #
Mrxvt.cursorBlink: true
Mrxvt.cursorColor: #00ff00
Mrxvt.cursorColor2: #000000
# ---------------------------------- COLORS ---------------------------------- #
# Setup colors for a black background.
Mrxvt.background: #000000
Mrxvt.foreground: #9a9a9a
Mrxvt.color0: #000000
Mrxvt.color1: #af0000
Mrxvt.color2: #00af00
Mrxvt.color3: #afaf00
Mrxvt.color4: #0000af
Mrxvt.color5: #af00af
Mrxvt.color6: #00afaf
Mrxvt.color7: #9a9a9a
Mrxvt.color8: #5f5f5f
Mrxvt.color9: #d70000
Mrxvt.color10: #00d700
Mrxvt.color11: #d7d700
Mrxvt.color12: #0000d7
Mrxvt.color13: #d700d7
Mrxvt.color14: #00d7d7
Mrxvt.color15: #d7d7d7
# Display bold and underlined text in color, rather than using the terminal
# attributes. This makes reading man pages a little easier.
Mrxvt.colorBD: #00afaf
Mrxvt.colorUL: #00af00
# Mrxvt.colorRV: #000040
# Display the X selection as highlighted instead of using reverse video.
Mrxvt.highlightColor: #303060
# Colors when terminal window looses focus. (Does not work well with Xft).
# Mrxvt.ufBackground: yellow
Mrxvt.backgroundFade: 50
# ------------------------------- MISC OPTIONS ------------------------------- #
mrxvt*geometry: 120x45
# The value of the TERM environment variable. Default is rxvt. If you have
# trouble, try uncommenting the following line.
Mrxvt.termName: rxvt
# Default title of each tab.
#Mrxvt.tabTitle: mrxvt
Mrxvt.vt0.tabTitle: Term 1
Mrxvt.vt1.tabTitle: Term 2
Mrxvt.vt2.tabTitle: Term 3
# Border to leave around terminal text
Mrxvt.internalBorder: 2
# Make double click select whole URL's
Mrxvt.cutChars: :=/~#@?%&_-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0abcdefghijklmnopqrstuvwxyz
# Blank the mouse pointer on keystrokes or after 10 seconds of inactivity.
Mrxvt.pointerBlank: True
Mrxvt.pointerBlankDelay: 10
# Don't close the tab if the secondary screen is displayed (e.g. when running
# vim).
Mrxvt.protectSecondary: True
# Run as a login shell.
Mrxvt.loginShell: True
# Enable session management
# Mrxvt.sessionMgt: true
# ---------------------------- KEYBOARD SHORTCUTS ---------------------------- #
Mrxvt.macro.Shift+Left: GotoTab -1
Mrxvt.macro.Shift+Right: GotoTab +1

And here’s how it looks like:

Well…It looks pretty nice to me…Here you can see 2 tabs (one running top at the background and the current one with a cat .mrtxvtrc output), how the highlighting works (instead of just reverse video), and that I am a zsh lover 🙂

And here comes the question : Is there any xft compatible, Mono font that can display greek characters at terminals ? If so…WHICH ?

Anyway…if you think you have a better .mrxvtrc that I might like…can you post it ?