The Linux Page

New Ubuntu Desktop: Unity How To

The page you requested does not exist. A search for ubuntu 1804 keyboard mouse tricks setting them resulted in this page.

You may also be interested by my new page:

Ubuntu 18.04 keyboard and mouse tricks and setting them up

I love Linux and use Ubuntu, but all of a sudden you don't have support for Gnome. Instead they now force you to use Unity. It's probably a good idea to go with the flow because trying to maintain Gnome is probably a hell of a lot of work so...

Losing your settings all the time? Check out When I lose gnome settings...

I have to have a few things in my window system:

1) Menus MUST be attached to the window I'm using. I don't like the Macintosh way. Sorry. To remove the menus from the top, run the following command:

sudo apt-get remove appmenu-gtk appmenu-gtk3 appmenu-qt

(Source: lifehacker)

I have found out that in Ubuntu 13.04 you have a new version of appmenu that you can remove with:

sudo apt-get remove appmenu-qt5

There are people who say that the indicator-appmenu should be removed too:

sudo apt-get remove indicator-appmenu

This last one does NOT take effect until you restart X11 (log out and back in). Once you restart X11, your menus will be back where they belong.

Now Firefox decided to have their own mechanism. In the old days, it was just an extension (up to version 21.x.) and disabling that extension would do it. Since version 22.0, it changed to a flag in the configuration. This is changed by going to your firefox configuration screen: about:config, search for unity, and toggle the flag there. Here is a screenshot:

Flag to tweak to get the menus back inside of the FIrefox window when on Unity.

(Source: askubuntu)

2) My windows MUST auto-focus when the mouse goes over them. How would I be able to type otherwise?! Oh! Yeah! Click on the window. Did you ever noticed that when you click on that other window you cannot see what you need to see to copy in the new window? Well... there you go. Gnome at an option... let's see for Unity!

gconf-editor

Then open /apps/metacity/general go down to the focus_mode and enter "mouse" or "sloppy" then enter. Also by default auto_raise is probably selected. Click on it to deselect if you hate that feature.

In newer versions of Ubuntu, the gconf-editor may not work very well. Try the gnome-tweak-tool instead (see point 6) and click on Windows for this "mouse" or "sloppy" feature. This can also be found in the General Options of the CompizConfig tool. Actually, the Auto-Raise feature must be tweaked in that tool. You can find the CompizConfig tool using the Dash or run it from the command line with:

ccsm

WARNING: If you are on Ubuntu 17.10 or newer, you probably do not want to install anything which involces Unity.

The tool comes from the compizconfig-settings-manager package, if you don't have it installed:

sudo apt-get install compizconfig-settings-manager

(Source: askubuntu)

3) Now I also MUST have Alt-F1, Alt-F2, and Alt-F3 to switch between my first 3 workspaces. I had that correctly setup before, but it went bust when upgrading to 11.10. Anyway, I found out that it was also under the gconf-editor, this time go to:

/apps/metacity/global_keybindings

and check the switch_to_workspace_1, _2, _3. Although I have 4 workspaces, I don't use Alt-F4 to go there because under MS-Windows Alt-F4 closes windows and once in a while I'd use it and bing! Not happy...

Problem is Alt-F1 and Alt-F2 are already defined in Unity, so you want to remove the default bindings from:

/apps/compiz-1/plugins/unityshell/screen0/options

There you'll find the keyboard focus and run command entries that make use of those two key combinaisons.

By the way, using Alt-F1, F2, etc. is the same in my Linux consoles (before I start X) and that's why I use those. Bad habit?! 8-)

4) Missing icons in top menu bar! When I upgraded and tested Ubuntu 11.10, the icons in the top menu bar were missing. When installing from scratch, it's fine. I suspect that the upgrade has a little flow and I've other people talking about it. Although it is still possible to click on the system menu (far top-right corner) and thus access the Log Out menu item, it's definitively not self explanatory!?

This happened again, Ubuntu 12.10 and Ubuntu 13.10 each got it wrong. Ubuntu 13.04 corrected Ubuntu 12.10, but I stayed quite a while on Ubuntu 13.10 so I looked for an answer on that one. No one replied, but I finally found it using wmctrl which listed my windows and shown me that the problem is that the window with the icons is BEHIND the window used by Unity to display the window menu "a la Macintosh". To fix the problem, I now have a script which goes like this:

