Upgrade from Caixa Mágica 22LTS (based on Ubuntu 14.04) to Ubuntu 14.04 or 15.04?

Short answer: you can't upgrade.

Long answer: I think there is a confusion in your mind. Please, allow me to clear that for you.

Your distribution Caixa Mágica 22LTS is based on Ubuntu 14.04, which means, it is a different distribution. Even if they have a lot in common - Ubuntu can be considered the "parent" distro for Caixa Mágica, from the moment when "daughter" distro - in your case, Caixa - split up from the "parent" distro, - in this case, Ubuntu - , they all evolve on different paths.

Maybe you'd find easier to understand that, if you'd think about the Biology class and the evolution of species - well, in Linux world, things are pretty much the same.

If you need to upgrade, then you should upgrade your distribution Caixa Mágica 22LTS to its last stable version. If you want to use Ubuntu instead, then forget about Caixa Mágica and do a fresh Ubuntu install.

But under no circumstances, don't make the mistake to upgrade your older version of Caixa Mágica to the newer version of Ubuntu! Because if you do so, you risk messing up everything. The resulting "distro" would be neighter Caixa Mágica, nor Ubuntu. That if it will be functional!

I'll give you another example, just to show you that you are not the only non-Ubuntu user "lurking" on Askubuntu. I use Zorin OS 6 Core, a distro which is based on Ubuntu 12.04 LTS. Now that Ubuntu 14.04 is already released, I keep getting messages from the system asking me to do the upgrade to Ubuntu14.04. But I don't upgrade, I ignore the messages. Why? Because, like I've said, I know that Ubuntu and Zorin OS are two different distributions.

Still, coming here, in the very hart of Ubuntu community is the best thing that any user of Ubuntu-derived distros can do, as long as he/she keeps in mind the way Linux distributions relate, what they have in common, what makes them different, what are the characteristics of a specific distribution, etc.


You can do either: fix the image file or make a new one.

However,  I would use ddrescue instead of dd as it was designed to be able to read bad sectores / skip over them / ...:

sudo apt install gddrescue
ddrescue --retry-passes=3 /dev/sdd /media/me/out/theimage.img /media/me/out/theimage.log

For more info: man ddrescue


What is the 'libc gethostbyname buffer overflow' and how can I protect myself from it

According to the Ubuntu Security Notices, this affects 10.04 and 12.04 among the currently supported versions of Ubuntu.

How can I protect myself?

Upgrade.

sudo apt-get update
sudo apt-get upgrade

Or, specifically:

sudo apt-get update
sudo apt-get install libc6

Check the currently installed version using apt-cache policy libc6:

For 12.04, it should be 2.15-0ubuntu10.10, or higher.
For 10.04, it should be 2.11.1-0ubuntu7.20, or higher.

Restart.

libc is a core package. You should restart to be sure nothing on your system is using the old version.

At the least, restart every service running on your system.

What is it?

The team who discovered this vulnerability has published an advisory (posted in the mailing list referred), examining the code involved and case studies. It includes a C program to detect if the system is vulnerable.

Essentially, look-ups of IPv4-style addresses (those involving numbers and dots) can cause this trigger.

  [The] hostname must
  have one of the following forms: "a.b.c.d", "a.b.c", "a.b", or "a",
  where a, b, c, d must be unsigned integers, at most 0xfffffffful,
  converted successfully (ie, no integer overflow) by strtoul() in
  decimal or octal (but not hexadecimal, because 'x' and 'X' are
  forbidden).

This is due to a miscalculation in the size of a buffer needed, where the size is a bit short, allowing a strcpy down the line to write past the end of the buffer by a limited amount (4 bytes on 32-bit machines, or 8 bytes on 64-bit machines).

An exploit has been written by the team against the Exim mail server, but the code has not been released yet.

The list of services affected include, but is not limited to:

  MySQL servers, Secure Shell servers, form submission apps, and other types of mail servers. ... Apache, Cups, Dovecot, GnuPG, isc-dhcp, lighttpd, mariadb/mysql, nfs-utils, nginx, nodejs, openldap, openssh, postfix, proftpd, pure-ftpd, rsyslog, samba, sendmail, sysklogd, syslog-ng, tcp_wrappers, vsftpd, and xinetd.

Apparently the test code is available on the University of Chicago website. Therefore you can do:

wget https://webshare.uchicago.edu/orgs/ITServices/itsec/Downloads/GHOST.c
gcc GHOST.c -o GHOST
./GHOST

The final output would be vulnerable or not vulnerable.


trouble resetting forgotten password in recovery mode, ubuntu 12.04

I was having the same problem with my password and I tried everyone's suggestions but none worked for me. So I tried some of my own and this is what worked for me... "Keep in mind I can NOT explain why it worked, all I know is it worked...

"10 Easy and Simple steps to Reset Lost or Forgotten Password"

Reboot computer and hold the Left Shift Key down.
Select boot into recovery mode.

After a few seconds you should get the "Recovery Mode Options" screen.

Note: (Here is the part I can't explain. After trying everything, and nothing working, I finally just started trying all the options here one at a time. When I tried the "grub Update grub boot loader" and then followed the rest of the steps all was well and password was reset.)

So before going to the "root Drop to root shell promt"selection,
Select "grub Update grub boot loader", and you should get this screen.

Select "Yes". Wait for it to go through the update.
Now select "root Drop to root shell prompt".
Now you should be at a root terminal with something like the following: youracctname@yourcompname:~$. type passwd accountname ( acountname  being the name of the account you are trying to change the password for ).
Enter new Unix password: "enter the new password".
Retype new Unix password: "retype the same password you did in Step-8".
It should confirm successful password change. type exit at the prompt and reboot.

If this does not work for you, try skipping Steps 4 & 5...


How do I install Nautilus 3.28 on Ubuntu 18.04?

If you want Files 3.28 right now you can get the Nightly Flatpak (though that will automatically update you to 3.29 when that’s Flatpak’d).

GET IT HERE ----> https://git.gnome.org/browse/gnome-apps-nightly/plain/nautilus.flatpakref?id=7308f18578ac9d587ef82e1bae8b5e78b52f66aa

Reboot after installing and then when you click on Files in the Dash or Activities it will load up the Flatpak rather than the Deb. Please note that the Files Flatpak is very buggy (and they know that it’s buggy so don’t file bug reports for it). Alternatively you can get the Deb from Debian Experimental (which is highly likely to break your install although it could be less buggy than the Flatpak).

GET IT HERE ---> https://packages.debian.org/experimental/nautilus

You may want to wait for Files 3.28 to hit Debian Unstable or Testing (currently Buster) before getting the Deb from there (and it would still be risky to do so and not recommended). You could thus get 3.28 from Debian but it really isn’t recommended also because you’d get no automatic updates (not even security updates) for it.

Basically, for now, please wait for more progress on the Flatpak and snap!


How can I access my Windows partition as an ordinary user?

When you run the sudo command in the Terminal, that causes what you type after sudo to be run as root. This is why it works from the Terminal--because the technique you are using makes you act as root.

Being an administrator does not mean you are root, or that most of what you do is done as root. It does mean that you can perform actions as root with a couple of built-in facilities (one of which is sudo).

When partitions are mounted automatically from /etc/fstab, the mount operation is performed by root, so it is necessary to be root (or run a command as root) to undo it. This is the normal and expected behavior, and not a bug.

When you mount partitions dynamically as a non-root user, behind the scenes, that uses udisks --mount. Then you can unmount them automatically with udisks --unmount (which is what happens behind the scenes when you unmount them). The way you fixed your problem prevents this from happening, because /etc/fstab entries are not mounted/unmounted dynamically with udisks.

So it seems that the way you've fixed your problem does not fully suit your needs. I recommend that you post a new question detailing the problem you were experiencing, so that someone can help you make automatic, non-root mounting and unmounting of your Windows partition work again.


Chrome ignores --force-display-scale-factor flag?

Remove Chrome completely as described here
Set the system-wide font size to desired value (if it is already the desired value, change it to something else, reboot, then change to the size you want)
Reboot
Install Chrome again

Chrome will respect the system-wide font size this way. The rebooting might be unnecessary, but it doesn't work for me without rebooting first after changing font.


I keep running out of memory and swapping but having a hard time figuring out what is using so much ram

From the comments...

Your 2G swap space is too small. And the parameter vm.swappiness may need to be tweaked. The buff/cache is used as file/disk cache when available.

You thought the system was using a 22G swap partition, but instead it was using a 2G swapfile. You've enlarged that, and so far it's working well. I'd recommend about a 8G swapfile.

The parameter vm.swappiness can be changed from its default of 60, to 10, to see if that improves the ratio of main memory vs swap and disk/file cache. Edit /etc/sysctl.conf and add vm.swappiness=10, and then reboot.


No. According to the developer: "Unfortunately, the crop presets are hard-coded. We could add more if they are commonly used sizes."


Would there have been the same risk with Gnome 3.16 if it had been included in Ubuntu Gnome 15.04?

My opinion based answer is, I have fewer problems with GNOME 3.16 as with GNOME 3.14 in my GNOME Ubuntu 15.04 with proprietary nvidia drivers.

A warning for not supported software is always good to avoid discussions.

GNOME 3.16 is released since weeks and the PPAs have some patches included. That's a good sign for me.

Ok, maybe there are some apps which not work properly, eg. GNOME Music. But that's not a real problem.

I would never get back GNOME 3.14.


How to set folder icons of multiple folders automatically?

I might still "elegant it up a bit" but below are the edited versions of the linked ones.

What is the difference?

I added a predefined list to the head section:

specs = ["folder.png", "cover.png", "monkey.png"]

and I replaced:

try:
    first = min(p for p in os.listdir(folder)
                if p.split(".")[-1].lower() in ext)
except ValueError:
    pass

by:

fls = os.listdir(folder)
try:
    first = [p for p in fls if p in specs]
    first = first[0] if first else min(
        p for p in fls if p.split(".")[-1].lower() in ext
        )
except ValueError:
    pass

so that the script first tries to find (file) matches in the list specs, (only) if there are no, it jumps to searching for matching extension, and does the trick if it finds a suitable image.

1. The basic version

To be used with the targeted directory as argument:

#!/usr/bin/env python3
import subprocess
import os
import sys

# --- set the list of valid extensions below (lowercase)
# --- use quotes, *don't* include the dot!
ext = ["jpg", "jpeg", "png", "gif", "icns", "ico"]
# --- set the list of preferred filenames
# --- use quotes
specs = ["folder.png", "cover.png", "monkey.png"]
# ---

# retrieve the path of the targeted folder
dr = sys.argv[1]

for root, dirs, files in os.walk(dr):
    for directory in dirs:
        folder = os.path.join(root, directory)
        try:
            fls = os.listdir(folder)
            first = [p for p in fls if p in specs]
            first = first[0] if first else min(
                p for p in fls if p.split(".")[-1].lower() in ext
                )
        except (ValueError, PermissionError):
            pass

        else:
            subprocess.Popen([
                "gvfs-set-attribute", "-t", "string",
                os.path.abspath(folder), "metadata::custom-icon",
                "file://"+os.path.abspath(os.path.join(folder, first))
                ])

How to use

Copy the script into an empty file, save it as change_icon.py
In the head of the script, edit, if you like, the list of extensions to be used as valid icon images. Also set the preferred list of filenames.
Run it with the targeted directory as an argument:

python3 /path/to/change_icon.py <targeted_directory>

That's it!

2. The edited right-click option, to be used as a nautilus (right-click) script

#!/usr/bin/env python3
import subprocess
import os

# --- set the list of valid extensions below (lowercase)
# --- use quotes, *don't* include the dot!
ext = ["jpg", "jpeg", "png", "gif", "icns", "ico"]
# --- set the list of preferred filenames
# --- use quotes
specs = ["folder.png", "cover.png", "aap.png"]
# ---

def fix(path):
    for c in [("%23", "#"), ("%5D", "]"), ("%5E", "^"),
              ("file://", ""), ("%20", " ")]:
        path = path.replace(c[0], c[1])
    return path

# retrieve the path of the targeted folder
current = fix(os.getenv("NAUTILUS_SCRIPT_CURRENT_URI"))
dr = os.path.realpath(current)

for root, dirs, files in os.walk(dr):
    for directory in dirs:
        folder = os.path.join(root, directory)
        try:
            fls = os.listdir(folder)
            first = [p for p in fls if p in specs]
            first = first[0] if first else min(
                p for p in fls if p.split(".")[-1].lower() in ext
                )
        except (ValueError, PermissionError):
            pass

        else:
            subprocess.Popen([
                "gvfs-set-attribute", "-t", "string",
                os.path.abspath(folder), "metadata::custom-icon",
                "file://"+os.path.abspath(os.path.join(folder, first))
                ])

To use

Create, if it doesn't exist yet, the directory

~/.local/share/nautilus/scripts

Copy the script into an empty file, save it in ~/.local/share/nautilus/scripts as set_foldericons (no extension!), and make it executable.
In the head of the script, edit, if you like, the list of extensions to be used as valid icon images. Also set the preferred list of filenames.
Log out and back in, and it works.

If, for some reason you'd like to reset the icons inside a folder to their default icon(s), use the script here


Why can't Django installed with pip be imported by Python, whereas Django installed with apt-get works fine?

The problem was that my pip was, for some reason, pointing to Python 3.5, even though there was already pip3 for that. I fixed it.


Can't find Skype package through software center - apt-get, Canonical partners' box uncheckable

Essentially, Skype isn't a part of the standard repository as it is a piece of commercial third-party software. I'm not 100% certain why it isn't in the Ubuntu Software Centre (it isn't there for me either)

