Add script to startup
by krisrmgua on Jun.02, 2009, under Ubuntu
I used this: update-rc.d -f pytivo start 99 2 .
You can use update-rc.d for start-only or stop-only scripts
Start my script on startup :
# update-rc.d -f my_script start 99 2 3 4 5 .
where
- start is the argument given to the script (start, stop).
- 99 is the start order of the script (1 = first one, 99= last one)
- 2 3 4 5 are the runlevels to start
Dont forget the dot at the end
More info in /etc/rcS.d/README
Start my_script on shutdown and reboot :
# update-rc.d -f my_script start 90 0 6 .
Stop my_script on halt and reboot :
# update-rc.d -f my_script reboot 90 0 6 .
If you want to make your own demon, you can use the skeleton file provided at
/etc/init.d/skeleton
about runlevels :
To know which runlevel you are running, simply type
$ runlevel
more info about runlevels here : http://oldfield.wattle.id.au/luv/boot.html#init
happy scripting
HedgeWars Fun Game ALOT like WORMS
by krisrmgua on May.30, 2009, under Ubuntu
HedgeWars
sudo apt-get install hedgewars
http://www.hedgewars.org/
http://www.getdeb.net/app/Hedgewars
Command Line Torrent For Ubuntu
by krisrmgua on Apr.18, 2009, under Ubuntu
sudo apt-get install transmission-cli
Use:
transmissioncli Filename.torrent
HOWTO: NFS Server/Client
by krisrmgua on Dec.11, 2008, under Ubuntu
I simply wanted to experiment with NFS, and couldn’t seem to find the documentation here on the forums. I found using NFS just as easy if not easier than using Samba for sharing between a few of my Unix based systems. In order to share a folder it only required a single line in a configuration file under /etc/exports, and a single line under /etc/fstab on the client to mount the share on each client at boot.
I mostly edited and moved things around from these guides to make a more complete single guide to getting this working using Ubuntu.
http://www.cyberciti.biz/tips/ubuntu…nfs-share.html (for client configuration)
http://www.redhat.com/docs/manuals/l…nfs-mount.html (for mounting using fstab)
http://czarism.com/easy-peasy-ubuntu…s-file-sharing (for server configuration)
http://www.freebsd.org/doc/en_US.ISO…twork-nfs.html (contains more info about NFS)
Install NFS Server Support
at the terminal type
sudo apt-get install nfs-kernel-server nfs-common portmap
When configuring portmap do =not= bind loopback. If you do you can either edit /etc/default/portmap by hand or run:
sudo dpkg-reconfigure portmap
sudo /etc/init.d/portmap restart
Editing /etc/exports
the /etc/exports file is used for creating a share on the NFS server
invoke your favorite text editor or
sudo vi /etc/exports
Here are some quick examples of what you could add to your /etc/exports
For Full Read Write Permissions allowing any computer from 192.168.1.1 through 192.168.1.255
- /files 192.168.1.1/24(rw,no_root_squash,async)
Or for Read Only from a single machine
- /files 192.168.1.2 (ro,async)
save this file and then in a terminal type
sudo /etc/init.d/nfs-kernel-server restart
Also aftter making changes to /etc/exports in a terminal you must type
sudo exportfs -a
Install NFS client support
sudo apt-get install portmap nfs-common
Mounting manually
Example to mount server.mydomain.com:/files to /files. In this example server.mydomain.com is the name of the server containing the nfs share, and files is the name of the share on the nfs server
The mount point /files must first exist on the client machine.
cd /
sudo mkdir files
to mount the share from a terminal type
sudo mount server.mydomain.com:/files /files
Note you may need to restart above services:
sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-common restart
Mounting at boot using /etc/fstab
Invoke the text editor using your favorite editor, or
gksudo gedit /etc/fstab
In this example my /etc/fstab was like this:
- server.mydomain.com:/files /files nfs rsize=8192,wsize=8192,timeo=14,intr
You could copy and paste my line, and change “servername.mydomain.com:/files”, and “/files” to match your server name:share name, and the name of the mount point you created.
It is a good idea to test this before a reboot in case a mistake was made.
type
mount /files
in a terminal, and the mount point /files will be mounted from the server.
Ubuntu get media tomb working
by krisrmgua on Dec.07, 2008, under Ubuntu
sudo apt-get install mediatomb
browsed to
http://192.168.0.112:49152/
and setup the files i wanted.
REbooted.
ran command sudo mediatomb and aslo tried it as sudo su - and just running media tome..
In both check files are still lised that i added if not added them.
Then:
added kris to etc group to mediat tomb group
chown kris:kris all /home/kris/.mediatomb
in /home/kris/.mediatomb i edited the config.xml file and changed the folling lines:
–> <home>/home/kris/.mediatomb</home>
<webroot>/usr/share/mediatomb/web</webroot>
<storage>
<sqlite3 enabled=”yes”>
–> <database-file>mediatomb.db</database-file>
Then added to sessions media tomb so it starts on startup and reboot.!