Ubuntu HowTo: How to update graphics drivers on ubuntu?

Original Source Link

I’m trying to get Blender 2.8 and Unity Game Engine to work on my Ubuntu laptop but I keep getting errors related to my graphics driver. The main problem seems to be that I need OpenGL 3.3. Is there any way to update this?
Blender gives the following error:

Error! Unsupported graphics card or driver.
A graphics card and driver with support for OpenGL 3.3 or higher is required.
The program will now close.

Unity gives the following error:

Fatal Error: Failed to initialize Unity graphics

Some info:

$sudo lshw -c video

  *-display                 
   description: VGA compatible controller
   product: Park [Mobility Radeon HD 5430/5450/5470]
   vendor: Advanced Micro Devices, Inc. [AMD/ATI]
   physical id: 0
   bus info: [email protected]:01:00.0
   version: 00
   width: 64 bits
   clock: 33MHz
   capabilities: pm pciexpress msi vga_controller bus_master cap_list rom
   configuration: driver=radeon latency=0
   resources: irq:16 memory:a0000000-afffffff memory:c4400000-c441ffff ioport:3000(size=256) memory:c4440000-c445ffff

  *-display
   description: VGA compatible controller
   product: Core Processor Integrated Graphics Controller
   vendor: Intel Corporation
   physical id: 2
   bus info: [email protected]:00:02.0
   version: 02
   width: 64 bits
   clock: 33MHz
   capabilities: msi pm vga_controller bus_master cap_list rom
   configuration: driver=i915 latency=0
   resources: irq:30 memory:c0000000-c03fffff memory:b0000000-bfffffff ioport:4050(size=8) memory:c0000-dffff

$lspci -nnk | grep -i vga -A3 | grep 'in use'

    Kernel driver in use: i915
    Kernel driver in use: radeon

$lspci -k | grep -EA3 'VGA|Display|3D'

    00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02)
    Subsystem: Hewlett-Packard Company Core Processor Integrated Graphics Controller
    Kernel driver in use: i915
    Kernel modules: i915
--
    01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Park [Mobility Radeon HD 5430/5450/5470]
    Subsystem: Hewlett-Packard Company Park [Mobility Radeon HD 5430/5450/5470]
    Kernel driver in use: radeon
    Kernel modules: radeon

$glxinfo | grep OpenGL

    OpenGL vendor string: Intel Open Source Technology Center
    OpenGL renderer string: Mesa DRI Intel(R) Ironlake Mobile 
    OpenGL version string: 2.1 Mesa 19.2.8
    OpenGL shading language version string: 1.20
    OpenGL extensions:
    OpenGL ES profile version string: OpenGL ES 2.0 Mesa 19.2.8
    OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
    OpenGL ES profile extensions:

Tagged : / /

Ubuntu HowTo: How can I change the icon of an application in the Unity launcher?

Original Source Link

I’m trying to change the icon of a specific application (Pidgin) in my Ubuntu 11.10 Unity launcher. I have tried searching in the options and in the Compiz settings but could locate no option for changing individual icons.

I can change the theme but that’s not what I want.

I am willing to edit configuration files to get this change. It doesn’t have to be a UI solution.

For Ubuntu 11.10


The first thing you would need to do is take a .png icon file that you would like to use and copy it to the respective ~/.local/share/icons/hicolor/ directory. This will contain the following directories (which are the dimensions of the icons) : 16x16/apps/ 32x32/apps/ 48x48/apps/

I downloaded a free 16×16 free icon sampler and picked a 16×16 icon called Alien.png

I took the Alien.png file and copied it to ~/.local/share/icons/hicolor/16x16/apps, When you copy yours, you can do that through either the GUI or terminal.

From there you would need do the following in a terminal (you may need sudo to copy this over):

cp /usr/share/applications/pidgin.desktop ~/.local/share/applications/

Next edit the pidgin.desktop file:

vi ~/.local/share/applications/pidgin.desktop

Look for the line that says:

Icon=pidgin

This will need to change to the new icon name without the .png prefix…

Icon=Alien

Save your changes… Then logout and log back in.

Please let me know if this helps or if you need more assistance.

The way that I did it was go to /usr/share/applications/<whatever app your looking for> then right click to properties click on the icon on the left and select the image that you want to be the icon.

You will have to sudo nautilus to edit the icon. Then just exit and search the program in Unity and it will show up with the selected icon.

For Ubuntu 12.04


In addition to the excellent answer given by itnet7, I would like to add that in Ubuntu 12.04 I had to also add ~/.local/usr/applications/icons/hicolor/64x64/apps in order for Unity to see the icon.

To resize your custom icon, you can use the excellent imagemagick package.

sudo apt-get install imagemagick

Then run the command mogrify -resize 64x64! myImage.png in order to get your custom icons nicely scaled down to the desired resolutions.

If you run the command below after creating the desktop icon and locked the application to your launcher, it will update unity without a need for a reboot.

unity --replace & 

as described here:
application locked to launcher without icon

  1. Install Main Menu (AKA Alacarte) alacarte Install alacarte
  2. Open Main Menu
  3. Click on a program and select Properties in the right menu.
  4. Click on the icon
  5. Browse for your new icon and click Open
  6. Close your programs properties
  7. Close Main Menu

