Search This Blog

Thursday, March 3, 2011

Ubuntu 10.10 & vnc4server pressing ‘D’ minimizes all windows

There's a bug in vnc4server. When you have gnome installed and you install vnc4server you'll experience it. Pressing 'D' wherever & whenever inside gnome will cause all the windows to minimize.

Change System->Preferences->Keyboard shortcuts; find the shortcut:

"Hide all normal windows and set focus to the desktop"

and change ‘D’ to something else.

Running VNC Server without XServer on Ubuntu

What we want to do is to install VNC Server (which is about 45MB) without install the whole gnome environment. Such a vnc server can be started at boot time and serve as a XFCE or Fluxbox desktop with single user.

Install basic gnome environment (or any other lightweight):

?> apt-get install gnome-core

install vnc server:

?> apt-get install vnc4server

run the server to set password:

?> vncserver -geometry 1280x1024 -depth 24 :0

kill the server:

?> vncserver -kill :0

edit ~/.vnc/xstartup file:

change x-window-manager & in the end to:

gnome-session &

start the server:

?> vncserver -geometry 1280x1024 -depth 24 :0

Configuring WebInterface for rtorrent

 

Install rtorrent:

$> aptitude install rtorrent

$> apt-get install libapache2-mod-scgi

let’s configure apache to setup a scgi socket to a local process.
# nano /etc/apache2/httpd.conf

add a line:

SCGIMount /RPC2 127.0.0.1:5000

Then do the following:

$> a2enmod scgi

$> /etc/init.d/apache2 restart

install php support:

$>  aptitude install libapache2-mod-php5


$> a2enmod php5


$> wget http://rutorrent.googlecode.com/files/rutorrent-3.2.tar.gz
(or from http://sites.google.com/site/bkosarzyckiaboutme/rutorrent-3.2.tar.gz)
Unpack these files and place in apache’s www directory.


$> aptitude install screen
$> aptitude install gcc libncurses-dev libncurses5 libsigc++-2.0-dev libsigc++-2.0-0c2a libssl-dev libssl-dev
$> aptitude install php5-xmlrpc coreutils


 

remember that you need to give rights to your rutorrent files. You can do this with chmod 666 for example.

mine rutorrent files were placed in:
/var/www/rutorrent

To use WebGUI you need to configure rtorrent and run it in background (e.g. in screen)
$> screen rtorrent

Rtorrent configuration has to be placed in home directory:
~/.rtorrent.rc


configure port settings in .rtorrent.rc:
port_range = 10000-10000
port_random = no

Running step-by-step:
a) you need Apache running (configured in SCGI mode)
b) you need rtorrent running (with SCGI enabled)
c) access RuTorrent (GUI) via browser

look for errors in:
/var/log/apache2/error.log

Wrong version of xmlrpc-c.
Ubuntu has old version (only stable) of xmlrpc. Until they update their packages you'll experience an error in rutorrent:

“rtorrent is compiled with incorrect version of xmlrpc - without i8 support.”

I use this old library and everything works more or less ok. Torrent size is invalid (it shows –2343444) and rtorrent settings do not work. But the main functionality remains intact.

You can download unstable xmlrpc-c release from:
http://xmlrpc-c.sourceforge.net/downloading.php
to remove this error.

Wednesday, March 2, 2011

Ubuntu – change Message Of The Day (MOTD)

The usual problem MOTD is that you want to change it in /etc/motd and it keeps reverting to the default value.

Try different approach.

Install package  update-motd

aptitude install update-motd

Now you can control motd via editing files:

/etc/update-motd.d/00-header
/etc/update-motd.d/10-help-text
/etc/update-motd.d/91-release-upgrade
/etc/update-motd.d/99-footer

If you just want to add something in the bottom, create & edit the file:

/etc/motd.tail

Setting samba share

install samba:

aptitude install samba smbfs smbclient

In the ####authentication#### section find the line that says security, uncomment it and change it to:

security = share

Define new share in this way:

[public]
writable = yes
path = /public
public = yes
guest ok = yes
guest only = yes
guest account = nobody
browsable = yes

Tuesday, March 1, 2011

udev: eth0 stopped working - renamed to eth2

 

After putting new ethernet cards my ubuntu renamed eth0 to eth2 and eth1 to eth3. I wanted to have my old names back.

in dmesg there was:

eth0 –> renamed to eth2.

All you have to do is delete all old entries in:

/etc/udev/rules.d/70-persistent-net.rules
and you’ll have eth0 and eth1 names back.
 

VirtualBox can't operate in VMX root mode. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_VMX_IN_VMX_ROOT_MODE).

This error is caused by having kernel module kvm and VirtualBox at the same time. KVM is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V).
http://www.linux-kvm.org/page/Main_Page

To remove kvm module enter:

sudo modprobe -r kvm-intel
sudo modprobe -r kvm-amd

remove kvm from modules that are loaded at boot time. These are stored in file:

/etc/modules