A Blank Desktop in Ubuntu

A few days ago, when I decided that my 5GB partition for Ubuntu is getting a bit too crowded with all kinds of applications, I uninstalled a bunch of software through synaptic. Well, one of them is Evolution. I freed about 1GB of hard drive space. However, disaster stroke, everything disappeared from my desktop. I saw nothing on my desktop, no menus, no icons, no panels and not even my beloved desktop background but a smooth orange background. I freaked out. After several restarts, things did not help at all.

I needed to get online for some help, and the only way to do that was to open Firefox. So I opened terminal -> Ctrl+Shift+T (Thank god for the shortcut, otherwise I’m dead). Typed in firefox, it opened firefox! nice. Now, this guy had a similar problem, and the solution seemed very simple. I posted it here.

Problem

After uninstalling several packages in Synaptic, the desktop just goes blank and there is nothing, not even icons or panels.

Solution

We need to reinstall ubuntu-desktop, this will reinstall all the default packages.

  1. Hold down Ctrl+Alt+F1
  2. Login
  3. Enter

    sudo apt-get install ubuntu-desktop

  4. After you are done, return to x-server by Alt+F7 or just restart.

Interestingly enough, if you would like to have packages installed in Kbuntu or other distribution, there you can do so with a similar process as above. The only thing different is it would be Kbuntu-desktop (or else) instead of Ubuntu-desktop. Check Synaptic.

Ok, that is it.

Linux Commands

I have been scouting around for some sort of tutorial on how to work with Linux Commands in terminal. I’m sure some of you guys are doing the same thing. I found this tutorial on LinuxCommand.org. A very simple and straight forward tutorial to learn Shells in Linux, navigations, and more. It’s not overwhelming for those who never touch Linux before (but do realize that it’s a steep learning curve.)

Learning the Shell

That is it for this post. Enjoy the tutorial.

Who am I? Where am I? and Where are you?

I usually get lost when using the terminal. Because there is no address bar, I have no idea what directory I am in. To make matter worse, I use zsh shell and all it shows for what suppose to be something like /Desktop is only a %. So, I need to know where I am.

Who am I?

Just in case you get so lost in the terminal that you forget who you are, the command below will let you know the user is in control of the session, effective user id, hence, you. So, if you forget who you are (I hope not) enter:

whoami

So there you go, linux just tells you who you are!

Where am I?

So I have been cruising around in the terminal, then I forget where I am, which directory I’m in, so to find out where I am in linux, I would enter in the terminal.

pwd

I learned this from a friend, it means “Print Working Directory”, the output looks something like this

/home/ma65p

That is my current/working directory, that is where I am!

Where are you?

What if I need to locate a file in Ubuntu? For example, I need to find a file named “you.” I would use either one of the two command below

whereis <what>
locate <what>

So, If I want to know where “you” is, I would enter in the terminal

whereis you
or
locate you

This would tell me where “you” is.
Have fun messing around, you never know what you can find with these two commands.

Get Some Help With Linux Commands

There are two things (that I know of) you can do in Linux to get some help with the commands in the terminal.

Use man command

This gives you a manual page for your command. The syntax is

man <command>

For example, if I want to see the manual for cd command, I would enter

man cd

The out put would be everything I need to know about cd, what it is what it does, its options, who made it…

Once you are done with reading the manual, and you want to quit, hit

Esc or q

Use –help

When you try to execute a command in the wrong way, Linux usually suggest you to try –help. Do that, sometimes it works and what it gives you is similar to what the man command would give you. For example

sudo --help

The input above will give you all options available for sudo command without any explanation or lengthly credits and copy right statements. The output looks like this, short and to the point.