No logging out or reboot required 😉

For Ubuntu 14.04

In order to link an icon with a certain application that could be placed on the launcher, do the following on the command line:

Take e.g. an application called alpha_app with its icon alpha_app.png:

  1. execute:

     sudo cp alpha_app.png /usr/share/pixmaps/
    

    The above command copies your icon with file name alpha_app.png to the appropriate folder.

  2. Execute:

     sudo gedit /usr/local/share/applications/alpha_app.desktop
    
  3. In gedit, change the name of the icon as follows:

     Icon=alpha_app.png
    

    If the file alpha_app.desktop doesn’t exist in /usr/local/share/applications/, execute locate alpha_app.desktop and copy it there. In the unlikely event that this is unsuccessful, it means that there is no alpha_app.desktop file anywhere in the disk and that you would need to create it yourself.

  4. Go to the dash and type the name of your application, in our example alpha_app.

  5. Pick the icon from Dash and move in onto Launcher.

Τέλος! The end!

I did this in Ubuntu 14.04.

I wanted to give a decent launcher icon to the “Dolphin” file manager (I wanted a dolphin for Dolphin).

I dread using complicated program and system file edits, because it is easy to mess up things. I like to keep it simple. So, instead of all these programming acrobatics …

  1. I prepared my dolphin picture.

    Best to use a picture with a transparent background (typically a png), because the desktop background will show through it nicely (it won’t be in its isolated own rectangle). As for size, my picture’s file size is about 200 kB with a dimension of about 560×640 pixels. This size matches the other icons nicely.
    So, I had this picture ready in the normal “Pictures” folder.

  2. Then I typed into Terminal:

    sudo nautilus /usr/share/applications
    

    enter, and the panel with your applications comes up (represented by the current icons)

  3. Find the application you want to change the launch icon for, right click on its icon, then click on its “properties”

  4. At the top left of the properties panel you will see the current launch icon that you want to change to your own choice

  5. Now just left-click on that icon in the top left corner of the properties panel, and a new panel opens that asks you to select a custom icon to replace the old one with

  6. Find your prepared picture (it is like in a file manager), and select it

  7. Your selected new icon appears in the properties panel

  8. For the new icon to start showing among the launch icons, you need to restart your PC, and lo behold, there’s your custom icon!

For Ubuntu 12.10


The directory that contains the following directories (which are the dimensions of the icons) has been changed to:

~/.local/share/icons/unity-webapps/apps

and if you do ls :

128  16  192  22  24  32  48  64  96

In 13.04 I installed Nemo to get rid of nautilus-for-armless-toy.

I wanted the icon folder-house in the launcher.

I opened ~/.local/share/applications/nemo.desktop with gedit to have a look, and found a line

icon=folder 

(no path, no extension ???)

I tried searching in /usr/share/ for the usual default icon of nautilus which appeared to be called folder_home.png or .svg, I couldn’t decide which. There were a bunch a files with the same name in various folders, so in the end I just changed the line to

icon=folder_home

and after logging out and back in the icon was changed.

Tagged : /

Ubuntu HowTo: gtk.css – How to add blurry background effect?

Original Source Link

How to add blurry glass effect into the themes? (CSS3 supports gaussian blur with blur(1px); on many browsers)

When I drop the opacity, I’m getting a result like this:

Terminal Background & Panel without blur effect

But I want a blur effect like this:

Finder Panel with blur effect

In Addition for understanding the blur effect:

enter image description here

Thanks!

I was also wondering this recently, and from what I understand I don’t believe that gtkcss supports filters at the minute.

The method I came around was to add a shader effect to a clutter (mutter) actor through a glsl shader.

I managed to get it working to a good blur effect, the example I was working off was a GNOME extension called blyr.

My glsl file and code for my project can be found here, for reference.

And you can call the glsl in code and apply it to the actor with something like

    var shaderEffectVer = new Clutter.ShaderEffect(Clutter.ShaderType.FRAGMENT_SHADER);
    var wallpaper_actor = new GtkClutter.Actor ();

    shaderEffectVer.set_shader_source("shader.glsl"));
    shaderEffectVer.set_uniform_value("dir", 1.0);
    shaderEffectVer.set_uniform_value("width", g_width);
    shaderEffectVer.set_uniform_value("height", g_height);
    shaderEffectVer.set_uniform_value("radius", 10.0);
    shaderEffectVer.set_uniform_value("brightness", 0.98);
    wallpaper_actor.add_effect_with_name("blur",shaderEffectVer);

Hope that helps you

Tagged : / / /

Ubuntu HowTo: How to change tooltip background color in Unity?

Original Source Link

In a lot of applications the tooltips are just plain ugly (White text on black background, way too much contrast) or even unreadable (black or dark blue text (Hyperlinks) on black background). I want to change the background color of the tooltips to some medium gray or even some yellow or something like that, maybe even something semi-transparent.

Here is a screenshot of Eclipse which displays some source code in a tool tip with black text on black background:

Eclipse with an unusable tooltip

Switching to a different theme (Something other than Ambiance or Radiance) helps but I like Ambiance and I want to keep it. It’s just this darn tooltip color which is absolutely unacceptable.

