Posts Tagged ‘ubuntu

06
Dec
10

Ubuntu Printer installation of Canon MF4150

This page has moved to: http://numberformatdata.wordpress.com/2010/05/09/ubuntu-printer-installation-of-canon-mf4150/

01
Mar
10

How to mount a remote ssh filesystem using sshfs

I came across this great article that shows how to mount a file system using sshfs. Just thought I would share.

How to mount a remote ssh filesystem using sshfs

It talks about the sshfs and fusermount commands that allow you to use a remote file system just like it was local. On  the  local  computer where  the  SSHFS  is mounted, the implementation makes use of the FUSE (Filesystem in Userspace) kernel module. I believe this to be better than the davfs2 because you don’t have to be root in order to mount the file system.

Requirements

  • Ubuntu
  • Server will files you want to access
  • Root access to local box

TO install

sudo apt-get install sshfs

To Mount

mkdir /home/[your username]/mnt

sshfs prod:/home/[your username] /home/[your username]/mnt

To Un-mount

fusermount -uz /home/[your username]/mnt

24
Jan
10

Setting Environment Variables in Ubuntu

This page describes the process of setting up environment variables in Ubuntu.

Session-wide environment variables

In order to set environment variables in a way that affects a user’s entire desktop session, one may place commands to set their values in one of the “hidden” script files in the user’s home directory. The more common such files are outlined below.

  • ~/.profile – This is probably the best file for placing environment variable assignments in, since it gets executed automatically by the Display Manager during the startup process desktop session as well as by the login shell when one logs-in from the textual console.
  • ~/.bash_profile or ~./bash_login – If one of these file exist, bash executes it rather then “~/.profile” when it is started as a login shell. (Bash will prefer “~/.bash_profile” to “~/.bash_login”). However, these files won’t influence a graphical session by default.
  • ~/.bashrc – Because of the way Ubuntu currently sets up the various script files by default, this may be the easiest place to set variables in. The default configuration nearly guarantees that this file will be executed in each and every invocation of bash as well as while logging in to the graphical environment. However, performance-wise this may not be the best thing to do since it will cause values to be unnecessarily set many times.

System-wide environment variables

Environment variable settings that affect the system as a whole (rather then just a particular user’s desktop session) can be placed in any of the many system-level scripts that get executed when the system or the desktop session are loaded. Ubuntu defines several locations dedicated to placing such settings:

  • /etc/profile – This file gets executed whenever a bash login shell is entered (e.g. when logging in from the console or over ssh), as well well as by the DisplayManager when the desktop session loads. This is probably the file you will get referred to when asking veteran UNIX system administrators about environment variables. In Ubuntu, however, this file does little more then invoke the /etc/bash.bashrc file.
  • /etc/bash.bashrc – This is is the system-wide version of the ~/.bashrc file. Ubuntu is configured by default to execute this file whenever a user enters a shell or the desktop environment.
  • /etc/environment – This file is specifically meant for system-wide environment variable settings. It is not a script file, but rather consists of assignment expressions, one per line. Specifically, this file stores the system-wide locale and path settings.

The above was taken from the following URL: https://help.ubuntu.com/community/EnvironmentVariables

My thoughts on the above

If you want to change system wide environment variables then /etc/environment is your best bet.

The environment file contains variables that are made effective globally. The following output shows my current environment file.

vi /etc/environment

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"

If you want to change session wide then ~/.bashrc or ~/.pam_environment would be your best bet. See the next code block or the comments below.

vi ~/.bashrc

PATH=$PATH:/path_to_where_java_is/bin
export PATH

FreeBSD

To change environment variables globally just change the /etc/login.conf file. and run the command it lists on the top for the changes to take. Also if there are any global variables in your local configuration files. ex. /etc/cshrc.conf or ~/.cshrc then you need to make sure that the files dont clobber any variables from login.conf.

12
Dec
09

Converting RPM Packages To DEB

This page describes the process of converting an RPM package into a DEB package. DEB packages are used by Ubuntu package manager for installing applications. RPM is used by Red Hat Distribution. The binaries are compatible but the package are not.

Requirements

  • Ubuntu Linux
  • An RPM package to convert

sudo apt-get install alien dpkg-dev debhelper build-essential
sudo alien --scripts pkg-name.rpm
sudo dpkg -i pkg-name.deb

30
Mar
09

Getting nVidia GeForce 8800 SLI to work in Ubuntu

This page describes some of the issues I went thru while setting up my Dual GTS 8800 cards.

Requirements

Operating system: Ubuntu 9.10 Driver version: Nvidia-Linux-x86_64-180.44 I was getting a kinit: No resume image, doing normal boot… after installing nvidia drivers. I have dual geForce 8800 GTS cards and the system was getting confused. I was able to fix the problem by specifying BusID in the xorg.conf file. see below for complete install instructions… make sure that the following modules are installed. sudo apt-get install build-essential linux-headers-`uname-r` Install the nvidia drivers by either going to System -> Administration -> hardware drivers or download them from the nvidia site and install them yourself. Reboot the system and it should come up using the new drivers. If it does not and if you have dual cards then you need to specify the primary. I have 2 GTS 8800 cards and after viewing the /var/log/messages I found out that they were on BusId “00:02:0″ and “00:03:0″

I modified the /etc/X11/xorg.conf and inserted BusID field seen below…

Section "Device"
Identifier "Configured Video Device"
Driver "nvidia"
Option "NoLogo" "True"
BusID "02:00:0"
EndSection

#save and restart your computer and gdm should come up without problems.

my complete xorg.conf looks like this…

# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# Note that some configuration settings that could be done previously
# in this file, now are automatically configured by the server and settings
# here are ignored.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Monitor"
        Identifier      "Configured Monitor"
EndSection

Section "Screen"
        Identifier      "Default Screen"
        Monitor         "Configured Monitor"
        Device          "Configured Video Device"
        DefaultDepth    24
EndSection

Section "Module"
        Load    "glx"
EndSection

Section "Device"
        Identifier      "Configured Video Device"
        Driver  "nvidia"
        Option  "NoLogo"        "True"
        BusID   "02:00:0"
EndSection

Verify by going to nvidia-settings that you are running in SLI mode. If not then execute the following command.

sudo nvidia-xconfig –sli=AFR

The screens should look like this:

30
Mar
09

Getting Sound to work in Linux Ubuntu

I have a p6T motherboard. This Comes with an Intel ALC1200 Surround Sound card.

I had to put the following into

/etc/modprobe.d/alsa-base.conf

options snd-hda-intel model=intel probe_mask=1

Also had to change to use Pulse Audio instead of ALSA for virtual box after upgrade to 9.10.

Power Saving
By default the operating system enables power saving. This helps in two ways.

  1. Saves Energy (obviously)
  2. Reduces the hum that sound cards make due to EM interference in the computer.

The Disadvantage of this is that when you start playing music you hear a loud pop or click. Sometime this is more annoying than the hum.

To fix this all you need to do is modify the alsa-base.conf and comment out the the following line:

# Power down HDA controllers after 10 idle seconds
#options snd-hda-intel power_save=10 power_save_controller=N




Follow

Get every new post delivered to your Inbox.

Join 34 other followers