#!/bin/sh
PANEL_XID=`wmctrl -l | awk '/Top Expanded Edge Panel/ { print $1 }'`
wmctrl -i -r $PANEL_XID -b add,above

I would imagine that this will work as is for you as the name of the panel should be the same on your system.

WARNING: moving the panels order may prevent you from using your windows menu if you are still in the 'a la Macintosh' mode. You can always move the unity-panel above in a similar fashion. It may be required to "remove" the above property with:

wmctrl -i -r some-XID -b remove,above

To get the XID of a window, use the wmctrl list command:

wmctrl -l

You may find more information about all of this on SourceForge where I posted the question:

http://askubuntu.com/questions/436590/lost-all-my-applets-last-time-i-up...

5) CPU, Memory, Network, etc. indicator in my toolbar. Very important to monitor your system.

sudo add-apt-repository ppa:indicator-multiload/stable-daily
sudo apt-get update
sudo apt-get install indicator-multiload

Once installed, it should automatically appear in your top bar (it did for me under Ubuntu 12.04)

If it doesn't appear, search for it and start it (click on the icon that appears from your search.)

(Source: Network, Memory And CPU Usage Indicator For Ubuntu: System Load Indicator)

6) I had a bit of a hard time with the orange in that Unity theme, I use 4DWM and the orange just doesn't make it. So I tried to change the theme. The default theme handler only offered me 4 themes which I did not want. Since Unity is itself Gnome 3, I instead installed the tweak tool and played with that:

sudo apt-get install gnome-tweak-tool
gnome-tweak-tool

This is a graphical tool, just click on Themes and select whatever you want. There are quite a few options so it may take you a bit of time.

Note that the gconf-editor also gives you access to that information (desktop / gnome / shell / windows) but you need to know what you're doing (I don't in this case!) and it doesn't refresh your screen automatically (people suggest you log out and back in when using gconf-editor which if you don't know what you're doing is going to take you hours to get the right settings!)

(Source: How do I change window theme in 11.10?)

7) Wow! No screensaver!? It's called "Brightness & Lock"

The Lock, it seems, is ON by default and I don't need it at home (really). So I wanted to turn that off and looked for a screensaver but could not find it. No wonder. "Brightness" == "Screensaver"!?!?

8) Shadows make my windows jump to another workspace?! [Fixed!]

I use 3 workspaces, although I have 4 defined and very rarely use the 4th one. In Unity, they added shadows around the windows and no real way to remove those shadows. Placing my windows on the 2nd workspace, on the right edge would make my windows jump to the 1st workspace!!! Since I could not remove the shadows (I tried to put their radius to zero but it did not have any effect, maybe I need to restart, I'll see next time I restart X11.)

Instead, I changed my workspaces to a 4x1 instead of the default 2x2. That works because the shadow leaks in the 3rd workspace and thus doesn't need to jump to the first workspace (to be visible)! This is done in the CCMS (CompizConfig Settings Manager) You can find it with Dash and go to General Options and then click on the Desktop Size tab. There you will see the number of vertical and horizontal virtual workspaces! (In my case I have 4, 1, 1).

I do consider that a bug though. Shadows and even borders or even no jumps at all, what the heck? Actually, my browser started jumping too today!

Actually, I found the shadow in CCMS but did not test to know whether it would solve the problem... but since you cannot set the radius to zero, it's unlikely that it would work.

This got fixed! Actually the whole problem of auto-moving windows is gone. I do not know whether there is a flag to turn it back on (for those who liked it?!) but I'm sure glad that its gone!

(Source: Compiz cube not working with 12.04 in gnome classic or unity)

9) Animations -- when opening/closing things, moving, etc. and when switching between workspaces.

The first set of animations appear as Animations in the CCMS main window, just disable that and you're good to go!

For the animations switching between workspaces, that's under Desktop » Desktop wall » Viewport Switching and there you can set the Wall sliding duration to zero. Then you can go from Viewport (workspace) to Viewport instantaneously.

10) Adding or editing your Ubuntu launchers in Unity (11.10, 12.04, etc.)

Before (up to 11.04) you could edit launchers by right clicking on them in the menu and select Edit Properties. Now you have to find the .desktop file to edit said properties, the right mouse click doesn't give you that option now. The normal location, it seems, is:

~/.local/share/applications

However, if you upgraded your system, opposed to installing a fresh 11.10 or 12.04, then your icons will instead be in the following (older) folder:

~/.gnome2/panel2.d/default/launchers