Your best bet is to directly visit the Skype website and download it from there. The download page can be found at http://www.skype.com/en/download-skype/skype-for-computer/ . Pick your distro there (12.04 for anything >= 12.04) and then download and run the .deb file it gives you. That should be all you need to do.


After Uninstalling KDE in Ubuntu some changes were not revoked?

A good thing to try is to fully remove all the KDE packages. The command below is for Ubuntu 10.10:

sudo apt-get remove akonadi-server akregator amarok amarok-common amarok-utils apport-kde apturl-kde ark bluedevil cdparanoia cdrdao docbook-xsl docbook-xsl-doc-html dolphin dragonplayer gdebi-core gdebi-kde gnupg-agent gnupg2 gtk2-engines-qtcurve gwenview hal hal-info ibus-qt4 icoutils jockey-kde k3b k3b-data kaddressbook kamera kate kcalc kde-config-gtk kde-config-touchpad kde-window-manager kde-zeroconf kdebase-bin kdebase-data kdebase-runtime kdebase-runtime-data kdebase-workspace kdebase-workspace-bin kdebase-workspace-data kdebase-workspace-kgreet-plugins kdegraphics-libs-data kdegraphics-strigi-plugins kdelibs-bin kdelibs5 kdelibs5-data kdelibs5-plugins kdemultimedia-kio-plugins kdepasswd kdepim-groupware kdepim-kresources kdepim-runtime kdepim-strigi-plugins kdepim-wizards kdepimlibs-kio-plugins kdesudo kdm kdoctools kfind khelpcenter4 kinfocenter klipper kmag kmail kmix kmousetool knm-runtime knotes konsole kontact kopete kopete-message-indicator korganizer kpackagekit kppp krdc krfb krosspython ksnapshot ksysguard ksysguardd ksystemlog ktimetracker ktorrent ktorrent-data kubuntu-debug-installer kubuntu-default-settings kubuntu-desktop kubuntu-docs kubuntu-firefox-installer kubuntu-konqueror-shortcuts kubuntu-netbook-default-settings kubuntu-notification-helper kvkbd kwalletmanager language-selector-qt libakonadi-contact4 libakonadi-kabc4 libakonadi-kcal4 libakonadi-kde4 libakonadi-kmime4 libakonadiprivate1 libao-common libao4 libattica0 libaudio2 libbluedevil1 libboost-program-options1.42.0 libcln6 libclucene0ldbl libdbusmenu-qt2 libdebconf-kde0 libdirectfb-1.2-9 libepub0 libflac++6 libgif4 libgpgme++2 libgps19 libhal-storage1 libhal1 libibus-qt1 libilmbase6 libindicate-qt0 libiodbc2 libk3b6 libkabc4 libkatepartinterfaces4 libkblog4 libkcal4 libkcddb4 libkdcraw8 libkde3support4 libkdecorations4 libkdecore5 libkdepim4 libkdesu5 libkdeui5 libkdewebkit5 libkdnssd4 libkephal4 libkexiv2-8 libkfile4 libkholidays4 libkhtml5 libkimap4 libkimproxy4 libkio5 libkipi7 libkjsapi4 libkjsembed4 libkldap4 libkleo4 libkmediaplayer4 libkmime4 libknewstuff2-4 libknewstuff3-4 libknotifyconfig4 libkntlm4 libkonq5 libkonq5-templates libkontactinterface4 libkopete4 libkparts4 libkpgp4 libkpimidentities4 libkpimtextedit4 libkpimutils4 libkpty4 libkresources4 libkrosscore4 libkrossui4 libksba8 libkscreensaver5 libksgrd4 libksieve4 libksignalplotter4 libktexteditor4 libktnef4 libktorrent-l10n libktorrent2 libkunitconversion4 libkutils4 libkwineffects1a libkworkspace4 libkxmlrpcclient4 liblastfm0 libloudmouth1-0 libmailtransport4 libmessagecore4 libmessagelist4 libmicroblog4 libmimelib4 libmng1 libmodplug1 libmpcdec6 libmsn0.3 libmysqlclient16 libnepomuk4 libnepomukquery4a libokularcore1 libopenexr6 libotr2 libpackagekit-glib2-14 libpackagekit-qt-14 libphonon4 libplasma-geolocation-interface4 libplasma3 libplasmaclock4b libplasmagenericshell4 libpolkit-qt-1-0 libpoppler-qt4-3 libprocesscore4a libprocessui4a libqalculate5 libqapt-runtime libqapt1 libqca2 libqca2-plugin-ossl libqgpgme1 libqimageblitz4 libqjson0 libqt4-dbus libqt4-designer libqt4-help libqt4-network libqt4-opengl libqt4-qt3support libqt4-script libqt4-scripttools libqt4-sql libqt4-sql-mysql libqt4-sql-sqlite libqt4-svg libqt4-test libqt4-xml libqt4-xmlpatterns libqtcore4 libqtgui4 libqtscript4-core libqtscript4-gui libqtscript4-network libqtscript4-sql libqtscript4-uitools libqtscript4-xml libqtwebkit4 libreadline5 libsolid4 libsolidcontrol4a libsolidcontrolifaces4 libsoprano4 libssh-4 libstreamanalyzer0 libstreams0 libsyndication4 libtag-extras1 libtaskmanager4a libtelepathy-qt4-0 libthreadweaver4 libts-0.0-0 libvirtodbc0 libvncserver0 libweather-ion4a libxcb-shape0 libxcb-xv0 libxine1 libxine1-bin libxine1-console libxine1-misc-plugins libxine1-x libzip1 mysql-client-core-5.1 mysql-common mysql-server-core-5.1 network-manager-pptp-kde odbcinst odbcinst1debian2 okular okular-extra-backends openoffice.org-kde openoffice.org-style-oxygen oxygen-cursor-theme oxygen-icon-theme oxygen-icon-theme-complete packagekit packagekit-backend-aptcc phonon phonon-backend-xine pinentry-gtk2 pinentry-qt4 plasma-dataengines-addons plasma-dataengines-workspace plasma-desktop plasma-netbook plasma-scriptengine-javascript plasma-scriptengine-python plasma-widget-facebook plasma-widget-folderview plasma-widget-kimpanel plasma-widget-kimpanel-backend-ibus plasma-widget-kubuntu-feedback plasma-widget-menubar plasma-widget-message-indicator plasma-widget-networkmanagement plasma-widget-quickaccess plasma-widgets-addons plasma-widgets-workspace plymouth-theme-kubuntu-logo plymouth-theme-kubuntu-text polkit-kde-1 printer-applet python-kde4 python-packagekit python-qt4 python-qt4-dbus python-sip qapt-batch quassel quassel-data rekonq shared-desktop-ontologies smartdimmer software-properties-kde soprano-daemon system-config-printer-kde systemsettings tsconf ttf-dejavu ttf-dejavu-extra update-manager-kde usb-creator-kde userconfig virtuoso-minimal virtuoso-opensource-6.1-bin virtuoso-opensource-6.1-common && sudo apt-get install ubuntu-desktop

This should certainly change your boot theme back. You may however need to reinstall any KDE programs such as Krusader once this is done.

Also you may want to look at the question on this site entitled Reset gnome font configuration?


nvidia-331 drivers gives black screen at startup

I eventually solved my problem with my nvidia.

I found the fix on the post #15 of https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-331/+bug/1362848

Here how I fixed in details:

Log out and go to the console:

CTRL-ALT-F1

if (like me) you tried to install latest nvidia driver (nvidia-340 ...), you need to revert back with following commands:

sudo apt-get install ppa-purge
sudo ppa-purge xorg-edgers
sudo apt-get purge nvidia*

Then copy all xorg config files in a temporary dir:

cd
mkdir temp
sudo mv /etc/X11/xorg.conf* ./temp/

Then clean, update, upgrade and reboot the system:

sudo apt-get autoremove
sudo apt-get update
sudo apt-get upgrade
sudo reboot

Go to the console:

CTRL-ALT-F1

Install nvidia 331:

sudo apt-get install nvidia-331 nvidia-prime

Copy the old xorg.conf made by nvidia  back in its directory:

sudo cp temp/xorg.conf.nvidia-xconfig-original /etc/X11/xorg.conf

And edit it (I used vi, you may prefer nano):

sudo vi /etc/X11/xorg.conf

To be as the following:

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
EndSection

Section "Device"
    Identifier "intel"
    Driver "intel"
    BusID "PCI:0@0:2:0"
    Option "AccelMethod" "SNA"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1@0:0:0"
    Option "ConstrainCursor" "off"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration" "on"
    Option "IgnoreDisplayDevices" "CRT"
EndSection

Eventually reboot the system:

sudo reboot

Now I have nvidia set as graphic card and the hardware acceleration works fine.


USB devices recognized, but not working. Ubuntu 18.04

