hype-o-thetic?com

my notes

Archive for the ‘linux’ tag

Ping Ubuntu hostname from Windows (winbind+samba)

leave a comment

Here’s a procedure I found on taesch.com to ping a Ubuntu machine by the hostname from a Windows PC:

  1. sudo vi /etc/nsswitch.conf
    hosts: files wins dns
  2. sudo aptitude install winbind
  3. sudo aptitude install samba

SOURCE: http://taesch.com/my-digital-life/cant-ping-ubuntu-hostname-from-windows-xp-setup-winbind

Fork me on GitHub

Written by gimpe

February 19th, 2010 at 8:17 pm

Posted in linux,network,tips

Tagged with , ,

Diskless HTPC using DD-WRT (PXE), Ubuntu/XBMC and FreeNAS (TFTP, NFS)

6 comments

Given that I spent time and money on my FeeNAS node, I want to maximize its usage, so when a friend told me that I can use PXE and NFS to boot a diskless computer from the network, I thought it was the perfect opportunity to try somehing new and activate some more services under FreeNAS!

Read the rest of this entry »

Written by gimpe

September 20th, 2009 at 2:46 pm

Posted in FreeNAS,htpc,hype,linux,network

Tagged with , , ,

Ubuntu: ethtool permanent 1000baseTX full-duplex

leave a comment

vi /etc/init.d/1000Mbs
#!/bin/sh

ETHTOOL="/usr/sbin/ethtool"
DEV="eth0"

case "$1" in
    start)
        echo -n "Setting eth0 speed 1000 full-duplex...";
        $ETHTOOL -s $DEV speed 1000 duplex full autoneg on;
        echo " done."
        ;;
    stop)
        ;;
esac

exit 0
update-rc.d 1000Mbs defaults

SOURCE: http://www.cyberciti.biz/tips/howto-linux-add-ethtool-duplex-settings-permanent.html

Written by gimpe

August 1st, 2009 at 1:15 pm

Posted in bash,linux,network

Tagged with , ,

Ubuntu Jaunty: ATI Radeon HD 2400 XT working in dual head with compiz! (Catalyst 9.7)

leave a comment

1 – Compile and install driver:
Source: http://wiki.cchtml.com/

sudo aptitude install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++5 dkms

sh ati-driver-installer-9-7-x86.x86_64.run --buildpkg Ubuntu/jaunty

sudo dpkg -i xorg-driver-fglrx_*.deb fglrx-kernel-source_*.deb fglrx-amdcccle_*.deb

2 – Generate base xorg.conf:

sudo aticonfig --initial=dual-head

sudo aticonfig --dtop=horizontal

Note: you can do “dpkg-reconfigure xserver-xorg” to reset you xorg.conf to default values.

3 – Log out and log in to use the new xorg.conf

4 – Activate multi-screen & compiz:

Source: http://www.uluga.ubuntuforums.org/showthread.php?p=7552538

Start ATI Catalyst Control Center as root:

sudo amdcccle

Now, go in Display Manager -> Multi-Display -> Big Desktop right fo display 1

Then start compiz: System -> Preferences -> Appearence -> Visual Effects

Written by gimpe

July 29th, 2009 at 1:13 pm

Posted in linux

Tagged with

Ubuntu Jaunty: ATI Radeon HD 2400 XT working in dual head (Catalyst 9.6)

2 comments

1 – Compile and install driver:
Source: http://wiki.cchtml.com/
sudo aptitude install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++5 dkms

sh ati-driver-installer-9-6-x86.x86_64.run --buildpkg Ubuntu/jaunty

# i386
sudo dpkg -i xorg-driver-fglrx_*.deb fglrx-kernel-source_*.deb fglrx-amdcccle_*.deb

# AMD64
sudo dpkg -i xorg-driver-fglrx_*.deb fglrx-kernel-source_*.deb fglrx-amdcccle_*.deb

2 – Generate xorg.conf:
sudo aticonfig --initial=dual-head --screen-layout=right

sudo aticonfig --dtop=horizontal --overlay-on=1

sudo aticonfig --xinerama=on

Note: you can do “dpkg-reconfigure xserver-xorg” to reset you xorg.conf to default values.

