auto login with ubuntu 12.04
# edit the lightdm.conf
sudo gedit /etc/lightdm/lightdm.conf
# then add the following
autologin-user=
autologin-user-timeout=0
then reboot and see if it works!
ubuntu 11.10 server as a time machine
i have been working on this for quite some time. i finally found a blog that outlined it – here is the quick and dirty version. the blog is by chris lyons.
i currently have this set up and running in a local business. it manages 6 different mac’s (1x os x 10.5.8, 5x os x 10.6.8) and 2 windows xp sp3 virtual machines. so far the system has been in place for 8 months without issue. i will be migrating all mac’s to os x 10.7.8 in the coming months as well as migrating the server to a minimalist version of ubuntu 12.04.
# install the following packages
sudo apt-get install libdb4.7-dev libgcrypt11 avahi-daemon tcpd netatalk
# in order to build packages from the source, do the following
sudo apt-get install build-essential checkinstall
sudo apt-get install cvs subversion git-core mercurial
sudo chown $USER /usr/local/src
sudo chmod u+rwx /usr/local/src
# next, download the netatalk software
wget http://iweb.dl.sourceforge.net/project/netatalk/netatalk/2.2.2/netatalk-2.2.2.tar.bz2
# untar and build netatalk from source
tar xvjf netatalk-2.2.2.tar.bz2
cd netatalk-2.2.2
./configure --enable-debian
make
sudo make install
# edit the afpd.conf
sudo nano /usr/local/etc/netatalk/afpd.conf
# add the following to the bottom of the file
- -tcp -noddp -uamlist uams_randnum.so,uams_dhx.so,uams_dhx2_passwd.so -nosavepassword
# edit the applevolumes file to add shares to the afp server
sudo nano /usr/local/etc/netatalk/AppleVolumes.default
# add the following to the bottom – this allows users access to their home directories – change as neded
~ "Home" allow:UserName cnidscheme:dbd options:usedots,upriv
# you can add a variety of folders to the applevolumes – below is the syntax
/media/files "Files" allow:UserName cnidscheme:dbd options:usedots,upriv
/media/tm1 "Time Machine 1" allow:UserName cnidscheme:dbd options:usedots,upriv,tm
/media/tm2 "Time Machine 2" allow:UserName cnidscheme:dbd options:usedots,upriv,tm
# create the xml file that will control avahi
sudo nano /etc/avahi/services/afpd.service
# add this to the newly created /etc/avahi/services/afpd.service
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=Xserve</txtrecord>
</service>
</service-group>
# restart netatalk and avahi
sudo service netatalk restart
sudo service avahi restart
# go to each mac on the network, open a terminal, and enter the following
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
that should be it – now the mac users should be able to go to the Go -> Connect to server menu and connect to the afp using username@ip.of.the.server
i installed ubuntu 12….what now?
i have been using the ubuntu minimal install iso lately for fresh ubuntu installs. for a few reasons really:
- smaller, more lightweight install
- completely customizable – no bloatware (you can even manually select each package)
- the resulting install is more tailored to the machine
so, after installing, there really isn’t much. so here is a list of things that are a good idea to install and configure. first, open up the ubuntu software center then go to edit and then select software sources. make sure both canonical and independent entries are checked before proceeding.
after following all these steps, you will have all the programs and libraries to watch dvd’s, play music, etc. you will also have all the latest office software and plugins (including google web office), graphics viewing and design programs, as well as pdf tools.
not all these steps are necessary – you can pick and choose what you want to install – i know i am missing some other programs and applications and i will add them later on.
this is for a 32 bit install of ubuntu!!
# first – update the system – the minimal install is usually up-to-date as it pulls all the software from current repo’s. better safe than sorry
sudo apt-get update && sudo apt-get upgrade
# adobe flash player
sudo apt-get install flashplugin-installer gsfonts-x11
# adding medibuntu – “medibutnu is a repository of packages that cannot be included into the ubuntu distribution for legal reasons (copyright, license, patent, etc).” – see the link for more details. medibuntu is also deactivated when you upgrade to a newer ubuntu release – so you will need to run this again after a release upgrade.
sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get --quiet update && sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && sudo apt-get --quiet update
sudo apt-get --yes install app-install-data-medibuntu apport-hooks-medibuntu
# after installing medibuntu install the following – these are open source software for accessing and unscrambling some encrypted dvds
sudo apt-get install w32codecs libdvdcss2
sudo apt-get install libdvdnav4
sudo apt-get install libdvdread4
sudo /usr/share/doc/libdvdread4/./install-css.sh
# tools for compiling software from source
sudo apt-get install build-essential checkinstall cdbs devscripts dh-make fakeroot libxml-parser-perl check avahi-daemon
# multimedia – vlc, mplayer, etc – vlc is a highly portable multimedia player and framework it can read most audio, video, cds, dvds and allows streaming. mplayer (with smplayer – the front-end gui) is an awesome choice for watching dvd movies, etc, it will remember your place and settings for each movie.
sudo add-apt-repository ppa:videolan/stable-daily
sudo apt-get update
sudo apt-get install vlc mplayer smplayer
# ffmpeg – a complete and free internet live audio and video broadcasting solution for *nix based systems
sudo apt-get install libxine1-ffmpeg gxine mencoder mpeg2dec vorbis-tools id3v2 mpg321 mpg123 libflac++6 ffmpeg totem-mozilla icedax tagtool easytag id3tool lame nautilus-script-audio-convert libmad0 libjpeg-progs flac faac faad sox ffmpeg2theora libmpeg2-4 uudeview flac libmpeg3-1 mpeg3-utils mpegdemux liba52-0.7.4-dev libquicktime2
# java – this provides the libraries, java vm and other components – you can go here to test if java is installed
sudo apt-get install openjdk-7-jre icedtea-7-plugin
# google chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install google-chrome-stable
# gedit – an amazing text editor. when in the gui this is the one i primarily use
sudo apt-get install gedit gedit-plugins gedit-developer-plugins
# libre office (open office) with pdf import and mozilla office plugin
sudo add-apt-repository ppa:libreoffice/ppa
sudo apt-get update
sudo apt-get install libreoffice libreoffice-java-common libreoffice-math libreoffice-gnome libreoffice-java-common
sudo apt-get install libreoffice-pdfimport
sudo apt-get install mozilla-libreoffice
# gwoffice (google web office) – i have not used this yet, however, i will have a post about it in the near future
sudo add-apt-repository ppa:tombeckmann/ppa
sudo apt-get update && sudo apt-get install gwoffice
# remove gimp and update repo, install new version, install extras and gimp paint studio
sudo apt-get --purge remove gimp*
sudo add-apt-repository ppa:otto-kesselgulasch/gimp
sudo apt-get update
sudo apt-get install gimp gimp-data gimp-data-extras
sudo apt-get dist-upgrade
sudo add-apt-repository ppa:shnatsel/gimp-paint-studio
sudo apt-get update
sudo apt-get install gimp-paint-studio
# ms visio equivalent – dia
sudo apt-get install dia
# calibre – and ebook reader and converter – it can convert several formats to epub for your kindle or phone
sudo apt-get install calibre
# htop – a task manager for the command line
sudo apt-get install htop
# draftsight – an open source cad product that allows users to create, edit and view dwg files
# install the packages below
sudo apt-get install libxcb-render-util0
sudo apt-get install libdirectfb-extra
# download the install file from 3ds here
well thats it for now, i will add more to this and update it periodically.
missing window decorations in ubuntu
every now and again window decorations disappear in ubuntu 12.04. this happened in 11.04 and 11.10 as well. here is the fix for that.
# press alt + f2 to open the run command dialog
/usr/bin/compiz-decorator
and viola, your window decorations have returned!
ssh server on ubuntu 12.04 lts
# install open ssh server
sudo apt-get install openssh-server
# backup the default ssh config to the home directory
sudo cp /etc/ssh/sshd_config ~
# edit the config file using vi (gedit works as well if your in a gui)
sudo vi /etc/ssh/sshd_config
# change the following lines – you dont want root to be able log in, change the default port from 22 and allow users – so change the ones listed below
PermitRootLogin
AllowUsers user1 user2
Port 5569
# restart the ssh server to commit the changes
sudo restart ssh
dont forget to setup the port forwarding on the router for external access!
removing samyak/oriya fonts for wine
when installing the dotnet packages in wine, i got this error -
user@darkstar:~/.wine$ ./winetricks dotnet11
Executing w_do_call dotnet11
Executing load_dotnet11
Executing w_do_call fontfix
Executing load_fontfix
-misc-samyak-medium-r-normal--0-0-0-0-p-0-iso10646-1
-misc-samyak-medium-r-normal--0-0-0-0-p-0-iso10646-1
------------------------------------------------------
Please uninstall the Samyak/Oriya font, e.g. 'sudo dpkg -r ttf-oriya-fonts', then log out and log in again. That font causes strange crashes in .net programs.
------------------------------------------------------
to remove the font package
# its a part of the ttf-indic-fonts package, so we need to remove it
removepkg ttf-indic-fonts-0.4.7.4-noarch-1.txz
# there are other references to them – using a handy sed command you can find them and then edit the file to remove.
# i ran the following commands in the /usr/share/fonts directory
grep -nr samy . | sed 's@\(Samyak\)@@'
grep -nr oriy . | sed 's@\(Oriya\)@@'
after the oriya and samyak fonts and all mentions of them are removed, log out and log back in and you should be all set to move forward with the dotnet11 install
compiling 3.3.1 kernel in slackware 13
i am using slackware 13.37 and was using the default 2.6.37 kernel and decided to take the plunge and check out the 3.3.1 stable kernel.
here is a fast and dirty how to for recompiling your kernel in slackware -
download the kernel source
http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.3.1.tar.bz2
cd over to the directory we are building the kernel in
cd /usr/src
move the tarball over to the directory we are building the kernel in
mv /home/michael/linux-3.3.1.tar.bz2 .
unpack the tarball
tar -xvjf linux-3.3.1.tar.bz2
remove the sym link to the old kernel
rm linux
create a new sym link to the new kernel
ln -s linux-3.3.1/ linux
move into the new folder
cd linux
copy the old config over to use for the recompile
cp /boot/config .config
there are a few different options to use here – make menuconfig which is a ncurses based tool to configure the kernel. for this how to i used make xconfig which is a X based tool. there is also make config which is just awful and i would not recommend using it unless you have a lot of time.
make xconfig
compile the kernel – i used the -j3 because i have a dual core. use -jN where N is the number of cores you have +1
make bzImage
compile the modules
make -j3 modules
install the modules
make -j3 modules_install
remove the sym link for the old System.map, config and kernel
rm /boot/System.map
rm /boot/config
rm /boot/vmlinuz
now copy the new System.map, config and kernel over to /boot
cp arch/i386/boot/bzImage /boot/vmlinuz-3.3.1
cp System.map /boot/System.map-3.3.1
cp .config /boot/config-3.3.1
create the sym links for the new kernel
ln -s /boot/vmlinuz-3.3.1 vmlinuz
ln -s /boot/System.map System.map
ln -s /boot/config-3.3.1 config
now to modify your lilo.conf to show the new kernel on boot
vi /etc/lilo.conf
here is what my section of lilo looks like – make sure you change the /dev/ points to your partitions
# Windows bootable partition config begins
other = /dev/sda1
label = windows
table = /dev/sda
# Windows bootable partition config ends
# 2.6.37.6 start
image = /boot/vmlinuz-huge-smp-2.6.37.6-smp
root = /dev/sda6
label = 2.6.37.6
read-only
# 2.6.37.6 end
# 3.3.31 start
image = /boot/vmlinuz-3.3.1
root = /dev/sda6
label = 3.3.31
read-only
# 3.3.31 end
then run lilo to update the config
lilo
after the kernel has been added reboot
reboot
and when you load into the new kernel, assuming you dont get a kernel panic error, run uname -a and you will see the new kernel. for example, mine looks like this -
Linux quotidian 3.3.1-map-3-4-12 #1 SMP Tue Apr 3 13:15:09 EDT 2012 i686 AMD Athlon(tm) 64 X2 Dual Core Processor 4000+ AuthenticAMD GNU/Linux
webmin in ubuntu server 11.10
webmin is a great gui tool for a server. i have been using it in slackware and tested it in ubuntu server as well. while it does not replace the command line (nothing will) it is a handy addition and provides many tools that make configuration much easier.
add these to your /etc/apt/sources.list
deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib
now import the gpg key
wget http://www.webmin.com/jcameron-key.asc
sudo apt-key add jcameron-key.asc
sudo apt-get update
now install webmin
sudo apt-get install webmin
to access webmin, open a browser, and then go to https://you-server-ip:10000/
(replacing your-server-ip with the local ip of the box you installed webmin on)
you will then be prompted for username and password. you will either need to assign a password to root or log in using a user with root privileges.
fat32 in the fstab
to mount a fat32 to the users group and a user:
/dev/sda3 /home/michael-pass/fat32 vfat users,gid=users,umask=0002,uid=1000 0 0
install virtualbox on ubuntu server 11.04
i did this all on a ubuntu 11.04 server virtual machine inside of an ubuntu 11.04 host.
open /etc/apt/source.list in your favorite editor and add the following line
deb http://download.virtualbox.org/virtualbox/debian natty contrib
get the virtualbox public key
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
update the package database
sudo apt-get update
now install virtualbox 4
sudo apt-get install linux-headers-$(uname -r) build-essential virtualbox-4.0 dkms
download and install the extension pack (this is required since virtualbox outsourced some funcionality)
cd /tmp/
sudo wget http://download.virtualbox.org/virtualbox/4.0.8/Oracle_VM_VirtualBox_Extension_Pack-4.0.8-71778.vbox-extpack
sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.0.8-71778.vbox-extpack
add user to vboxusers group
sudo adduser mike vboxusers
now virtualbox is installed and ready to use. the next posts will be on configuring and using virtualbox via the command line and managing your vms via phpvirtualbox