As far as Numlock goes, I had the same issue and did this in the terminal.

sudo apt install numlockx
(then)
numlockx on

Can't help with the rest, sorry


How to calculate Pi decimals from a given offset?

pi wants you to specify how many digits of the value to compute. Each of your attempts above has [some digits][a non-digit][who cares], and the [digits], is all cases, is "3". Try  pi 10 | cut -c5-7, or, since pi is a constant, why not use echo "159"?


If you're a bit of a programmer, there is a script at http://www.kryogenix.org/days/2012/04/18/publishing-a-folder-with-ubuntu-one which will allow you to "publish" a whole folder. It requires Python to work; it will work fine on Ubuntu 12.04, but I'm not able to test it on Windows -- I'd love to hear reports from U1 and Python users on Windows as to whether it works!


Tried to upgrade from 10.04 -> 11.04, how to fix broken packages?

You said that you tried to upgrade from 10.04 straight to 11.04.  Please can you confirm that you upgraded to 10.10 first before upgrading to 11.04?  If you didn't, then this is you key problem.  The correct upgrade path is 10.04 --> 10.10 --> 11.04.

If you havent upgraded through the correct upgrade path, then restore from a backup image.  If you havent got a backup then boot from a live CD and copy to a USB stick the most valuable data from your hard-drive.  Then reinstall a fresh 11.04 image.


How can I recover sudo/root ownership on system directories?

To make root owner of everything in /etc:

sudo chown root:root -R /etc

You will need to boot a live cd and run

sudo chown root:root -R /media/$USER/*/etc

You will need to open the folder in the file browser to mount the disk


Why are there no gpg signed hashes for the mini.iso

Ubuntu always provides signed hash files on the download servers. Within each image-directory, there are several hash files with corresponding signatures. An example listing for Ubuntu 16.04 LTS AMD64:

[ ]     MANIFEST        2016-08-10 19:07    1.0K
[ ]     MANIFEST.udebs  2016-08-10 19:07    23K
[ ]     MD5SUMS         2016-08-10 19:07    3.0K
[ ]     MD5SUMS.gpg     2016-08-10 19:07    933
[ ]     SHA1SUMS        2016-08-10 19:07    3.3K
[ ]     SHA1SUMS.gpg    2016-08-10 19:07    933
[ ]     SHA256SUMS      2016-08-10 19:07    4.2K
[ ]     SHA256SUMS.gpg  2016-08-10 19:07    933
[DIR]   cdrom/          2016-08-10 19:07    -
[DIR]   hd-media/       2016-08-10 19:07    -
[DIR]   netboot/        2016-08-10 19:07    -
[ ]     udeb.list       2016-08-10 19:07    4.3K

The minimal.iso file is stored in the netboot directory.


It's quite simple actually - find the "Displays" utiltity in the dash,and drag the "Scale for menus and titlebars" slider to the right, which will make everything bigger:

Another possibility would be to lower the resolution, which would also make things bigger on-screen. A third possibility may be to change the DPI, but that's somewhat complicated.

(Credits to Luis Alvarado for the screenshot)


This whole issue looks like an "it's not a bug, it's a FEATURE" present from Gnome.

In short: when you press a media button it generates a keycode which is then translated into a command. Let's say you press a Play/Pause button. It generates a keycode 162 and a command XF86AudioPlay.

Now almost every media application that may be waiting for this event (be it VLC, totem, kodi, spotify etc.) expect to receive pure XF86AudioPlay command. And what Gnome does? It intercepts this command and translate it into it's own command "play". Because of this neither xev nor xbindkeys show this event properly - they never receive a command they can understand.

When you press a media button Gnome receives the command and checks if there is any app that its recognized as capable of receiving this command. If there is (let's say totem, rhytmbox, maybe VLC) it sends "play" that should work. If there is no app recognised as capable of receiving this command Gnome will show the sign that is attached to first post and won't send any command anywhere.

The solution is simple - make Gnome unable to intercept media key events. Install dconf-editor , go to org.gnome.settings-daemon.plugins.media-keys and change any button that should work from XF86SomeExample (e.g., XF86AudioPlay) to none (''). This way any app should receive key command directly.


permanently disable trackpoint in Lenovo T440p Ubuntu 14.04

I suggest you try placing the command in rc.local:

gksudo gedit /etc/rc.local

Use nano or kate or leafpad if you don't have the text editor gedit. Right above the final line exit 0, add your command:

xinput -set-prop 12 135 0

Proofread carefully, save and close the text editor.


How do I find the most recent timestamp in directory names in a bash script?

Might not be pretty, and I'm not handling filenames with newlines in them:

find collect/ -mindepth 1 |
  awk -F_ '{print $(NF-1),$NF,$0}' |
  sort -V |
  sed -r 's/^([^ ]* ){2}//'

So:

Listing the files with find
Adding the last 2 _-delimited fields in the filename to the start of it using awk
Sorting it (-V - version sort - can handle fields like 0A and 1)
Removing the added part with sed

It could be made safe for filenames containing any valid character, but I'd have to replace awk with sed for that.

My output:

$ find collect/ -mindepth 1 | awk -F_ '{print $(NF-1),$NF,$0}' | sort -V | sed -r 's/^([^ ]* ){2}//'
collect/mydir_20161102_0A
collect/mydir_20161102_0B
collect/mydir_20161102_0C
collect/mydir_20161102_1
collect/mydir_20161102_2
collect/other_dir_20161103_0A
collect/other_dir_20161103_0B
collect/mydir_20161104_0A
collect/mydir_20161104_0B
collect/mydir_20161104_0C
collect/mydir_20161104_1
collect/mydir_20161104_2

Of course, this is just parsing ls. ;)

If you need just the title and timestamp without the suffix, reverse the sort (sort -Vr) and modify the last sed to:

sed -r 's:.*/::;s/_[^_]*$//;q'

So:

$ find collect/ -mindepth 1 | awk -F_ '{print $(NF-1),$NF,$0}' | sort -rV | sed -r 's:.*/::;s/_[^_]*$//;q'
mydir_20161104

And a version that can handle filenames with newlines:

find collect/ -mindepth 1 -print0 | sed -rz 's/(.*)(_[^_]*)(_[^_]*)$/\2\3 &/' | sort -zrV | sed -zr 's:.*/::;s/_[^_]*$//;q'

This uses \0-delimited lines throughout (-print0 in find, -z in sed and sort). awk is replaced with an equivalent sed command.


"xrandr: Configuration crtc 0 failed" after xrandr --addmode command

Do you have multiple output devices? You will probably need to specify the crtc number when setting the resolution.
First get your crtc number with:
xrandr --verbose

Now make this part of the command:
xrandr --output CRT1 --crtc CRT1 --mode 1280x720_60.00 --brightness 0.7 --gamma 0.3:0.3:0.3

Remember to change CRT1 to the value you receive from the --verbose output.
That should do it.


move 14.04 from HD to SSD and new HD - in what order

I would move the data to the HDD first, then the system to the SSD - that way you don't run out of space & can use recursive copy/move without duplicating.

The way I did this was to create a smallish partition - 15G IIRC - for boot & most of the smaller directories, around 20G for /usr, and the remainder of the SSD for /home (I tend to install lots of packages over the years!) using gparted, and create folders for 'Stuff' on the large HDD; along the lines of cd /path_to_3TBdrive ; mkdir Music Movies Documents... & then move out large files from my /home to the new HDD, finally copying the remainder of the system over using a live CD - you can then move the system folders while they're not mounted, re-write /etc/fstab to suit (the SSD copy of course!), put the [small enough] residue of your /home folder into the 3rd SSD partition, use grub to make the SSD boot & you're done.

There is sufficient info in askubuntu that I haven't re-written the detail on this part!


For login shells, .profile in your home directory will be executed. So if you have functions defined in .bashrc, make sure the file is included in .profile as below:

if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
        . "$HOME/.bashrc"
    fi
fi

Also, you can issue the command below:

source ~/.bashrc

and then call your functions. This will make sure there is no problem in including any files.


juju message: Waiting for agent initialization to finish

Usually when you deploy a service and don't specify a machine, juju deploys that service to a new machine enlisted in MAAS. This message appears when juju is grabbing a new node to deploy that service on.
See juju deploy in commands list


How to get the toolbar to follow greybird theme in Corebird

According to the official site, that's how it's supposed to look:

The actual toolbar is the toolbar/button controls combined one and it seems to be following your gtk3 theme correctly.


Can Nautilus display a .desktop file by its real name?

With newer versions of Nautilus (2.31.5 and later) renaming .desktop files actually changes the filename, not the Name field of the file itself.

Nautilus  will show the full filename (with the .desktop extension), if the .desktop file is not executable.

For example,
if Firefox.desktop is executable:

Now to see the actual filename, make Firefox.desktop un-executable. Right click -> Properties -> Permissions -> Uncheck  Allow executing file as a program.

Now Nautilus will show the full file name:

   There seems to be a bug with renaming un-executable .desktop files in Nautilus.
  If you don't erase the .desktop extension, the file will
  have a double-extension (i.e Firefox.desktop.desktop).


'The folder could not be opened' Lubuntu 12.04 64-bit error

Solution in this post should help:

http://ubuntuforums.org/showpost.php?p=11816590&postcount=4

Works for me.


Try mkusb with GUI. It do more then what rufus does. Simple to use.

Find the below article: mkusb - tool to create boot drives | help.ubuntu.com


Got stuck when updating from 15.04 to 15.10, generating grub config file

Try deleting some of the initrd images:

sudo rm /boot/initrd.img-3.13.0-3*
sudo rm /boot/initrd.img-3.13.0-4*
sudo rm /boot/initrd.img-3.13.0-5*

and the linux images:

sudo rm /boot/vmlinuz-3.13.0-3*
sudo rm /boot/vmlinuz-3.13.0-4*
sudo rm /boot/vmlinuz-3.13.0-5*

Then use apt-get to purge them:

sudo apt-get purge linux-image-3.13.0-3* linux-image-3.13.0-4* linux-image-3.13.0-5*

Then, make sure the upgrade went properly by running the following commands:

sudo apt-get update
sudo apt-get upgrade

If you get no errors, run the following:

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

When that is done, run:

cat /etc/apt/sources.list.d | grep wily

it should return wily.

EDIT

Because windows seems to be in a hibernated state, run the following command to fix that:

sudo ntfsfix /dev/sdXX

where sdXX is the drive and partition number of the drive partition that was "left in an unsafe state". Example sdc1.

Then, run:

sudo update-grub

and proceed.

Please post any errors.


Apache startup script keeps lock file open

Since nobody wrote an answer (despite bounty), I'm going to explain myself, how I finally solved this.

muru's comment (thanks a lot!) was right and brought me on the right track: In Ubuntu 14.04, the Apache startup is managed by a sysv init script, and being a shell script it inherits everything (environment variables, open file descriptors, etc.), and the apache process started by it will inherit all of those as well. Mysql, in turn, is managed by Upstart, which ensures a clean environment for started services. This explains the different behavior for Mysql and Apache.

Armed with that knowledge I knew better, what to look for, and found this answer on unix.stackexchange.com. It suggests to close the file descriptor in the sub-shell that calls scripts that shouldn't inherit it, while keeping the descriptor open in the outer shell, to make sure that the lock stays effective.

