Ubuntu HowTo: ROS download unable to locate package error

Original Source Link

I have Ubuntu 20.04 LTS and I want to download ROS Melodic
I have followed this instruction from here.

After sudo apt install ros-melodic-desktop-full command terminal is showing:

Unable to locate package ros-melodic-desktop-full

  1. Make sure to configure your Ubuntu repositories to allow restricted, universe, and multiverse. See this for a guide on how to do that.
  2. Issue the following command into terminal to setup your computer to accept software from packages.ros.org

    sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
    
  3. Setup your keys by issuing the following into terminal:

    curl -sSL 'http://keyserver.ubuntu.com/pks/lookupop=get&search=0xC1CF6E31E6BADE8868B172B4F42ED6FBAB17C654' | sudo apt-key add -
    
  4. Update your packages

    sudo apt update
    
  5. Now install:

    sudo apt install ros-melodic-desktop-full
    
Tagged : /

Ubuntu HowTo: Ubuntu 20.04 error on install gimp : Depends: libgimp2.0 (>= 2.10.18) but it is not going to be installed [duplicate]

Original Source Link

I have this issue when I search to install Gimp:

$ sudo apt-get install gimp 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 gimp : Depends: libgimp2.0 (>= 2.10.18) but it is not going to be installed
        Depends: libgimp2.0 (<= 2.10.18-z) but it is not going to be installed
        Depends: libgegl-0.4-0 (>= 0.4.22) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Nothing change after apt update & upgrade.
Do you have a solution for me? Thanks to

Best,

I would recommend installing Gimp as a flatpak, as the flatpak is maintained by the gimp developers.

sudo apt install flatpak

flatpak install flathub org.gimp.GIMP

and to run

flatpak run org.gimp.GIMP

Firstly, update and upgrade so everything is fresh:

sudo apt-get update && sudo apt-get upgrade -y

Then, try these two commands:

sudo dpkg --configure -a
sudo apt-get install -f

They will usually fix broken or unmet dependencies.

You can also look for JUST files related with your package and purge them, then reinstall them:

sudo dpkg --list
sudo apt-get purge <file-name>

Or you can use aptitude in place of apt or apt-get, aptitude is smarter than apt-get and will help deal with dependencies:

sudo aptitude install gimp

Hope it helps!

One solution is to use aptitude. It is generally smarter than apt-get at resolving dependencies.

First, install aptitude:

sudo apt-get install aptitude

Then install Gimp using aptitude:

sudo aptitude install gimp

And then after running that, Gimp should be installed.

Tagged : / /

Ubuntu HowTo: Ubuntu 20.04 and Huawei Mobile Stick E3372

Original Source Link

I am trying to use the HUAWEI 4G Usb-Dongle E3372 with Ubuntu 20.04 but the module doesn’t seem to work.

[email protected]:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 018: ID 12d1:14dc Huawei Technologies Co., Ltd. E33372 LTE/UMTS/GSM HiLink Modem/Networkcard

Do you have any advice?