3 – Bug workaround:
Source: http://jen3ral.wordpress.com/

  1. Login to a tty (ctrl+alt F1) and type sudo killall gdm.
  2. Type sudo nano (or gedit, whichever you prefer) /etc/ati/amdpcsdb to edit the file. Go to the [AMDPCSROOT/SYSTEM/DDX] section and add:
    EnableRandR12=Sfalse.
  3. Type this into a terminal, sudo nano (or gedit) /etc/X11/xorg.conf, to open the xorg.conf file.
  4. Under the “Device” section add these options on separate lines:
    Option "EnableRandR12" "false"
    Option "DesktopSetup" "horizontal"
  5. Now just restart your computer and it should be good to go.

Compiz still not working…

Written by gimpe

June 18th, 2009 at 2:30 pm

Posted in linux

Tagged with

Linux delete/reset old eth0 network card

leave a comment

rulesWhen you add a new network card in your linux box and remove the old one, the new card will be named eth1. If you want to change it back to eth0, you can edit the file “70-persistent-net.rules” to remove the old eth0 card line and also remove the new eth1 line:

vi /etc/udev/rules.d/70-persistent-net.rules

Then you just need to reboot and the file will be updated with the new network card as eth0.

Written by gimpe

June 15th, 2009 at 11:07 pm

Posted in linux

Tagged with

NoMachine FreeNX – NX Free Edition

leave a comment

https://help.ubuntu.com/community/FreeNX

Written by gimpe

April 26th, 2009 at 1:49 pm

Posted in linux

Tagged with

Ubuntu: Send e-mail through your ISP with smtp

one comment

dpkg-reconfigure exim4-config

Choose: “mail sent by smarthost; received via SMTP or fetchmail”

Written by gimpe

March 3rd, 2009 at 9:54 am

Posted in linux

Tagged with

Linux: Backup and restore your system!

leave a comment

Get root access:
sudo su

To backup:
tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /

To restore:
tar xvpfz backup.tgz -C /

Source: http://ubuntuforums.org/showthread.php?t=35087

To backup on an other mount:
tar cvpzf /mnt/data/backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/mnt --exclude=/sys /

Written by gimpe

February 28th, 2009 at 9:09 am

Posted in linux

Tagged with

Ubuntu-Gnome minimal install with “alternate installer”

leave a comment

linux-command-line

  1. Use the Ubuntu “alternate installer” disc
  2. At the start menu press F4 and select “Install a commande-line system”
  3. Complete the installation process
  4. After add the gnome-core package and gdm:
    aptitude install gnome-core gdm

Voilà!

Written by gimpe

February 14th, 2009 at 3:14 pm

Posted in linux

Tagged with

No more swap partition!

leave a comment

I am now installing Ubuntu without a swap partition and I use a swap file afterward.

Here’s the details from Ubuntu Swap FAQ:

Should I reinstall with more swap?

  • Definitely no.
  • With the 2.6 kernel, “a swap file is just as fast as a swap partition.”(Wikipedia:Paging, LKML).

How do I add more swap?

  • Usually, people associate swap with a swap partition, maybe because they’ve been proposed to create a swap partition on install. In fact any file can be used as a swapping device, be it a partition or a conventional file. If you’re considering responsiveness, my advice: add more RAM. Swapping to a partition or a file won’t change anything.
  • We will add more swap by adding a swap file.
  • Adding more swap is a four-step process :
    • a- Creating a file the size you want.
    • b- Formatting that file to create a swapping device.
    • c- Adding the swap to the running system.
    • d- Making the change permanent.
  • We will consider (as an example) a 512 M swap need.
  • a- Creating a file the size you want :
    • We will create a /mnt/512M.swap swap file.
      sudo dd if=/dev/zero of=/mnt/512M.swap bs=1M count=512

      • What is important here is count=512, which means we want our file to contain 512 blocks of bs=1M, which means block size = 1 MegaBytes.
      • Be careful *not* to do this dd of=/mnt/512M.swap bs=1M seek=512 count=0
        Though the file grows to 512M immediately,it will have holes that makes it unusable.
  • b- Formatting that file to create a swapping device :
    sudo mkswap /mnt/512M.swap
  • c- Adding the swap to the running system :
    sudo swapon /mnt/512M.swap

    • You can see with “cat /proc/meminfo” that your additionnal swap is now available.
  • d- Making the change permanent :
    • edit your /etc/fstab:
      gksudo gedit /etc/fstab
    • and add this line at the end of the file:
      /mnt/512M.swap  none  swap  sw  0 0
    • save and reboot

Ref: https://help.ubuntu.com/community/SwapFaq

Written by gimpe

February 9th, 2009 at 9:36 am

Posted in linux

Tagged with

Performance Optimization WordPress Plugins by W3 EDGE