Archive for the ‘Operating systems’ Category

Restoring backup-manager backups

For linux we have nice and easy backup software – backup-manager. Beside regular file backups it supports mysql dumps and svn dumps backups.

However, when you need to restore the backup you won’t find any command or script to do that. No wonder why – it’s so easy you don’t need them.

Steps to restore:

  1. If you were encrypting your backup images – use gpg to decrypt first.
  2. Use tar with appropriate command to uncompress main image.
  3. Repeat step 2 for every incremental image if you have them.

Sunday, February 10th, 2013

Disable menu bar in gnome-terminal

You can easily hide menu bar for gnome-terminal at a runtime. Obviously it’s rarely used and you can save some screen space by hiding it.

To hide it for newly opened terminal windows by default change this flag in gnome config:
/apps/gnome-terminal/profiles/Default/default_show_menubar to false.

gconftool --type boolean --set /apps/gnome-terminal/profiles/Default/default_show_menubar false

Sunday, October 18th, 2009

Setting up HP LaserJet P1005 on Debian Lenny

Do not confuse this printer with LaserJet 1005, it’s different printer (you’ll need drivers from foo2zjs package for 1005).

To make P1005 working you’ll need hplip package. Run hp-setup as root or run hplip from system menu. Unfortunately it is not able to download required plugin (at least in version 2.8.6b). You have to download it manually here http://www.linuxprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-2.8.6b-plugin.run and provide to hp setup tool.

Sunday, December 21st, 2008

Add font to your system (Windows)

When you working with graphics, for example in Photoshop, you may need to use nonstandart fonts. To add new font you can copy font file to Windows/Fonts directory. You can access it using usual file manager or via Control Panel -> Fonts.

Tuesday, May 13th, 2008

tty’s killed on Ubuntu Hardy Heron VPS

If you’ve upgraded your Ubuntu VPS to 8.04 check your syslog. It could happen that getty processes are being killed all the time:

May  2 06:28:54 vps_server init: tty3 main process (19690) terminated with status 1
May  2 06:28:54 vps_server init: tty3 main process ended, respawning
May  2 06:28:59 vps_server init: tty6 main process (19753) terminated with status 1
May  2 06:28:59 vps_server init: tty6 main process ended, respawning
May  2 06:29:00 vps_server init: tty5 main process (19764) terminated with status 1
May  2 06:29:00 vps_server init: tty5 main process ended, respawning
May  2 06:29:00 vps_server init: tty1 main process (19772) terminated with status 1
May  2 06:29:00 vps_server init: tty1 main process ended, respawning
May  2 06:29:02 vps_server init: tty4 main process (19891) terminated with status 1
May  2 06:29:02 vps_server init: tty4 main process ended, respawning
May  2 06:29:02 vps_server init: tty2 main process (19892) terminated with status 1
May  2 06:29:02 vps_server init: tty2 main process ended, respawning
...

To get rid of this (you don’t need terminals on remote machine) edit files /etc/event.d/tty1, /etc/event.d/tty2, etc and comment lines that causes respawning:

respawn
exec /sbin/getty 38400 tty1

Friday, May 9th, 2008

403 error after installing Mongrel with Apache2

If you’ve installed Mongrel for your Rails application with Apache2 as a proxy and receive 403-Forbidden error, first look in apache error log. If you have something like

[warn] proxy: No protocol handler was valid for the URL. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.

you probably forgot to enable/load all required modules. Make sure you have proxy, proxy_balancer and proxy_http.

Tuesday, November 13th, 2007

Connecting Debian to GPRS via Sony Ericsson

I was connecting mobile through USB cable. A month ago I was trying to connect Siemens mobile through IRDA dongle, but I give it up and made a gateway on Windows machine.

This time I found a solution. kppp didn’t work anyway, but it’s not a problem.

Install wvdial, it will scan your computer for available modems during installation. If you forgot to plug your phone, you can rerun scanning with wvdialconf.

The only thing that I had to modify in generated config was additional initialization string:

Init2 = AT+CGDCONT=1, "IP","yourprovider.com"

That’s it. Run wvdial and enjoy. Don’t forget to replace default route.

Tuesday, November 13th, 2007

Linux & Windows dual-boot – BIOS time problems

The problem is that by default these systems interprets hardware time in different way. Windows thinks that this is a local time, Linux – UTC (GMT). As a result you can have problems with jumping time each time you reboot into some OS. However you can force Linux to interpret hardware time as local, edit /etc/default/rcS and set UTC=no.
If you are running these two shits (Win & Linux) on a laptop you may have additional problems, Linux may still show wrong time. If you look into logs, you’ll find that probably it can’t open /dev/rtc device. In this case edit files /etc/init.d/hwclockfirst.sh and hwclockfirst.sh and set parameter HWCLOCKPARS=--directisa

Thursday, October 4th, 2007