I just finished install Debian 8.3 on my new laptop. I'm using the XFCE4 desktop environment because I don't want any of that fancy 3D crap that is all the rage nowadays. All I need is a dozen workspaces, and shortcut keys to switch between them.
XFCE4 does the job perfectly. It's light and fast, and doesn't get in your way. One problem I found with the new installation, is a screen flicker when switching between desktops. Many users wouldn't notice it, but because nearly all my applications run in a black text terminal, that flash of white as the screen redraws is really disturbing.
The problem is reported on the GTK mailing list with no solution. I did figure out a workaround though. The flicker is caused by the window manager redrawing the window background. To do this, it uses the theme colours. All you need to do is select a black theme, and the redraw becomes barely noticable.
XFCE4 comes with one dark theme, called 'xfce4-dusk' (select it in Applications > Settings > Appearance). It doesn't have a black window background, but it is close. I edited the theme to make it a pure black background, which reduces the problem as much as possible. Also, the dark theme is easier on the eyes when using Gnome-GTK applications.
To change the background colour, edit /usr/share/themes/Xfce-dusk/gtk-2.0/gtkrc as root, and look for the following block:
bg[ACTIVE] = "#151515" bg[INSENSITIVE] = "#303030" #bg[NORMAL] = "#232323" bg[NORMAL] = "#000000" bg[PRELIGHT] = "#003263" bg[SELECTED] = "#002849"
You can see the change I made above.
This trick really makes a difference on my eyes. I spend about 9 hours a day looking at this screen. The last thing I need is things flashing at me.
I hope this helps you solve whatever problem bought you here.
ASSP is an SMTP proxy than runs infront of your mailserver to filter out all the spam email. Despite being implemented as a monolothic, indecipherable perl script, it is actually very effective and runs with very little intervention once you have it configured correctly.
Get the code from assp.sourceforge.net and extract it to /opt/assp-2.4.3 or wherever you would like to deploy it.
The README has some details about downloading dependencies from CPAN, however my preference is to use the Debian packages wherever possible, so I figured out which packages those were and came up with this list:
Okay, Ubuntu Hardy is pretty old now but my Hardy server is still humming along just fine and I don't see a good reason to break it just to run a few Ruby On Rails apps. The ruby, ruby1.9 and rubygems packages on Hardy simply don't work anymore and the rails package is too old to run my app.
So here is how I got the latest rails running on this 4 year old server. I hope it saves you some pain.
1. Install JRuby 1.6.8. The Ubuntu ruby1.9 package just hangs silently when trying to install rubygems, but JRuby does the job.
# cd /opt # wget http://jruby.org.s3.amazonaws.com/downloads/1.6.8/jruby-bin-1.6.8.tar.gz # tar -zxf jruby-bin-1.6.8.tar.gz # export PATH=$PATH:/opt/jruby-1.6.8/bin
2. Install Rubygems 1.8.24
# wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.24.zip # unzip rubygems-1.8.24.zip # cd /opt/rubygems-1.8.24 # jruby setup.rb
I use xmodmap to turn caps-lock into an extra modifier for special keys and shortcuts. Since upgrading finally to Ubuntu Lucid 10.04 LTS, I've had a problem with the Caps-Lock modifier key (Mode_switch) getting stuck when I accidentally press the Shift key. When I get it unstuck by pressing the same combination of Caps, Shift and one of my special keys, all my X-Windows shortcuts like Alt-Tab and Function keys stop working.
$ setxkbmap -layout jp
This resets your keyboard to it's original state. In my case the layout is japanese. You will probably want 'us' for US keyboards. Now you can reapply your xmodmap settings:
$ xmodmap ~/.xmodmaprc
It's still flaky, but it gets me back on the road.
Wow. You learn something everyday huh? Since I killed a bunch of the keys on my keyboard recently I've been stuck without being able to easily enter Latin characters. Today I found out about the Compose key, or in Ubuntu terminology - the Multi Key.
The Multi Key lets you enter special characters by typing a combination of two keys. For example:
Pretty neat huh? Except my keyboard doesn't have a Compose key. Apparently you can set up Shift and Alt to be the compose key under keyboard options somewhere, but I preferred to use xmodmap to onvert my Windows key to a Compose key:
$ xmodmap -e "keycode 133 = Multi_key"
Voila! Now I can put in any Latin characters without resorting to the Character Map.
Check this list of common compose sequences to find the characters you want to enter.
While searching the MRTG docs for some settings, I stumbled across the following option:
ThreshMinI (PER TARGET)
This is the minimum acceptable value for the Input (first) parameter. If the parameter falls below this value, the program specified in ThreshProgI will be run and a mail will be sent to the ThreshMailAddress if specified. If the value ends in '%' then the threshold is defined relative to MaxBytes.
Although my version of MRTG didn't support ThreshMailAddress, it was pretty simple to rig up a shell script to send email notifications when threshold values are reached.
Here is the MRTG config I added to notify me if the cpu usage exceeds 75% or the disks reach 95% capacity.
I really did deserve to be slapped for cleaning my laptop keyboard using water. My punishment was a bunch of dead keys, including the left arrow key. This is really annoying, and as it happens they simply don't stock replacement keyboards for my laptop in Lima. I searched everywhere.
With no other real option than to remap my broken keys I stumbled across something really cool in Ubuntu / Linux. Xmodmap is a utility I had used before for remapping dead keys, but I wasn't aware of the Mode_switch modifier which basically acts as an additional Control / Shift button.
The magic happens when you map Mode_switch to the otherwise useless Caps Lock key. Voila! Instantly you have a whole new set of shortcuts available using Caps Lock that you can use for ALL your applications. I've set up VIM style navigation keys, and shortcuts for hard to reach common keys like escape, backspace, delete, page up and page down.
What a freaking train wreck. I just spent the last hour trying to figure out why I couldn't insert still images into my Cinelerra project. It turns out there a setting in the preferences dialog for the image duration of inserted stills. Guess what the default is? The default is OFF. WTF even a default of 0 would have been better.
And just to add salt to the wound, this setting is not visible on my laptop because of the small screen size. I had to hold down ALT and drag the window up to find it. It is in the preferences dialog at the bottom of the Recording tab:
You can convert multiple jpgs into a single pdf on Ubuntu Linux using ImageMagick like so:
$ convert *.jpg out.pdf
The problem with this is that it segfaults for me using jpegs, and if I use PNGs the resulting file is way too large. So I did some searching and found an even better tool for the job. It's called gscan2pdf and works flawlessy with jpeg images and lets you set all sorts of output options for the pdf.
Since it has a GUI it's also very easy to use. It's in the Ubuntu repository already, so all you need is:
$ apt-get install gscan2pdf
Great job gscan2pdf developers!