LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to restore Workspace Switcher (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-restore-workspace-switcher-943327/)

Concert 05-04-2012 05:25 PM

How to restore Workspace Switcher
 
I am trying to restore Workspace Switcher in Ubuntu 10.04

I deleted (see below for why) the two applets:

WorkspacesSwitcherApplet, and
ShowSwitcherApplet

Now I want to reinstall them, but can't find the applets in the Ubunutu Software Center and googling isn't yielding anything.

Can anyone help?
----------------------------------------------------
The below for background purposes only:

Yesterday morning the computer was frozen requiring a hard reboot. Just after the BIOS splash screen, it gave the warning:

"Hostname main process (329)[this number varied with successive reboots] with status 1"

It eventually started up with the usual 8 desktops showing in the lower right corner, but as I tried to re-establish the usual windows in each, I began to run into problems. The computer froze again.

Then on the reboot, I got a dialog window saying (I might not have copied the entire message. Surely it must have said something about a problem):

"OAFIID:GNOME_WorkspacesSwitcherApplet"
Do you want to delete the applet from your config?

So I chose delete. Then I got:

"OAFIID:GNOME_ShowSwitcherApplet"
Do you want to delete the applet from your config?

Again I deleted.

It seems that the first issue was that the hostname got somehow changed. Fixed that, but the problem of having removed (unnecssarily it now seems, the two workspaces applets

I tried to bring up the Ubunut Software Center to reinstall the two apps, but cannot find anything with the name workspace that appears to be the aplets that I need.

Knightron 05-05-2012 08:37 AM

Ok, you've only deleted them from your panels. They're still on your computer. What's happend is you've likely done an update and altered a dependency of them packages.

Here is how you can fix your issue. I will use the clock applet as an example, and you've got to obviously use your common sense and switch the appropriate parts to suit your two issues. I've used the Clock applet in my example because i've had this issue with the clock before, i know it works, and i currently don't have gnome installed and so, can't write this to suit your applets, (because i don't want to make mistakes).

Steps to Fix:
1. find the applets file:
The clock applet and others are located at
Code:

/usr/lib/bonobo/servers/GNOME_ClockApplet_Factory.server
If you are using a 64bit distro, it will be lib64 instead of lib.

2. Searhing for location of the applets execitable file:
Code:

cat /usr/lib/bonobo/servers/GNOME_ClockApplet_Factory.server | grep location
that is the same path mentioned in step 1. 'cat' displays the text in the desired file, 'grep' searches for keywords, so combining them with a '|' it displays the text of the seached keyword.
The result will look something like below.
Code:

location="/usr/lib/gnome-panel/clock-applet">
location="OAFIID:GNOME_ClockApplet_Factory">

You've now found out that the location is at /usr/lib/gnome-panel/clock-applet

3. Search on libs, which it is missing:
Code:

ldd /usr/lib/gnome-panel/clock-applet | grep "not found"
The output will be a library and look something like below.
Code:

libcroco-0.6.so.3 => not found
4. Fix it
So now you know what's missing, you need to find out why. Go to /usr/lib or /usr/lib64 and search for that lib. It is likely you will have it there, but the version is not there. Create a symlink of the file to the same directory and name the symlink the right version.

And that's it. I hope that's helped. :)

4. And install the missing libs.

Concert 05-05-2012 09:51 AM

Knightron, Many thanks. I have found one applet file in

Code:

concert@i3model2120:~$ /usr/share/gnome-2.0/ui/GNOME_WorkspaceSwitcherApplet.xml
so I attempted to modify your instructions as follows:

Code:

concert@i3model2120:~$ cat /usr/share/gnome-2.0/ui/GNOME_WorkspaceSwitcherApplet.server | grep location
but when I ran it, got the following back.
Code:

cat: /usr/share/gnome-2.0/ui/GNOME_WorkspaceSwitcherApplet.server: No such file or directory
Did I not modify the instruction correctly?

I didn't understand this part of the cat instruction: "/usr/share/gnome-2.0/ui/", so I tried this as well:
Code:

concert@i3model2120:~$ cat GNOME_WorkspaceSwitcherApplet.server | grep locationcat:
and got the same result:
Code:

GNOME_WorkspaceSwitcherApplet.server: No such file or directory
Apology for my confusion on this but I am definitely a newbie at the command line.

Concert 05-05-2012 10:01 AM

I must be doing something wrong with the cat command, because I tried this:

Code:

concert@i3model2120:~$ cat /usr/share/gnome-2.0/ui/GNOME_WorkspaceSwitcherApplet.xml | grep location
and just got the prompt back:

Code:

concert@i3model2120:~$

Knightron 05-05-2012 11:24 PM

Ok i've installed Debian squeeze with gnome onto a vm. I don't have that version of Ubuntu, and Debian Squeeze has a very similar version of gnome so this info should be relevant.

Wow, that was not as simple as i thought. I see why you couldn't find the applet; i've just spent the last 50 min working it out. Did a lot of googling and found other post you'd made in different forums; and in the end still got no answers. using a long system of process of elimination to work out the right applet; Your workspace switcher is called 'GNOME_Wncklet_Factory.server' at '/usr/lib/bonobo/servers/'.

Tell us what happens when you enter this command.
remember it will be lib64 if you're running a 64 bit version of Ubuntu
Code:

cat /usr/lib/bonobo/servers/GNOME_Wncklet_Factory.server | grep location

tailinlinux 05-06-2012 09:54 PM

Go to panel.

Press right click.

Select add to panel.

Look for Workspace Switcher.

Maybe this one help.
Aries


All times are GMT -5. The time now is 02:46 AM.