Monitoring CPU and Hard Drive Temperature on Xubuntu

, No Comments »

I run my Xubuntu computer 24/7 a day, therefore it’s a good idea to be able to monitor the CPU and hard drive temperature. Not looking for something complicated, I decided to install an applet on the Xfce4 panel. The first hardware sensors applet I found was the xfce4-sensors-plugin package, however I didn’t find the graphics very appealing, therefore I decided to use the sensors-applet which displays hardware sensors readings in the Gnonme panel.

To get the sensors-applet working on the xfce4 panel, I had to install xfce4-xfapplet-plugin which allows Gnome applets to be plugged into the Xfce4 panel. If you have hddtemp (a utility to monitor the temperature of your hard drive) you can also display the readings in sensors-applet as well.

$ apt-get install xfce4-xfapplet-plugin

$ apt-get install hddtemp

$ apt-get install sensors-applet

Sensors Applet Preferences

Remote Desktop on Ubuntu

, No Comments »

Ubuntu uses VNC (Virtual Network Computing) to allow remote desktop access. The default VNC server which Ubuntu uses is vino. Vino works differently from most VNC servers; once it is enabled, the GNOME session manager automatically starts it for you whenever you log in. It can therefore only export the display of a user that is currently logged in, unlike more standard VNC servers that typically display a system’s login screen and therefore support remote access to your system by random users.

Enable Remote Desktop

  1. Go to System -> Preferences -> Remote Desktop
  2. Under “Sharing” heading check both the “Allow other users to view your desktop” and “Allow others to control your desktop” checkbox
  3. Keep the “Ask you for confirmation” checkbox is uncheck
  4. Check the “Require the user to enter this password” checkbox and enter the password in the textbox below. Note that this is the VNC password and is not related to your users login password.
  5. Under the “Users can view your desktop using this command:” make a note of the port number indicated in the command. This will the be port assign to acess your desktop.

Remote Desktop
Connecting to Remote Desktop

To connect to your remote desktop any VNC viewer can be installed. A popular VNC viewer is TightVNC, the viewer can be downloaded at http://www.tightvnc.com/download.html. The viewer is just a single executable file, and can be installed on any portable drive. When you start the VNC viewer, enter your computer’s public IP address and port number indicated by the by the screen above (:0 indicates port 5900, :1 to port 5901 etc.), and click on the “Connect” button.

TightVNC Viewer
It is also possible to use VNC through SSH Tunneling refer to setting up a SSH server, and configuring Putty in the blog Remote Desktop with SSH Tunneling.

vsftpd on Ubuntu Quickstart Guide

No Comments »

vsftpd or Very Secure FTP Daemon is a FTP server for Unix like systems. It is secure and extremely fast when doing file transfers.

Installing vsftpd

$ sudo apt-get install vsftpd

Configuring vsftpd

The configuration file for vsftpd is located at /etc/vsftpd.conf

Modify the configuration file with the changes below:

anonymous_enable=NO
local_enable=YES
write_enable=YES

For more information refer to the vsftpd website.

Running Windows Application on Ubuntu

, No Comments »

Wine is a software application which allows Unix-like computer operating systems run programs that were originally written for Microsoft Windows. The Wine developers released the first beta version of Wine (version 0.9) on October 25, 2005 after 12 years of development.

Installing Wine

It’s recommended that you installed the latest version of Wine, unfortunately the version that is included in Ubuntu is often a few versions behind. To get the latest version you’ll need to edit the /etc/app/sources.list and add Wine’s own apt repository.

$ sudo nano /etc/apt/sources.list

Enter the following at the end of the file:

deb http://wine.sourceforge.net/apt binary/

After the changes have been done, run the following command to update the package cache:

$ sudo apt-get update

Finally to install Wine with the command:

$ sudo apt-get install wine

During the installation it will recommend you to install the msttcorefonts (Micrsoft True Type fonts) and cabextract (a tool for extracting the conts of Microsoft .cab archives) as well.

$ sudo apt-get install msttcorefonts cabextract

Configuring Wine

To configure Wine run the Wine configuration utility:

$ winecfg

Note this utility doesn’t need a sudo user to run it.

