Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Tuesday, March 27, 2012

Ubuntu Adding Sudo Users

1. Add admin group
$groupadd admin

2. Add a user called "hiro" to admin group
$gpasswd -a hiro admin

Thursday, February 10, 2011

configuring sun-java6-jre license screen: can't press

I'm still struggling my way through with Ubuntu Linux.
I was installing java6-jdk with the following command.

$ sudo apt-get install sun-java6-jdk

Then, configuring sun-java6-jre license screen shows up.
It has <ok> but I couldn't figure out how to select it.

The solution was Press <TAB> and then Press <Enter>.

Well, this was really annoying....
http://ubuntuforums.org/showthread.php?t=657917
http://forum.nginx.org/read.php?26,120455,120455

Monday, January 31, 2011

Where to install Eclipse on Ubuntu

I don't know. I'm not an expert on Linux system at all.
However, I found a nice post and decided to install under /opt folder.

sudo mv eclipse /opt/eclipse cd /opt sudo chown -R root:root eclipse
sudo mv eclipse /opt/eclipse cd /opt sudo chown -R root:root eclipse
sudo chmod -R +r eclipse
sudo chmod +x `sudo find eclipse -type d`
Then create an eclipse executable in your path
sudo touch /usr/bin/eclipse
sudo chmod 755 /usr/bin/eclipse
sudoedit /usr/bin/eclipse
With these contents:
#!/bin/sh
export ECLIPSE_HOME="/opt/eclipse"
$ECLIPSE_HOME/eclipse $*

http://informationideas.com/news/2008/11/16/where-to-install-eclipse-on-ubuntu/
http://flurdy.com/docs/eclipse/install.html

VirtualBox Screen Size too small: Windows Host OS + Ubuntu Guest OS

I've been using VirtualBox to run Ubuntu on my PC.
The screen size is too small.
So here's what you have to do to install GuestAdditions.


1. Start the virtual machine
2. Select "Mount CD/DVD-ROM" from the "Devices" menu in the virtual machine's menu bar and then "CD/DVD-ROM image".
3. Before installing the Guest Additions, you will have to prepare your guest system for building external kernel modules. This works similarly as described in Section 2.3.2, “The VirtualBox kernel module”, except that this step must now be performed in your Linux guest instead of on a Linux host system, as described there.

Again, as with Linux hosts, we recommend using DKMS for Linux guests as well. If it is not installed, use this command for Ubuntu/Debian systems:

sudo apt-get install dkms

4. Mount the VBoxGuestAdditions.iso file as your Linux guest's virtual CD-ROM drive.

5. Change to the directory where your CD-ROM drive is mounted and execute as root:

sudo ./VBoxLinuxAdditions-x86.run
In a 64-bit Linux guest, use VBoxLinuxAdditions-amd64.run instead.

6. Restart the system

7. After the system starts, Host Key + F (Default setting is Right CTL + F) to try out Full Screen mode.
This worked for me, and hopefully this will work for you too.

After all of this, I found a very useful post.
http://www.nerdgrind.com/how-to-increase-screen-size-or-resolution-in-virtualbox-for-ubuntu-or-linux/

Ubuntu Linux PATH problem

I was trying to build Android from source code.
http://source.android.com/source/download.html

I had to install Repo and set it to PATH.
I've been used to MacOS now but Ubuntu is not my cup of tea yet....well MacOS neither...but anyhow...
The problem was, that in ~/ directory, I find .profile and .bashrc files.
In .profile, I find the following line.
     if [ -d ~/bin ] ; then
          PATH=~/bin:"${PATH}"
     fi



So it seems this should work, however when I type "repo", the terminal doesn't recognize this command.
I went through quite a number of posts online.
And finally I found a solution.
Here, I quote
The .bash_profile file is read and executed when bash is invoked as a login shell, otherwise the .bashrc file will be read and executed.
That's why this code:
if [ -d ~/bin ] ; then
    PATH=~/bin:"${PATH}"
fi
which is located in .bash_profile, doesn't seem to work...it's not being read. But, if you enter this into your terminal:
bash --login
then all your scripts in ~/bin will execute properly for your current terminal session.
A good solution is to cut those 3 lines of code out of .bash_profile and put them in your .bashrc file. If you don't cut (or comment out) the code in .bash_profile it will be read twice since .bash_profile includes the .bashrc file.

So I followed this suggestion and it worked perfectly.
Here's the reference to the post.
It's frustrating to be a beginner....isn't it?