ma65p@ma65p-laptop:~$ sudo –help
sudo: please use single character options
usage: sudo -h | -K | -k | -L | -l | -V | -v
usage: sudo [-bEHPS] [-p prompt] [-u username|#uid] [VAR=value]
{-i | -s | }
usage: sudo -e [-S] [-p prompt] [-u username|#uid] file …

But if you enter

man sudo

then the output looks like this

SUDO() MAINTENANCE COMMANDS SUDO()

NAME
sudo, sudoedit – execute a command as another user

SYNOPSIS
sudo -h | -K | -k | -L | -l | -V | -v

sudo [-bEHPS] [-a auth_type] [-c class|-] [-p prompt] [-u username|#uid] [VAR=value] {-i | -s | command}

sudoedit [-S] [-a auth_type] [-c class|-] [-p prompt] [-u username|#uid] file …

DESCRIPTION
sudo allows a permitted user to execute a command as the superuser or another user, as specified in the sudoers file. The real and effective uid and gid are set to match those of the target user as specified in the passwd file and the group vector is initialized based on the group file (unless the -P option was specified). If the invoking user is root or if the target user is the same as the invoking user, no password is required. Otherwise, sudo requires that users authenticate themselves with a password by default (NOTE: in the default configuration this is the user’s password, not the root password). Once a user has been authenticated, a timestamp is updated and the user may then use sudo without a password for a short period of time (15 minutes unless overridden in sudoers).

When invoked as sudoedit, the -e option (described below), is implied.
Manual page sudo() line 1

Last words

I’m sure some of you have been using one or two Linux command regularly. For me, I use top and cd the most. There are many commands in Linux that are fun and useful. For instance, some of you might have know the fortune command that gives you random fortune and jokes, some of which are not too bad. Using terminal and command could be painful sometimes because there is no way we know all those commands in Linux, there are hundreds of them, and each have a dozen different options, one of which could be fatal to our system (and ourselves). The key to avoid a disaster is to know what we are doing, and linux offers some great help. No, not the Ubuntu forum, you have to wait for someone to answer. No, not google, what if your internet is not working?. The commands above will help you sometimes in the future and it is a great tool to learn what you are doing.

How To Deal With .bin Files in Ubuntu

I was just trying out Thinkfree office suit online and it requires me install Java update. I downloaded the update file but it was in .bin format and I had no idea what to do with it. As usual, there was not any instruction on how to install stuff in Ubuntu. After screwing around a bit, I found the solution on Youtube.

To execute .bin files, you will have to use terminal.

Execute .bin files

  1. Open Terminal: Ctrl+Shift+T or Applications -> Accessories -> Terminal
  2. Navigate to where you save your file. Make sure you save your file where you want to install the application.
  3. Execute the file

    sudo ./yourfile.bin

    Replace the name of the .bin file into “yourfile.” Make sure you type everything in correctly, including the file name, the period and lash before the file.

  4. Enter your password and the file will be executed.

Have fun!

Note: I accidentally install my Java folder onto the Desktop. However, since Java does not require me to put it anywhere specific I can leave it on the desktop. I chose to move it to the lib folder though.

sudo mv ~/Desktop/jre1.5.0_12 /lib

Or you can open Nautilus as root to have root permission to move the folder with your mouse.

sudo nautilus

How To Restore The Original Panel And Menu Bar in Ubuntu

New Solution

Note: The old solution no longer worked for me, I found a new solution and posted it here.

Open Terminal: Ctrl+Shift+T

Execute these three commands:

gconftool-2 --shutdown
rm -rf ~/.gconf/apps/panel
pkill gnome-panel

The panels should reappear without logging out.


Old Solution

Note: This no longer works for me, but I leave it here for those who would like to try. After all, this solution saved me once, and it once worked just fine.

Well, I deleted my top panel by accident today. When I create a new one, some of the original items such as wire network connection, PMC volume control, notification area, date and time… are not there any more. Some of them are no where to be found in the items listed for adding new items onto panels. Anyhow, a quick Google search let me to the solution, found here and quoted below.

Open Terminal: Ctrl+Shift+T

Execute these three commands:

gnome-session-remove gnome-panel
gconftool-2 --recursive-unset /apps/panel
gnome-panel &

Then logout and log back in, or restart you X server with CTRL+ALT+BACKSPACE , everything should be fine.

Note: During this process, all panels, including the top and bottom, will be deleted and restore to the default settings. So, if you delete the bottom panel, this also restores it.

Fatal Error in VirtualBox

I just installed Virtual box a few days ago to run Windows inside Ubuntu. But after messing with group permission and upgrades, there was an error similar to the one below.

Could not load the settings file ‘/home/MyUsername/.VirtualBox/OpenSUSE 10.3.xml’ (VERR_OPEN_FAILED).

FATAL ERROR: Unknown element ‘PXEDebug’

Whatever it was, I kept getting it after multiple removals and reinstallations. Ubuntu forum did not have a solution, or at least not the one that worked for me. So, I decided to come up with a solution myself and it was incredibly simple. The goal is to remove the .xml file and then reinstall VirtualBox.

Solution

  1. Entering Synaptic.
  2. Search for “virtualbox” and uninstall all VirtualBox packages.
  3. Then open your home folder,
  4. On the menu bar, select View -> Show hidden files and folder.
  5. Delete the folder called “.VirtualBox“. This will erase the annoying .xml file.
  6. Reinstall VirtualBox like usual. For instruction on how to install, visit Ubuntu community.

Worked like a charm. Try it out. Cheers.