Unfortunately, this means that I had to move the flock calls to within the shell script, otherwise my script wouldn't know which file descriptor to close. So my new shell script (which also took some inspiration from this blog post about flock) has the following structure:

#!/bin/bash

FLOCK_FILE="/var/lock/backup-lock"
FLOCK_FD=20

# Locking
eval "exec $FLOCK_FD>'$FLOCK_FILE'"
if ! flock -n $FLOCK_FD
then
  echo "FAILED! There is a backup script already running."
  exit 1
fi

(
  # Unlock in sub-shell, so daemons with bad startup scripts
  # (like Apache) don't inherit the look.
  # Note that the lock is still alive in general because it's
  # held by the outer shell.
  eval "exec $FLOCK_FD>-"

  # ... normal backup stuff from the original script ...

  # Among other stuff the mentioned vicious line:
  service apache2 start

  # ... normal backup stuff from the original script ...
)

# Unlock in outer shell because we're done.
eval "exec $FLOCK_FD>-"


Wubi installation on laptop keeps becoming unresponsive

You can start narrowing it down by adding measurements:

1) Start a terminal session (Applications -> Accessories -> Terminal), and run the "top" command on it. That will show you what processes are using cpu time.

2) Add graphs of your system performance to the menu bar. Right click there and select add to panel -> system monitor. Then right click on the new graph, select properties preferences and tick all the monitored resources enabled. You might also want to change the Processor IOWait colour to be more easily noticeable.


You might have got the answer by now, but i am still posting it here.
You can use expect command to send the password (stored in the 'passwd' variable) to the terminal when the required prompt appears.
A good tutorial can be seen here.


32 bit server CD fails with package corrupt

Try a different download mirror. Try comparing the checksum on your ISO before burning it. If those check out clean, you probably have a hardware failure. You might be able to get away with just burning the disc on another machine since burning tends be a little more fragile than reading.


This is a bug in librsvg package. They have 200000 items hardcoded for versions prior 2.49.5.
I can confirm the bug on Ubuntu 20.04 LTS. So I have reported it to LaunchPad as bug 1916055. Popular affected apps:

Eye of GNOME
Eye of MATE, Atril
GIMP

There are apps using different libraries and fail - Karbon, Krita, Cenon.
Possible workarounds are:

recompile the library locally with patch to have 1000000 XML node limit.
At first enable Source Code repositories from software-properties-gtk and the run commands below to get build-dependencies and for patching with successful compilation:
sudo apt-add-repository main
sudo apt-add-repository universe
sudo apt-add-repository multiverse
sudo apt-add-repository restricted

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

sudo apt-get build-dep librsvg2-dev
sudo apt-get install devscripts

cd ~/Downloads
apt-get source librsvg2-dev
cd librsvg-2.48.9

# change 200000 to 1000000
sed -i "s/200_000/1_000_000/" rsvg_internals/src/limits.rs
dpkg-buildpackage -b -uc -us

sudo apt-get install ../*svg*.deb

Then pin package versions with single long command:
cat <<EOF | sudo tee /etc/apt/preferences.d/pin-librsvg2
Package: gir1.2-rsvg-2.0
Pin: release a=now
Pin-Priority: 1337

Package: librsvg2-2
Pin: release a=now
Pin-Priority: 1337

Package: librsvg2-bin
Pin: release a=now
Pin-Priority: 1337

Package: librsvg2-dev
Pin: release a=now
Pin-Priority: 1337

Package: librsvg2-common
Pin: release a=now
Pin-Priority: 1337

Package: librsvg2-doc
Pin: release a=now
Pin-Priority: 1337
EOF

And enjoy:

use viewers and editors with different back-end library:

web browsers like Firefox, Chromium, Konqueror
LibreOffice Draw
Inkscape (needs >14 Gb of RAM)


I'm not sure what details you exactly want to collect, however in similar situations I would suggest using sysstat.

sudo apt-get install sysstat

then you can use sar command to see what's going on. it also installs a cron script: /etc/cron.d/sysstat and saves data at /var/log/sarX.

You can use sar -q to get a report of load avg or -P for per-processor statistics, etc.

Example:

01:36:25 PM       CPU     %user     %nice   %system   %iowait    %steal     %idle
01:36:26 PM         1      8.08      0.00      2.02      1.01      0.00     88.89

Read more: examples, outputs, ...


How to write a shell script that synchronizes Google Drive to Linux OS?

have you tried "Grive".

It simply downloads all the files in your Google Drive into the current directory.
after you make some changes to the local files, run grive again and it will upload
your changes back to your Google Drive. New files created locally or in Google Drive
will be uploaded or downloaded respectively. Deleted files will also be "removed".

also take a look at this question


How to remove shortcuts of drives from desktop without unmounting it always?

Press Alt+F2 and enter gconf-editor.
Navigate to /apps/nautilus/desktop.
Deselect volumes_visible.

(source)


16.04: How to access new disk just added

The server was set up not to use raid and as such was not "hot swap" so I needed to go into system setup -> device managment and "make the disk 'non raid'".


Make a bootable USB stick for MacBook Air, with wifi drivers?

Had the same problem. Use a Thunderbolt to Ethernet adapter, it is detected out of the box (no connection needed). Then you can install the wlan drivers.


Please take a look at my answer in Openstack on MAAS error when upload images for details on how to upload Ubuntu Cloud Images to an OpenStack cloud.


try this method

1.Download java

http://www.oracle.com/technetwork/java/javase/downloads/index.html

2.Open terminal type commant

cd Downloads

tar xzvf jdk-8u45-linux-x64.tar.gz

sudo mkdir /usr/lib/jvm

sudo mv ~/Downloads/jdk1.8.0_45/ /usr/lib/jvm/

sudo chown -R root:root /usr/lib/jvm/jdk1.8.0_45

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0_45/bin/java" 0

sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0_45/bin/javac" 0

sudo update-alternatives --set java /usr/lib/jvm/jdk1.8.0_45/bin/java

sudo update-alternatives --set javac /usr/lib/jvm/jdk1.8.0_45/bin/javac

sudo gedit ~/.bashrc
    export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_45
    export PATH=$PATH:$JAVA_HOME/bin

. ~/.bashrc

java -version

echo $JAVA_HOME

echo $PATH


Open Source alternatives to Windows Live Writer

Drivel - GNOME client for working with online journals, also known as weblogs or simply "blogs". It retains a simple and elegant design while providing many powerful features, including: Support for LiveJour ...

BloGTK - weblog client that allows you to post to your weblog from GNOME without the need for a separate browser window. BloGTK allows you to connect with many weblog systems such as Blogger, Movable Type, WordPress, ...

ScribeFire - extension for the Browser that integrates with your browser to let you easily post to your blog: you can drag and drop formatted text from pages you are browsing, take notes, and post to your blog. Avail ...

Blogilo - blogging client for KDE, which supports famous blogging APIs.

GNOME blog - desktop blogging application for Linux and Unix. Easy and quick to use to help you writing your great blog posts.Any bugs or feature requests should be done through Bugzilla.Features Simple to use inte ...

You should use all to have an opinion. It is a good idea to check their reviews in Ubuntu Software Center.

source


Is there a way to adjust brightness for only a single window?

No. You can't adjust the brightness/contrast/gamma of a specific window. What you CAN do if you have multiple screens is adjust the screens separately.

xrandrcan do this on a screen by screen basis. The command structure is xrandr --output displayname --brightness brightness
where displayname is the connected display that you have chosen from the list that you get with the command xrandr -q | grep " connected"and brightness is a value of your choosing (1 being the default). Values above 2 will wash things out to the point of being virtually unreadable, and values of .1 or below aren't recommended either. Your mileage may vary somewhat depending on the darkness or brightness of your theme. Smaller adjustments are preferable until you get a sense of the extents you are looking for.


You must remove previous existing version of docker and docker engine before you install docker using docker installation guide.

sudo apt-get purge docker docker-engine

If you have already removed previous version of Docker and still have issue as mentioned,then you may have issue due networking ranges overlapping between your network or vpn and docker0 bridge interface.

Docker attempts to find if any of the standard private IP-ranges is available to use.

You can configure the default bridge network by providing the bip option different than your current network or vpn ip ranges along with the desired subnet in the daemon.json (default location at /etc/docker/daemon.json on Linux) file as shown in below example:

{
  "bip": "172.26.0.1/16"
}

Restart the docker daemon

sudo systemctl restart docker


Determining which update caused 12.04 to stop working in VirtualBox

During the testing in beta release something similar happened to me, installing guest additions from "Additionals Driver" did the trick.


Clarification: SSD Cache Hard Drive w/ intel raid

What I did with my u410 was put the sata controller into AHCI mode (enable legace mode booting, and enable USB Legacy mode), and then installed ubuntu to the mechanical disk (I used a single partition, but there's no reason you couldn't use a separate one for your /home as well). From there I used flashcache (step by step directions located here) and now I find that booting and what not happens just about as quickly as it does right off the SSD. I would have preferred to use bcache, but couldn't be bothered to pave that road with ubuntu.


What does "[[ $- != *i* ]] && return" mean?

$- means 'current flags'.
echo $- returns "himBH". Those are all defaults.
so ... [[ $- != *i* ]] && return actually does what it says above in a comment: it checks if the interactive flag is set. The [[ and ]] make it a boolean so it ends up in a "true" or "false". "false && return" makes it go on "true && return" makes it execute the return.

The default flags explained in more detail:

h is for "hash all": this tells bash to remember the locations of commands it has found through querying your PATH.

i is for "interactive": entering input & getting back output.

m is for "monitor": this enables job control

B is for "brace expand". This allows you to use brace expansion

H is for "history expand". This is what enables you to rerun a command from your history by prefacing its number with an exclamation point

By the way. I have ...

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

Basically does the same but easier to read I assume.


When does "Not all updates can be installed" warning appear

The Information provided on Community Help may helpful for dealing with partial upgrade:

  During the past few Ubuntu development cycles, we've been flooded with
  threads asking for assistance related to issues caused by careless
  usage of the "Partial Upgrade" feature of Update Manager, which hinted
  to a poor understanding of package management and the way updates
  happen in the development branch.

  In an effort to help with this situation, this document aims to
  clarify what a Partial Upgrade is, and why, in most cases, you'll want
  to avoid it.


Well I think this should disable the annoying update pop-up:

gsettings set com.ubuntu.update-notifier auto-launch 'false'

Regarding the previous answer (and in particular the "Updates are important." comment), there are many MANY reasons for wanting to disable intrusive applications.  I hardly think it is necessary to lecture the Op.  As an example: I for one find this update pop-up very annoying on my mythtv set-up as it not only blocks the screen but is modal.


Installing the package pinentry-gnome3 solved the issue for me.


Screen freeze for 20 seconds after automatic login

You need to install video driver. Run in terminal

sudo apt-get install nvidia-346

and reboot.

If that does not work well, install another driver

sudo apt-get purge nvidia*
sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-352
sudo add-apt-repository -r ppa:xorg-edgers/ppa


How do I move the workspace selector to left?

If indeed you are using standard Ubuntu, and are referring to the workspace selector that appears on the right of the screen when you click the Activities button or press the Super key, then most probably you will like the Gnome Shell extension Workspaces to Dock. In first instance, this extension was designed to show the workspace selector as a dock on the desktop, similar as how the popular extension Dash to Dock (and also the Ubuntu Dock) turn the dash into a dock on the workspace.

To suit your preferences, you can configure the Workspaces dock to be on the left side of the screen. You will then need to move the Dock to the right or the bottom of the screen. However, Workspaces to Dock includes also functionality of the Dock, so you could eliminate the Dock and control both workspaces and applications from a single dock to the left of the screen. There are many options to control the feel, look and behaviour of the dock.


I think that wxHexEditor fits your needs.

  wxHexEditor is not an ordinary hex editor, but could work as low level
  disk editor too. If you have problems with your HDD or partition, you
  can recover your data from HDD or from partition via editing sectors
  in raw hex. You can edit your partition tables or you could recover
  files from File System by hand with help of wxHexEditor. Or you might
  want to analyze your big binary files, partitions, devices... If you
  need a good reverse engineer tool like a good hex editor, you welcome.
  wxHexEditor could edit HDD/SDD disk devices or partitions in raw up to
  exabyte sizes.

You can install it with this command:

sudo apt-get install wxhexeditor

Official webpage: http://www.wxhexeditor.org/


Perhaps, you can try Lubuntu or Xubuntu 18.04.04. They both have 32bit versions, and have better support than 16.04.06.

Anyway, the default virtual box resolution is: 800x600 which is why the continue button is cut off.

You can do the following:

Alt + Right Click to move the window to the left and then continue the install on the default resolution.

OR

Instead of going to the install menu, click on Try Ubuntu.

Either do the following:

Go to System Settings menu by clicking on the top right gear icon. Then, go to Displays. Select a higher resolution and click the apply button on the right. (it may be partially covered.) Afterwards, continue the install process.
Go to the terminal (shortcut: ctrl+alt+t) and run this command:

xrandr --output Virtual1 --mode 1024x768


HBO Go Termination of NPAPI plugin support

According to https://help.hbogo.com/hc/en-us/articles/204870417-Is-HBO-GO-supported-on-Linux-

  HBO GO/MAX GO is not accessible on the Linux platforms, including the Ubuntu & Tizen OS.

You have to complain to HBO and ask them to support Linux.

Submit a request here - https://help.hbogo.com/hc/en-us/requests/new


Broadcom BCM4313 works poorly on a HP Pavilion G4-1212TU

User ts3 over at Ubuntu Forums wrote a solution which worked for me, finally, after so long a struggle. So if you're facing the same problem as me, check it out at http://ubuntuforums.org/showthread.php?t=1889170

Here's his summary:

  The b-43 installer does not support BCM4313 (4727)
  The bcmwl-kernel-source driver (found in the Ubuntu Software Center) supports it but first one needs to make sure that

  b43 and the option to activate the STA Broadcom drivers through System Settings -> Additional Drivers are uninstalled/disabled
  that those drivers (b43, bcma, brcsmac) are blacklisted and
  that the wl driver that works is NOT blacklisted

See the link for details.


From man 5 crontab :

  The day of a command's execution can be specified by two fields — day
  of  month,  and  day  of  week.   If  both  fields  are
         restricted (i.e., aren't *), the command will be run when either field matches the current time.  For example,
         ``30 4 1,15 * 5'' would cause a command to be run at 4:30 am on the 1st and 15th of each month, plus every Friday. One can, however,
         achieve the desired result by adding a test to the command.

So in your case the command is being executed on date 8-17 of all months plus mon-fri of every week.

In order to run the job on only mon-fri of day 8-17 of each month we need to add a test :

*/15 * 8-17 * * /bin/bash -c '[[ $(/bin/date '+%u') =~ 1|2|3|4|5 ]]' && your_command

