Tuesday, 30 June 2009

(ubuntu tips)

- http://www.go2linux.org/how-to-install-samba-on-linux-with-swat
- http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch05_:_Troubleshooting_Linux_with_syslog


Ubuntu can play the most popular non-free media formats, including DVD, MP3, Quicktime, Windows Media

apt:ubuntu-restricted-extras?section=universe?section=multiverse


LINKS:
https://help.ubuntu.com/community/RestrictedFormats/
https://help.ubuntu.com/community/Medibuntu



======================


Ubuntu contains a very powerful firewall called netfilter that is part of
the central kernel program.

netfilter GUI: Firestarter
-------------------------------------------------


sudo apt‐get update
sudo apt‐get upgrade
or
sudo apt‐get update
sudo apt‐get dist‐upgrade

-------------------------------------------------------------------

Vim
Emacs (CLI mode using emacs --no-window and in GUI mode)
Nano

-------------------------------------------------------------------

MPlayer
SMPlayer
VLC


---------------------------------------------------------------------

network card info:

ifconfig


------------------------------------------------------------------------


So, here we go:

1. Follow the official instruction to install all the restricted formats:

sudo apt-get install ubuntu-restricted-extras

2. Install MPlayer:

sudo apt-get install mplayer

3. Download MPlayer binary codecs package from here.
4. Install MPlayer binary codecs package: (Note: the package name may differ from yours.)

tar xjvf essential-20071007.tar.bz2
sudo mkdir /usr/lib/codecs
sudo cp essential-20071007/* /usr/lib/codecs

At this point, you should be able to play rmvb files now. In case you still can’t, install libstdc++5 as follow:

sudo apt-get install libstdc++5

Bonus: I highly recommend you to give SMPlayer a try. You can get SMPlayer by:

sudo apt-get install smplayer





=========================================================

CHANGE FILE PERMITIONS

sudo chmod -R a+rwx .mozilla

links:
http://www.freeos.com/articles/4440/
http://lowfatlinux.com/linux-file-permissions.html




LISTING FILES AND DIRS

ls [list, all, show direcrtys] search string
ls -lad .mo*


MOVING AND COPYING FILES

cp -i file file2
cp file1 file2 file3 dir1
mv file file2


LINKS
http://www.tuxfiles.org/linuxhelp/fileman.html

================================

ssh gui tunneling
enovativ: No problem. To clear this up, run ssh -X (or ssh -Y) in your machine and run a command "firefox &" would bri

==========


list current processes.:
ps -e

kill a process:
kill

Monday, 22 June 2009

harddrive partition and folder properties

GRUB setup instructions
http://ubuntuforums.org/showthread.php?t=224351
-----------------------------------------------------------------------------------------------------------------

to the "sudo chown" and "sudo chmod" commands. In a unix/linux system, users can only write into their home directory by default. this is a very good approach, because this way, it is hardly possible that one user breaks the system (by accident or intentionally).


Drives by default belong to the root user



sudo mkdir /media/Disk/userdata

or using Nautilus as root ("gksudo nautilus").

Then, you give the directory to the user

sudo chown youruser:youruser /media/Disk/userdata

You can also do this with nautilus as root.


From this point, it is n excellent idea to create a symbolic link to that directory under the home directory of the user. That way, the user will be able to reach his space on the drive from within his home directory (where al his other data are as well).

sudo ln -s /media/Disk/userdata /home/youruser/userdata


src: http://ubuntuforums.org/showthread.php?t=543






Now I need to give it the proper permissions. Let's just assume, for this example, that my username is marie.
sudo chown -R marie:marie /storage
sudo chmod -R 755 /storage

Saturday, 20 June 2009

Bash Tips (CLI Command Line Interface)

Bash Tips (CLI Command Line Interface)

list all files in list format:
$ls -alt


prints the contents of text file "defines.h" to the CLI (Command Line Interface):
$cat < defines.h




Renaming a File or Folder

In the below example this would rename the file test.txt to hope.txt.

mv test.txt hope.txt

If the test.txt file was in a different directory then the one you were currently in you would need to specify the path of the file. For example, if the file was in the "computer" directory you would type a command similar to the below example.

mv computer/test.txt hope.txt

Renaming multiple files or directories at once

To rename multiple files at once you must utilize some form of wild character, below are some examples of how this could be done.

In the below example this would rename all the files in the current directory that end with .rtf to .txt files.

mv *.rtf *.txt

In this next example the command would rename a file with an unknown character in the file name to something that can be read. The "?" used in the below example is the wild character for an unknown character.

mv h?pe.txt hope.txt

Renaming a directory

Renaming a directory in Linux / Unix is much like renaming a file simply replace the file name with the directory name that you wish to rename. For example, if we wanted to rename the directory "test" to "hope" you would type the below command.

mv test hope

MONOTONE TIPS (Monotone):

MONOTONE TIPS:

mtn record of what you was doing last

$ mtn status




Jim can now check the status of his branch using the “heads” command, which lists all the head revisions in the branch:

$ mtn heads

Synchronising Databases (Monotone):

Synchronising Databases:

$ mtn --db=abe.mtn sync jim-laptop.juicebot.co.jp "jp.co.juicebot.jb7*"


Abe now has, in his database, a copy of everything Jim put in the branch. Therefore Abe can disconnect from the expensive network connection he's on and work locally for a while.

Committing Work (Monotone):

Committing Work:

local i think need to check????

$ mtn commit --message="initial checkin of project"
mtn: beginning commit on branch 'jp.co.juicebot.jb7'
mtn: committed revision 2e24d49a48adf9acf3a1b6391a080008cbef9c21

When monotone committed Jim's revision, it updated _MTN/revision to record the workspace's new base revision ID. Jim can use this revision ID in the future, as an argument to the checkout command, if he wishes to return to this revision:

Checking Out (co)

Checking Out (co):

$ WORKINGDIR=/home/user/code/pidgin-mtn

$ mtn -d $DATABASE co -b im.pidgin.pidgin $WORKINGDIR

Basic Monotone Setup

Basic Monotone Setup:

create database emmpty i think:
$ mtn db init --db=~/jim.mtn


create workspace:
/home/jim$ mtn --db=jim.mtn --branch=jp.co.juicebot.jb7 setup juice
/home/jim$ cd juice
/home/jim/juice$




Adding Files MONOTONE:

creating the files:
$ mkdir include
$ cat >include/jb.h
/* Standard JuiceBot hw interface */

