Wednesday, December 19, 2007
Virtual Box start a VM from commandline
VBoxManage vmstart "VM name"
You can make a kde icon to launch the machine!
Wednesday, December 5, 2007
mounting your NTFS partitions with fstab
/dev/hda1 /mnt/win auto ro,users,umask=022
note the umask "ro,users,umask=022"
Sunday, December 2, 2007
Installing Debian ETCH and adding the extras
System
graphics card drivers
module assistant build-essential
ndiswrapper -i -l modprobe
wine + rep
sensor-detect + ksensors
Virtualbox
Desktop
katapult
krusader
//adept
knemo
adept
kweather
Internet
qca-tls (for google talk in kopete)
kde-network-manager
fire fox +addblock + noscript+downloadstatus
Multimedia
deb apt source debian multimedia +rep
w32codecs
audacity
amarok
vlc
hydrogen
lmms
mixxx
mplayer
xinegui
jammin
Graphics
blender
scribus
inkscape
gimp
Office
openoffice
koffice
Development
kdev
eclipse
Monday, October 8, 2007
How to mount BIN/CUE - bchunk to the rescue
ISO is definitely the most common CD image type and basically every program will support it. Occasionally, you might come across a disc image in the BIN format. While there are ways to use BIN/CUE’s in Linux, it is much easier to convert them to the standard ISO format.
open up a terminal and type
apt-get install bchunk.
This will install a program called Binchunker.
Binchunker is used in the terminal and is very simple. Navigate to the folder containing the BIN/CUE file and run Binchunker in the following way.
bchunk IMAGE.bin IMAGE.cue IMAGE.iso
Depending on the speed of your machine, the time required will vary. Overall it is very quick and should not take more than a few minutes.
You should now have a standard ISO file that you can use anywhere!
Automate your xsession and repetative tasks :XMacro
It also contains and assortment of script commands that can be edited in to the macro script (text file) to tune its performance.
eg. Delay [n] - where n is a number of seconds.
so to start, record a macro by running
xmacrorec2 >newmacro.mac
(where newmacro.mac is the filename that will capture all the recorded info)
then xmacro will ask you set a key that will be presses when you are done recording (a good choice is the escape key)
As soon as you select the key, the recording will being, every mouse move, click and keypress will be recorded until you press the done key.
* note the timings of the above events are not recorded, so you will have to add delay events into the macro file later if your application requires pauses.
When you have pressed the done key, the recording is terminated and you can edit your macro file adding and removing the simple script commands.
To playback the macro file :
xmacroplay -d 10 :0 < newmacro.mac
where "-d 10 " is a delay of 10 microseconds
":0" is the screen to run the macro on
Enjoy!
PS. you can even make the macro run from your desktop or toolbar by making a shell script etc.
Sunday, September 30, 2007
Xephyr - a way to run another xsession inside your current one
set DISPLAY=:0 ;
export DISPLAY=:0 ;
# resets to xserver default
#start it on screen :2
Xephyr :2 -host-cursor -screen 1280x880x16 -dpi 96 -ac &
#setup the display for the other programs
export DISPLAY=:2
#run and xterm in the :2 screen to get started
xterm &
#once the xterm starts inside the Xephyr window, I like to switch to another user and start whatever programs for a clean enviroment!
su test
kwin &
iceweasel &
# and ofcourse its a nice idea to set the launch terminals x display back to :0
set DISPLAY=:0 ;
export DISPLAY=:0 ;
Cheers!
Saturday, September 29, 2007
Virtual Box notes
Here are some of my test notes so far to help get the most out of its features.
It has support for CPUs with virtualization instructions, so generally with modern CPUs you can enable this feature for speed improvements.
-general install and networking setups work out-of-the-box in windows, but in linux (esp. debian) the kernel modules modules have to be built and installed, and certain permissions set for VMs to launch
- its a good idea make a large virtual hard disk from the beginning , and you can set VB to dynamically allocate space. There is no resize option for virtual disks yet, so there is a long method to copy your os to a new partition etc.
- there is and option to use a real harddrive and partition for VMs, but that means all changes to the drive will be permenant
- you can make a copy of virtual harddrives to another location to make a backup copy just incase. look for ".VDI" files. Copying snapshots etc is also possible.
- there is a "portable" version of Virtualbox, thus it can be run off flash drive etc..
How I think I host bridged VirtualBox guest to Linux host
VirtualBox has good NAT support for linux hosts / guests
After installing Debian Etch on a guest VM, www access worked but there was no ping etc.
So the best way I found is to get a host bridge working and setting the guest VM network card to the host bridge mode and giving it the appropriate tap/tun name to use.
Here is the process that seemed to work ( I tried many things, so I dont know if they could have inadvertently could have contributed to the success of this.)
1. Grab the bridging utilities from the repository
apt-get install bridge-utils uml-utilities
*2. (unsure if this set is necessary)
enable port forwarding
/usr/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
/bin/chmod 666 /proc/sys/net/ipv4/ip_forward
/bin/echo "1" >/proc/sys/net/ipv4/ip_forward
3. edit your
/etc/network/interfaces
to read:
# added this vbox bridge
auto tap0
iface tap0 inet manual
tunctl_user reckless
auto br0
iface br0 inet dhcp
post-up chmod ugo+rw /dev/net/tun
bridge-ports eth0 tap0
bridge-ageing 7200
bridge-fd 0
auto eth0
iface eth0 inet manual
# end of my vbox bridge
* change reckless to your username that will be running a virtualbox
** notice the eth0 is my real NIC, and the bridge gets the DHCP IP
This creates a bridge interface that gets the eth0 and a tap0 working together.
4. ok, now restart your network interfaces with
/etc/init.d/networking restart
5. If everthing started ok, your ifconfig should show a br0, eth0, and tap0.
The br0 should take the place of your eth0 in terms of handing physical network work :)
The tap0 is what you will enter in the guest VM's network adapter setting.
You can test to see if its working by pinging google etc from inside the VM,
and also ping the guest VM from the host.
My guess is that the guest VM is getting the IP from where ever your host VM gets its DHCP IP.
Good Luck!
ref links
http://www.virtualbox.org/wiki/Advanced_Networking_Linux
http://forums.virtualbox.org/viewtopic.php?p=6486&sid=10dd76650f213b1cb0a87f2dd372f84e
http://www.virtualbox.de/discussion/1/126?discussion_action=set-display;display=flat-desc
Saturday, September 22, 2007
KDE 4 is looking good
A nice collection of behind the scenes paslma (desktop engine) videos:
http://plasma.kde.org/media/
Thursday, April 19, 2007
a new VNC program mainly for local computer setups
desktop? check!
And the monitors are close together on the desktop? check!
well synergy is just what you might be looking for.
synergy allows you to setup one computer as a master,
and the other computers as slaves, and use the the master
computer's keyboard and mouse on the other machines by
just moving your mouse to the edge of the screen and it
will switch to the other computer.
a video better explains it.
http://synergy2.sourceforge.net/
This is much better than using screen space on your master computer to run
a vncviwer, and its quicker
There is a program called quicksynergy that is suppose to allow a quick setup
and launch for configurations
KDE apt-get equivelant program
I like better than GNOME etc.
So how about a KDE version of synaptic complete with on the fly
as you type searching?
try apt-get install adept
Adept even has an update system tray applet.
SSH resetting your keys
~/.ssh/known_hosts
edit / move this file will allow you to reconnect to
machines that have changed configurations/installs
(eg. that new server)
Sunday, April 1, 2007
Amarok eyecandy
apt-get install xmms-synaesthesia xmms-status-plugin xmms-bumpscope xmms-msa xmms-iris xmms-jess xmms-blursk audacious-plugins-extra audacious-plugins
generally any xmms visualiztion plug in will work.
How to change your hostname
Debian based systems use the file /etc/hostname to read the hostname of the system at boot time and set it up using the init script /etc/init.d/hostname.sh.
- Edit /etc/hostname and update to your new hostname, you can then run /etc/init.d/hostname.sh to activiate the change.
- Update your /etc/hosts file to refelect new hostname
You can also use sysctl to change the hostname:
- sysctl kernel.hostname (To read the current hostname)
- sysctl kernel.hostname=NEW_HOSTNAME (to change it)
Unresponsive system? some hotkeys
A) Press “ALT” + “sysreq-key” + “one of the keys” listed below (The sysreq-key is also known as the ‘print screen’ key):
‘r’ - Turns off keyboard raw mode and sets it to XLATE.
‘k’ - Secure Access Key (SAK) Kills all programs on the current virtual console.
‘b’ - Will immediately reboot the system without syncing or unmounting your disks.
‘c’ - Will perform a kexec reboot in order to take a crashdump.
‘o’ - Will shut your system off (if configured and supported).
’s’ - Will attempt to sync all mounted filesystems.
‘u’ - Will attempt to remount all mounted filesystems read-only.
‘p’ - Will dump the current registers and flags to your console.
‘t’ - Will dump a list of current tasks and their information to your console.
‘m’ - Will dump current memory info to your console.
‘v’ - Dumps Voyager SMP processor info to your console.
‘0′-’9′ - Sets the console log level, controlling which kernel messages will be printed to your console.
‘f’ - Will call oom_kill to kill a memory hog process
‘e’ - Send a SIGTERM to all processes, except for init.
‘i’ - Send a SIGKILL to all processes, except for init.
‘l’ - Send a SIGKILL to all processes, INCLUDING init.
Saturday, March 31, 2007
Configuring Kdevelop in Debian
to get the documention search functions to work properly
apt-get htdig
and add the some paths to the Configure Kdevelop / Documention tabs
htsearch location is /usr/lib/cgi-bin/htsearch
Monday, March 19, 2007
Speed up your network - local DNS caching
linux. Basically everytime you visit a website or
a site that has a name (eg. www.google.com),
you computer must look up the name from an
internet server called a DNS (Domain Name Server).
This gives your computer an IP address (numbers)
that it can use to connect directly to the server you
requested.
The look up of the name and conversion to this
number address can take a few microseconds
(usually 30-60) depending on where the DNS
server is, lag, etc.
So under heavy usage all the address lookups
could add up to minutes of waiting in a day.
Fortunately, most web browsers have a built in DNS
cache, so they dont have to keep looking up the address
for that current session you are using.
But what about a better way to cache all theese address,
even for non websites.
Enter the DNS cache....
With a DNS cache, all the websites address are stored localy
so the lookup delay is cut from 30-60 down to 3-6! wow!
A tenfold savings in wait time!
For linux there are a few programs that can be easily used,
bind, dnsmasq pdns, dnsproxy
I have tried pdns, and it seems to work well.
So
apt-get install pdns resolvconf
once bind is up and running, its default mode
is dns caching, meaning you dont have to do any setup.
u can test the speed improvement by using:
dig www.google.com
before and after
note: there are 2 files than can be edited
if resolvconf doesnt do the job
/etc/resolv.conf
should contain a line that say:
nameserver 127.0.0.1
( your local ip)
Purge locales - free a little more drive space
on those small installs of linux (eg. flash drive)
is to remove the localization files that are for
the other languages you wont be using.
So if you know, you wont be using anything,
but us-english or canadian-english you can:
apt-get install localepurge
then it will prompt you to select the language
types u want keep.
now everytime you run
localepurge
from the console, it will search and delete the localefiles,
and show you how much diskspace it has liberated!
Monday, March 5, 2007
checking your filesystem for errors
Method #1
if its not the rootfs, you can unmount it and simply:
fsk /dev/hda1
(where hda1 is any available unmounted partition you want checked)
Method #2
especially useful if it is the root file system
1. goto single user mode by typing in a console:
init 1;
2. remount the rootfs as readonly
mount / -o remount,ro
3. now run
fsck /
4. reboot
Method #3
goto root
type
# touch /forcefsck
reboot
Method #4
use the shutdown command with some extra options
eg.
shutdown -r -F -time now
your disk usage and free space
gives a nice formated list of mounted drives and space
du -x -s /
will show disk usage for the / and summarize to one total
du -ah | sort -n
will show directories with a numerical sort
if you like a graphical display of disk usage
baobab or kdirstats can help
finding an elusive module
modprobe -l
will list all the modules
use with grep to help search!
Sunday, February 25, 2007
SSH auto start on boot
Each time I do a new install of Linux, I set up ssh like this (as root, of course):
update-rc.d -f ssh remove
and then:
update-rc.d -f ssh defaults
KDE tips : window candy
KDE has a nice translucency and shadow feature ,
but its heavy on the cpu usage, and doesn't work
with the ATI propriety driver.
The easiest way to turn it on is to right click on any
windows title bar and select "Configure window behavior".
Then goto the bottom of the features list and click on
translucency.
Now you should see a bunch of tabs and checkboxs on the
right side.
The shadows look really nice if you increase the shadow size
on active windows etc, to the maximum settings.
As a tweak to increase speed, I find that if you enable
the check box on the "Opacity" tab, called
"Disable ARGB windows...", the windows redraw a bit faster.
the Xserver must be restarted for the chances to have an effect.
*ATI propriety driver note:
If you change the xorg.conf line
Extensions / Composite / from "0" to "1"
then it might work but hardware 3D acceleration will be disabled.
Composite "Disabled" makes the 3D work.
apt-get : free up the cached space
apt-get clean
will free up the localy cached downloaded files,
thus you will have more free space on your drive.
After a few months of heavy use, it clean over 700Mb
from my system.
Linux programs or user Login not working?
If you cant login as a user, or some programs fail to load / crash,
check your disk usage at the commandline with
df -h
If you have no space on your rootfs then you will have to
clear up some space before you can login as a user (root login still works).
You would think that there would be some warning in dmeg
or some logfile.
Monday, February 19, 2007
Flac Audio encoding
The commandline flac encoder has some quick encode options via
-1 thru -8
Command-line:
flac -6 filename.ext
Using -6 is apparently great for speed (3.5x than -8),
and quality
Wednesday, February 14, 2007
KDE file assosiations
within KDE control / components, or use the right click context menus
in konqueror when you have selected a partical file.
But how would you do it from a console or better yet script.
Firstly you would have to find the file that stores the file associates.
/home/reckless/.kde/share/config
/profilercseems to be the magical location, so once you edit / setup this file,
it can be copied to any users home directory and they will have the
same associations.
*Untested
ref: http://docs.kde.org/userguide/file-associations.html
Starting with something simple: matrix style console glitz
So if you have debian based distro, you can
apt-get install cmatrix cmatrix-xfont
and then " cmatrix " in a console
to get your very own matrix like vertical scolling random text screen.
Just thought I would start with something simple to
get things going.
Ez6