The above job will be run after every 15 minutes of 8-17 of each month and will check if the day is between monday to friday by the test [[ $(/bin/date '+%u') =~ 1|2|3|4|5 ]], if so then your_command will be executed, otherwise not.

Also as you are using an interval of 15 minutes use */15 instead of comma separated range.


Why does `which` point to a different binary?

If you run:

echo $PATH

You are going to get something similar to:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

As you can see, /usr/local/bin has a higher priority, so bash will find your locally installed version of curl first and stop searching any more.

You can change this behavior by editing PATH environment variable, e.g (in .profile):

PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin


solved by adding udev rules from the following link https://www.pjrc.com/teensy/49-teensy.rules

ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789A]?", ENV{MTP_NO_PROBE}="1"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", MODE:="0666"
KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", MODE:="0666"

save as /etc/udev/rules.d/49-teensy.rules


Permission denied (publickey) When Trying to Connect to Server over Internet

Following up on my comment since it solved the problem.
I think the addition of Google Authenticator was an unrelated event to your problem.  Basically, running a command with sudo runs it in the context of the root user.  When you run the command ssh user@server, it will look under /home/$USER/.ssh/ for private keys to use.  When you run it with sudo ssh user@server, it looks under /root/.ssh/ for private keys.  I'm guessing your keys are under your user's account rather than root.


How to add option in xorg.conf with nvidia-prime

Don't edit /etc/X11/xorg.conf. Applications like nvidia-settings have a bad habit of overwriting it. Use separate .conf files in /etc/X11/xorg.conf.d instead. From man xorg.conf:

Additional configuration  files  are  searched  for  in  the  following
directories when the server is started as a normal user:

    /etc/X11/<cmdline>
    /etc/X11/<cmdline>
    /etc/X11/xorg.conf.d
    /etc/X11/xorg.conf.d

where  <cmdline> is a relative path (with no “..” components) specified
with the -configdir command line option.

When the Xorg  server  is  started  by  the  “root”  user,  the  config
directory search locations are as follows:

    <cmdline>
    /etc/X11/<cmdline>
    /etc/X11/<cmdline>
    /etc/X11/xorg.conf.d
    /etc/X11/xorg.conf.d

where  <cmdline> is the path specified with the -configdir command line
option (which may be absolute or relative).


How can I always show the hover title in expose when using compiz?

Open the Compiz Settings Manager and look for Scale Addons (confusingly in the Utility section, not with the regular Scale plugin under Window Management). From there, click on the Appearance tab and open the Window Title section. You'll find a drop-down menu for the Window Title Display, which you can change to All Windows.

I believe you might also need to have the package "compiz-plugins-extra".

In addition, as pydave mentions below, make sure that the Text Plugin (in the Image Loading Section), is enabled.


I think you should install hplip-gui package with sudo apt-get install hplip-gui and add your printer from here.

According to HP page Envy 4520 Series are fully supported since 3.15.1 (16.04 LTS xenial has 3.16.3+repack0-1).

After installation you can launch HP utility from terminal as hp-toolbox or from GUI as HPLIP Toolbox.


Text editor row and font color problem ( Ubuntu 20.10 - Dark Mode active)

I'm getting same issue on Ubuntu 20.04 w/Dark Mode ... seems much better if I click in the app's hamburger menu ( the 3 horizontal bars just to right of  Save button -->
Preferences -> Font & Colors -> where I picked say  Oblivion


Where is GNOME device configuration? - Ubuntu 17.10

As you noted, Wayland does configuration a bit differently. I think to answer your question: the location you're interested in is /usr/share/X11/xorg.conf.d. That should get you started (it did for me). Otherwise, yell out and we can sort out any additional config issues.


Could not download the upgrades Ubuntu 14.04 to 16.04,how to resolve

I don't think you can upgrade Ubuntu 14.04 to 16.04 through terminal. To do that you need to go to the Ubuntu's official website and go to **Downloads > Ubuntu 16.04.x or 16.04 ** and you should start downloading the file.

Good luck


Display Settings / Dual Displays > Lubuntu 20.04

open Application menu, then

preferences
lxqt setting
open lxqt configuration center

Then on configuration center you will see monitor setting or you can simply open application menu and type monitor setting on search.


How to reconfigure keyboard input toggle shortcut

The point that I had missing was that by default you could have switched between input languages by using the combination Super+Space; but if you somehow did something that ruined this shortcut, you can run the command gsettings reset org.gnome.desktop.input-sources xkb-options to erase the new settings and it's now back to default. If you want to use any new combination you can set it through the settings menu.All credits go to @GunnarHjalmarsson for helping me out through this.


Setting up Ubuntu 16.04 with nvidia gtx 1070

I believe I have fixed the issue for now!

After some hours of research I noticed that I could do some basic stuff with my ubuntu terminal after logging in. I had the empty screen and could get basic options by right clicking the mouse.

So i figured, perhaps Unity is just not working properly.

In my case the following solved it:

How enable Unity again?

I hope this helps others too!


Does anyone know of a substitute, or native application, for notes and notebooks in Ubuntu?

Organon is free software with the formatting capability you want (it piggybacks on Libre Office Write), comes in a Linux native version, and coupled with documents stored on Dropbox or Google Drive will give the cloud features you want.  I can't say whether it's directly compatible with other notes apps (especially on Android or iOS), because I don't use it that way.


Ethernet to NAS, Wifi to Internet on same subnet

Turns out, my NAS had somehow messed up the internal IP. I resetted the NAS, configured as shown above and now I can surf the interwebs over Wifi and use my NAS over Ethernet.


UbuntuOne needs CouchDB for contacts and notes synchronisation.


Installing wine mono and gecko using .msi file offline

From https://www.winehq.org/pipermail/wine-users/2005-December/020055.html

wine msiexec /i <path to msi>


I've never been able to find a setting to easily do this using Ubuntu's Unity Desktop.  Someone can correct me if it exists.

However, the Cinnamon Desktop does allow this.  Cinnamon Settings->Workspaces->'Only use workspaces on primary monitor'


Boot loop after installing Ubuntu 18.04 alongside Windows 10

A) UEFI/BIOS

Set to "UEFI mode only" (no legacy/CSM).

Disable "secure boot"

Disable "Intel Rapid Start" (if equipped)

Disable "fast boot" in UEFI (note this is different than the "fast startup" setting in Windows 8/10). The options in your UEFI/BIOS might say something like Full/Minimal/Automatic for boot mode. Select Full (or thorough, or complete, etc whatever your UEFI vendor has chosen to call it).

B) Advanced Power Options (Fastboot)
Disable fast startup in Windows 8/10 under "advanced power options". Restart computer to ensure that this subsequent boot and the next reboot/shutdown will be in "normal" mode.
C) Rufus / Bootable USB stick
Use Rufus to create a bootable USB stick with your choice of Ubuntu based distro. Make sure in Rufus that you CHOOSE the option UEFI/GPT only. This ensures the Linux environment boots only into UEFI mode during your install.
D) Boot Menu
Reboot your computer and press key for one time boot menu (Dell is typically F12). Select your USB stick from the boot options.

Note:
Make sure it says UEFI in front of the USB stick in the boot menu.
If not, return to Windows and recreate your USB stick with Rufus ensuring you choose the UEFI/GPT (only) option.