Either way you'll find .desktop files in those folders. You can edit them using a right mouse click and Properties. There you'll find your good old launcher parameters.

I noticed that if you changed the name it would create a new file. Use with caution: change the name, close, then reopen. Otherwise you'll change the options of the old files! You can create new launchers by copying existing ones too end editing them either with a text editor or the Properties option.

To make it handy, there is a sample Application icon text (i.e. content of a .desktop file):

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=thunderbird
Name[en_US]=Thunderbird
Comment[en_US]=e-Mail
Name=Thunderbird
Comment=e-Mail Client
Icon=thunderbird
Exec=/home/alexis/tools/thunderbird/starter
GenericName[en_US.UTF-8]=Shredder which doesn't load the same message forever

11) Wow! Cool! gVim is working now! Not true... works a bit better and only for that session!?

Update: I'll have to confirm that with time, but it looks like this is finally fixed. I upgraded to Ubuntu 13.04 and it looks like gvim does print the complete list of files as expected when I use ":ls". It sounds like this is true, only it can take a second before it corrects itself.

I have had a rendering problem with gVim, quite often I would use Ctrl-^ to switch between files and the rendering would be mangled (old & new files overlapped) and nearly every time I was using :ls the list of files would not come out right.

I found out today that the culprit was compiz that does not correctly handle XGL by default (at least for me). They have flags that you can change to fix the problem and it worked for me!

In the screenshot below you can see that I turned ON the two XGL fixes: "Fix screen updates in XGL with fglrx", and "Force synchronization between X and XGL". I tried with one or the other and it didn't fix the list properly. I tried to turn them off after I tried with them turned on and the rendering broke again. Hurray!

CompizConfig

12) Getting acroread

I have acroread and it works very nicely on my main server. I wanted to install that on my 2 new servers running Ubuntu 12.10 and was wondering how I even got it installed on my system!? The fact is that it is available in the partners repository which is not available by default. There are the commands to get that in place:

sudo add-apt-repository "deb http://archive.canonical.com/ precise partner"
sudo apt-get update
sudo apt-get install acroread

These commands add the repository in question, update the apt-get cache, and finally install acroread. It is likely to take a while because it makes use of many i386 (32bit) libraries that you are not likely to already have on your system (especially if it is a fresh install.)

14) Scrollbar Arrows are missing

I have had that problem before, but as I upgraded to 13.04 it happened again. Ubuntu or Gnome, rather, has strange ideas about scrollbars. They now hide the arrows at the ends. I often find it very practical to have arrows so I searched for a solution and found one here: http://askubuntu.com/questions/200938/question-about-gtkscrollbar-class-... which says you have to edit the gtk-widgets.css file of your theme. I looked at the files in my theme and I could not see any such file. Instead, I edited said file of the Ambiance and Radiance themes and then the arrows appeared. No need to even restarted X-Windows, only the applications that have scrollbars.

The following shows the contents of the files I changed:

.scrollbar,
.scrollbar.vertical {
    -GtkScrollbar-has-backward-stepper: 1;
    -GtkScrollbar-has-forward-stepper: 1;
    -GtkRange-slider-width: 14;

    border-radius: 20px;

    border-image: none;
}

The -GtkScrollbar-has-[back/for]ward-stepper variables were set to 0 by default. I put 1 instead.

Although I don't think it helped, I lost my arrows again when I upgraded to 13.10 and I only had to edit the /usr/share/themes/Adwaita/gtk-2.0/gtkrc file to get everything fixed. Since I'm running Gnome 3.6+, I'm not so sure that gtk-2.0 files are being used at all, but I may be wrong. That file was still using an old format:

GtkRange::stepper-size                   = 13
GtkScrollbar::has-backward-stepper       = 1  
GtkScrollbar::has-forward-stepper        = 1

Similarly I put 1 instead of zero in those two variables. And as the person on askubuntu mentioned, if the stepper size is zero, put 13 in there.

Save and enjoy!

15) Gnome Calculator has no menus, Ubuntu 13.04

At first I was thinking that they installed some sort of crap calculator, but looking closer into it, the gnome-calculator gets started and yet it looks like stuff I can do with expr in my command line shell.

Looking closer in the matter, the fact is that if you remove the global menus:

apt-get remove indicator-appmenu

Then the global menu is gone and the app. does not know what to do about it at that point. This is a bug and it needs to be resolved for us to have a fix.

Source: https://bugs.launchpad.net/ubuntu/+source/gnome-calculator/+bug/1230172