#define FLOW_JUICE 0x1
#define POLL_JUICE 0x2
int spoutctl(int port, int cmd, void *x);

/* JuiceBot 7 API */

#define APPLE_SPOUT 0x7e
#define BANANA_SPOUT 0x7f
void dispense_apple_juice ();
void dispense_banana_juice ();
^D



adding the files into the workspace:
not you must be in the project directory. the one with _MTN file

mtn add include/jb.h src

Sync Database in MONOTONE

 Sync Database in MONOTONE:

$ mtn --db=abe.mtn sync jim-laptop.juicebot.co.jp "jp.co.juicebot.jb7*"


Getting pidgin source code / Monotone

Getting pidgin source code and using Monotone:


NOTES:
-------------

$ DATABASE=/home/user/monotone_databases/pidgin.mtn
$ WORKINGDIR=/home/user/code/pidgin-mtn

# Download the bootstrap database. For example:
$ cd $(dirname $DATABASE)
$ wget http://developer.pidgin.im/static/pidgin.mtn.bz2
$ bzip2 -d pidgin.mtn.bz2

$ mtn -d $DATABASE pull --set-default mtn.pidgin.im "im.pidgin.*"
$ mtn -d $DATABASE co -b im.pidgin.pidgin $WORKINGDIR





update" the scheme used by the Pidgin MTN database. Do:
mtn -d $DATABASE db migrate






simply go to $WORKINGDIR:
and execute mtn pull, or execute mtn -d $DATABASE pull from anywhere.
Note that this will pull the new revision history from the server, but will not update your working directory to reflect the newest available revision. For this, you need to run:
mtn up in $WORKINGDIR.

itsgoodtogive

itsgoodtogive

i am currently working on login into yahoo

lookin at pidgin / libpurple