E) Boot into USB Stick
Boot into Linux live environment and begin the install.
F) Installation type
When you get to the installation option, choose "Something else" at the bottom of the Ubiquity installer.
G) Create partitions
Find your secondary HDD that you will be installing Linux to.
In my case it was listed as /dev/sdc (with /dev/sda being the windows drive and /dev/sdb the USB drive [which was invisible in the installer]).
So basically:
+--------------+--------+---------------------------+--------------------------------+
| Device path  | Device | Operating System (OS)     | Visible in Ubiquity installer? |
+--------------+--------+---------------------------+--------------------------------+
| /dev/sda     |  SSD   | Windows 10                | yes                            |
| /dev/sdb     |  USB   | Ubuntu 20.04 (Live Stick) | no                             |
| /dev/sdc     |  HDD   | None                      | yes                            |
+--------------+--------+---------------------------+--------------------------------+

1st Partition / EFI (For separate EFI partition. See below for what this does.)

Select your target drive (in my case /dev/sdc)

Select "Make New Partition Table" (IMPORTANT: This will format the entire disk. Do not do this if you have any data you want in this disk. In that case, you can back up the data and proceed. You can recreate a partition and store the data back in there.)

Partition the target drive as follows:

Size: 650 MB
Type for the new partition: Primary
Location for the new partition: Beginning of this space
Use as: EFI (this will be listed as /dev/sdc1 efi in the partitioning tool once you create it)

2nd Partition / Root (All the software you install are stored here)

Select "free space" under your target drive (in my case /dev/sdc)

Select "+"

Partition the target drive as follows:

Size: min. 10 GB (25+GB recommended. I have 40GB)
Type for the new partition: Primary
Location for the new partition: Beginning of this space
Use as: ext4
Mount point: Choose "/"

3rd Partition / Swap (Only needed if you want to Hybernate)

Select "free space" under your target drive (in my case /dev/sdc)

Select "+"

Partition the target drive as follows:

Size: Depends on your RAM. See Swap FAQ.
Type for the new partition: Primary
Location for the new partition: Beginning of this space
Use as: swap

4th Partition / Home (Only needed if you want to keep your personal files separate from / Root partition)

Select "free space" under your target drive (in my case /dev/sdc)

Select "+"

Partition the target drive as follows:

Size: Remainder of space on the drive or any size you want. (You will need to leave some space if you want to make another partition. Of course, you can always shrink "/home" partition later)
Type for the new partition: Primary
Location for the new partition: Beginning of this space
Use as: ext4
Mount point: Choose "/home"

H) Boot loader Device

BEFORE clicking "Install Now", from the "device for boot loader installation" option button, select the 650MB EFI partition you just created as the target for the bootloader. (example /dev/sdc1 in my case).
Click "Install Now".

I) Installation & Reboot

Finish the installation process and reboot (removing the USB stick when your UEFI/BIOS screen logo appears).

J) Upon reboot
After UEFI/BIOS reads the new bootloader entry that Linux has added to it, you will be presented with the grub menu with a listing of your Linux distro as well as a listing to boot Windows 10.

Boot into Linux

Install any updates and then reboot and attempt to enter Windows 10 from the grub menu to make sure that grub correctly handles the hand-off to the Windows 10 bootloader.

What you have done:
You have installed the Linux EFI bootloader to the newly created EFI partition. In the process of this, Linux has added an entry to your UEFI listings in your systems UEFI/BIOS. Linux has also automatically detected your Windows 10 install and added a grub menu item to boot it. Your computer at this point will now automatically boot to Linux unless you choose to boot to Windows (from the Grub menu).
What you have not done:
You have not in any way altered your Windows 10 install or its bootloader or even so much as touched the Windows 10 EFI partition. Everything is reversible simply by removing the Linux UEFI listing from your UEFI/BIOS settings. How to do so varies from each vendor.
Borrowed and edited from user613363's answer. (Dual Boot Windows 10 and Linux Ubuntu on Separate Hard Drives)


Gwibber-service keeps running after uninstall

Uninstall the package gwibber-service and log in again.


inotify in a remote shell and get the output back

Figured it out:

while true; do
    echo "inotifywait -m -e close_write $REMOTE_WATCH_DIR --format '%w%f:%f'" | ssh -i key.pem A@machineA /bin/bash |
    while read file
    do
        process_data $file
    done
done


How to know if Squid Proxy is doing the Cache correctly

in a terminal, on the server running squid, run the command

tail -f /var/log/squid3/access.log

then watch it as a user visits web pages.  If lots of lines scroll up the screen whenever they click on something then they are using the proxy server.  If the squid log file is not located there have a look in /etc/squid for the location of the log file.

To quit out of the above command press ctrl+c

To see if it is actually caching stuff and being useful there should be some lines that say it is a HIT.  To see a full description of the log file contents see the squid wiki. Note that cache HITs will not be as frequent as you'd like due to an individual user's web browser already caching stuff locally.  You will get the most hits when multiple users request the same pages before that info is dropped from the cache.

Such as when an allstaff email goes out saying "check this site out..."

TCP_MISS/200 means that the requested document was not in the cache but it could fetch it OK from the web server.  The direct at the end says that the file was fetched from the webserver.
TCP_IMS_HIT/304 means that the client asked if the file has changed, and squid checked its date/time on the webserver and found it had not changed, so it gave a copy of the file to the client out of its local cache.

So yes your squid is being used and is working as a cache.


Can't install Ubuntu on Lenovo Windows 10 laptop

Thanks to @muru and @sudodus in the comments above.

My Ubuntu install from a USB stick was failing - an error about a lack of space available.

The two internal hard drives were not getting recognised when installing.

This is now rememedied as per changing UEFI settings to AHCI mode.

I used this link: How to change BIOS UEFI settings to AHCI mode


If you installed python3.8 using apt (via ppa:deadsnakes/ppa), it can be installed using apt too, the name of library is python3.8-tk.
sudo apt install python3.8-tk

In my case, it solves the problem. For instance, now I can use matplotlib in python3.8 which requires tkinter.


Splashtop ... used to be. X2Go – If you’re comfortable exposing your SSH port maybe run fail2ban with it. Mikogo – Surprisingly, not bad at all. To get it going you might need to

 sudo apt-get install libxtst6:i386

You could pay very reasonable price for Aeroadmin.


changing ownership of file as group user

Only the owner of a file or root is permitted to change permissions.

And even if a file is owned by you, you can't change it ownership to another user. You can however, change its group, to one of the groups which your user is part of.

If a user can execute sudo then the user can execute:

sudo chown new-owner filename

  You can try to manipulate the system files in a way it will be
  possible, however it will create major security risk to your system.

  Such non recommended solution might be:

sudo cp /bin/chown /bin/chown.mod
sudo chown root.www-data /bin/chown.mod
sudo chmod 750 /bin/chown.mod
sudo chmod +s /bin/chown.mod

  Now, user with groupid www-data can execute /bin/chown.mod as user
  root

/bin/chown.mod userid /path/to/filename

  It is very dangerous, for example: as such user can change the owner of /etc/passwd to himself, modify the password file, and change
  the owner back to root, and  a new user was added to the system.


This document is what I use to switch the settings on my keyboard. Most of the configuration only states that it works up to Ubuntu 11.04, but I change the function-mode successfully on 12.04.


Writing commands to a file from a shell script

You can alternatively escape $:

\$(...)
\$

in your code:

cat > .git/hooks/pre-commit << EOM
#Colors
RED='\033[0;31m'
NC='\033[0m' # No Color

# Javascript unit tests
res=\$(script -q /dev/null ./tests/hooks/non-ui-test-hook )
RESULT=\$?
[ $RESULT -ne 0 ] && echo -e "$res" && exit 1
echo -e "All test cases passed.\n"
exit 0
EOM


Static Application Switcher is empty after show dekstop

This happens because that plugin works by default on "active" windows.
You should consider associating Alt+Tab shortcut to ALL windows.

Give it a try:

CCSM/Application Switcher/Association tab.
Get rid of Next window / Previous window keyboard shortcuts and apply them to
Next window (All windows) / Previous window (All windows).

Hope this helps.


How to remove wrong command ran earlier?

This should fix it:

sudo sed -i 's/ ain//' /etc/apt/sources.list.d/noobslab-themes-precise.list

Otherwise, run sudoedit /etc/apt/sources.list.d/noobslab-themes-precise.list and fix the line manually.


ubuntu 14.04 not detecting external hdd ext4

Just got it working with the umount command


If your internet connection works well, my suggestions are just for the "browser" problem.

You can always try other browsers (such as Chromium, etc.), there are a lot of options in Ubuntu Software Center.

If you want to stick with Firefox, here are the complete troubleshoot.

The short version, each step could help, so try open some pages after each step.

Restart your computer
Press Ctrl + Shift + Del to clear "recent" history (I know this is a fresh install, it helps sometimes)
Open a terminal, and run: firefox -safe-mode
Reinstall Firefox, following this


19.10 Kubuntu Enable menu bar on second monitor

To add a new panel either click on the desktop toolbox button and select Add Panel or open the context (right click) menu on the desktop and select Add Panel from the menu. Default Panel make a Panel with all of the default widgets (launcher, pager, tasks, system tray, clock, etc.), which looks like what you want.

If you can't create it on the second monitor, create a second panel of the first monitor then drag-and-drop it to the second monitor.


The installation script should have handled this for you. If you are on GUI, you can confirm by checking for apcupsd in the list of startup applications:

System > Preferences > Startup Applications

If this is not the case or doesn't apply, these further resources can assist:

How do I start applications automatically on login?
Run a program on startup using Ubuntu | Lifewire


Lubuntu 17.10 network manager preventing shutdown

I had exactly the same problem with my ASUS X206HA.
Updating my linux kernel (4.13.4) to 4.14.0 solved my problem.

I used this guidance:
ostechnix.com

In the ArchLinux Forum they also discussed a similiar problem:
archlinux forum


multi-core usage, biased towards core 2?

Yeah, it can be normal. Depends on how much management the OS does. The two big tools to impact this are

taskset which can direct what CPU a process can use
setting the IRQ affinity of your pci devices

IRQ affinity is easy to fix. Do some IO, watch /proc/interrupts and if you see MSI-foo all on the same CPU then distribute them. You usually want to service IRQs on the "real cores" since they are the fastest. Once you have that figured out, write a script to commit that to system start and you're done.

Processes are a pain because they can migrate between CPUs. To "do it right" you really need to setup cgroups for the processes in question. Or... you take the lazy way out and make a wrapper script for program X that calls taskset ... _X.

Measure your before an after performance with a benchmark like fio or all your tweaking is for nothing. If you can't measure your changes you don't know what they're worth.

For example I have a 24 CPU, 2  numa node system here that has a storage device which will create a MSI interrupt for each CPU... and then bind them all to CPU 0 :-p. Spreading the IRQ affinity across the first 12 cores quadrupled the IO throughput recorded by fio. But this system actually has lots of bandwidth, the typical desktop does not.

Good luck. Performance work is fun, ... and hard :)


Ubuntu 20.04: CPU usage peaks every 10 seconds - must be gnome-shell

I turned my Wi-fi connection off and strangely everything worked fine. Turns out that MEGAsync, a cloud software, somehow causes gnome-shell to use all of my CPU's capacity. I reported a bug.
So this is not a "solution" to the problem, but a workaround.


I had the exact same problem. This answer here solved the problem.

I followed the last one , i.e,

Install vlc with sudo apt-get install vlc
and then install the required plugins to play *.mkv files by sudo apt-get install vlc-plugin-libde265

