At work we are getting more and more Solaris box’es. Zones in Solaris are great for delivering secure webhotell and email services for large amounts of customers.
But, coming from Linux, Solaris can be a bit frustrating at first. Though Sun has released a OpenSolaris version, development there aren’t even close to what I’m used to in Linux.
I find it a bit interesting looking at Solaris ’cause it shows the power of a open source community, while one can get a bit spoiled in a mono Linux environment I easily take for granted all the great tools available at a Linux box.
Anyway here’s some useful stuff I’ve found out which makes it, for me, a lot easier to get friends with Solaris.
First of all, stuff like using pageup/pagedown keys in manual pages or even with ‘less’ is not common in a default Solaris 5.10 installation.
Since we’re more than one sysadmin at our Solaris box’es, I’ve setup my own environment and alias for commands.
I put a file called jjprofile at every box, and then I have to source the file ($ . ./jjprofile) every time I’ve logged on. A more elegant approach would of course to put this stuff in .bashrc or what ever the file being sourced when logging on.
#when using packages from http://www.blastwave.org/index.fam
#preferably hit those binaries before Solaris' binaries in the PATH
export PATH="/opt/csw/bin:$PATH"
#less is more (Solaris defaults to more)
export PAGER="less -iMsq"
#include man pages from blastwave packages
export MANPATH="${MANPATH:=/usr/share/man}:/usr/local/man:/opt/csw/man"
#using terminfo from blastwave let
#you use pageup/down and arrow keys and so on in man pages, less and vim
export TERMINFO="/opt/csw/share/terminfo"
# some aliases, I want to use the
# gnu binaries which I'm used to
alias vi='/usr/bin/env TERM=xterm-color vim'
alias ls='gls --color=auto'
alias ll='gls -l --color=auto'
alias du='gdu'
alias find='gfind'
alias tar='gtar'
alias grep='ggrep'
Regarding references to blastwave, more info at blastwave.org.
I rolled my own 2.6.31 kernel for my Ubuntu Karmic, and used make-kpkg to make .deb packages for easy installation. For some reason, unknown at the moment, my .deb didn’t install properly. The kernel .deb package ended up in a iF state by dpkg. I didn’t have time to fix this when it occurred and planned on getting back to it later until I started getting annoying errors when update-manager wanted to update my system. It seemed that update-initramfs tried to reconfigure my broken kernel package and kept on failing. So I removed my custom kernel via dpkg –purge ‘name of package’ but still when updating my system update-initramfs got hung up on trying to configure my custom kernel, which no longer existed on my system. My first thought was to reinstall my custom kernel and then reinstall initramfs-tools but I got into this really stupid circular problem with my custom kernel not getting installed followed by update-initramfs failing ending up with dpkg setting a iF state on initramfs-tools package as well which again led to any kernel upgrade failing, or at least giving lots of complaints about that stupid kernel package of mine.
I finally got out of it by installing my custom kernel, which broke under installation, then do a update-initramfs -d -k ‘my custom kernel’ followed by dpkg –purge ‘my custom kernel’ and everything got back to normal
Terminator is a great terminal, but running compiz it might be a bit confusing getting real transparency (if you’re one of those). With reference to the terminator man page (man 5 terminator_config), edit ~/.config/terminator/config and add these lines:
enable_real_transparency = true
background_darkness = 0.7
background_type = transparent
Note: use background_darkness to adjust the level of transparency
At work they recently switched to ip telephony, our supplier haven’t got any Linux client for their softphone so I had to install windows just to have a working phone !
So I end up running Virtualbox-ose and setting up a windows guest.
After installing windows xp (which takes AGES) I installed the softphone application, but my michrophone didn’t work in the guest environment !
The mic did work OK in Ubuntu, so I ended up debugging ( a lot).
I came over several people having the same problem + launchpad had a bug reported on the problem.
I uninstalled pulseaudio and the mic started working OK in the guest.
I had to do a
apt-get purge pulseaudio gstreamer0.10-pulseaudio + the rest of my packages related to pulse (found via dpkg -l | grep pulse),
except i still got libpulse-browse0 libpulse-mainloop-glib0 and libpulse0
Apt tells you it’s removing ubuntu-desktop as well, which probably is because ubuntu-desktop got pulse as a dependency or something. I find that apt-get doesn’t remove as much as aptitude wants to, so I used apt-get for this one.
I also installed gnome-alsamixer alsa alsa-firmware-loaders alsa-tools alsa-tools-gui
and reboot
note: volume control (in tray) and ’system -> preferences -> sound’ in gnome is now broken, but I kan control sound via gnome-alsamixer
UPDATE UPDATE: see this post regarding “I no longer need windows for my companys ip telephone solution”
After installing my favourite distro, which these days seem to have fallen back on Ubuntu I’m usually installing the ‘vim-gnome’ package. It pulls down the necessary packages for me to have a fully fledged Vim editor with syntax highlighting and so on.
But what if I don’t have X installed ?
Trying to install vim-gnome then would pull down xorg + the complete gnome-desktop environment, which really isn’t that necessary.
Since there’s a lot of packages related to vim it could be a bit confusing which one to pull down just to have syntax highlighting.
# aptitude install vim-nox
gives you, in _my_ opinion, a working and useful Vim editor in a ‘non-X’ environment :p
Ubuntu defaults to having the totem-mozilla plugin installed, I’m always having problems listening to radio at nrk.no with that one. For me, removing totem-mozilla and installing mozilla-mplayer solves everything .
# aptitude remove totem-mozilla && aptitude install mozilla-mplayer
UPDATE 11.05.10: Ubuntu Lucid (10.04) has renamed this package to ‘gecko-mediaplayer’
When setting up openvpn on my Debian vps daemon.log said
Note: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)
On vps I’ve come over other things too missing from /dev , this time I had to create the /dev/net/tun device manually by issuing:
mkdir /dev/net
mknod /dev/net/tun c 10 200
chmod 600 /dev/net/tun
So I had to convert some jpg’s to pdf, I know I’ve done it before but it’s so long between each time I keep forgetting which tools I used the last time I did it.
Bitprison.net reminded me how I did it last time.
Imagemagic is just priceless !
Supporting syntax highlighting in less, how cool is that !
According to linux-tips.org
In debian/ubuntu install source-highliting and set up these variables:
export LESSOPEN="| /usr/share/source-highlight/src-hilite-lesspipe.sh %s"
export LESS=' -R '
I’m working on a project where I need copies of files both at my laptop and at my home dir somewhere else.
I’ve setup an rsync script to do 2-way synchronization between my laptop and the home dir like this:
#!/bin/sh
remote="joar@remote.server.address"
rdir="remote_sync_dir/"
ldir="/home/joar/local_syncdir/"
rsync -e ssh -vaurP $ldir $remote:$rdir
rsync -e ssh -vaurP $remote:$rdir $ldir
Note: to avoid having to type your password for each sync one should setup ssh-keys.