Once the command is executed, the Wine configuration directory will be created in /home/username/.wine. As well, a tabbed Wine configuration interface will appear. The interface will allow you to adjust various parameters of your Wine installation for the currently logged in user, e.g, the version of Windows that you want Wine to behave like, but everything will work fine with the default settings.

Wine Configuration

If you want to add a CD-ROM drive:

  1. Click on the “Drive” tab.
  2. Click on the “Add” button to create a new Windows D: drive
  3. Click on the “Browse” button to select the path to your CD-ROM e.g. /media/cdrom0
  4. Click on the “Apply” button to finish.

Installing a Windows Application

To install an Windows application just type the wine command e.g.

$ wine "utorrent.exe"

If you are using an application that works with Wine, the installer will launch and install the application into the mock Windows filesystem in your .wine directory. After the installation has completed you will be able to find the installed program under the menu “Applications” -> “Wine”.

If it doesn’t show up you can run the application in the command prompt:

$ wine "c:\\Progam Files\\utorrent\\utorrent.exe"

µTorrent on Ubuntu

Samba on Ubuntu Quickstart Guide

, No Comments »

Installing Samba for Ubuntu

To install Samba from the command line:

$ sudo apt-get install samba

Configuring Samba

The configuration file for Samba is located in /etc/samba/smb.conf. A simple configuration is listed below:

[global]
# Change this to the workgroup name your Samba server will be part of
workgroup = WORKGROUP
# server string is the equivalent of the NT Description field
server string = %h server (Samba, Ubuntu)

# This will require a Unix account in this server for every user accessing the server.
security = user
# The Unix account smbd uses this parameter when a connection is allowed guest access.
guest account = nobody
# Determine whether a failed authentication request should be treated as the guest user and allowed access.
# Use the guest account if the username is unknown to Samba's list of accounts.
map to guest = bad user

# Enable the default home directory shares.
# This will share each user's home directory as \\server\username
[homes]
comment = Home Directories
# Make sure that only “username” can connect to \\server\username
valid user = %S
# By default, the home directories are exported read-only. Change next
# parameter to ‘yes’ if you want to be able to write to them.
writable = yes
# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
create mask = 0600
# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
directory mask = 0700

# Here is one file share named [public], which makes the /tmp directory available for users
[public]
# Specifies whether a user mapped to the guest account is allowed access to this share.
guest ok = yes
# Automatically maps the user to the guest account for access to this share.
guest only = yes
path = /tmp
read only = no

Configuring Samba Authentication

$ sudo smbpasswd -a <username>
Password:
New SMB password:
Retype new SMB password:

The first password is for the sudo application, and the second two are for the Samba password for the <username>.

Configuring Firestarter Firewall

If you have a firewall on the same server as Samba the the rules will need to change to in order for Samba to work.

For Firestarter:

  1. System -> Administration -> Firestarter
  2. Click on the “Policy” tab
  3. Click on the “Allow service” table
  4. Click on the “Policy” menu -> “Add Rule”
  5. Under the “Name” dropdown, select “Samba (SMB)” and ports 137-139, and 445 will be populated
  6. If you want to restrict to only allow computers to your local network then add 192.168.x.x/24 to the “IP, host or network” textbox
  7. Click the “Add” button to add the policy to Firestarter
  8. Click on the “Edit” menu -> “Preferences”
  9. Expand “Firewall” -> “Advanced Options”
  10. Under the “Broadcast traffic” section, uncheck the “Block broadcasts from external network” checkbox

Reinstalling Samba

When attempting to reinstall Samba after it it has been uninstalled will result in an error.

$ apt-get remove --purge samba
Removing samba ...
* Stopping Samba daemons...
...done.
Purging configuration files for samba ...
Removing configuration file /etc/default/samba...
Removing configuration file /etc/default/samba...

$ apt-get install samba
Setting up samba (3.0.22-1ubuntu3.3) ...
* Starting Samba daemons...
...fail!
invoke-rc.d: initscript samba, action "start" failed.

The reason is because during the uninstallation the /etc/samba/smb.conf file has also been deleted which is required by the samba-common package. To resolve this problem the samba-common package must be resintalled before installing the samba package again.

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in