Note that, if the plugin installation gave you an error of not found, you will need to add it to the repo first

sudo apt-add-repository ppa:strukturag/libde265
sudo apt-get update

Now try opening the file in vlc.


Why did Remastersys mess up my folder structure?

Before you Remaster your Distro. Open up the file called

/home/{USER_NAME}/.config/user-dirs.dirs

Replac {USER_NAME} with your user name, for example : /home/amit/.config/user-dirs.dirs

Check out all folder places are typed like this following file, if needed edit as shown in picture below

If the desire folder is not typed and left blank type it as given snapshot above. Some times some Desire Directories are left blank and won't work. Check all

XDG_<Desired Name>_DIR="<Required absolute Path>"

When this is done then copy all, whatever you want, folders, files, ect. to /etc/skel remaster will make that default home folder as installation and will copy the same.

to copy and paste alike above pic VISIT HERE


Run sudo apt install -f and you'll get the missing depenencies.


Fan always running in Dell Inspiron 5520

Is the FAN running only under Ubuntu or with other OS too? Maybe the notebook need to be opened and cleaned...?!

Maybe its possilbe to set the temperature when the FAN should start to run to a higer value in the BIOS. This can be dangerus, when the FAN doesen't start early enough and the notebook gets too hot.


Unable to update ubuntu 14.04 LTS by using 'sudo apt-get update'

just add

  http://

edit it like this deb http://download.virtualbox.org/virtualbox/debian trusty contrib non-free

then sudo apt-get update and if that doesn't fix which it should then just delete the file from the sources.list.d directory dont worry it wont effect anything.


How can I find the reference manuals of the installed libraries?

The doc files are usually in /usr/share/doc/.

To check it, you can use apt-file

apt-file list gsl-doc-pdf

or dpkg (only if the package is already installed)

dpkg -L gsl-doc-pdf

The output of the first is

$ apt-file list gsl-doc-pdf
gsl-doc-pdf: /usr/share/doc/gsl-doc-pdf/changelog.Debian.gz
gsl-doc-pdf: /usr/share/doc/gsl-doc-pdf/copyright
gsl-doc-pdf: /usr/share/doc/gsl-doc-pdf/gsl-ref.pdf.gz

So you can find it (as expected) in /usr/share/doc/gsl-doc-pdf/.


That's not what kill timeout does; it specifies how long to wait after sending a polite "terminate" signal for the process to exit before giving up and launching nukes.

If you want to set a process time limit in the upstart way, the easiest way is probably to have something periodically issue a timer event, and use stop on timer.  Alternately (and perhaps more generally), create a wrapper program which forks a small process which sends an event after a time period, and stop on that event.

For more information and best practices,  see The Upstart Cookbook.


Banshee has a DAAP plugin that should be able to see music on your server made available using a DAAP server like Tangerine or mtdaap (both are in the Ubuntu repos).


initramfs: where can I determine what goes into /sbin?

You have to use the entries in /usr/share/initramfs-tools/hooks. These files are executed when you type update-initramfs. Create your own hook script or remove scripts.

Another folder is /etc/initramfs-tools/hook

From man initramfs-tools

   Hooks can be found in two places: /usr/share/initramfs-tools/hooks  and
   /etc/initramfs-tools/hooks.  They are executed during generation of the
   initramfs-image and are responsible for  including  all  the  necessary
   components  in the image itself. No guarantees are made as to the order
   in which the different scripts are  executed  unless  the  prereqs  are
   setup in the script.

Note, the hook-scripts are part of the packages, e.g. kmod. The package creates the file kmod in /usr/share/initramfs-tools/hooks.

Sample script

#!/bin/sh -e
# Copy the compatibility symlinks until initramfs-tools will be converted
# to use the kmod program.

if [ "$1" = "prereqs" ]; then exit 0; fi

. /usr/share/initramfs-tools/hook-functions

copy_exec /bin/kmod
cp -a /sbin/modprobe /sbin/rmmod $DESTDIR/sbin/

