Workshop
Fighting ISP redirects
2009-08-17It hasn't been long since I noticed some strange behavior in my browser which looked too much like malware attack, but since using NoScript on Firefox on Linux reduces such risks to a negligible minimum, I attributed the problem to some profile glitches, possibly in the recently installed extensions, and ignored it. The above-mentioned behavior occurred when I requested a nonexistent URL: instead of the browser's 404 page, it was redirected to a page with a Yahoo search (who still uses it nowadays, anyway?) with the search string being the mistyped URL. The page belonged to my provider, Charter, and after testing (and finding) this problem in other browsers, I got it.
After some search, I found more info about it.
The situation being rather unpleasant, I began looking for the solution. One seemed easy: at the bottom of the page they put "More about this page", where, in turn, was the option "Opt out", which, again, on the third click, gave me the page with choices: "Opt in (recommended)" (!) and "Opt out" with the choices of Google, other search engines, and "None". Hoping I got rid of the annoyance, I chose "None" and tested again... The result was unbelievable.
As it can be seen, the redirect did not go away, but they apparently thought I would think it did and therefore put the Internet Explorer error page copy with the images referring to shdoclc.dll in Windows. Therefore, they also thought I used Windows and that I used Internet Explorer.
Still surprised that anyone in a serious business could make something of this kind, I looked for more feedback from other troubled users and considered other solutions: change DNS; block Charter's Web site on the network level; manipulations with browser settings -- for example, Dillo, which does not support Javascript, refused to get redirected.
I have tried two solutions: 1) Add "127.0.0.1 [offending URL]" into /etc/hosts. The browsers will then say that the offending URL does not exist. 2) NoRedirect for Firefox. This one works just for Firefox (of course), but it fixes the problem completely (I get notified that the URL I typed does not exist, not that the offending one does not exist). I combined both and it seems to be the solution.
MAF 0.12.3 out
2009-05-18Lack of an open-source Web archive format (analogous to MHT) nearly drove me to writing my own format which used the same old way -- archiving a bunch of files into one, and hooking it up to Firefox as an extension. MAF, whose version 0.6 contained Windows binaries and did not work with Firefox 3, seemed frozen at that stage. I force-installed the 0.6 on Firefox and it did open MHTs but did not create files. Today I took a look at MAF's page hoping to see no change and -- lo and behold, the new, system-independent version for Firefox 3 is out! The MAF format (which is a just zip file with the page contents) works flawlessly.
GTK 1.2 font issues
2009-05-16In old GTK1 applications (like xmms, geg, dillo) the fonts are too large by default. The gtkrc file in /usr/share/themes/[theme name]/gtk-2.0 has no effect on them because it relates to GTK 2.0. Finally, I found the workaround.
Create the file .gtkrc-1.2-gnome2 with the content:
include "/usr/share/themes/Default/gtk/gtkrc" style "default-text" { fontset ="-bitstream-bitstream vera sans-medium-r-normal-*-*-90-*-*-p-*-iso10646-1″ } class "GtkWidget" style "default-text"
Source: http://ubuntuforums.org/showthread.php?t=107135
Note: on the source page, due to some reason they advise to create another file and include it into .gtkrc-1.2-gnome2. I have not figured out the reason, and putting the content directly into .gtkrc-1.2-gnome2 worked for me.
chmod recursively
2009-02-01So many times I had this problem: set permissions 644 on all files and 755 on all directories recursively. chmod has the -R option, but it will treat files and directores equally. By googling I found this page; indeed, the power of command line!
find . -type f -exec chmod 644 {} \; #on files only
find . -type d -exec chmod 755 {} \; #on directories only
FlightGear init script
2008-07-19FlightGear (www.flightgear.org) has a Windows version of its startup dialog; on Linux, however, one has to put all the initial parameters in the command line. There is a Linux startup dialog program called fgrun (http://www.viciouslime.co.uk/downloads/cat_view/2-debs), but due to some reason it didn't go well on my distro (Ubuntu 8.04). I remembered a small but useful utility called zenity, and with the help of it and some bash scripting man pages wrote a startup script with a GUI.
===BEGIN FILE=== #! /bin/sh # FlightGear start script example name=$(zenity --entry --title="Enter Callsign" --text "Enter your callsign") plane=$(zenity --list --title="Choose Airplane" \ --column="Airplane" \ "787-ANA" \ "c172p" \ "737-300" \ "A-10" \ "Concorde" \ "Blackbird-A" \ "T38" \ "seahawk" \ "ufo" \ ) airport=$(zenity --list --title="Choose Airport" \ --column="Airport" --column="Location" \ "KSFO" "San Francisco, CA, USA" \ "KATL" "Atlanta, GA, USA" \ "25U" "Imnaha, OR, USA" \ "64S" "Prospect, OR, USA" \ "6WA8" "Greenwater, WA, USA" \ "UUEE" "Moscow, Russia (SVO)" \ "UWGG" "Nizhny Novgorod, Russia" \ ) is_multi=$(zenity --question --text "Server login?"; echo $?) case $is_multi in 0) multi="--multiplay=out,10,mpserver02.flightgear.org,5000";; 1) multi="";; esac fgfs --aircraft=$plane --callsign=$name --airport=$airport $multi --timeofday=noon ===END FILE===
*.mht file issues
2008-07-06*.mht Internet Explorer Web archives can be easily opened with Opera (http://www.opera.com). In my experience, not all of them were handled correctly by Opera. Mozilla Archive Format (http://maf.mozdev.org) Firefox extension seems to be frozen at its version for Firefox 1.5 and it claims to be for Windows only. Following advice on Ubuntu Forums, I just edited install.rdf by putting the maximum Firefox version as 3.* and repackaged it. It opens *.mht files perfectly -- those which didn't show well in Opera were good in this one. Unfortunately, the capability of saving pages into MAF or MHT files does not function.
Interactive directory opened
2008-04-05I've been thinking about it for quite a time since frequent content editing in a regular HTML page requires much more than posting here; besides, there is no option of content commenting. Thus, the necessity of getting a blog made me look through some blog scripts and check them out. Surprisingly, there were not too many of them that I would like. The best one that I came across is Bloly blog script — a nice-looking minimalist no-junk blog. Due to some reason it did not allow anonymous comments and its registration script did not deliver the passwords to the two email addresses I tested it on. Well, too bad. I checked out one more that I liked (forgot the name), but its not being open source and the license which prohibited editing the scripts made it unacceptable. [EDIT 2008-04-06: remembered the name: aFlog] I went through some more but due to one or another reason they did not work for me either. After some thinking, I decided to use a phpbb forum for this purpose — I have some experience with it (administered one for a year), and it has even more functionality that a standard blog script.
So I came across this forum script and found it better for here: it does not take as much disk space as does phpbb and it uses fewer mysql tables.
Abandoning ICQ chat protocol
2008-03-20Beginning March 30, 2008, I will stop using the ICQ instant message protocol. This decision was made taking into account the overall poor quality of ICQ service, its user-unfriendly attitude, and the consequent loss of popularity (no one really uses it now anymore, except for Russia and probably some other countries, where it still seems to be popular). Anyone who uses the ICQ protocol via any chat client (ICQ5, LICQ, QIP, or any multi-protocol client using the ICQ protocol) will not be able to contact me after March 30, 2008 via ICQ.
If you want to contact me in an instant-message network after March 30, 2008, I am currently available in four of them.
- Jabber (e.g., Google Talk): my ID is [...]@gmail.com (preferred)
- Mail.ru Agent: my ID is [...]@mail.ru
- MSN: my ID is [...]@gmail.com
- Yahoo: my ID is [...]@yahoo.com
Начиная с 30 марта 2008 г. я перестану использовать чат-протокол ICQ. Это решение было сделано исходя из некачественности данной службы, недружелюбности по отношению к пользователям и, как следствие, потери популярности (вряд ли кто-либо сейчас до сих пор использует ICQ, за исключением России и, возможно, некоторых других стран, где он все еще пользуется популярностью). Все те, кто используют протокол ICQ с каким угодно чат-клиентом (ICQ5, LICQ, QIP, или любой мультипротокольный клиент, использующий ICQ), не смогут связаться со мной после 30 марта 2008 г. через ICQ.
Если Вы хотите связаться со мной через чат после 30 марта 2008 г., я доступен в нижеследующих четырех чат-протоколах:
- Jabber (например, Google Talk): мой логин — [...]@gmail.com (предпочтительный вариант)
- Mail.ru Агент: мой логин — [...]@mail.ru
- MSN: мой логин — [...]@gmail.com
- Yahoo: мой логин — [...]@yahoo.com
Related links:
- http://my.opera.com/mamapapalong/blog/2008/04/25/the-end-of-icq-icq-is-officially-dead
- http://stop-icq.blogspot.com (Russian)
- http://e-novosti.info/forumo/viewtopic.php?t=2665 (Russian)
2009-07-29 update: It's been half a year or so since I stopped using Yahoo and Mail.ru chat services, mainly due to absence of correspondents on those networks or their availability on Jabber or MSN.
Getting rid of .serverauth.???? files
2008-03-19A manual on how to get rid of .serverauth.???? files generated in your home directory. This seems to happen to those who log in from console rather than use (unnecessary) graphic login managers like gdm.
Cleaning up Ubuntu installation
2008-03-07Due to lack of free disk space on small hard drives or just to keep the system free from the stuff that I don't need, I made a small shell script which removes unneeded software which is installed in Ubuntu Linux by default (Ubuntu does not give you the option of selecting desired software during install). This list is made for Ubuntu 6.06. Packages to remove include the following:
- gdm: graphical login manager (console login is faster, and you can start the GUI by doing "startx" or configuring .bash_profile or .xinitrc. Frees about 12 M.
- ubuntu-artwork, tango-icon-theme, ubuntu-sounds, gnome-themes, xcursor-themes: all so-called "eye-candy", desktop wallpapers, fancy mouse cursors, and the like. You might have to do "sudo dpkg-reconfigure xserver-xorg" if your X does not start, or just edit /etc/X11/xorg.conf. After this, you have just one "Custom" theme in the Themes control window. I use "Redmond" for the color scheme in "Theme details" with my customized colors (see below).
- gnome-accessibility-themes, gnopernicus: accessibility features.
- example-content: just deletes the folder /usr/share/example-content with sample text and media files.
- gnome2-user-guide: a huge help package which hardly anyone will use (google is your friend anyway).
- ttf-arabeyes, ttf-arphic-ukai, ttf-arphic-uming, ttf-baekmuk, ttf-bengali-fonts, ttf-devanagari-fonts, ttf-kochi-gothic, ttf-kochi-mincho, ttf-thai-tlwg: Asian and Arabic TTF fonts.
- gaim, gnome-terminal: unnecessary software which is either unused or replaced by better alternatives (Gaim is inferior to Psi or Pidgin, and I use xterm anyway).
You can download the script here.
How to play Shockwave on Linux
2008-02-19Once I had to use a site with Shockwave and it didn't work in my Firefox. As I found out, Shockwave was not Linux-friendly. All right, in this case I would have to tell it that I was not Linux. :) Thanks to this wonderful advice everything worked. I ran the Firefox 1.5 installer for Windows under Wine (Firefox 2.0 didn't work due to some reason), then opened the unfriendly site in it. Firefox suggested downloading the Shockwave plugin. Voila!
My programming exercises
Old Pascal programs
Miscellaneous
- My customized theme for GTK "Redmond" theme (put in /usr/share/themes/Redmond/gtk*).
- WinClassic - my old project which changed Windows XP GUI into Windows NT 4.0 or Windows 98 GUI almost completely
