Monday, September 24, 2012

dpkg problem

Had this problem:

 subprocess installed post-installation script returned error exit status 1

And found a solution here

What I did to recover from this problem;

  1. Go to /var/lib/dpkg/info
  2.  Find the related package problem ended with *.postinst
  3. Delete that particular file
  4. Try apt-get update again, should be working

Error with debconf

I had this problem just now, making my system half-broke!

"Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/ line 44, <DEBCONF_CONFIG> chunk 3."

Searched for the solution and found. To solve,

sudo apt-get install debconf --reinstall

and worked!

Tuesday, September 18, 2012

Lomo plugin for Gimp

1. Install this plugin. Create a folder and extract that zipfile.

2. Use gimptool. As for this time of writing, in Linux Mint Maya 13 (based on Ubuntu 12.04 LTS), I need to install libgimp2.0-dev.


gimptool-2.0 --install-script lomo-gimp.scm

3. Launch Gimp. Go to Filters->Artistics->Lomo Gimp

4. Alter whatever variable that you need.

Thursday, September 13, 2012

Removing comma at then of line

Let say for a file named "filename.CSV"


sed 's/,$//g' filename.CSV

Wednesday, September 12, 2012

Enable USB on Oracle's Virtualbox

I want to mount my USB disk on my Windows as the guest on my Ubuntu host. But need to install a USB extension. Download the extension here. Which version suits you depends.. you may want to test one by one as there is no clear cut or suggested version on the Virtualbox installed.

Go to your Virtualbox menu, File->Preferences

After few straightforward/self-explain buttons, it's good to go!

After the installation, the USB won't be mounted straight away, you need to include the current user into vboxuser as explained here

Monday, September 10, 2012

rsync using non standard SSH port

For some reason, you want to listen SSH on different port. Let say you want to minimize SSH illegitimate attempt by deceiving the people out there with so called "closed port" (I learned this from Mr Adli Wahid, the then VP of CyberSecurityMalaysia). 

Rsync can be mapped with SSH, but by using the normal -e ssh flag it will use the default port 22.

To use with you personalized port, let say port 60000 use

rsync -avz --progress -e 'ssh -p60000' 

and the rest of the command.

That's all, worked for me. 

x11vnc + lightdm - how to login lightdm remotely

x11vnc usually cannot be used to log into GDM/KDM/LIGHTDM directly, unless there's already someone else logged to that machine.

Here is the solution with xinetd originally blogged here;

Edit /etc/xinetd.d/x11vnc 


service x11vnc
  type = UNLISTED
  disable = no
  socket_type = stream
  protocol = tcp
  wait = no
  user = root
  server = /usr/bin/x11vnc
  server_args = -inetd -o /var/log/x11vnc.log -display :0 -forever -bg -rfbauth /etc/vncpasswd -shared -enablehttpproxy -forever -nolookup -auth /var/run/lightdm/root/:0    
  port = 5900
    flags = IPv6

Make it executable;
sudo chmod a+x /etc/xinetd.d/x11vnc

Assign password to be stored;
sudo x11vnc -storepasswd (VNC password) /etc/vncpasswd

Sunday, September 9, 2012

Ignoring translation files during apt-get update

Ever had this problem?

Get:10 squeeze/main Translation-vi [16.0 kB]                                                                                
Get:11 squeeze/main Translation-fr [553 kB]                                                                                 
Get:12 squeeze/main Translation-it [1546 kB]                                                                                
Get:13 squeeze/main Translation-ja [1002 kB]                                                                                
Get:14 squeeze/main Translation-km [4772 B]                                                                                 
Get:15 squeeze/main Translation-es [472 kB]                                                                                 
Get:16 squeeze/main Translation-ca [5637 B]                                                                                 
Get:17 squeeze/main Translation-zh [1685 B]                                                                                 
Get:18 squeeze/main Translation-hu [49.4 kB]                                                                                
Get:19 squeeze/main Translation-pl [375 kB]                                                                                 
Get:20 squeeze/main Translation-pt [687 kB]                                                                                 
Get:21 squeeze/main Translation-eu [9373 B]                                                                                 
Get:22 squeeze/main Translation-nl [45.3 kB]                      

Since I know I may never need this, we need to fine tune our apt.conf

Edit /etc/apt/apt.conf


Acquire::Languages "none";

Problem solved!

Debian on Mac Mini

I just installed Debian Testing (Wheezy) on my Mac Mini. However, it has the deficiency of the firmware (wireless driver) if you just install it using a single CD.



apt-get install wireless-tools firmware-b43-installer

Then configure this file manually;

Edit the /etc/network/interfaces file

Put in the file:

auto wlan0 #so that you can boot up with WiFi connection automatically
iface wlan0 inet dhcp
    wpa-ssid <put your WiFi access point name>
    wpa-psk <put your WiFi access password>