I found several solutions for older Ubuntu versions but they no longer work with Unity in Ubuntu 11.10 because I can’t find any function to customize the Ambiance or Radiance theme. So how do I do that in the current Ubuntu version?

Install and open gnome-color-chooser Install gnome-color-chooser.

Go to SpecificTooltips and put black foreground over pale yellow background.

Found it!

I had to edit these files:

/usr/share/themes/Ambiance/gtk-3.0/settings.ini
/usr/share/themes/Ambiance/gtk-3.0/gtk.css
/usr/share/themes/Ambiance/gtk-2.0/gtkrc

(Addition: for Ubuntu 12.04, it seems youjust have to modify the file:
/usr/share/themes/Ambiance/gtk-2.0/gtkrc , replacing the tooltip backround and foreground color, with the #000000 and the #f5f5b5 color, respectively)

You require root privileges to edit the files. Use gksudo gedit to edit them.

Search for tooltip in these files and you’ll find the color definitions for the foreground and the background. I use #000000 as foreground and #f5f5b5 as background and now the tooltips in all applications are again readable. After changing the color values simply switch to some other theme and then back to Ambiance and the tooltip color is now fixed.

Here is the result:

Eclipse with customized theme

If you want to change the tooltip colors for all apps then install and run gnome-color-chooser and go to Specific tab > Tooltips. Check the boxes for Foreground and Background and choose colors.

How it works (you can do this manually):

gnome-color-chooser adds the following to your ~/.gtkrc-2.0:

include ".gtkrc-2.0-gnome-color-chooser"

and ~/.gtkrc-2.0-gnome-chooser:

style "gnome-color-chooser-tooltips"
{
  bg[NORMAL] = "#FFFFAF"
  fg[NORMAL] = "#000000"
}
widget "gtk-tooltip*" style "gnome-color-chooser-tooltips"

If you just want to change the tooltip colors for a single app, such as eclipse, then put the above text into a custom gtkrc file (e.g. ~/gtkrc-eclipse) and start eclipse with GTK2_RC_FILES=~/gtkrc-eclipse eclipse

I created a small script that does that for you

#/bin/sh
# Tooltip fix
# A script to fix themes files in Ubuntu 11.10
#  to have readable tooltips in applications such
#  as eclipse.
# The script edits the gtk.css, settings.ini and gtkrc files
# Author: Victor Pillac
# http://victorpillac.wordpress.com

if [[ $EUID -ne 0 ]]; then
  echo "This script must be run as root" 1>&2
  exit 1
fi  

path=/usr/share/themes
theme=Ambiance

if [ $# = 1 ]; then
  theme=$1
fi

echo "Fixing tooltips for theme $theme"
echo " (you can select a different theme by passing its name as argument)"
sed -i 's/tooltip_bg_color #000000/tooltip_bg_color #f5f5b5/g' $path/$theme/gtk-3.0/gtk.css
sed -i 's/tooltip_fg_color #ffffff/tooltip_fg_color #000000/g' $path/$theme/gtk-3.0/gtk.css
sed -i 's/tooltip_bg_color:#000000/tooltip_bg_color:#f5f5b5/g' $path/$theme/gtk-3.0/settings.ini
sed -i 's/tooltip_fg_color:#ffffff/tooltip_fg_color:#000000/g' $path/$theme/gtk-3.0/settings.ini
sed -i 's/tooltip_bg_color:#000000/tooltip_bg_color:#f5f5b5/g' $path/$theme/gtk-2.0/gtkrc
sed -i 's/tooltip_fg_color:#ffffff/tooltip_fg_color:#000000/g' $path/$theme/gtk-2.0/gtkrc
echo "Done"

I’ve adopted a slightly different solution;

First create a new script, eclipse.sh, that starts eclipse, mine look like this:

#!/bin/bash
GTK2_RC_FILES=/usr/share/eclipse/gtkrc-2.0-eclipse /usr/share/eclipse/eclipse

Then create the gtkrc file (/usr/share/eclipse/gtkrc-2.0-eclipse), mine look like this (it have some other changes as well to make better use of the screen):

style "my-tooltips"
{
  bg[NORMAL] = "#FFFFAF"
  fg[NORMAL] = "#000000"
}
widget "gtk-tooltip*" style "my-tooltips"

style "gtkcompact" 
{
    font_name="Ubuntu Light 11"

    GtkButton::default_border={0,0,0,0}
    GtkButton::default_outside_border={0,0,0,0}
    GtkButtonBox::child_min_width=0
    GtkButtonBox::child_min_heigth=0
    GtkButtonBox::child_internal_pad_x=4
    GtkButtonBox::child_internal_pad_y=4
    GtkMenu::vertical-padding=1
    GtkMenuBar::internal_padding=0
    GtkMenuItem::horizontal_padding=4
    GtkToolbar::internal-padding=1
    GtkToolbar::space-size=1
    GtkOptionMenu::indicator_size=0
    GtkOptionMenu::indicator_spacing=0
    GtkPaned::handle_size=4
    GtkRange::trough_border=0
    GtkRange::stepper_spacing=0
    GtkScale::value_spacing=0
    GtkScrolledWindow::scrollbar_spacing=0
    GtkExpander::expander_size=10
    GtkExpander::expander_spacing=0
    GtkTreeView::vertical-separator=0
    GtkTreeView::horizontal-separator=0
    GtkTreeView::expander-size=10
    GtkTreeView::fixed-height-mode=TRUE
    GtkWidget::focus_padding=0
    GtkTreeView::vertical-separator = 0
}

class "GtkWidget" style "gtkcompact"

style "gtkcompactextra" 
{
    xthickness=0
    ythickness=0
}

class "GtkButton"   style "gtkcompactextra"
class "GtkToolbar"  style "gtkcompactextra"
class "GtkPaned"    style "gtkcompactextra"
class "GtkNotebook" style "gtkcompact"

For CDT do the following:

Window>Preferences>C/C++>Editor: Appearance Color Options>Source Hover Background

Uncheck System Default, and select a color.

Unfortunately there’s no Eclipse-wide setting that I know of. Pretty lame. You shouldn’t have to set stuff like that for every perspective.

I think this one is solved. I got it showing the tooltip with black letters on white background. In my case, it seems that Eclipse is using settings fot tooltips from gtk-2.0/gtkrc file from theme directory.

My setup: Ubuntu 12.04, Gnome (Not Unitiy), Eclipse Indigo (3.7), GrayDay theme for Gnome. The name of theme and theme itself is not importat.

Open the terminal, change to the theme directory (cd $HOME/.themes) and there, go to the directory of your theme. If your .themes direcotry if empty of it doesn’t exist, then, you are using system theme which is in /usr/share/themes. Just figure out the name of the theme you are using (right click on bakcground, choose Change Desktop Background, the theme name should be in the lower right corner. If it says nothing about theme name, then use gnome-tweak-tool to find out which theme you are using).

In the theme directory, issue this command:

grep -r tooltip *

it should list all of the files and lines where keywork “tooltip” is mentioned. Change every background (tooltip_bg_color) to #ffffff and every foreground to #000000. Black latters on white foreground, this is what we want! Especially, change values in the gtk-2.0/gtkrc file.

Mistake I was doing, is chainging tooltip color in the gtk-3.0 directory, which didn’t have any effect.

Now, go to the Eclipse, Window -> Preferences -> Java -> Editor and set Source Hover Background to the “System color” (check on the right). Restart the Eclipse!

This is listig of grep -r tooltip * from my theme directory after doing changes:

gtk-2.0/gtkrc:gtk-color-scheme  = "tooltip_fg_color:#000000ntooltip_bg_color:#ffffffnlink_color:#0033ff"
gtk-2.0/gtkrc:style "tooltips" {
gtk-2.0/gtkrc:  bg[NORMAL]  = @tooltip_bg_color
gtk-2.0/gtkrc:  fg[NORMAL]  = @tooltip_fg_color
gtk-2.0/gtkrc:  GtkWidget::new-tooltip-style    = 0
gtk-2.0/gtkrc:# The window of the tooltip is called "gtk-tooltip"
gtk-2.0/gtkrc:widget "gtk-tooltip*"             style "tooltips"
gtk-3.0/gtk.css:/* @define-color tooltip_bg_color #343434; */
gtk-3.0/gtk.css:/* @define-color tooltip_fg_color #ffffff; */
gtk-3.0/gtk.css:@define-color tooltip_bg_color #ffffff;
gtk-3.0/gtk.css:@define-color tooltip_fg_color #343434;
gtk-3.0/gtk.css:@define-color theme_tooltip_bg_color @tooltip_bg_color;
gtk-3.0/gtk.css:@define-color theme_tooltip_fg_color @tooltip_fg_color;
gtk-3.0/gtk-widgets.css:.tooltip {
gtk-3.0/gtk-widgets.css:    background-color:   @theme_tooltip_bg_color;
gtk-3.0/gtk-widgets.css:    color:              shade(@theme_tooltip_fg_color, 0.90);
gtk-3.0/gtk-widgets.css:.tooltip * {
gtk-3.0/gtk-widgets.css:    background-color: @theme_tooltip_bg_color;
gtk-3.0/settings.ini:gtk-color-scheme   = "tooltip_fg_color:#343434ntooltip_bg_color:#ffffffnlink_color:#4a90d9"
gtk-3.0/settings-default.ini:gtk-color-scheme   = "tooltip_fg_color:#343434ntooltip_bg_color:#ffffffnlink_color:#4a90d9"

There is also another solution to this:
use dconf-editor to find the following key:

org->gnome->desktop->interference->gtk-color-scheme

whose description said:
A n separated list of name:color as defined by the gtk-color-scheme setting.

Write the scheme in gedit in the style likes the following(this example is mine), then paste it in the dconf-editor(notice the ‘n’ at each end of the line):

fg_color:#4c4c4c4c4c4c
bg_color:#f2f2f1f1f0f0
text_color:#3c3c3c3c3c3c
base_color:#ffffffffffff
selected_fg_color:#ffffffffffff
selected_bg_color:#f0f077774646
tooltip_fg_color:#ffffff5a0e74
tooltip_bg_color:#14a784edd8b6

and the problem will be solved immediately.

My tooltips are black-on-yellow. See screenshot below from Ubuntu 16.04 LTS with MATE DE:

Black-on-Yellow tooltip

If you like such color combination, use 2 gtkrc (1 for GTK3, 1 for GTK2) files below:

mkdir -p ~/.config/gtk-3.0/
cat << EOF >> ~/.config/gtk-3.0/gtk.css
/* tooltips */
@define-color tooltip_bg_color #ffffaf;
@define-color tooltip_fg_color #000000;
tooltip label,
.tooltip label {
    text-shadow: none;
}
EOF
cat << EOF >> ~/.config/gtk-3.0/settings.ini
[Settings]
gtk-color-scheme = "tooltip_bg_color:#ffffafntooltip_fg_color:#000000"
EOF

cat << EOF >> ~/.gtkrc-2.0
style "gnome-color-chooser-tooltips"
{
  bg[NORMAL] = "#FFFFAF"
  fg[NORMAL] = "#000000"
}
widget "gtk-tooltip*" style "gnome-color-chooser-tooltips"
EOF

The 3rd file is only for GTK2-based applications.

The method above was tested on Ubuntu 14.04 LTS (Unity and GNOME), Ubuntu 16.04 LTS (Unity, GNOME, MATE), Ubuntu 18.04 LTS (Unity, GNOME, MATE), Ubuntu 20.04 LTS (MATE).

I was having same problem (Xubuntu 12.04, Greybird theme, Eclipse Indigo) and Mihael K’s answer worked for me.
The only file I changed was gtk-2.0/gtkrc and I only changed one line.
The third line after the initial comments. Changed the hex color values of tooltip_bg_color:#000000 to tooltip_bg_color:#ffffe1 and tooltip_fg_color:#ffffff to tooltip_fg_color:#000000. So the line will look like this:

gtk_color_scheme        = "tooltip_bg_color:#ffffe1ntooltip_fg_color:#000000" # Tooltips.

Restarted elipse and tooltips are now the yellowish color I’m accustomed to. I didn’t need to do any further tweaks in eclipse or any of the other files.

On ubuntu 12.10 (quantal) you can use the following two commands:

#foreground white => black
sudo sed -i s/tooltip_fg_color:#ffffff/tooltip_fg_color:#000000/g  /usr/share/themes/Ambiance/gtk-3.0/settings.ini /usr/share/themes/Ambiance/gtk-3.0/gtk.css /usr/share/themes/Ambiance/gtk-2.0/gtkrc
#background black => yellow
sudo sed -i s/tooltip_bg_color:#000000/tooltip_bg_color:#f5f5b5/g  /usr/share/themes/Ambiance/gtk-3.0/settings.ini /usr/share/themes/Ambiance/gtk-3.0/gtk.css /usr/share/themes/Ambiance/gtk-2.0/gtkrc

(Thanks to the other answers that helped me to figure this out!!)

A more user-friendly way to change the background is using the UI. Open System, Preferences, Appearance. By default “Ambiance” theme will be selected, but you can change it for any theme. Click on Customize button below and switch to Colors tab. There you can change foreground and background colors for tooltips by clicking on appropriate boxes.

This answer is to point out a rare case where a very similar bug occurs if you have installed xulrunner and configured eclipse to use it.

I installed xulrunner to make the GPE Designer to properly render GWT UIs in the design mode, which worked very well but I found it also broke the tooltips. The bug is actually worse than the screenshot above, it just display a blank tooltip.

To fix it you only have to remove the xulrunner parameter from eclipse.ini:

-Dorg.eclipse.swt.browser.XULRunnerPath=/path/to/xulrunner/

It worked for me with Ubuntu 12.04, Eclipse 4.2/Juno and xulrunner 1.9.2

For elementary users:

Go to /usr/share/themes/elementary/gtk-3.0, edit the file gtk-widgets.css with sudo nano, type Ctrl + W to find Tooltips, and then at the background-color: alpha(#color, #opacity) change the color to something like #f5f5b5 and set opacity to 1.

To open Appearance window with Tab: Themes direct from [email protected] terminal write (you can use this command also for script):

sudo -u USER gnome-appearance-properties -p theme

where USER is your current user on the desktop. It will open Appearance correctly, but you still need to click on theme displays in Appearance window to launch your theme.

For the test with install theme: Dust from [email protected] terminal, command:

sudo -u USER gnome-appearance-properties -i /home/USER/Desktop/Dust-0.4.tar.gz

gets this error:

(gnome-appearance-properties:16161): Gtk-WARNING **: Unable to locate theme engine in module_path: “murrine”

but if theme: Dust is installing by chosing menu: System/Preferences/Appearance and installs from Appearance window , installation of the theme: Dust is correct.

There is needed command responsible for choosing themes in Appearance window, but I can’t find it.

I’m running Kubuntu 16.04 with the Breeze theme, and Eclipse 4.6.1 with the default GTK3 now that they’ve fixed the button padding issue.

To attain hover tooltips with light grey background and black foreground I made a few changes to /usr/share/themes/Breeze-gtk/gtk-3.0/gtk.css; here’s what I ended up with:

/************
 * Tooltips *
 ************/
.tooltip {
  color: #000000;
  padding: 4px;
  box-shadow: none;
}
.tooltip.background {
    background-color: #f5f5f5;
    background-clip: padding-box;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

And the original:

/************
 * Tooltips *
 ************/
.tooltip {
  color: white;
  padding: 4px;
  /* not working */
  border-radius: 5px;
  box-shadow: none;
  text-shadow: 0 1px black; }
  .tooltip.background {
    background-color: rgba(0, 0, 0, 0.8);
    background-clip: padding-box;
    border: 1px solid rgba(255, 255, 255, 0.1); }

In case links aren’t working in Javadoc popups, it may help to install libwebkitgtk like so:

sudo apt install libwebkitgtk-1.0-0

Tagged : /

Ubuntu HowTo: How to find out the terminal command of an application?

Original Source Link

I want to use some applications shown on the Unity Launcher in a terminal, but I need to know the appropriate command to run them. How can I achieve that?

Most default applications will have a .desktop file located in /usr/share/applications.

To find out about the corresponding terminal command that will be run when launching one of these applications open the file browser Nautilus and right click on the application’s icon to select Properties in the context menu. This will give you all details you need (shown here for System Settings that will run gnome-control-center -overview)

application launcher properties view

If you installed the application through the repositories or through dpkg, you can use this command:

dpkg -l | grep "application name"

This will search through all your installed applications, as well as search their descriptions; searching the description is the important part here, because the description usually contains the name of the application, even if the “command” to run it does not contain the application name.

Example:

In GNOME, there’s an application called the Disk Usage Analyzer. However, the command to run it from the terminal is not disk-usage-analyzer. To find out its command, you can run:

dpkg -l | grep "disk usage"

The output should contain this entry:

[email protected]:~$ dpkg -l | grep "disk usage"
ii  baobab            3.6.4-0ubuntu1          i386         GNOME disk usage analyzer

Look at the second column. The command to actually run the Disk Usage Analyzer is baobab.

What you can do is use xprop: it will let you click on a application and display information. To get the name, enter in a terminal:

xprop | grep WM_CLASS

if WM_CLASS doesn’t work, then try with WM_COMMAND.

First, open Synaptic by running synaptic in the terminal. Type the name of the app in the quick filter box. For an example, I’ll use LibreOffice Writer. Type the name of the app in the Synaptic filter: enter image description here

It appears as the first installed result (little green box), with the full package name libreoffice-writer in the first column.

Now, try running libreoffice-writer in the terminal. Sometimes the package will run, but in this case it doesn’t work: enter image description here

Now, if you look back at Synaptic, you will see that the very first result is the libreoffice package. You could just run libreoffice in the terminal, in which case you get this window: enter image description here

Or, you could type man libreoffice in the terminal. If you look at the these two screenshots: enter image description hereenter image description here

You can see that to directly launch LibreOffice Writer, you can use one of two commands: lowriter or libreoffice --writer. Both work equally well.

Some programs or applications simply run by a binary. By name of application one
can find out where binary is located.

whereis name-of-application

ergo little example:

$ whereis gparted
gparted: /usr/sbin/gparted /usr/share/man/man8/gparted.8.gz

You simply can take over /usr/sbin/gparted – for to run this application gparted in entry of icon or application-name (like in cairo-dock). (in this case to run gparted root-password is necessary).

xprop allows finding the PID of a running window, while ps allows finding command corresponding to a PID. By combining the two together, we can find a command corresponding to a window , like so :

ps --no-headers -p $(xprop | awk -F '=' '/_NET_WM_PID/{print $2}') -o cmd 

xprop will turn your cursor into X , which you can use to click on a window, it will return the PID, and then ps will use that PID to print the command

That is too simple for Linux geeks.

  • Close the application if it is open.

  • Open the application by clicking its icon.

For example, I click the icon Document Viewer.

  • Open Terminal (ctl alt T), and run

    ps -u `whoami`|tail -3

The answer is on the first line of ouput:

mac2011-linux% ps -u `whoami`|tail -3
  51252 ?        00:00:01 evince
  53209 pts/3    00:00:00 ps
  53211 pts/3    00:00:00 tail

Yes, Document Viewer is evince, not easy to guess.

Tagged : /

Ubuntu HowTo: Windows 7 Virtualbox guest in seamless mode has bottom clipped off in Ubuntu 13.04

Original Source Link

I realise that this is a duplicate of this post but I was unable to comment on that one.

I am able to replicate this issue on a fresh install of 13.04

I have tried installing the prop nvidia drivers, this had no effect

I then put Cinnamon and KDE on to see what would happen. Neither desktop had this issue, it only happens with Unity. The area clipped seems to be exactly the same size as the footer of the guest in a normal window.

This clipping only occurs in seamless mode. And only effects the guests windows (Windows 7). A window from the host (Ubuntu 13.04) renders correctly to the bottom of the screen.

I have tried different resolutions on both the host and the guest, no effect.

Does anyone have any suggestions?

EDIT: Also if I move the mouse near the bottom of the screen it sort of scrolls down to show the clipped off bit. This was noted in the other post but what is interesting is that the visible part of each open window also scrolls. I mean that if you have a command prompt open and you move you mouse to the bottom of the screen the menu bar at the top disappears and an equal area of the guests desktop is revealed at the bottom.

EDIT: If I plug a second screen into the laptop and apply the display changes, the problem goes away. But if I then reboot the VM it bluescreens on boot until I unplug the second screen and reboot….

I’ve recently encountered this bug, when switching from Seemless Mode to FullScreen Mode, and some how the top and Bottom gets clipped… I went to the Display settings only to see something like “1366×747” or something like that.. instead of “1366×768”. After many attempts, I think I have found the solution.

Solution:

Follow Instructions on this page: https://wiki.ubuntu.com/X/Config/Resolution#Adding_undetected_resolutions

Example (What I did):

My Screen Resolution is 1366×768

$ cvt 1366 768 60
# 1368x768 59.88 Hz (CVT) hsync: 47.79 kHz; pclk: 85.25 MHz
Modeline "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync

Copied everything after “Modeline”

$ xrandr --newmode "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync

run xrandr command with the copied line

$ xrandr --addmode VBOX0 1366x768

Save the newly-created mode

$ xrandr --output VBOX0 --mode 1366x768

Apply the newly-created mode and You’re done!
Now go check in the display settings and everything should be good.

NOTE: Just do what I did but I do strongly recommend actually running the commands and not just copying the “Modeline” in the example, since it could be different for you even if you have the same screen resolution as me. This was done with the VirtualBox Guest Additions Installed, I don’t know if it works without it, it should work though…

  1. Click on workspace switcher.
  2. Move Virtualbox machine window to another workspace.
  3. Touch the machine window to the top of the workspace and it will maximize.
  4. Switch to the workspace.
Tagged : / /

Ubuntu HowTo: Unity crashes in Ubuntu 20.04

Original Source Link

I use Ubuntu 20.04 with Unity desktop and it randomly crashes on closing the random window. Happened to me multiple times today after i was removing bloatware from system. I didn’t removed anything that should affect DE. It happens completely randomly after closing windows like terminal with exit or Firefox with arrow box. After this freeze i am still able to get to tty. System still works but whole DE freezes and after a minute completely crashes. It restarts itself and runs fine until the next crash.
Bloat that I was removing and processes i was disabling

sudo apt-get purge gnome-control-center – No longer needed in Unity

sudo apt-get remove gnome-software – I don’t use gnome software center

sudo apt remove gnome-software-plugin-snap

sudo apt remove --purge snapd – I don’t use snaps

sudo apt-get remove avahi-daemon

sudo mv /usr/lib/evolution-data-server /usr/lib/evolution-data-server-disabled – This is not removed just “disabled”

sudo apt-get remove nemo* – I dont use nemo and nemo-desktop was contantly consuming my RAM

I see no way that this could harm my DE and make it unstable… It was completely fine before removing these.

Tagged : / /

Ubuntu HowTo: Why is Ubuntu positioning new windows beneath the menu bar?

Original Source Link

I was messing around with CompizConfig Settings Manager recently and I’m not really sure what I did to cause this issue, but now all new windows are opened at 0, 0. This means the title bar is positioned beneath the menu bar in the window z-order, making it very difficult to grab and move the window.

Here’s a screenie that may explain it a little better:

  enter image description here

I was pretty much just experimenting in CompizConfig Settings Manager, I reversed any changes I made (to my knowledge), but I may have overlooked something. How can I fix this?

  1. Press Alt+Ctrl+F1. Login using credentials.
  2. Enter

    sudo stop lightdm
    
  3. Enter

    unity --reset
    
  4. Reboot the system using

    sudo reboot now
    
  5. If even after reboot, it is the same situation, open a terminal.
  6. Type in ccsm.
  7. Now check ‘Unity Plugin‘. It might have got unchecked. Once checked, it will fix everything.

Next time take a back up in ccsm working profile.

I opened the CompizConfig Setting Manager and enabled Place Windows plugin.

Tagged : / / /

Ubuntu HowTo: The battery indicator in Unity panel not showing up

Original Source Link

I installed Ubuntu 12.04 with Wubi. Well after being completely dazzled with the amount of free content in the Software Centre, I decided to go deeper and start messing with settings. Well after changing the screen brightness the highest level I noticed that there wasn’t an indicator for how much battery was left in my laptop. I looked up online on got 2 suggestions on how to fix:

  • Right click on the Unity panel and add an indicator
  • Set it to show in the power settings menu.

Well I did both when I right click at the top menu nothing comes up and setting it to show does nothing either. Then I tried installing something in the Software Centre. I got something but when I activated it it said I had 0% power left even though I was charging and at %100 according the Light in the front of my laptop. So now I’m thinking that it doesn’t even recognise my computer as a laptop which is weird because in the display settings it says my screen size is set to laptop.

How can I install it?

I don’t know what version it is other then Ubuntu 12.04 and no matter what the icon does not appear with the

I’m not sure if Beeju meant Power or Power Manager. In any case, I was able to solve this problem by:

Click on the power button in the top right hand corner select: System Settings... > Power > Show battery status in the menu bar > Change to When battery is charging/in use

Power

Restart, go back to System Settings... > Power a bunch more options are now avaialble.

Run the Power Manager and see this checked: Show notifications to notify about the battery state.
This should solve your issue.

sudo apt-get install dconf-tools

enter image description here

Battery indicator should run with the Unity Panel, but sometimes is inhibited for strange reasons.

You can try to force the daemon to run, writing gnome-settings-daemon in the terminal.

If it works, and you see the battery indicator in the panel, you can add the command to the Startup Applications.

How do I start applications automatically on login?

It work great for me, I hope it can help you!

Make sure your battery is inserted properly, if that was not the issue, go to System Settings > Power and make sure that Show battery status in the menu bar is set to When battery is present.

Tagged : / / / /

Ubuntu HowTo: Ubuntu boots on terminal only, how do I recover the GUI desktop?

Original Source Link

Where is my Ubuntu desktop? Its booting and going always default to terminal screen, if i press Ctrl+Alt+F7 still in terminal Ctrl+Alt+F1 still in terminal.

enter image description here

No GUI, how do I recover it?

EDIT:

[email protected]:/etc/X11$ sudo apt-get install --reinstall ubuntu-desktop
[sudo] password for sun: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libcdio-paranoia1 packagekit-backend-aptcc gdebi-core libxrandr-ltsq2 linux-headers-3.5.0-23-generic linux-headers-3.5.0-23 libcdio-cdda1 libllvm3.1
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 209 not upgraded.
Need to get 0 B/4,016 B of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 230006 files and directories currently installed.)
Preparing to replace ubuntu-desktop 1.267.1 (using .../ubuntu-desktop_1.267.1_amd64.deb) ...
Unpacking replacement ubuntu-desktop ...
Setting up ubuntu-desktop (1.267.1) ...

[email protected]:~$ unity --reset
WARNING: no DISPLAY variable set, setting it to :0

(process:2541): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
//bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.

WARNING: environment is incorrect: No D-BUS daemon running

Did you just try to reset in a tty?
unity-panel-service: no process found
compiz (core) - Fatal: Couldn't open display :0




[email protected]:~$ sudo startx
[sudo] password for sun: 


X.Org X Server 1.11.3
Release Date: 2011-12-16
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.42-37-generic x86_64 Ubuntu
Current Operating System: Linux e700gent 3.5.0-36-generic #57~precise1-Ubuntu SMP Thu Jun 20 18:21:09 UTC 2013 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.5.0-36-generic.efi.signed root=UUID=68af0547-17ed-4a85-8369-244d57223f91 ro quiet splash vt.handoff=7
Build Date: 11 April 2013  01:05:39PM
xorg-server 2:1.11.4-0ubuntu10.13 (For technical support please see http://www.ubuntu.com/support) 
Current version of pixman: 0.24.4
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Jul 16 17:37:57 2013
(==) Using system config directory "/usr/share/X11/xorg.conf.d"

Fatal server error:
no screens found

Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
Please also check the log file at "/var/log/Xorg.0.log" for additional information.

 ddxSigGiveUp: Closing log
Server terminated with error (1). Closing log file.

EDIT:

It seems like solving this problem is like rocket science, its unfixed. Instead of wasting time debugging it, i finally re-install the ubuntu.

Try this. Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install --reinstall ubuntu-desktop

Follow below instructions:

  1. sudo dpkg --configure -a
  2. sudo apt-get install --reinstall ubuntu-desktop
  3. restart your computer and go to desktop

when I encounter this on my machine I simply delete the /etc/X11/xorg.conf and restart the system. BUT – I always make backups! 🙂

What display manager did you have before? Go to protected mode as root with Ctrl + Alt + F1 Then try reinstalling the following packages:

apt-get install --reinstall xorg-xserver*
apt-get install --reinstall gdm
apt-get install --reinstall unity

In case you have a different display manager than gdm, type kdm or lightdm.

I once had that too – regarding nvidia-drivers …

There was posted in Ubuntu-forum this here to solve the problem after

“Stopping userspace bootsplash” appears like in your boot-log:

With the proprietary drivers installed they did the following:

Ctrl + Alt + F1 (To open up a terminal)
and after login:

sudo apt-get clean

sudo apt-get autoclean

sudo apt-get autoremove

sudo dpkg-reconfigure -phigh -a

reboot

Entered Grub recovery mode and selected “repair damaged packages”

reboot

Hold Shift to get to grub menu
hit E to enter temporary changes into grub
place ‘vmalloc=192MB’ next to quiet splash

F10

And problem now solved ?!

They then made the change permanent by editing the /etc/default/grub to include:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash vmalloc=192MB"

Maybe this solves your problem ? Let me know !

I had the same problem, and none of the solutions posted here worked.
What worked for me is the following:

     sudo apt-get upgrade
     sudo reboot

Commands such as apt-get update where not working before reboot. After rebooting I opened a terminal (Ctrl + Alt + T) and updated everything

    sudo apt-get update
    sudo apt-get dist-upgrade

and everything seems to work fine.

If you have a gui installed and it boots to command line, then you can use the following command:

sudo service lightdm start

I recently got this problem. So the problem is, changing the default display manager or deleting the daemon associated with it. My default display manager was gdm3, but mistakenly I installed xdm and hence while installation I choose xdm. But when I understood the problem, I removed xdm hoping the default would go back to gdm3, but it didn’t go. Instead I got a terminal screen popping uo each time I login. It was frustrating at first, but just a singlr line will make it work…

sudo apt install xdm

When the window to choose the default display manager pop up, choose gdm3 ( yes it was still present) and press ok. Now reboot the system to put a smile on your face.

What worked for me were the following two commands and then rebooting

sudo apt install xorg
sudo apt-get install --reinstall ubuntu-desktop

Tagged : / / /