mkdir -p $DESTDIR/lib/modprobe.d/
if [ "$(echo /lib/modprobe.d/*)" != "/lib/modprobe.d/*" ]; then
  cp -a /lib/modprobe.d/* $DESTDIR/lib/modprobe.d/
fi

As you can see, the hook-script copies all files in /lib/modprobe.d/ into initramfs/lib/modprobe.d/

cp -a /lib/modprobe.d/* $DESTDIR/lib/modprobe.d/

and modprobe into initramfs/sbin

cp -a /sbin/modprobe /sbin/rmmod $DESTDIR/sbin/

Your own initrd.img with one file foo

cd
mkdir initrd
cd initrd
touch foo   # an example file
find . | cpio -o -H newc > ../initrd.img
cd ..
gzip initrd.img
cp initrd.img.gz initrd.img

Check the content of your initrd.img

cd
mkdir initrd_out
cd initrd_out
cpio -i < ../initrd.img

And with ls you should see one file

% ls
foo


Quick way to test / verify a partman expert recipe

Not really what you wanted but you can switch to BusyBox during the installation process, then try fdisk.
But you will have to reboot to load a new recipe, as I don't know how reload the recipe from /tmp.

Installation is on the tty1 and BusyBox tty2 as an example.

From BusyBox you can type : fdisk /dev/sda.
At least you would try. I got the command into a PXE installation, but I just tryed into a VM (iso installation) to check and I can't fdisk...


Most common usage of VPN is to tunnel entire internet connection on system on which it's set. I've no idea how you did it only for browser... Did you perhaps meant Tor Browser? It's a different network. There are some free VPN's, but for good one you will need to pay.

You can redirect entire connection with free Tor network, check "TORtp". Don't know how and if it will work on Ubuntu, seen it on "Freepto" OS and there's also similar solution on "Tails" OS. I've found however this topic for Ubuntu:

How to route all internet traffic through Tor (the onion router)?


I believe the Windows 7 DVD/USB Tool only works for Windows ISOs. I recommend using Rufus to burn your server image. Rufus works with most OSes and is extremely easy to use.


How to open a picture from Ubuntu server, via [SSH on] my laptop Macbook?

I don't know anything about mac, but in your ubuntu server you can enable forward X session. Afterwards you can run a graphical application on your server and relay the application window directly to your ssh client. I can describe the procedure for ubuntu serer AND client.

Server:

/etc/ssh/sshd_config
*find line X11Forwarding and set it to yes*

NOTE server must have X11 installed for this to work (ubuntu server doesn't come with X11 on by default as I recall but you can install it yourself. Mind that it's a major change to your server that can severely load up your server if it's a low cost machine not suited for graphical interface)

Client:
run your ssh command with -x paramter. Afterwards you can request any graphics viewing software installed to open your picture.

user@remotehost# programofchoice /path/to/picture

My suggestion
A simpler way is probably to simply copy the file to local disk using scp (a secure copy that uses ssh to copy the file to the local disk - you make a simple script to download the file without typing the path every time.


Xubuntu 17.04: suspend, shutdown dump to login screen

It's been over a full day since this reoccured. I wonder if something got fixed in an update? It has been suspending properly, whereas before it would happen several times a day. I guess this  is resolved.


Black Screen after booting from USB to Install

Things you might want to confirm:

Your machine has the same architecture you are installing. i.e., it's a 64 bit since you indicated you are installing  ubuntu-18.04.2-desktop-amd64
Try different bios settings such as Raid on
Create a bootable USB using rufus


Making an exact copy of a drive with 14.10 on it to a larger drive

Currently I have this command:-
dd if=/dev/sda of=/dev/sda conv=noerror,sync
Am I right that this will copy the entire disk with the sda2 et al partitions over to the drive that a fresh sda will be created?

Notice that you have a typo in your command. Output file should be the target drive, i.e. most likely sdb. Check which is the source drive and which is the target drive carefully before doing anything! If sda=source drive and sdb=target drive, the command would be:
dd if=/dev/sda of=/dev/sdb conv=noerror,sync

and, to answer your question, yes. But keep in mind that conv=noerror,sync will force bad blocks (if present) to be copied without any warning.

The 8GB drive is encrypted, how do I cater for this and the drive being cloned / copied is in use, how do I deal with that so that any copy is exact and is their a verify setting?

No problems in regard to the encryption, but absolutely don't clone the drive while it's in use.
Boot from a live CD/DVD and do everything from there. Once done you can compare the drives using cmp; first of all you'll need to know the size of your first drive in byte. You can use fdisk to do this: in a terminal:
fdisk -l /dev/sda

Then:
cmp -n <size_of_sda_in_bytes> /dev/sda /dev/sdb

where <size_of_sda_in_bytes> is the size the first drive in byte.
If there's no output, the drives match up to byte <size_of_sda_in_bytes>, i.e. the whole procedure succeded


Did "sudo dconf reset -f /org/compiz". How to restore /org/compiz gsettings from backup?

You used sudo the reset personal configuration files inside your home folder, that made the files changed by the reset owned by root.

To set that back that you need to open a terminal and type this when logged in to your account:

sudo chown -R $USER:$USER $HOME

It will reset all files ownership inside your home folder back to your user and you will be able to use CCSM again.

Next time you need to reset your compiz (or another config tree) just use dconf reset -f /org/compiz, you don't need sudo to change your own files inside your home folder.


How do I Install Ubuntu as a shell to learn how to program in it?

Ubuntu is not a Windows program, it is a different operating system. It doesn't run inside Windows, but instead of Windows.

You can install Ubuntu alongside Windows. Download the CD image, burn it to a CD, and reboot. When prompted, select “Install Ubuntu” and then “alongside Windows”. After the installation, each time you start your computer, you will have a prompt asking you to select Ubuntu or Windows.

There is also an installer program you can run from inside Windows. This installs Ubuntu on a big file inside the existing Windows partition on your hard disk, but even so, you'll have to select Ubuntu or Windows when your computer starts.

Alternatively, you can install Ubuntu in a virtual machine. VirtualBox is an easy one to install and set up. The advantage of running Ubuntu in a virtual machine is that it'll run in a window inside Windows, hence you can switch between Windows programs and Ubuntu programs. The downside is that running in a virtual machine hurts performance; Ubuntu will run slower, and you'll need about twice as much memory since both operating systems are running at once.


What is the default gnome terminal size?

You can get it easily by running the resize command:

terrance@terrance-ubuntu:~$ resize
COLUMNS=80;
LINES=24;
export COLUMNS LINES;

I found it by using apropos and looking for the terminal settings

~$ apropos "terminal settings"
resize (1)           - set environment and terminal settings to current xterm..

Hope this helps!


Unable to implement remote desktop connection from Windows 7 to Ubuntu 14.04

xRDP software package support remote desktop connection from Windows machine. The solution is working quite well as long as you define and install an alternate desktop and you tell your linux machine which desktop to use when performing a remote desktop connection

installing and configuring xRDP and have it working is pretty straight forward and simple nowadays. To summarize

Step 1 - Install xrdp (sudo apt-get install xrdp)
Step 2 - install a desktop. we use mate-desktop (sudo apt-get install mate-core mate-desktop-environment mate-notification-daemon)
Step 3 - tell your system to use mate-desktop by issuing the following command

  echo mate-session >~/.xsession

Restart and you are done.....

there might be some small additional configuration settings to be done.  You can find a detailed and easy to use step by step instructions here


How to troubleshoot or resolve of hardware acceleration of Intel i945 disabled on upgrade from 17.10 to 18.04?

I had a similar problem with my Intel i915 video.

Switching from gdm3 to lightdm fixed the problem.

In terminal...

sudo apt-get update # update the software database
sudo apt-get install lightdm liblightdm-gobject-1-0 # install lightdm
sudo dpkg-reconfigure lightdm # set lightdm as the DM

Choose lightdm and then OK

reboot # reboot the machine (remove nomodeset if you still have it enabled)


What do I need to know if I compile something in order to make it run on other people's machines?

Generally just need to know the binary format (mac, pc or unix in 32 or 64 bit) and if any special libraries or driver are needed. Most desktop machines run a 64bit pc format. There are some rare formats though. Gcc's default options without optimisation should be fine. There are cross compilers that enable you to compile win binaries on unix.


UBUNTU 14.04LTS Wi-Fi hotspot is not detected by android phone

here is a clear guide to create a Wi-Fi hotspot detectable by any Android phone on a Ubuntu 14.04 using the Network Manager and a minor hack:

Click on Network manager -> Create new Wi-Fi network
sudo nano the newly created file /etc/NetworkManager/system-connections/yourWifiNetworkName
change the mode line to: mode=ap

Thats all! From now on you can enable this network from Network manager -> Create new Wi-Fi network -> Connection: select yourWifiNetworkName from the dropdown

source:
http://ubuntuhandbook.org/index.php/2014/09/3-ways-create-wifi-hotspot-ubuntu/


Can you try running

mv /usr/lib/python2.7/site-packages /usr/lib/python2.7/dist-packages; ln -s dist-packages /usr/lib/python2.7/site-packages

Which fixed a similar issue for me in Docker.
Inspired by https://forums.swift.org/t/lldb-install-precludes-installing-python-in-image/24040


Use the design function of Qt Creator when developing Ubuntu apps

I might be a bit late but yes you can use most normal QML.You should read the ubuntu api documentation for that.


CanoScan LiDE 110 driver for Ubuntu? How to scan via command line?

Run the scanimage program.

If you install the 'sane' package, you can also use the scanadf tool.

To find the scanner use lsusb and sane-find-scanner.

http://www.sane-project.org/man/scanimage.1.html

http://www.martoneconsulting.com/sane-scanadf.html


How to diagnose suddenly failing grub boot from iso?

As so often happens, after giving up and posting a question, I figured it out.

This part of my question was incorrect: "I have made no hardware changes...."

There was an Android tablet plugged into a USB port, and the UEFI was counting it as the first drive.

This messed up the drive count and my hd0,1 was not what I expected.


How to efficiently partition a single Windows-Ubuntu dual boot disk?

I know Windows well but Ubuntu not so well
(or the other way around)
Both Windows and Ubuntu are POSIX compliant operating systems and they both allow you to define which user has access to which individual file, directory, partition or disk!
But they do it just a little bit differently (There are full-time jobs for people who have to clean up wrong ownership of data all day long!)
So take the average hard disk:

If you have more then 1 partition, you're probably running an UEFI system.  Please, do not delete any of those partitions!  Concentrate on the biggest partition you have and use that one in the following exercise...
Depending on your use case give each OS enough space for its own system and applications (the below numbers are the minimum and recommended system requirements, so you should multiply them by a factor that is comfortable for your use case)

Windows 10 : 20 GB minimum,     >=32GB recommended
Windows 8        : 20 GB minimum,  N/A recommended
Windows 7        : 20 GB minimum, >=35GB recommended
Windows Vista    : 15 GB minimum, >=35GB recommended
Windows XP       : 4 GB minimum, N/A recommended
Ubuntu Desktop   : 4 GB minimum, 25GB recommended
Ubuntu Server    : 1 GB minimum, 25GB recommended

Note: Ubuntu also needs a swap partition of a size described here.
The rest of the disk (-10%) can be given to a data partition formatted to NTFS from gparted See note below so that you arrive at the following lay-out:

Then:

Install Windows
Create all your users under Windows
Install Ubuntu
Create all your users under Ubuntu giving them both the same name and the same password as under Windows.
Boot the Ubuntu Live CD again and run gparted and shrink both Windows and Ubuntu partitions until they take twice to thrice the amount of the pale yellow bar.  Then create the data partition and format it to "ntfs"
mount this partition in your fstab (E.g. /media/data)

The following steps credit to:user68186, copied from here

Move your data directories to the /Data mount point by pressing Ctrl+Alt+T and copy-paste
each line followed by Enter (replace "UserName" by your
user name):
  md /media/data/UserName
  md /media/data/UserName/{bin,Desktop,Documents,Downloads,Music,Pictures,Public,Templates,Videos}
  mv /home/UserName/bin /media/data/UserName/bin
  mv /home/UserName/Desktop /media/data/UserName/Desktop
  mv /home/UserName/Documents /media/data/UserName/Documents
  mv /home/UserName/Downloads /media/data/UserName/Downloads
  mv /home/UserName/Music /media/data/UserName/Music
  mv /home/UserName/Pictures /media/data/UserName/Pictures
  mv /home/UserName/Public /media/data/UserName/Public
  mv /home/UserName/Templates /media/data/UserName/Templates
  mv /home/UserName/Videos /media/data/UserName/Videos

Make symbolic links for your user to the above directories somewhere else
  ln -s /media/data/UserName/bin/ bin
  ln -s /media/data/UserName/Desktop/ Desktop
  ln -s /media/data/UserName/Documents/ Documents
  ln -s /media/data/UserName/Downloads/ Downloads
  ln -s /media/data/UserName/Music/ Music
  ln -s /media/data/UserName/Pictures/ Pictures
  ln -s /media/data/UserName/Public/ Public
  ln -s /media/data/UserName/Templates/ Templates
  ln -s /media/data/UserName/Videos/ Videos

Go to Windows again and move the user directories to your D: drive in the users directory.

Why?
When you boot into Windows (or Ubuntu), both Windows and Ubuntu have their own system files and applications installed in their own environment.  On top of that, you don't have to worry about which file goes where:  All Ubuntu files can be found under Windows in the d:\home directory and all your Windows files can be found under the /users directory in Ubuntu.
If you use any of the following:

Ubuntu commands: chown, chmod or Windows command: cacls,
if you use any of the file managers to right-click on directories or files to use set permissions

then please do not set permissions from inside Windows in the D:\home nor from inside Ubuntu on the /Users directory ever! Also, do not move files between /users and /home (or D:\home and D:\Users) ever!
###Only copy files!
(and then delete the original because moving  will try to move the permissions from one totally different file system to another and that'll give you troubles you want to avoid)
Why is there 10% unallocated space on your drive?  Well, that's a little trick when your PC is brand new: you don't need all that space, and that free space is your proverbial spare tire if you ever need to extend one of the other partitions when they run flat!  ;-)
Now go back to step 5 of the How to Install Ubuntu and continue there...


How to reset grub to see both windows 7 and ubuntu 12.04?

Do not unplug hard drive which is Windows system on, either the hard drive installed ubuntu.
Change the order of hard drive in bios, set the hard drive which installed ubuntu on top of the list, keep the Ubuntu can startup as default.
Boot, and login to Ubuntu
run update-grub in terminal as root. you will find something in terminal, like:

"Found Windows 7 (loader) on /dev/sdxX"

sucess!

you can change the boot order by edit /etc/default/grub. change the GRUB_DEFAULT=0 to whatever you want. (0: means the first item in grub menu; 1: means the second item in grub menu. You can find grub menu by press 'shift' or down arrow key while you boot your system, or check /boot/grub/grub.cfg in ubuntu)

good luck!


With nm-connection-editor, in the General tab for the Ethernet/Wireless connection you're using, there should be an option to automatically connect the VPN when the interface is brought up.


How can I make myself the owner of a partition?

Hopefully the following will answer your question:

Change owner of internal hard drive partition from root to user

It says:

  If the partition is called party, your user is called cyrex and it is in /media just do for example:

  sudo chown cyrex:cyrex /media/cyrex/party -R (The R is for recursive so it affects all directory/files and subdirectory.

This would help you locate your drive:

How can I list the hard drive and all its partitions including size from terminal?

It says:

  If you have an MBR partition table:

  sudo fdisk -l

  For both GPT and MBR partition tables:

  ?sudo parted -l


vlc doesnt use any external codecs as its self contained and comes with all codecs, it should play wmv fine as it does here on all my machines.

VLC can be installed from the Ubuntu Software Center
 : VLC


There sure is. Open Nautilus, then click Edit -> Preferences. On the Behavior tab, select "Run executable text files when they are opened".


CPU frequency stuck at low value after installing gnome extensions

After checking different options in grub with no result, I booted a clean ubuntu image from USB. The CPU frequency was still at 800 Mhz indication that it wasn't OS related. A quick search yielded that this is a Dell safeguard mechanism to protect the laptop and is triggered by a thermal event, bad battery, or faulty charger. In my case, it was probably a thermal event I had at the same time I experimented with the above-mentioned extensions. My laptop failed to sleep and went full throttle in my rucksack sometime last week.
The solution was to unscrew the back-lid and disconnect the battery for >15 seconds. This resets the safeguard mechanism. After reboot the CPU is again following the intel_pstate settings.


Try awk. For example:

echo "00:20:40" | awk -F: '{ print ($1 * 3600) + ($2 * 60) + $3 }'

So, if you have:

time="00:20:40"

then:

seconds=$(echo $time | awk -F: '{ print ($1 * 3600) + ($2 * 60) + $3 }')

and echo $seconds will print 1240.


Sensible/correct way to edit the files provided by base-files package?

Since I never got an answer, I'll answer it myself.

Editing the files that the package base-files provides with any text editor works, be it with nano or Gedit.


Unable to login into ubuntu(16.04) after CUDA installation

Finally the issue is resolved.

once i got my logon screen. press ctrl-Alt-F1
apt-get purge nvidia*
apt-get purge cuda*
press ctrl-Alt-F7 (it will be redirected to login screen)

FYI:
Never install CUDA on Ubuntu VM


OK I have had a look around the Internet and found a few references to this problem. Apparently it is the Nvidia Graphics Drivers causing the problem... now you're going to tell me that you do not have Nvidia Graphics Card, if you do not, let me know else, continue reading.

The way to get around this can be approached from two different ways. The first way assumes that you can NOT start Ubuntu.

From GRUB

When the GRUB menu shows, press the Down Arrow

If the GRUB menu isn't showing, press on the Shift key, imediatly after the BIOS screen, to display it.
Select Advanced options
Navigate through this until you can start Ubuntu. (I only have Ubuntu on my computer, so can not remember what the exact menus there are to choose from) If you get stuck here,

If you can not get to, or past these options, you may need to download and run Boot Repair

Once Ubuntu has started

Click on the Ctrl+Alt+T to launch Terminal.
Type the following command in to the Terminal window.

software-properties-gtk --open-tab=4

This will open a window (after a delay) which looks like this:
From the list of available drivers, (None displayed on this system as I do not have a Nvidia Graphics Card!) select one of the Proprietary Drivers from the list. If this doesn't work, try each one in turn, until you find one that works.