Showing posts with label linux ubuntu. Show all posts
Showing posts with label linux ubuntu. Show all posts

Friday, February 17, 2012

Desktop Shortcuts Ubuntu 11.10

If you didn't already know, in Ubuntu if you type ctrl+alt+T the default terminal opens up. Now if you wish for other programs to open using keyboard shortcuts, here is how you do it.

Go to "System settings". You can get there by clicking on the circle on the top right hand corner or searching it at the Dash Home (top left corner).

Under "Hardware" click on "Keyboard".

Go to the Shortcut tab and click on the Custom Shortcuts. Click the plus sign (+).

A little window will open asking for Name and Command. Name is for naming of the shortcut and command is the program. Example:
Name: myShortcut
Command: terminator

Now it will appear in the box. Now select it and click where it says disabled and enter the shortcut. Close the window.

That's it! Easy.

Wednesday, February 15, 2012

Linux: Launching a program from Terminal

In linux there're couple different methods to install a program. The most often used and easy is apt-get because it does all the work. All it is a line in the terminal like:
$ sudo apt-get install terminator
and the program will install.

Programs like XAMPP where the package needs to be downloaded and extracted to a specific location. Other programs like netbeans and Komodo Edit where the package is first downloaded then extracted and then run an install script.

Sometimes I like to launch a program using the terminal such as:
$ terminator

When you install netbeans it doesn't give you this feature but I going to show you how to create it.

When netbeans is installed it creates a netbeans folder in your home directory. There you will find a netbeans executable file (~/netbeans-7.1/bin/netbeans). If you run this file it will launch the program. What we need is to put this file symbolic link (symlink) inside the directory that holds these other executable programs which is /usr/local/bin. You do this by
$ sudo ln -s ~/netbeans-7.1/bin/netbeans /usr/local/bin/netbeans

that's it!

Now netbeans may give you an error stating that you do not have permission to write in ~/.netbeans/ What is needed here is to change the permission with chmod. I gave it full access by running
$ sudo chmod -R 777 ~/.netbeans/

now you should be able to open the terminal, type netbeans and the program will launch



tags:
command line

Monday, February 13, 2012

3rd Party Suck!

Don't store files in 3rd party servers! I knew it, look at megaupload was taken down with people files that were legal. That's why you need a personal server for storing important files to avoid these pitfalls. Now many are left with their thumb in their mouth because their work sank with the ship, it's at the bottom of the ocean and good luck trying to get it back.

I've seen web developers put their development source code in dropbox. Yes, it syncs with your other computers but seriously how safe is it to have it out there.

Think about it...

What happens if dropbox gets hacked, I never trust these 3rd party companies saying they delete your stuff. 3rd Parties are infamous in not telling what they do with your information. Someone once told me "its not how safe you are with your information but how safe others are."

Setting up your own server is not difficult, especially with technology getting cheaper. With a little knowledge of Linux, an old computer(or buy one for $70) and with the information on this site you can get it started.

The Benefits:
Not only does it pay for itself in the long run (hosting cost) it also gives you the freedom to customize it with software and hardware. It also give you control with the security. You'll will be able to access your files from anywhere thru ssh, ftp, http and so on. And best of all you'll learn alot.

To get started click this and this.

Tuesday, February 7, 2012

Fixing the internet in Ubuntu using driver BCM4312 802.11b/g LP-PHY

What a pain! I recently reinstalled Ubuntu 11.10 on my Dell Latitude D630 and wireless wasn't working. It wasn't picking up any connections. My driver BCM4312 802.11b/g LP-PHY for some reason wasn't installed and when I went to Ubuntu "System settings->Additional Drives" and tried to activate the Broadcom STA wireless driver I would get an error to check /var/log/ folder that didn't exist.

So I connect to the internet using a wire connection and ran this in the terminal

$ sudo apt-get install b43-fwcutter

rebooted the computer then went back to "System settings->Additional Drives" tried to activate the driver again and it worked.

Resources:
https://help.ubuntu.com/11.10/ubuntu-help/net-wireless-troubleshooting-device-drivers.html
http://askubuntu.com/questions/95852/how-to-fix-bcm4312-driver-problem
https://www.evernote.com/shard/s18/sh/d245d647-45aa-474d-b093-a6346c7e9e27/e56bca9b17d774858fb6900cd302d047

Saturday, January 28, 2012

ssh from anywhere

I have no trouble accessing my server inside my home from my laptop because I'm local (in the same wifi) but if I decide that I need to access my server from at a coffee shop thorough my ipaddress here is how I do it.

First make sure that ssh is install on your linux machine and you can access ssh locally.

All is need is to port forward the range 22 by accessing your router. That's it!

Now you can
$ ssh username@ipaddress





linux, ubuntu, putty, ssh anywhere port 22 connection refused port forwarding

Thursday, January 26, 2012

change IP address on linux

I was having issues with git connection to my laptop thru ssh. Then after looking into it, my laptop had changed IP address. Now I didnt want to change all the git fetch origin source on all my repositories so here is how to change the IP address back.

# sudo ifconfig [connection] [IP you want]
$ sudo ifconfig eth0 192.168.1.5



sources:
http://www.cyberciti.biz/faq/linux-change-ip-address/