Update:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 192.168.1.88  netmask 255.255.255.0  broadcast 192.168.1.255
    inet6 fe80::dea6:32ff:fe66:502e  prefixlen 64  scopeid 0x20<link>
    ether dc:a6:32:66:50:2e  txqueuelen 1000  (Ethernet)
    RX packets 1546  bytes 135451 (135.4 KB)
    RX errors 0  dropped 1  overruns 0  frame 0
    TX packets 1058  bytes 166563 (166.5 KB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 143  bytes 11669 (11.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 143  bytes 11669 (11.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether dc:a6:32:66:50:2f  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Tagged : / / /

Ubuntu HowTo: Hardware compatibility with Dell notebook

Original Source Link

I recently tried to install Ubuntu 20.04 on a Dell laptop and the installation never completed. I had a problem with Ubuntu 19.10. After installing, it didn’t leave the login screen. Only Ubuntu 18.04 works.

I didn’t find the model of the laptop at https://certification.ubuntu.com/desktop. I wonder if this hardware is not supported.

Hardware:

  • Model: Dell Inspiron 15 Gaming 7567
  • CPU: Intel Core i7-7700HQ CPU @ 2.80GHz
  • Chipset: Intel 100 Series/C230 Series Chipset Family
  • GPU: NVIDIA GeForce GTX 1050 Ti + Intel HD Graphics 630
  • RAM: 8 GB

digiwizkid

I installed 20.04, I hadn’t even thought about it. But only by the safe graphics mode

I took advantage and configured the NVIDIA driver as well. The installation is complete.

But the system does not load.
Going through the advanced boot, it crashes in the “Loading initial ramdisk” part. I got stuck on that. I’ll have to do more research.

Tagged : / / /

Ubuntu HowTo: Top-bar appears twice in Ubuntu 20.04

Original Source Link

I’m running multi-monitors on a fresh install of 20.04. Suddenly I have two top-bars on my primary monitor – rebooting didn’t fix it, nor did disabling gnome extensions. The bottom bar is working as required with extensions running ok – the top one contains only the “activities”,”application-menu” clock and language selector.

Any ideas?both monitors – three top-bars 🙂

Tagged : / /

Ubuntu HowTo: Can’t acces to Xauthority for X11VNC (Ubuntu 20.04)

Original Source Link

I’m trying to implement X11VNC on Ubuntu 20.04 but it’s been frustrating.
I need to use command way, the goal is to keep it on a systemd service.

As I know Ubuntu is using Xorg for the moment. Running ps wwwwaux | grep auth I get this:

gdm 3530 0.0 2.4 211180 50128 tty1 Sl+ 10:41 0:01 /usr/lib/xorg/Xorg vt1 -displayfd 3 -auth /run/user/125/gdm/Xauthority -background none -noreset -keeptty -verbose 3

admin-r+ 4700 0.2 2.7 216112 55220 tty2 Sl+ 11:58 0:02 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3

So it should be correct to run the X11VNC server like this when user is not logged in (forget security pls):

x11vnc -xkb -noxrecord -noxfixes -noxdamage -forever -rfbport 11226 -auth /run/user/125/gdm/Xauthority -display :0

And like this when it’s logged in:

x11vnc -xkb -noxrecord -noxfixes -noxdamage -forever -rfbport 11226 -auth /run/user/1000/gdm/Xauthority -display :0

Well, it works good on GDM, but not when the user is logged in.

  • Tried with root and user profile of course.
  • UUIDs checked of course.

Also tried with the directive GDM conf file WaylandEnable=false commented and without comment. When comment it, it works running this when the user is logged in:

x11vnc -xkb -noxrecord -noxfixes -noxdamage -forever -rfbport 11226 -display :0

But not works in GDM.
If I comment it, it works on GDM from root with:

x11vnc -xkb -noxrecord -noxfixes -noxdamage -forever -rfbport 11226 -auth /run/user/125/gdm/Xauthority -display :0

So I don’t get a solution for everything. I’m now out of ideas. LightDM is not a solution, cause we want to use GDM3.

Any response will be highly appreciated.

Regards.

The problem was the display.
As lightdm only uses one display (:0), GDM raises a display for each user, so this should be correct and works for me:

x11vnc -xkb -noxrecord -noxfixes -noxdamage -forever -rfbport 11226
-auth /run/user/1000/gdm/Xauthority -display :1

Tagged : / / /

Server Bug Fix: How to remove gnome settings from ubuntu 20.04 with unity desktop?

Original Source Link

I have ubuntu 20.04 with unity desktop. I removed the existing gnome shell and now when I search for settings I have two of them one is the system settings and the other is the gnome settings. How can I remove the gnome settings from ubuntu 20.04

After you’ve install Unity Desktop and, logged into it, use:

sudo apt remove ubuntu-gnome-desktop
sudo apt remove gnome-shell

This works for for Ubuntu 16.04 to 20.04 and even 20.10 (Groovy). Source:


Although article is written for Ubuntu 16.04, you can verify the package is still around for 20.04 (called Focal) by visiting https://packages.ubuntu.com/focal/ubuntu-gnome-desktop:

ubuntu-gnome-deskop package.png


Personally I use Unity all the time but like to keep both desktops installed. Occasionally I need to answer other users’ questions about Gnome Desktop.


Note: ubuntu-gnome-desktop might not be installed

Because it is a transitional package since 18.04 these instructions from:

Tell you to simply use:

sudo apt remove gnome-shell

The article doesn’t mention ubuntu-gnome-desktop needing to be removed. This article includes additional tips on setting up Unity Desktop.

Tagged :

Server Bug Fix: Why are basic Gnome apps disappearing in 20.04?

Original Source Link

I upgraded to 20.04 from 19.10 a few weeks ago. Everything has been working fine except for a few teething problems I easily sorted out. I regularly update my system with sudo apt-get update && sudo apt-get upgrade and since the last update some basic Gnome apps have been removed. For instance yesterday the gnome.logs app had gone and when a called it from the command line I got this message:

$ gnome-logs

Der Befehl 'gnome-logs' wurde nicht gefunden, kann aber installiert werden mit:

sudo snap install gnome-logs # version 3.34.0,  or sudo apt install gnome-logs # version 3.34.0-1ubuntu1

(The German reads “The command ‘gnome-logs’ was not found but can be installed with: …….)

I reinstalled it with sudo apt-get install gnome-logs and the version 3.34.0 was installed and works as it did previously.

Then today I needed to use the calculator, but that too had disappeared! And when I called it from the command line I got the same message to (re-)install with snap or apt.

Why are these often used apps being removed? Is it someone trying to get me to switch to using snap rather than apt or reminding me that the packages are available in snap?

Whatever the reason, trying to open often used apps only to find you have to re-install them is frustrating and subtracts from the pleasure of using Ubuntu.

There is fundamental difference between the ways the mentioned applications are shipped with Ubuntu 19.10 and 20.04. Those are apps are pre-installed as snap packages in Ubuntu 19.10 whereas in Ubuntu 20.04, they’re shipped via a more traditional way (installed with apt).

It seems during the upgrade process, the updater couldn’t deal with the change and thus simply removed the snap ones but didn’t install the replacements via apt. It’s very unlikely there is a conspiracy going on. To be safe, consider reinstalling the ubuntu-desktop meta-package once again.

P.S. GNOME Characters also falls under this category, you should see the same behaviour with that application too.

Tagged : / /

Ubuntu HowTo: How do I dim inactive windows

Original Source Link

Back in the Unity days, there was a Compiz setting where you could force inactive windows to dim. I frequently work with two monitors and multiple windows open and it regularly happens that I start typing in the wrong window.

I already tried changing the colour of the titlebar, but it doesn’t seem to help me much.

Is there a way to dim inactive windows while letting them remain legible?

I’m using Gnome as my Desktop Environment.

So, inspired by the comments, I searched for suitable gnome extensions and found two useful ones:

Shade Inactive Windows and Windows Blur Effects

I settled for the second one since it is more configurable.

However, I quickly realised that, while this is a great help when I’m quickly switching between windows, it is a nuisance at other times. Not wanting to open the extensions app to enable/disable the extension every time, I did some research and found this script which I modified as follows:

#! /usr/bin/env bash

#   Copyright (C) 2016
#       Alexandru Catalin Petrini <[email protected]>
#  This script is intended to usefully manage gnome-shell extensions,
#  in compatible Gnome Shell versions.

# Install this script by running this command:
# $ sudo wget https://raw.githubusercontent.com/cyberalex4life/gnome-shell-extension-cl/master/gnome-shell-extension-cl -O /usr/local/bin/gnome-shell-extension-cl && sudo chmod +x /usr/local/bin/gnome-shell-extension-cl


# -------------------------------------------------------------------------------

function get_enabled_extensions() {
    enabled_extensions=( $(gsettings get org.gnome.shell enabled-extensions | 
                               sed -e 's|^@as ||g' | tr -d "[",",","]","'") )
}


function print_enabled_extensions(){
    get_enabled_extensions
    for enabled_extension in "${enabled_extensions[@]}"
    do
        echo "$enabled_extension"
    done
}


# -------------------------------------------------------------------------------

function get_installed_extensions() {
    global_installed_extensions=( $(find "/usr/share/gnome-shell/extensions/" 
                                         -maxdepth 1 -type d -name "*@*" -exec 
                                         /usr/bin/basename {} ;) )
    local_installed_extensions=( $(find "$HOME/.local/share/gnome-shell/extensions/" 
                                        -maxdepth 1 -type d -name "*@*" -exec 
                                        /usr/bin/basename {} ;) )

    if [ ${#local_installed_extensions[@]} -gt ${#global_installed_extensions[@]} ]
    then
        installed_extensions=( ${local_installed_extensions[@]} )
        test_extensions=( ${global_installed_extensions[@]} )
    else
        installed_extensions=( ${global_installed_extensions[@]} )
        test_extensions=( ${local_installed_extensions[@]} )
    fi
    for test_extension in "${test_extensions[@]}"
    do
        test_extension_not_doubled=true
        for installed_extension in "${installed_extensions[@]}"
        do
            if [ "$test_extension" = "$installed_extension" ]
            then
                test_extension_not_doubled=false
                break
            fi
        done
        if  [ $test_extension_not_doubled = true ]
        then
            test_extension=( $test_extension )
            installed_extensions=( "${installed_extensions[@]}" "${test_extension[@]}" )
            #echo ${test_extension[@]}
        fi
    done
    echo "${installed_extensions[@]}"
}


function print_installed_extensions() {
    installed_extensions=( $(get_installed_extensions) )
    for installed_extension in "${installed_extensions[@]}"
    do
        [ "$(check_extension_is_enabled "$installed_extension")" = true ] && 
            status="enabled" || status="disabled";
        printf "%-65s - %-10s n" "$installed_extension" "$status"
    done
}


# -------------------------------------------------------------------------------

function check_extension_is_enabled() {
    extension_to_check=$1
    enabled_extensions=( $(gsettings get org.gnome.shell enabled-extensions | 
                               sed -e 's|^@as ||g' | tr -d "[",",","]","'") )
    for enabled_extension in "${enabled_extensions[@]}"
    do
        if [ "$enabled_extension" = "$extension_to_check" ]
        then
            echo true
            return
        fi
    done
    echo false
}


function check_extension_in_all_extensions() {
    extension_to_check=$1
    installed_extensions=( $(get_installed_extensions) )
    for installed_extension in "${installed_extensions[@]}"
    do
        if [ "$installed_extension" = "$extension_to_check" ]
        then
            echo true
            return
        fi
    done
    echo false
}


function version_greater() {
    minimal_version=3.18.0
    our_version=$(gnome-shell --version | awk '{print $3}')
    if [ "$(echo "$our_version $minimal_version" | tr " " "n" | sort -V | head -n 1)" != "$our_version" ]
    then
        echo true
    else
        echo false
    fi
}


function disable_extension() {

    arguments=("[email protected]")
    unset "arguments[0]"

    for extension_to_disable in "${arguments[@]}"
    do

        if  [ "$(check_extension_in_all_extensions "$extension_to_disable")" = false ]
        then
            echo "'$extension_to_disable' is not installed."
            continue
        fi
        if  [ "$(check_extension_is_enabled "$extension_to_disable")" = false ]
        then
            echo "'$extension_to_disable' is already disabled."
            continue
        fi
        if [ "$(version_greater)" = true ]
        then
            gnome-shell-extension-tool -d "$extension_to_disable"
            continue
        fi
        enabled_extensions=( $(gsettings get org.gnome.shell enabled-extensions | 
                                   tr -d "[",",","]","'") )
        enabled_extensions_string=""
        for enabled_extension in "${enabled_extensions[@]}"
        do
            if [ "$enabled_extension" != "$extension_to_disable" ]
            then
                enabled_extensions_string="$enabled_extensions_string '$enabled_extension', "
            fi
        done
        enabled_extensions_string=${enabled_extensions_string:1:-2}
        enabled_extensions_string="[ $enabled_extensions_string ]"

        dbus-launch gsettings set org.gnome.shell enabled-extensions "$enabled_extensions_string"

    done
    return
}


function enable_extension() {

    arguments=("[email protected]")
    unset "arguments[0]"

    for extension_to_enable in "${arguments[@]}"
    do

        if  [ "$(check_extension_in_all_extensions "$extension_to_enable")" = false ]
        then
            echo "'$extension_to_enable' is not installed."
            continue
        fi
        if  [ "$(check_extension_is_enabled "$extension_to_enable")" = true ]
        then
            echo "'$extension_to_enable' is already enabled."
            continue
        fi
        if [ "$(version_greater)" = true ]
        then
            gnome-shell-extension-tool -e "$extension_to_enable"
            continue
        fi
        enabled_extensions_string=$(gsettings get org.gnome.shell enabled-extensions | tr -d "]")
        [ "$enabled_extensions_string" != "@as [" ] && delimiter=,
        enabled_extensions_string="${enabled_extensions_string}${delimiter} '$extension_to_enable' ]"

        gsettings set org.gnome.shell enabled-extensions "$enabled_extensions_string"

    done
    return
}


# -------------------------------------------------------------------------------

function disable_all_extensions() {
    get_enabled_extensions
    for enabled_extension in "${enabled_extensions[@]}"
    do
        # Don't disable user-theme extensions to avoid breaking them
        if [ "$enabled_extension" != "user-theme" ] && 
               [ "$enabled_extension" != "user-themes" ] && 
               [ "$enabled_extension" != "[email protected]" ]
        then
            disable_extension "this element will be ignored" "$enabled_extension"
        else
            continue
        fi
    done
}
# -------------------------------------------------------------------------------

function toggle_extension() {

    arguments=("[email protected]")
    unset "arguments[0]"

    for extension_to_enable in "${arguments[@]}"
    do

        if  [ "$(check_extension_in_all_extensions "$extension_to_enable")" = false ]
        then
            echo "'$extension_to_enable' is not installed."
            continue
        fi
        if  [ "$(check_extension_is_enabled "$extension_to_enable")" = true ]
        then
            disable_extension "[email protected]"
        else
            enable_extension "[email protected]"
        fi
    done
    return
}
# -------------------------------------------------------------------------------

function print_help() {

    printf "
GNOME Shell Extension Control Tool:

usage: gnome-shell-extensions <option> [extension name]

Options
    -h,   --help                                Display help message.
    -e,   --enable-extension <extension name>   Enable extension.
    -d,   --disable-extension <extension name>  Disable extension.
    -da,  --disable-all-extensions              Disables all extensions.
    -le,  --list-enabled                        List enabled extensions.
    -l,   --list                                List all extensions + state info.
    -s,   --status <extension name>             Show status of extension.
    -t,   --toggle-extension                    Toggle extension.
n"

}


# -------------------------------------------------------------------------------

case $1 in
    -h|--help)
        print_help
        ;;
    -e|--enable-extension)
        enable_extension "[email protected]"
        ;;
    -d|--disable-extension)
        disable_extension "[email protected]"
        ;;
    -t|--toggle-extension)
        toggle_extension "[email protected]"
        ;;
    -da|--disable-all-extensions)
        disable_all_extensions
        ;;
    -le|--list-enabled)
        print_enabled_extensions
        ;;
    -l|--list)
        print_installed_extensions
        ;;
    -s|--status)
        if  [ "$(check_extension_is_enabled "$2")" = true ]
        then
            echo "enabled"
        else
            echo "disabled"
        fi
        ;;
    *)
        print_help
        ;;
esac

Then, I ran gnome-shell-extension-cl -l to get the list of extensions.

Finally, I added a Keyboard shortcut to run gnome-shell-extension-cl -t [email protected]. I used Super + Alt + B, but any keyboard combination could do.

Tagged : / / /