Sunday, January 15, 2012

Passwordless SSH login Tutorial

$ ssh-keygen -t rsa

Generating public/private rsa key pair.
Enter file in which to save the key (/home/bigbang/.ssh/id_rsa):
(Enter)
Enter passphrase (empty for no passphrase):
(Enter)
Enter same passphrase again:
(Enter)


# this creates a file ~/.ssh/authorized_keys
$ ssh-copy-id user@192.168.1.217
user@192.168.1.217's password:
(Enter Password)

Now test login in via ssh. It will not ask for the password






Friday, November 25, 2011

Autostart XAMPP in linux ubuntu

This is the simplest and easiest way to autostart automatically xampp when your computer boots

1. run the line below in terminal, this opens the file rc.local for editing
$ sudo gedit /etc/rc.local

2. write this line of code in the file rc.local. Make sure you follow the instructions contained in the file
/opt/lampp/lampp start

3. save and exit




#no need to edit init.d

Monday, November 14, 2011

Set up a Custom Git Remote Server like GitHub



In the server:
# have ssh installed on your server
$ sudo apt-get install openssh-server

# install git on both local and server machine
sudo apt-get install git

# navigate inside the folder you want to contain the repository
# create a new repository
$ git init

In local machine:
# navigate inside the folder you want to contain the repository
# create a new repository
$ git init

# set the origin
$ git remote add origin ssh://michael@192.168.0.175/GitServerFolderCreatedLocation

# update the server
# when pushing to the server make sure your not in the branch your pushing to
# you may need to fetch and merge (pull) before you can push
$ git push origin --all          #or $ git push origin [branch Name]

# update the local machine, get data from server
$ git fetch origin [branch Name]

Saturday, June 4, 2011

Making your server accessible to the internet (outside your own network).

If you want to see a prettier version of this post with pictures and color coding (part of this post won't make sense if you don't see the pictures) click on the link below to view the pdf format
setting up your server.pdf

There are two types of IP address. I like to call it the internet ip address and the server ip address. The way it works is that the internet ip address points to the server ip address. The INTERNET cannot access your server directly but can access your internet ip address.

Figure:
This works
INTERNET(The world)->your internet ip address ->your server ip address

This doesn’t work
INTERNET(The world)->your server ip address

To find your internet ip address go to http://myipaddress.com

Your server ip address is what you created with Ubuntu or any server.

To point your internet ip address to your server ip address you need to access your router. You do this by typing 192.168.1.1 in browser (for Linksys, it may be different if you have a different router). What we will be doing is Port Forwarding.

In Applications & Gaming-> Port Range Foward

Applications-> can be anything you want
Start and End-> needs to be 80
Protocol->needs to be Both (TCP & UDP)
IP Address -> need to be your server IP

Save and exit

That’s it . Type your internet ip address in the browser. It will now direct you to your server.

Connect using domain name
I purchased my domain from godaddy
All were doing is connecting a domain name to the internet ip address

Log into godaddy.com account
Select the domain name you want to use
And access you Domain Manager
Click Launch where it says DNS Manager



Put your internet ip address (not the server) under Points To (next to Host) where its highlighted in blue


Then save

Now when you type your domain name it will take you to your site

Figure:
INTERNET(The world)->Domain Name->your internet ip address->your server ip address


You did it!!!
Thumbs up Everybody for Rock and Roll

Wednesday, June 1, 2011

How to set up Static IP address for Server

Its good practice to give your server a static IP address because
1. You don't always need to reconfigure your router
2. It's easy to do

Click on the link below for a full explanation

http://www.howtogeek.com/howto/ubuntu/change-ubuntu-server-from-dhcp-to-a-static-ip-address/

PS. It's not true that you need a static IP address for the world to access you website from you server. You can also use a dynamic (DHCP), which is the default when you set up your Ubuntu server.

For more infomation on Making your server accessible to the internet

Monday, May 30, 2011

Changing permissions for /var/www Ubuntu Server

The video below explains how to change the permissions for /var/www Ubuntu Server




Monday, May 9, 2011

Setup xampp/lampp on Linux unbuntu

video below gives everything you need to set up xampp/lampp

and the link below gives additional information. Like how to create a xampp control panel app.


PS. if you looking to reset password. Follow the video and you'll discover it.

Saturday, May 7, 2011

How to get the microphone to work, Ubuntu 11.04

First click on the speaker on the right hand corner->sound preference->input. Make sure that a input device is selected, the input volume is not muted, or isnt set too low.
------------------------------------------------------
Open terminal and enter:
alsamixer

press F5 to view all controls bars
tab allows you to select a specific bar (the description will turn red)

the arrow keys up and down allows you to increase or decrease the property selected

Capture, Capture 1, Input Source, Rear Mic and Rear Mic Boost was what allowed my microphone to work.

Initially I turned everything up until I saw a red square on each bar. Then I played with the Input Source and realize that by setting the first Input Source to Rear Mic it made my microphone work. Then I played with the volumes to reduce the background noise.

I used the 'sound recorder' to test my microphone. I tried skype and the microphone also worked.

AlsaMixer v.1.0.24.2 my configuration











Any questions leave it in the comments