Ubuntu 14.04 Chromium causes black screen

You may try this and comment the result:

open up chromium and type this in address bar: chrome://flags
enable "override software rendering list" (the first item) then restart the browser.
load the youtube or whichever website you were having problem on, and check whether you are having same problem. If yes then comment

source


How do I uninstall or disable the entire dash in Unity?

It is not possible to disable the dash inside unity but you can always head to a different desktop environment.

Try gnome-panel to fall back to classic gnome desktop. You can install it by:

sudo apt-get install gnome-panel

Then log out and log in to GNOME Desktop.


Turn a mac mini g4 - 1.4 ghz, 2 gb ram - into a home server

I don't have experience doing exactly what you want to do, but as an "old mac guy", I have a lot of experience w/ G4 processors, and a 1.4GHz G4 would be roughly equivalent to a 2.4GHz Pentium 4 which according to the Passmark site listing all benchmarked CPU's earns a Passmark score of 314, which to put in perspective would be roughly in line with a 1st Gen Atom from the first Netbooks that started floating around.


I would suggest to look up partitions using a Live GParted usb and check for the OS, whether it's been installed properly or not.

Check for the Boot Flag in the partition manager when you boot into Live GParted.

It must be set to the partition where your root is installed.

Please provide the screenshots so we can go further.

Update:
I found something in this Forum which might help you.


Unable to change Docky configuration in Lubuntu 18.04

To make Plank show animation on hover with Compton as the compositor
Open a terminal and run plank --preferences
You'll get a window looking like this:

You can adjust the value of Icon zoom to suit your needs.
Compositing

Lubuntu 18.04 comes with its own compositor called Compton which you can start from Menu > Accessories > compton.
There's also a very nice interface for adjusting Compton's settings. This GUI is called Window Effects and is found under Menu > Preferences > Window Effects.
Once you start Compton make the changes you want in Window Effects, go to Menu > Preferences > Default applications for LXSession and in the window that opens, add Compton to your Autostart as in the image below.


Ubuntu 14.04 crashed and mounting failed

From the comments...

To check the file system on your Ubuntu partition...

boot to the GRUB menu
choose Advanced Options
choose Recovery mode
choose Root access
at the # prompt, type sudo fsck -f /
repeat the fsck command if there were errors
type reboot

If for some reason you can't do the above...

boot to a Ubuntu Live DVD/USB
start gparted and determine which /dev/sdaX is your Ubuntu EXT4 partition
quit gparted
open a terminal window
type sudo fsck -f /dev/sdaX # replacing X with the number you found earlier
repeat the fsck command if there were errors
type reboot


windows are moving slowly on ubuntu 11.10

If you have an NVIDA or ATI graphics card I'd recommend installing the proprietary drivers.

System Settings --> Additional Drivers

I had that issue on my old Pentium 4 with 2GB of RAM.

Good Luck


How to configure 1440x900 on two monitors in mirror displays?

I have the same issue, and I still can not solve it, or can find anything helpful on how to fix. While reading online about it, I discovered that this is a bug. The problem arises when you try to do a multi-monitor setup with one monitor in a DVI port, and another in a HDMI. My suggestion is, do you have a VGA or DVI port on the HDTV. You could connect your HDTV with a VGA or DVI(DVI if you have two ports for it on your graphics card). This might work.

Also, does this graphics card have a Nvidia Chip on it. If so, you might have The Nvida X Server Settings application on your computer. From there, you can enable Xinerama and also Twinview. There might even be an option there to mirror.

I would give this issue some time, because eventually, it will be fixed, or a solution will be found.

I hope this can help you.


Trying to set up static IP on Ubuntu 18.04 LTS install

My friend told me "you're confusing netmask and ADDR/PREFIX notation. 192.168.1.0/24 is what you want" which solved the problem


Gaming in Linux is still behind, but so much better than a couple years ago (don't get me started on 15 years ago).

The drivers for Intel based cards are quite good on Linux, even though the card probably won't allow you gaming new games on high quality settings.

The best sources for commercial Linux games are in order of my personal preference:

Steam (http://store.steampowered.com/search/?os=linux)
Humble bundle (store and bundles, some items are even drm free) (https://www.humblebundle.com/)
GOG.com (completely drm free) (https://www.gog.com/games?system=lin_mint,lin_ubuntu&sort=bestselling&page=1)

If you are interested in running Linux as a gamer, now is a great time to do it. But if all you want is gaming and you don't mind Windows 10 (not UI wise, but the privacy and store developments), you might be better off there.

If you own those games in Steam on Windows, just give Linux a try, all the games you currently own that are available in Linux (Dota 2 and csgo are among them), you can already play without buying them again.

On a personal note, I've been dual booting for over 15 years now, always keeping a Windows partition for gaming. Since the release of Windows 10 and the advancements of Steam I finally use Linux as my primary gaming system as well.


When purchasing software, how many releases of Ubuntu will that software be available to me?

No. It is linked to your Ubuntu One account.

This is apart from the fact that you don't have to reinstall Ubuntu when the next version is released: you just let Update Manager perform the upgrade for you!


Urdu language not listed in my ubuntu 16.04 LTS

Language Support includes the languages for which language packs have been created, and language packs are no longer created for languages with a translation coverage below a certain threshold (can't tell exactly what the limit is). Probably that's the explanation why you don't find Urdu.

You may want to install the fonts-nafees package to render Urdu web contents.

sudo apt install fonts-nafees

Possibly you may also want to contact the Urdu translators team and help improve the translation status, so the Urdu language packs can again be included in the distribution. (They were included in Ubuntu 12.04 and 14.04.)


Ubuntu 20 - Gnome text randomly disappears

Had the same issue.  Reboot did not fix.  db429's suggestion of restarting Gnome-Shell worked, though not instantly.  I noticed everything (header, desktop icon text) back after a few minutes, but as noted in comments it was just a long few seconds.
Steps: Alt+F2, type r, hit enter, even if you can't see what it says when you do so.


Installed packages: what repository are they from?

If you install synaptic (sudo apt-get install synaptic), you can use it to view the sources of packages:


Ubuntu 12.04 In tray Icon -> "Edit Connections..." not clickable

You can access this menu by:
VPN Connections-->Configure VPN-->Ethernet-->Wired Connection-->Edit


Try running sudo apt-get update. Also try running sudo apt-get install -f, which will attempt to fix the problem.


I've covered something similar here before but it's never enough. It only takes somebody with physical access a small amount of knowhow expertise to get root and get access to your files. You can take a few steps to make that as hard as possible though:

Why does the system need to auto-login at all? The default settings for the lamp-server task launch the LAMP servers in the background. There's no system access other than by httpd. You don't need to "log in" for those to fire off and if you've somehow cocked things around so that you are logging in as a particular user to launch a web server, you're doing it wrong.
Next up, if you do need a desktop user, why does that have to be the same person as the user running the web server (www-data by default)? Simply keep them separate and make sure your files' permissions aren't too open. Something like sudo chmod 750 /var/www/ should be enough to stop others reading.
Cripple Grub to remove recovery mode.
Password lock BIOS (usually won't protect against a BIOS/CMOS reset)
Hot-glue the CMOS battery in and cover the CMOS reset jumpers
Melt the SATA cable into the disk and motherboard using a soldering iron or tons of glue.
Obfuscate and watermark your files on each deployment so that if they do get nicked you can trace it back to one client so that you can sue them.
Physical access restrictions are important too.
Perhaps most importantly, if you're going to deploy your software somewhere, make sure the person it's going to knows they are responsible for its safety. I sounds weird but it's not uncommon. Have a contract with them that outlines their liabilities if their copy of your code is leaked out.

Do all that and it might take somebody good about ten minutes longer to work out how to get access to the files. That's mostly the time to warm up glue to remove it.

If you don't want them to ever get access, don't give them the files. Host it yourself and provide it as a service that a lightweight daemon (you write) communicates with.


The documentation and API examples can be found here.

http://unity.ubuntu.com/projects/unity/

A few tutorial can be found here to help you with starting [Not so much for now]

http://developer.ubuntu.com/resources/tutorials/all/

if you are concerned with gmail unread count, there is already an solution for this.

http://www.omgubuntu.co.uk/2011/08/unity-mail-gmail-count-desktop-launcher-ubuntu/


Lubuntu 14.04 Wifi on Laptop with Broadcom BCM4322

Please temporarily connect the ethernet and with a working connection, do:

sudo apt-get install linux-firmware-nonfree

Reboot. If it is not working, post the entirety of the wireless script again.

EDIT: Jul 18 '17: As is the case with many answers here, this and most answers that are three or more years old are probably obsolete. In fact, today the correct package is firmware-b43-installer. There is no need to update and research Broadcom questions however, as the link in the duplicate is updated regularly as needed.


modprobe fuse returns module fuse not found

First you can try to install module from cache,

  apt-cache search fuse

if this doesn't work--- you can install fuse module with module-assistant,

  apt-get install module-assistant

  apt-get install fuse-source

  cd /usr/src

  m-a prepare

  m-a a-i fuse

  depmod -ae $(uname -r)

Now you can,

modprobe fuse


You can install lightdm by:

sudo apt-get install lightdm

If you want to set lightdm as the default one, run:

sudo dpkg-reconfigure lightdm

click "OK" and select lightdm


how about creating your new /home/user/.profile:

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

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

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

copy, paste, save ..


how to edit (or delete) sources list in commandline (no text editor, cannot install any new packages on limeted install)

Pretty sure, you will have terminal editor called nano installed.
You need to edit sources.list file with root privileges so run it with

$ sudo nano /etc/apt/sources.list

Now you can change the contents the same way as in graphical editor (apart from using mouse to move cursor - you need to use arrow keys).

When you're finished press Ctrl+x and then y to save changes and exit.

A side note: don't be afraid of running commands as root - your Linux will not do anything beyond what you will write in console yourself. And to know what you're doing you need to know at least basic commands. If you don't know what a command does - use man [command]. For you to change ownership of your home dir to root, you'd have to execute chown command, so no danger here :)


Package for reporting GUI problem in Ubuntu 19.10

It's not a bug it's a feature. Follow the steps from this answer:

Gnome Shell - How to prevent an application from starting behind the application in focus?

  Gnome Shell, which is used by Ubuntu, has the feature that launched
  applications are opened in the background. While this may be desirable
  in some workflows, many users will consider this an annoyance. A gnome
  Shell extension, appropriately named "No Annoyance", changes this
  behavior, and makes sure a launched application is immediately raised.

  Install the extension with the command sudo apt install
  gnome-shell-extension-no-annoyance, or using Synaptic Manager (not
  installed by default) or even using "Software". To enable the
  extension after installation, you can use "Gnome Tweaks" (not
  installed by default).


XF86WakeUp keys - where do they come from?

This problem is solved most probably due to a recent update of 12.04.


I have fixed the problem by installing linux-headers-generic and then re-installing the driver.


UEFI boot gone catastrophically sideways

The path on this wound up being slightly different than indicated.

I created a SysRescue live USB, booted that, mounted sda1, went to /EFI/boot. There was neither a mmx64.efi nor grubx64.efi BUT up in /EFI/ubuntu, there was a mmx64.efi.

I copied that over, sync'd, rebooted. And it works. Some squawking about setting up MOK, easily ignored.

The referenced prior art was a helpful clue, but not a sufficient solution. Thanks!


Mounting ipad in ubuntu 13.10 , can't find "Documents on iPad" device

Apple devices sync with itunes properly. For that, try downloading 'itunes' using 'wine' or 'play-on-linux'. You can follow "https://www.wikihow.tech/Download-iTunes-for-Linux" or any other guideline for it. That is what I do for my apple devices and is the safest and most reliable way to do it.


Since you downloaded and installed it without using apt you cannot remove it using apt, but instead need to use the uninstall.sh script that was provided with the Arduino download.


C:\Program Files folder equivalent on Ubuntu

Ubuntu's file system is organised according to the filesystem hierarchy standard and therefore there, generally speaking, is no equivalent to c:\program files.

The location of package files installed through apt can be viewed with
dpkg -L, e.g.

dpkg -L leafpad


How to upgrade Ubuntu 14.04.1 to 14.04.2?

14.04.2 and 14.04.3 are not "releases" in terms of "do-release-upgrade".

"Point" releases accumulate security updates and bug fixes that are added to Ubuntu repositories.

If you install ordinary updates on Ubuntu 14.04, 14.04.1 or 14.04.2, you will get 14.04.3.

So your goal makes no sense.

The only difference of the ISO of the point releases is HWE Stack. Kernels are updated to another major version and xserver.

If this is your question you can install 3.16 kernel and graphical stack of 14.04.2 by running

sudo apt-get install linux-generic-lts-utopic xserver-xorg-lts-utopic libqt5gui5 libgles1-mesa-lts-utopic libgles2-mesa-lts-utopic libgl1-mesa-glx-lts-utopic libgl1-mesa-glx-lts-utopic:i386 libglapi-mesa-lts-utopic:i386 libegl1-mesa-drivers-lts-utopic

The command given in the official wiki can brake your system in some cases.


If you installed the git* package(s) from the default repositories, the system-wide Git configuration is supposed to reside in /etc/gitconfig (since $(prefix) is empty for those Git installations). See the following git-config(1) manual excerpt:

  --system

  For writing options: write to system-wide $(prefix)/etc/gitconfig rather than the repository .git/config.
  For reading options: read only from system-wide $(prefix)/etc/gitconfig rather than from all available files.

  See also FILES.

  […]

  FILES

  If not set explicitly with --file, there are four files where git config will search for configuration options:

  $(prefix)/etc/gitconfig

  System-wide configuration file.

  […]

If there is no such file, sudo git config --system <name> <value> will create it for you. Alternatively you can create it manually with your favourite text editor. This is the same behaviour as for global (~/.gitconfig) and local ($GIT_DIR/config) Git configuration files


Xpad crashes after clicking on "show desktop"

You might want to try v4.2 of Xpad, which has a lot of bugfixes and some new functionality. Unfortunately it is not available through the Ubuntu repositories yet, but if you have enough courage you can try to download, compile and install it yourself.

You can find the latest version here:
https://launchpad.net/xpad

Does this help you?


My bluetooth headset is sizzle and no sound, I use 12.10

The computer may not be choosing the right hardware to play.

Open the Sound settings (open your Dash and type sound). Go to the Output tab. You should see more than one option.

Click the one that references your Bluetooth headphones. (You may have to double-click it.) Adjust the sounds as required. You can also use the Test Sound button.


lsusb reads its data from the kernel provided virtual sys Filesystem mounted in /sys;  specifically from the location of relevant directories for USB devices. These devices are connected to different PCI buses and are (mostly) detected by udevd.

For example, in my computer here is one example of the localtion of a USB device connected to a particular PCI bus:

/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/

The contents of the directory:

% print -l *
4-1:1.0
authorized
avoid_reset_quirk
bcdDevice
bConfigurationValue
bDeviceClass
bDeviceProtocol
bDeviceSubClass
bmAttributes
bMaxPacketSize0
bMaxPower
bNumConfigurations
bNumInterfaces
busnum
configuration
descriptors
dev
devnum
devpath
driver
ep_00
idProduct
idVendor
ltm_capable
maxchild
port
power
quirks
removable
remove
speed
subsystem
uevent
urbnum
version

lsusb just reads from relevant file(s) of this directory.


How to select notebook by default in Gnote

Use command line option --open-note=title for Gnote, which will display the existing note matching title. This by itself will not set the note as default.

How it works

To see how the option works, the note must have appropriate title and run Gnote from command line.

First, create a new note in Gnote by clicking New button in headerbar or toolbar, or click Gnote menu ➜ New note (appearance may vary by desktop environment).
Then, change the note title from "New Note 1" to title of choice i.e. "Test New Note". The title is not case sensitive i.e. "new note" and "New Note" are same in Gnote.

Open a Terminal or an application launcher, type the command i.e. gnote --open-note="Test New Note" and press Enter key. The note i.e. "Test New Note" will open directly.

Pseudo default

To open Gnote with the pseudo default note, user can either use system-wide application shortcuts, or use application menu (configuration may vary by desktop environment).

Using system-wide application shortcuts, for example, I have assigned Super+N as shortcut to run the command.

Using application menu, for example, I have created a new launcher using MenuLibre menu editor and the launcher is accessible from both application menu and application launcher.

Additional notes

By default, Gnote keep notes created by user at ~/.local/share/gnote/. If user wanted to open notes from elsewhere, use another option --note-path=path to create a new note directory first.

To create new note directory i.e. ~/Notebooks:

gnote --note-path="Notebooks"

To create new note directory with subdirectory i.e. ~/Notebooks/Project1:

gnote --note-path="Notebooks/Project1"

Then, create a new note and change the title i.e. "coding". Close the note and Gnote window. This time, to open the "coding" note, append the earlier option --open-note=title.

gnote --note-path="Notebooks/Project1" --open-note="coding"

Similarly, run the command in a Terminal or an application launcher. Also, the command can be added to system-wide application shortcuts with shortcut keys of choice to open the pseudo default note.

Tested using Gnote 3.10.3 in Xubuntu 14.04.


Can Ubuntu 16.10 install to free space, or does it need partitions?

You need at least one partition holding everything. Making separate partitions for /home, /srv, /opt, /var or swap is optional and depends on your preferences and intended use of the system. Some swap space is just about always highly recommended, but Ubuntu is perfectly able to use a swap file just like Windows; a separate swap partition is not needed and future Ubuntu versions will no longer create it by default.


What app should i get to help open Starmade/Minecraft

You need a Java runtime to run the game.
To install it, run sudo apt-get install openjdk-7-jre in a terminal. You can then run the game by double-clicking the .jar file (if it opens in Archive Manager instead, right-click it and select Open With > OpenJDK) or from a terminal by running java -jar ./StarMade-Starter.jar from the folder where the file is stored.


What happens if I purge unity on a gnome desktop?

No. It doesn't affect any way. In fact, many users do that regularly to switch from Unity to Gnome Shell. That's a perfect job to do since you're not willing to use Unity anymore.


16.04 LTS install issues on dell optiplex 5040; not recognizing hard drive

this is the best way to fix a failed grub install during installation:

restart. boot again from the USB and select "Try ubuntu without installing".
open a terminal with ctrl+alt+t
type these commands:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt update
sudo apt install boot-repair
sudo boot-repair

chose recommended repair.
after a while you will be asked to paste code in the terminal. you will need to open a new terminal window to do this. use ctrl+alt+t to do that.
after the interactive boot repair completes, restart, remove the installation media, and boot from your hard drive into your Ubuntu installation.


You can accelerate the rebuild by enabling the write-intent bitmap:

sudo mdadm /dev/md0 --bitmap=internal


Changing margins and alignment in the Lyx GUI

Both can be achieved.

Perhaps hackishly, you can toggle the Outline pane and then resize it for half of the screen. This allows to have a much less wider text blocks. Otherwise you can go to Tools > Prefs > Editing > Control > Fullscreen > Limit text width and then switch to fullscreen while working.

This said, the feature that you're describing is something I've been looking forward to for some time now, and it may be worth reporting it on their bugtracker.
To have left-text alignment you need to use the beta version of 2.1 (the final will be released shortly). You can install the latest beta release (and soon the RC release) from the LyX PPA (development).

From the log of new features in 2.1:

  Users can now decide for every document in the menu Document→Settings→Text Layout if LyX justifies the document text or not. (This setting has no effect on the output.)


Allow user to connect to mysql via ssh to create database dump, but don't allow anything else

add the code you need to execute the dump to your .bashrc/.zshrc followed by an exit.

# .bashrc
echo "Creating DB Dump..."
dumpdumpdump
echo "Done"
exit

This is however pretty insecure. Any ctrl-c before the exit will end up giving the user a shell. You could add a trap to also exit on INT and TERM to avoid this

trap exit INT TERM;
echo "Creating DB Dump..."
dumpdumpdump
echo "Done"
exit


Securely Mounting a Remote LUKS Partition at Boot

You are asking how to access a LUKS encrypted disk remotely, without the server having access to the data. I will ignore that, because it's probably not what you want. You want encrypted backups, not encrypted block level access to a remote disk.
There's generally two ways I'd go about it this:

Use an encrypting filesystem.
Encrypt the backup in the backup program.

Encrypting file system
This is content neutral. Any content stashed onto the virtual file system will be encrypted, before being stored. The network access can be performed via e.g. Samba or NFS, sshfs, or any other technique for remotely accessing a file system.
encfs is a good encrypting virtual filesystem. You can install it with sudo apt install encfs
To create a virtual, encrypted filesystem, run the following in a terminal
encfs /path/to/mounted/remote/storage ~/encrypted_storage

This will start a wizard which lets you configure the storage. When it's created, and mounted, anything you put inside ~/encrypted_storage will be encrypted before actually being written to disk. The encryption will happen on the machine that you ran the encfs-command on.
To umount it run fusermount -u ~/encrypted_storage.
To mount it again, simply run the original command used for creating it, and it will detect it as an existing FS, and ask for the passphrase.
Encrypt the backup data
In my opinion this is a better solution. Especially as duplicati supports strong encryption, allowing both AES-256 and GPG as encryption options. GPG is fairly well vetted software, security wise.
In addition this makes it trivial to move your backup to other backup providers, e.g. BackBlaze, Amazon S3 or any other service: as the backup data itself is encrypted, you don't have to worry about your provider. The server will not have access to your backed up data, only metadata, such as when last backup was performed, size and what backup system was used. This metadata will be available to the server anyway.

If you really want LUKS for remote volumes, have a look at iSCSI. It's far more work to set up, far less flexible, and probably not what you want.


How can I install windows 7 over ubuntu?

Installing Windows over Ubuntu is pretty easy, as Windows takes up the whole disk by default.

First, boot to the CD (you may need to modify your boot order in BIOS to acheive this)
Now, choose your language
Click 'Startup Repair'
Go into Command Prompt
Type format c: (this is required because Windows does not understand Ubuntu's filesystem, so it needs to format it)
You should get a warning. Just press Y.
Wait for it to finish, then install Windows
Profit!


LVM Full disk encryption on two disks with single passphrase

LUKS only encrypts one device, so you could put LVM outside of LUKS - creating a LVM out of the multiple drives, then use LUKS inside it.

The installer can't do that automatically, good guides abound on the web saying how to do it, could be rather long.


Ubuntu will only run from the live disk and not install my hard disk is corrupted

If you can boot live Ubuntu, then you should use GParted , a free partition editor.
First, unmount your hard disk (right click -> Unmount). Then you will see Format to and choose ntfs file system. Apply the changes and that´s it.

Also, there is answer about formatting from terminal. Hope it will be helpful to you.

Don´t forget to make backup!


Wubi uses two distinct techniques. The disk image technique downloads a preinstalled disk image file that has been compressed. Then it uncompresses this as the root.disk and then uses resize2fs to make it whatever size you want. Then it remains to create the user account at login which it does with a preseed file:

d-i clock-setup/utc boolean false
d-i time/zone string $(timezone)
d-i passwd/user-fullname string $(user_full_name)
d-i passwd/username string $(username)
d-i passwd/user-password-crypted password $(password)
d-i user-setup/encrypt-home boolean false
d-i netcfg/get_hostname string ubuntu
d-i debian-installer/locale string $(locale)
d-i keyboard-configuration/layoutcode string $(keyboard_layout)
d-i keyboard-configuration/variantcode string $(keyboard_variant)

All the $(xxx) are replaced by the Wubi installer - most are fairly straightforward, but my attempts to get the password correct failed (easily reset later).

Then it remains to boot the install with the preseed file:

loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
search --set=diskroot -f -n /ubuntu/disks/root.disk
probe --set=diskuuid -u $diskroot
linux /vmlinuz root=UUID=$diskuuid loop=/ubuntu/disks/root.disk preseed/file=/ubuntu/install/preseed.cfg wubi-diskimage ro quiet splash
initrd /initrd.img

Anyway that's the easiest way to get Wubi manually installed. I recently did it on a Virtual machine running EFI firmware.

The other technique is to get ubiquity (the desktop installer) to install directly to the root.disk. This requires a preseed file as well. Wubi kicks off the installer via grub4dos, then uses the kernel extracted from the ISO to boot the ISO (which has been saved to disk). Then it preseeds the installer. This is a lot more complex than using the pre-installed disk image.


Finding full path of a symlink'ed file (more quickly)?

You can use a nautilus script for this:

#!/bin/bash

# Remove line feed at the end of the path
selectedPath="${NAUTILUS_SCRIPT_SELECTED_FILE_PATHS%?}"

# Check if the selected file is a symbolic link
if [ -h "$selectedPath" ]; then
    symlinkPath=$( readlink "$selectedPath" )
else
    zenity --info --text="$( basename "$selectedPath" ) is not a symbolic link"
    exit 0
fi

# Copy the the symbolic link into the clipboard
echo "$symlinkPath" | xclip -selection clipboard

More about readlink -> http://manpages.ubuntu.com/manpages/hardy/man1/readlink.1.html

You have to install xclip for this if not already done.


Software and Updater consumes 100% CPU in Ubuntu 16.04

Had a similar issue.

As the other answer mentioned - it is possible to determine the problem by looking at /var/log/syslog.

Within my log gnome-settings was reporting the following:

(gnome-settings-daemon:3584): dconf-CRITICAL **: unable to create file '/home/USER/.cache/dconf/user': Permission denied.

In order to fix this I ran the following command, replace USER with your username:

sudo chown USER /home/USER/.cache/dconf


2 network interfaces connected to internet. Choose the one to use according to the domain name

If your example domain "*.domain.com" has a static IP address block, you can add a static route to your routing table like:

me@thiscomputer:~$ whois domain.com

This should give you some contact information for the owners of domain.com. You can contact them to find out their network address. This address will probably be in CIDR format where:
192.168.0.0/24 == "The set of IP addresses from 192.168.0.1 up to 192.168.0.254". The number after the slash is the number of bits in the network portion of the address. This is equivalent to a netmask of 255.255.255.0.

You could also use dig to look up some host addresses and attempt to deduce the netblock from that, or just add routes to discrete hosts, but I would not recommend it.

With the address information in hand, you can then add a static route like so:

me@thiscomputer:~$ sudo ip route add inet 10.0.0.0/24 dev ppp0

IRL it will probably not work exactly like this, consult the manpage for the ip command or the route command (these are different commands which do the same thing, route is older and part of coreutils) to see how to do it right.

If the domain's address is not static (configured by DHCP for example) which seems unlikely for a site with a persistent A record, you could work the above method into a cron job running at some interval shorter than the site's DHCP lease. You'd likely have to contact the site's administrator to get this information, or just experiment. If the job runs once a day, that would probably be sufficiently frequent.


The reason you are seeing "128 MB dedicated memory" is that the kernel also reserves some normal system RAM for graphics on top of the graphics card's RAM. The 512 MB is being used.


I faced the same issue on Ubuntu 18.10.
I had to de-install & re-install package winbind

sudo apt-get remove winbind && sudo apt-get install winbind

and this error went out...
(another one remains, but that's probably another issue :

GnuTLS error: A TLS fatal alert has been received


How to uninstall chrome OS and install Ubuntu 16.04 fully (not Crouton) on a Chromebook

WARNING: you cannot go back to Chrome OS. This permanently installs Ubuntu!

Things you will need:

A spare computer (one without Chrome OS)
a usb drive (must have more than 2GB worth of available space)
A spare keyboard and mouse

Steps:

This will wipe your local data, so make sure to back anything up that you don't have stored in the cloud. To put your Chromebook in Developer Mode:

Press and hold the Esc and Refresh keys together, then press the Power button (while still holding the other two keys). This will reboot your Chromebook into Recovery Mode.
As soon as you see Recovery Mode pop up—the screen with the yellow exclamation point—press Ctrl+D. This will bring up a prompt asking if you want to turn on Developer Mode.
Press Enter to continue, then give it some time. It'll pop up with a new screen for a few moments, then reboot and go through the process of enabling Developer Mode. This may take a little while (about 15 minutes or so), and will wipe your local information.
When it's done, it will return to the screen with the red exclamation point. Leave it alone until it reboots into Chrome OS.

(Note that some older Chromebooks have a physical switch that you'll have to flip in order to turn on Developer Mode. If you aren't sure, look up instructions for your specific device on enabling Developer Mode.)
Set it up normally, then press Ctrl-Alt-T to open the crosh. Type shell then Enter to open the shell. Then type
cd;bash <(curl https://johnlewis.ie/flash_cb_fw.sh) and Enter then follow the options to install new firmware. In most cases pick install Full ROM(let your computer work until given the safety prompt o restart, otherwise you could brick you computer).
Reboot your system. If it boots into a sea BIOS then good job! If it boots into Chrome OS(or doesn't boot) you did something wrong. For the people who got it to work turn off your chromebook. Now go to your second PC to create a Bootable Ubuntu Live USB. If you don't know how to do this then follow the guide.
Go back to your Chromebook with your new bootable usb, and plug it in. Turn on the chromebook and press esc when given the option and select your USB. This will boot into an Ubuntu installation screen.
Install Ubuntu normally and select erase other OS and install Ubuntu (Dual booting doesn't work with this method)

Side note: Your keyboard might not work as linux does not have the drivers yet. you will need an external keyboard and mouse until you install he drivers...

see https://johnlewis.ie/custom-chromebook-firmware/rom-download/ for any updates.


Have you tried purging the nvidia package? See this post for a how to  How can I uninstall a nvidia driver completely ?

If you cannot log into the desktop use Ctrl+Alt+F1  to access the terminal at the log in.


Disabled ports with UFW but outside scan still shows them as open?

In my case it was docker that bypasses the ufw:
How to fix the Docker and UFW security flaw

or

What is the best practice of docker + ufw under Ubuntu

In my case adding /etc/docker/daemon.json file with {"iptables":false} worked (and altering /etc/default/docker not)


Google Account not working in fresh install of Ubuntu 18.04

I was getting the similar issue but without message "Something went wrong". In my case the Linux sign in dialogue didn't evolve after type password (full frozen white screen).
This erro was happen in this invironment:

Operating System: Kubuntu 20.04
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8
Kernel Version: 5.4.0-71-generic
OS Type: 64-bit

And I resolved it with access to Google DisplayUnlockCaptcha in this link:
https://accounts.google.com/b/4/DisplayUnlockCaptcha
But pay attention: Change the number "4" in the url above for you desire account number, if you have more than one google account.
After access this link and click in "Continue" you will see the message: "account access allowed".
Then, go back to system settings in linux (my case is kubuntu), and try again:
System Settings > Personalization > Online Accounts > Add new Account > Google

And then may worked through the sign in dialogue in Evolution.
This got it up an running for me and for user Simon in launchpad.net.


My bad experience: PC couldn’t even see an OS

Thanks for the shoutout. It's highly appreciated. So to answer your questions:

No, it's not normal. No that has never happened to me.
I'm not sure why it didn't fully install any updates, but I've never had a machine that came pre-installed with Ubuntu.
If you install directly and format the drive, you shouldn't have any issues if done correctly.

If you'd like help to install the system, just message me and I could help.

PS: You'd most likely have to format the drive, but if you got all your data off it that you wanted, that wouldn't be an issue.


gnome-shell doesn't install due to held broken packages

You should install Synaptic Package Manager with sudo apt-get install synaptic, and then open it. Then, go to Edit > Fix Broken Packages. Then try to install Gnome Shell again.


How do I install Otter browser on Ubuntu 18.04?

It's should be pretty easy using a PPA, for example this one.

Just do

sudo add-apt-repository ppa:otter-browser/release
sudo apt-get update
sudo apt-get install otter-browser


chown $www-data results in invalid option -- d

$www is an empty variable, so chown sees the following:
sudo chown -R -data:-data

-data or rather -d is then interpreted as option.
it should be:
sudo chown -R www-data:www-data /path/to/public_html

That seems wrong in that tutorial.


At boot, networking.service is incredibly slow (5 minutes) on Ubuntu 16.10

Edit /etc/network/interfaces and change "auto" for interfaces to "allow-hotplug"

sudo nano /etc/network/interfaces

Example: auto interface for ethernet card auto eth0 change to allow-hotplug eth0

After that for me "systemd-analyze blame" -> networking.service changes from 5 min to 41 s


Remove Gnome from Ubuntu Gnome after switching to Cinnamon

As the Gnome Settings panel is the application gnome-control-center, you can remove it by running sudo apt-get purge gnome-control-center. This gets rid of of the duplicated settings items it the menu.

Hint: I have no clue why, but at the first time removing the control center apt wanted to install a bunch of unity stuff and even unity8, so check what apt-get will do before typing Y ;)


Laggy graphics in Gnome Desktop on Ubuntu 18.04

You are not using the "non-proprietary" driver. You are using the nVidia driver 390.48. In the terminal type:

sudo prime-select intel

Then reboot and the Intel iGPU will be used and hopefully performance will be better.


Using NC in For Loop to Iterate through Array with IP Addresses - syntax error: invalid arithmetic operator

You appear to want to iterate over the indices of the two arrays - which you can do using indirection

#!/bin/bash
IP_Addresses=(
172.217.6.142
191.239.213.197
)
FILE_Name=(
"google"
"microsoft"
)
for i in "${!IP_Addresses[@]}"
do
    nc -w2 -zv4  "${IP_Addresses[$i]}" 1-100 > "${FILE_Name[$i]}".log 2>&1
done

Also be consistent about your variable names (FILE_Name versus FILE_NAME) and get into the habit of quoting variable expansions.


Network Manager requested to „sleep“ every 30 minutes - wifi drops

OP provided an answer as part of their question:

  SOLVED: guess the “GUI” environment triggered the request to sleep after 30min -

  given that I run the Joule headless: disabling Gnome and lightdm
  did the trick - system up and running for hours (didn’t reverse the
  masking of sleep, suspend, hibernate, hybrid…).


How to import a radio station list from Rhythmbox to Banshee?

I don't know whether this is the best way, but I created a play-list of Armenian radio stations, Armenian.m3u

#EXTM3U
#EXTINF:-1,Beirut, Lebanon - Bashdee
http://yp.shoutcast.com/sbin/tunein-station.pls?id=546514
#EXTINF:-1,Istanbul, Turkey - Nor Radyo
http://www.norradyo.com:8000/
#EXTINF:-1,Moscow, Russia - Armenia.ru
http://radio.armenia.ru/pls/listen.pls
#EXTINF:-1,International - Armenian Bible Study Radio
http://sc7.mystreamserver.com:8036
#EXTINF:-1,International - Armenian Pulse Radio
http://yp.shoutcast.com/sbin/tunein-station.pls?id=416989
#EXTINF:-1,International - Arm Radio
http://www.realradios.com/x/stream/50536
#EXTINF:-1,Yerevan, Armenia - Public Radio of Armenia
http://www.armradio.am/eng/live/listens.pls
#EXTINF:-1,Yerevan, Armenia - Public Radio of Armenia - Shoutcast
http://yp.shoutcast.com/sbin/tunein-station.pls?id=898669
#EXTINF:-1,Yerevan, Yerevan, Armenia - AR Radio Intercontinental
http://www.realradios.com/x/stream/50541
#EXTINF:-1,Yerevan, Yerevan, Armenia - Yerevan Nights Radio
http://www.realradios.com/x/stream/46211
#EXTINF:-1,Boston, MA - Hairenik Radio
http://www.live365.com/play/acaa
#EXTINF:-1,International - AIM Radio
http://www.live365.com/play/aimmedia

So I can maintain this list separately and then import it into Banshee after upgrades.
I wish, however, for Banshee to be more user-friendly with add/remove/update/export/import of on-line radio stations, as this way seems to be not very intuitive (at least to me).


Should I search for help using 'Ubuntu' or 'Linux'?

Some questions should be Ubuntu specific: installations, hardware related questions, distribution (version) specific questions, etc. For example, python is part of the installation in Ubuntu; never try to delete or upgrade/downgrade python in any Ubuntu installation!
Also snap related questions may be Ubuntu specific.
But, most things are almost the same for any Linux distribution (subject to the version of the software you are talking about). For example, GNU command line utilities, systemd and other daemons. But, always check your software version to be at least the same as the version mentioned in the answer.
First google "Ubuntu your question". If you find nothing useful, then try "Linux your question". Also note that if you are using a desktop version with Gnome for example, then before trying to search "Linux your question", try "Gnome your question".
If you are searching for Ubuntu-related man pages you can search with "site:manpages.ubuntu.com ...". For package contents use "site:packages.ubuntu.com ...".

Note: Generally, I find the search facility in the AskUbuntu web site not so effective. Even when I need an answer from AskUbuntu, I prefer to google "site:askubuntu.com my question".


Vmware Workstation 11 Virtual Ethernet Kernel update fails on Ubuntu 15.10

I solved it doing.

after kernel 4.4 (VMWare Workstation 12) need some changes in c code:

/usr/lib/vmware/modules/source

1) vmmon.tar

untar
change ./vmmon-only/linux/hostif.c
replace all:

"get_user_pages" to "get_user_pages_remote"
tar and replace original

2) vmnet.tar

untar
change ./vmnet-only/userif.c
replace all:

"get_user_pages" to "get_user_pages_remote"
tar and replace original

Successful compiled on FC23 FC24, FC25 (kernel 4.7)

https://communities.vmware.com/message/2598402#2598402


How can I manually edit the unity top panel?

I am guessing that the one wich doesn't do a thing is the one of the login screen. But this happens to me as well. Just check if the bug has already been reported (should be), and if not, report it on launchpad yourself.
Ubuntu 11.10 is only in beta stage, wich means it's for testing purposes only and will still have lots of bugs.


Where can I find an Ubuntu iso under 700mb to install from CD?

The Mini ISO (scroll down on the linked page for download links) was made for fitting on regular CDs and even some mini CDs.

Since the software package installers are removed from the install CD to make it so small, you'll need an Internet connection (WiFi or Ethernet) on the computer you're installing it on in order to download them. It'll download up to several GB, so try to use an unmetered connection.

It can handle any official Ubuntu flavor you want, eventually presenting you a menu with all the options.

One drawback is that it only supports a BIOS install, not a UEFI install, so set your machine to BIOS mode. If your machine only supports UEFI, sorry, you'll need to burn a DVD or a large-enough USB drive instead.


Was able to make it work after installing as follows:

sudo add-apt-repository -y ppa:tortoisehg-ppa/releases
sudo apt-get update
sudo apt-get install mercurial tortoisehg

From this answer: https://stackoverflow.com/questions/5627414/correct-way-to-install-mercurial-on-ubuntu


In fact Puddletag in its present release will not be supported on Ubuntu Focal Fossa 20.04 as Puddletag needs to be updated to both QT5 and Python 3 (from Qt4 + Python 2).

The relevant bug reports can be seen here:

Ubuntu 20.04 LTS = Qt4 + Python 2 removal #462 A bug report specific to the current Focal Fossa issue of the removal of Puddletag.
Python 3 #300 The original plea for assistance by the Puddletag developer for assistance porting to  Python 3. Note that this a bug report / request from 2016...

Python 2 is of course still available on 20.04 (just not as default) but Puddletag will not work without the Python bindings pyqt4 and friends as well.

Sad days, but a nice replacement for Puddletag exists which works perfectly on 20.04: MusicBrainz Picard...


Why can't all the mount point in root directory changed to /mnt/temporary & /mnt/removable?

The FHS 3.0 specs (currently in beta, part of LSB 5.0) don't list /cdrom now:

  The following directories, or symbolic links to directories, are required in /.

Directory   Description
bin         Essential command binaries
boot        Static files of the boot loader
dev         Device files
etc         Host-specific system configuration
lib         Essential shared libraries and kernel modules
media       Mount point for removable media
mnt         Mount point for mounting a filesystem temporarily
opt         Add-on application software packages
run         Data relevant to running processes
sbin        Essential system binaries
srv         Data for services provided by this system
tmp         Temporary files
usr         Secondary hierarchy
var         Variable data

Discussion of the new standard takes place in the LSB mailing lists. I recommend that your suggestion be posted there.

Considering your suggested mount points, and current default behaviour on modern desktop Linux distros, I think (/media/tmp) is a better option. Most systems I use now (Arch, Debain jessie, Ubuntu 14.04) mount drives on subdirectories in /media/$USER/ (presumably due to the desktop environment I use (GNOME)). Note that this mounting doesn't really distinguish between removable media and others, since partitions on the local hard disk (on which Ubuntu was installed) still get mounted in /media, so /media is, for all intents and purposes, the top location for mounting disks.


zram vs zswap vs zcache Ultimate guide: when to use which one

There is a whole lot of stuff about these three systems but none of it makes simple comparison between them let alone explain them well. I tried to make sense of it but my head exploded. Then I thought I had got it so I tried writing it down and my head exploded again. (see summary of implementations) I thought it will be useful to post this here as there were many stackexchange questions asking about pairwise comparisons between them.

Summary of what to use when:

ZRAM if you have no swap device on HDD/SSD.
ZSWAP if you do have a swap device on HDD/SSD.
ZCACHE: It does what ZSWAP does and ALSO compresses and speeds the filesystem page cache. (It is internally much more complicated and is not in the mainline kernel as it is still under development).

Summary of their implementations:

ZRAM is a compressed RAM based swap device
ZSWAP is a compressed Cache if you already have a swap.
ZCache is a backend for a special type of Virtual RAM thingy (Transcendent memory) that can be used to cache filesystem pages or swap data.

Details:

ZRAM:  Makes a swap device in the RAM. Pages sent here are compressed as they are stored. It has a higher priority than other swap devices: pages that are swapped out are preferentially sent to the zram device till it is full, only then are any other swap devices used.

Benefits: Independent of other (physical) swap devices. It can be used when there is no swap partition to expand the available memory.
Disadvantages: If other swap devices (HDD/SSD) are present they are not used optimally. As the zram device is an independent swap device, once it is full, any new pages that need to be swapped out are sent to next swap device directly, hence:

There is a real chance of LRU (least recently used) inversion: It will be the most recently swapped data that goes to the slow disk, while inactive pages that were swapped out long ago will remain in the fast ZRAM
The data sent to and read from the disk will consume a lot of bandwidth as it is uncompressed.

Status: Merged into the mainline kernel 3.14. Once enabled on a system, it requires some userspace configuration to set up the swap devices and use them.

ZSWAP: The frontswap system hooks attempts to swap out pages and uses zswap as write-back-cache for a HDD/SSD swap device: An attempt is made to compress the page and if it contains poorly compressible data it is directly written to the disk. If the data is compressed, it is stored in the pool of zswap  memory. If pages are swapped out of memory when the total compressed pages in RAM exceeds a certain size, the Least Recently Used (LRU) compressed page is written to the disk as it is unlikely to be required soon.

Benefits: Very efficient use RAM and disk based swap. Minimizes Disk I/O by both reducing the number of writes and reads required (data is compressed and held in RAM) and by reducing the bandwidth of these I/O operations as the data is in a compressed form.
Limitations: It is an enhancement of disk based swap systems and hence depends on a swap partition on the hard disk.
Status: Merged into the 3.11 mainline linux kernel.

ZCache: It is a backend for the Transcendent memory system. Transcendent memory provides a RAM-like memory that can only be accessed a page at a time by using put and get calls. This is unlike normal memory that can be accessed a byte at a time. The frontswap and cleancache systems hook attempts to swap and reclaim file-system page caches respectively and send them to the transcendent memory backends. When zcache is used as a backend, the data is compressed and stored in the RAM. When it fills up, compressed pages are evicted to the swap. (an alternate backend is RAMster which shares a pool of RAM across networked computers).
Using only the frontswap frontend with the zcache backend works just like zswap. (In fact zswap is a simplified subset of zcache)

Benefits Provides compressed caching both for swap and for filesystem caches.
Status: Still not mainlined as it is very complicated and is being worked on.

The best resources I found were:

Transcendent memory in a nutshell
[PATCH 0/8] zswap: compressed swap caching
In-kernel memory compression
LSFMM: In-kernel memory compression
The zswap compressed swap cache


To change the home directory of a user, do:

sudo usermod -m -d /newhome/username username

then give it the mount point of your old hard drive.

So, you do not want your home to be what it is currently. "/home/spajdo/"
instead, you would like it to be "media/spajdo/90aeb766-0497-4557-a922-d6ddffb022ab/michal/"  and whatever your user-name is.
 so you might do

sudo usermod -m -d /media/spajdo/90aeb766-0497-4557-a922-d6ddffb022ab/michal/  `whoami`

you can read more about this in the manpage. man usermod


How can I get Unity to display applications when pressing start key?

To install unity, run the following command in a terminal:

sudo apt-get install ubuntu-desktop

To install gnome-shell, do the same in a terminal:

sudo apt-get install gnome-shell

You can choose the default login manager as per your preference.


How do I enable Global Menus and fix HUD (after upgrading to 12.04 from 10.04)?

This happend to me aswell after upgrading to 12.04.

You should install indicator-appmenu  which wasn't installed on my system (or was removed by the installer). After this my global menu was working perfectly. (May require a log out and in or restart to connect.)

 sudo apt-get install indicator-appmenu

To immediately apply without re-login restart Unity: Open a terminal and issue:

unity --replace


How do I install KDE or XFCE or LXDE to an Ubuntu 12.04 system with no internet connection?

Offline installation of LXDE, XFCE or KDE on Ubuntu 12.04

You can install one of the supported variant desktop environments for Ubuntu 12.04 (LXDE, XFCE or KDE) by downloading the alternate CD for that variant -- Lubuntu, Xubuntu and Kubuntu respectively. Please be sure to get 32-bit or 64-bit depending on your existing installation!

Direct links to alternate CD ISOs:

Kubuntu 12.04 (KDE): 32-bit | 64-bit
Lubuntu 12.04 (LXDE): 32-bit | 64-bit
Xubuntu 12.04 (XFCE): 32-bit | 64-bit

The Alternate CD is required because it actually contains the deb packages needed to install these onto a running system with apt-get versus the regular Desktop Live CDs which contain a compressed filesystem.

Once you download the Alternate CD ISO (32-bit or 64-bit, depending on your Ubuntu installation), burn it to a CD-R. Insert the CD into the target system.

Open a terminal with Ctrl-Alt-T, and type ls /media. You will see something in there like Kubuntu 12.04 LTS i386.

Then type sudo apt-cdrom add /media/Kubuntu (the first few letters), and press Tab to autocomplete the full name and press enter. apt will scan the CD for packages.

Now type sudo apt-get update, and then sudo apt-get install kubuntu-desktop to install the full KDE desktop environment. (Or xubuntu-desktop or lubuntu-desktop, respectively, for XFCE or LXDE).

If you have an internet connection on the machine, please disconnect the Ethernet cable (or disable networking/wireless), because even after you add the CD repositories, apt-get may still try to fetch the latest packages over the internet if it detects a connection!


Those commands are fixing your problem temporarily.

Try running this command from terminal when Ubuntu is running to try to fix the problem -

sudo update-grub

Running just this command should be enough for you, but if it isn't, you can run all three of these to try fixing your problem. [Replace X with your drive letter]

sudo grub-install /dev/sdX
sudo grub-install --recheck /dev/sdX
sudo update-grub


Does Ubuntu have support for Sony vaio pro series

The wireless issue is ongoing with the new Sony Vaio Pro series. I am currently running Ubuntu 13 daily build that resolves the wireless problem. Below is a tutorial by Nell Hardcastle on installing Ubuntu 13 on the new Sony Vaio Pro laptops.
Installing Ubuntu 13 (daily build)

Nell Hardcastle's original post on installing Ubuntu 13 on Sony Vaio Pro
Just picked up a Vaio Pro 11 to replace my MacBook Air. Another interesting piece of hardware, one of the first Haswell ultrabooks to be released and in my preferred ~11" form factor. Following is some tips to getting Ubuntu running on these devices, the Pro 11 and Pro 13 are virtually identical, some of these probably apply to all Haswell laptops.
To install Ubuntu, you need to grab the Ubuntu 13.10 daily image. The 13.04 image doesn't correctly setup the GPU at boot. Before installing, easiest is to switch the device to legacy in the "advanced bios options menu". This will prevent you from running Windows 8 - EFI mode should work in theory but after a day of EFI installs I couldn't get one running. This system does have the option to disable secure boot. Format the disk to MBR (not GPT) when installing in legacy mode, syncing the MBR from the GPT layout doesn't work on this hardware.
Hopefully I can figure out how to get it running in EFI mode, allowing dual boot setups and generally saner disk layouts. Using BIOS mode and MBR feels like a huge hack these days.
Next up, no wireless. The Intel 802.11ac 7260 card included in the Pro 11 has a driver on the stock 13.10 kernel but no firmware or correct PCI IDs for this revision of the card. To solve this, build a kernel from Intel's [iwlwifi git tree].
git clone git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi.git
cd iwlwifi
# Use your running Ubuntu kernel config
cp /boot/config-$(uname -r) .config
# Build packages and install them
make -j4 deb-pkg
sudo dpkg -i ../linux-headers* ../linux-image*

Firmware is pulled from the LKML mailing list as a patch to the [linux-firmware git tree]. I've mirrored it here, iwlwifi-7260-7.ucode and iwlwifi-3160-7.ucode following the license provided. Download the firmware and place it in /lib/firmware before rebooting on the new kernel.
Now the system works but you'll probably notice it's rather slow or running very inefficiently. On this kernel, Intel's new pstate CPU scaling driver is enabled but it isn't actually enabled for this CPU. The CPU will be stuck at 800MHz or 1.6GHz (not sure what controls which state you end up in but it seems either case can happen). A small change to the kernel will enable the pstate driver.
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 07f2840..1ce506a 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -522,6 +522,7 @@ static const struct x86_cpu_id intel_pstate_cpu_ids[] = {
        ICPU(0x2a, default_policy),
        ICPU(0x2d, default_policy),
        ICPU(0x3a, default_policy),
+       ICPU(0x45, default_policy),
        {}
 };

 MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids);

Save this patch and apply it with 'git apply haswell-pstate.patch'. Rebuild the kernel with make deb-pkg and install the new package. When you reboot, CPU scaling should work as normal but it may appear wrong in tools using the cpufreq interface still. You can check it's working by looking for the directory '/sys/devices/system/cpu/intel_pstate'. The actual speed of the CPU can be obtained with the i7z utility.
To apply this patch for other CPUs that may support pstate but do not have the driver enabled, add a new line with the model number from /proc/cpuinfo of your particular CPU. intel_pstate.c is using hex values and /proc/cpuinfo displays decimal, so be sure to get that right.
My experiences after that bit of kernel setup with the laptop has been pretty good. Thermal design seems much better than the 2012 MacBook Air it replaced. The screen has a slight amount of grain due to the touchscreen overlay that I find a little annoying, it will really bother some. Besides wireless and power management, the rest of the hardware works with no special configuration. Performance is good enough to run most of my Steam games at 1920x1080 with low or medium settings. Build quality seems less than perfect but acceptable. I'll post again how it holds up.

Resolving Keyboard Issue
The keyboard issue is to do with num lock being enabled (and there is no num lock key on the new Sony Vaio Pro series). You can type normally by holding  To resolve, do the following once logged in:
Bring up the on screen keyboard (it's called onboard on Ubuntu), then click the Ubuntu key on the onboard key board, then click on the "123" key on the right hand side of the onboard keyboard. Then, holding down the fn key on your physical keyboard, click on num lock on your onboard keyboard. This should resolve your issue.


CPU frquency scaling broken on upgrade from Ubuntu 20.04->20.10 (Intel CPU)

I have observed the same symptoms when upgrading from 20.10 to 21.04.
It turned out that thermald was causing these issues.
thermald is installed on kubuntu 20.10 and 21.04. However, on 20.10 thermald fails to start.
You can check if thermald is running by looking at the output of
ps aux |grep thermald

When I stop thermald on 21.04, throttling to 400 MHz stops.
sudo systemctl stop thermald

However, at this point some settings have already been changed and thermald doesn't seem to restore those settings when stopping. So I've simply removed thermald completely.
sudo apt remove thermald

After a restart 21.04 is behaving almost identically to 20.10. The base frequency is a bit lower (1300 MHz instead of 1800 MHz), but the peak and long-term frequencies under load are the same.
Instead of uninstalling thermald, deactivating should have the same effect:
sudo systemctl disable thermald.service


[16.04]Laptop behaves awkwardly when I'm running ubuntu

A lot of reasons could be the culprit, and honestly it could be an unlucky combination all of the reasons combined. Every situation is unique. Here's what I would do:

Always - A good practice is to make sure your PC is currently up to date, run this command:

apt-get update

and then this command:

apt-get upgrade

Then I'd wait to see if that fixed the issue.

1 - I'd run the command top to see what processes and resources are being commonly used. I'd also have top running before it suspends so I can see it first thing when it awakens. I'd research each one to make sure its useful to my usage and needs.

2 - I'd also go through the Startup Applications List to see what apps are auto-starting. There shouldn't be but a few things running. Again, I'd research each one to make sure its useful to my usage and needs.

3 - I'd double check the settings in the Power Menu as well as the Brightness & Lock settings too. Could be a bad combination of settings.

4 - I'd also check Bluetooth and wireless settings, if left on they could easily draw from battery. Again, could be a bad combination of settings.

5 - Remember to save and exit from any apps you have running before suspending your laptop.

6 - I'd, personally, try a new fresh install with a new download and a freshly burned CD. I'd go so far as to try Lubuntu or Xubuntu just to see if they have better results with the Hardware.

Good Luck!


The option is really missed. This is just another illustration of new GNOME modern "user-friendly" decisions.

You can use two workarounds here.

Workaround 1

As a workaround you can use two steps below:

Ctrl+L (for editing address bar)
Ctrl+C (for copying the path)

Workaround 2

Enable location bar and copy with mouse by:

Set always-use-location-entry to true

gsettings set org.gnome.nautilus.preferences always-use-location-entry 'true'

Click right mouse button on address bar and click Select All, followed by Copy (or simply drag the selected text to needed location)

Note: I reported bug 1807452 to launchpad.net and bug 708 to upstream to track the error.


Change Default Font for a Specific Language

You can create the file ~/.config/fontconfig/conf.d/90-my-farsi.conf and give it this contents as a starter:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <match target="pattern">
        <test name="lang" compare="contains">
            <string>fa</string>
        </test>
        <test qual="any" name="family">
            <string>sans-serif</string>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>Homa</string>
        </edit>
    </match>

    <match target="pattern">
        <test name="lang" compare="contains">
            <string>fa</string>
        </test>
        <test qual="any" name="family">
            <string>serif</string>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>Homa</string>
        </edit>
    </match>
</fontconfig>

That file results in the Homa font (included in the fonts-farsiweb package) being selected at first hand when Persian is the selected language.

$ LANG=fa_IR fc-match
homa.ttf: "Homa" "Regular"
$


I don't think that this can be done with scp. Last time I needed something like this i.e. progress shown, I used rsync instead. It shows progress in a bar-like manner. See if it works for you.

You will need to use the --progress option of rsync. You can use the following command:

rsync -r -v --progress -e ssh user@remote-system:/address/to/remote/file /home/user/


Can bad sectors cause ubuntu installer to freeze?

To check your HDD for bad blocks, and to see if that's causing your install problem... Note that these tests will take some time...

Note: do NOT abort a bad block scan!

Note: do NOT bad block a SSD

Note: backup your important files FIRST!

sudo e2fsck -fcky /dev/sdXX # read-only test

or

sudo e2fsck -fccky /dev/sdXX # non-destructive read/write test (recommended)

The -k is important, because it saves the previous bad block table, and adds any new bad blocks to that table. Without -k, you loose all of the prior bad block information.

The -fccky parameter...

   -f     Force checking even if the file system seems clean.

   -c     This option causes e2fsck to use badblocks(8) program  to  do  a
          read-only  scan  of  the device in order to find any bad blocks.
          If any bad blocks are found, they are added  to  the  bad  block
          inode  to  prevent them from being allocated to a file or direc‐
          tory.  If this option is specified twice,  then  the  bad  block
          scan will be done using a non-destructive read-write test.

   -k     When combined with the -c option, any existing bad blocks in the
          bad blocks list are preserved, and any new bad blocks  found  by
          running  badblocks(8)  will  be added to the existing bad blocks
          list.

   -y     Assume  an answer of `yes' to all questions; allows e2fsck to be
          used non-interactively.  This option may not be specified at the
          same time as the -n or -p options.


Dell 7530 Ubuntu 20.04/20.10 screen won't turn back on after sleep

The problem turned out to be a bug in the BIOS. After upgrading the BIOS firmware from Dell and undoing any changes within /etc/systemd/logind.conf, BIOS settings, gnome-tweak-tool, or Grub, everything seems to work as normal.


Key based SSH login that requires both key AND password

There are two ways to configure ssh to require both a public key and a password or passphrase.
The difference between the password and the passphrase:
The password in this context is the password assigned to the user in the server computer (the board). If the board has only one user account, then it will have only one password. If the board has multiple user accounts, they should have their unique passwords.
The passphrase is linked to the private key in the client (local) computer, not to the remote server (board) computer. Thus, if you use two different client computers of devices to ssh from, then you will have to create a passphrases for the private keys stored in each local computer. Similarly, if two different users need to ssh to the server (board) from their own respective local computers, they will need their own private-public key pairs and own passphrase to unlock their respective private keys.
For example, say you and I need to ssh to the same server computer (the board) from our own laptops. You will have your own private key and a passphrase for that private key. I will have my own private key and its passphrase. The upshot of this arrangement is, I can change the passphrase of my private key any time without telling you, or changing anything to the server computer (the board). I can even remove the passphrase from my private key without telling you.
The other scenario is, if I have multiple servers to ssh to and if I use the same private key to authenticate myself to all the servers, I will need to use the same passphrase to access ssh in all the servers I work with, not just your board.
Method 1. Public Key with passphrase
Reference: https://help.ubuntu.com/community/SSH/OpenSSH/Keys
Step 1. Add a passphrase to the existing public-private keyfor each client and user combinations
For each user on each client computer or device use the following command to generate a passphrase for the exiting public-private key pair:
ssh-keygen -p

You wil be prompted for the the location where to keep the files. Hit enter to accept the default location.
If you already have a passphrase set, you will be asked to enter the existing passphrase. In that case you have already done this step. Press Ctrl+C to stop the process.
Next you will be prompted to enter a new passphrase. Do not hit Enter! Enter a long and difficult to guess passphrase that is easy to remember. You will be asked to re-enter the passphrase.
If you don't have an existing public-private key pair, use the following command to generate it. You will be prompted to add a passphrase if you need one:
ssh-keygen -t rsa

Every time you try to login to the ssh server, you will be asked to enter this passphrase. This can be different for the user password of the ssh server. Each user can have their own passphrase. If an user needs to login from different clients  (laptop, phone, etc.) she will need to repeat this process for each client. She can choose different passphrase for different clients.
Step 2. Copy the public key to the server only if the key is new
In your client computer enter:
ssh-copy-id -i ~/.ssh/id_rsa.pub user@board_ip

It will ask for the password of the user in the remote server. Remember, password based login must be enabled for this to work.
Repeat for all the users and all client devices.
Step 3. Test if it works
Try to login to the server by entering:
ssh user@board_ip

If all goes well, you will be prompted to enter the passphrase you created in step 2. This is not the user password you were asked in step 3.
If you see the prompt to enter the user password, then something is not right.  Do not proceed to the next step, until you get this working.
Step 4. Disable password based login
Once each user and their respective client devices have their own public-private key pairs and respective passphrases of their choice, you won't need the password based login. It is best to disable this method. Keeping it enabled will allow anyone without the public-private key pair to try to guess the password of the user@board-ip.
In the ssh server, the board, edit the file /etc/ssh/sshd_config and change:
#PasswordAuthentication yes

to read:
PasswordAuthentication no

Note, the # is not there in the second line and the yes is now no.
Restart the ssh service in the server by:
sudo service ssh restart

If this does not work, reboot the board.
It is done. The passphrase is cached in the client probably by Gnome-Keyring until the user logs out of the local computer. Thus, the phass-phrase is asked only once per session.
What comes next is another alternative. You need to do either 1 or 2.
Method 2. Public key and user password both required
Reference: https://security.stackexchange.com/questions/17931/possible-to-use-both-private-key-and-password-authentication-for-ssh-login
Step 1. Remove passphrase from Private key if present, for each client and user combinations
For each user on each client computer or device use the following command to remove the existing passphrase for each public-private key pair:
ssh-keygen -p

You will be prompted for the the location where to keep the files. Hit enter to accept the default location.
If you have an existing passphrase you will be asked to enter it. If you don't get prompted for existing passphrase, you are done. Press Ctrl+C to stop the process.
Otherwise enter the existing passphrase and continue.
Next you will be prompted to enter a passphrase. Hit Enter twice to remove the existing passphrase from the private key.
If you don't have an existing public-private key pair, use the following command to generate it. You will be prompted to add a passphrase if you need one:
ssh-keygen -t rsa

If an user needs to login from different clients  (laptop, phone, etc.) she will need to repeat this process for each client.
Step 2. Copy the public key to the server only if the key is new
In your client computer enter:
ssh-copy-id -i ~/.ssh/id_rsa.pub user@board_ip

It will ask for the password of the user in the remote server. Remember, password based login must be enabled for this to work.
Repeat for all the users and all client devices.
Step 3. Test if public keys are being used
Try to login to the server by entering:
ssh user@board_ip

If all goes well, you will not be prompted to enter any password or passphrase.  This is normal. This shows that the public key is properly installed in the ssh server (the board) and it is working. We will change the setting so that it asks for the password again in the next step.
Step 4. Setup for both public key and password
Login to the ssh server (the board) and edit the /etc/ssh/sshd_config file. Add the following line in the file:
AuthenticationMethods "publickey,password"

Warning: Make sure the the PasswordAuthentication looks like:
#PasswordAuthentication yes

This is the default behavior. You may choose to keep or remove the # in the beginning. However, if this setting is set to no along with the line you just added, then nobody will be able to login to the server using ssh. If you get locked out, you will have to physically go to the remote server, hook it up to keyboard, monitor, etc. and login locally and edit this file to fix the problem.
End Warning
Restart the ssh service in the server by:
sudo service ssh restart

If this does not work, reboot the board.
Step 5. Test breaking in
Find a new computer or login to the client computer using a new username, say user2. This user should not have any public-private key pairs in his /home/$USER/.ssh/ folder. We will pretend that user2 is the hacker who has somehow found out the password of user@board_ip and try to ssh into that system.
Enter as user2, from the client computer:
ssh user@board_ip

If you can login with just the password, then it did not work. Anyone who has the password or can guess it, can login to the board. They do not need the key.
If you get a permission denied and login fails, then the double authentication of public key and password works.
Hope this helps


I can't import numpy in Visual studo code

you have to check that the python version running from VScode is the same as the one running from the terminal (probably you running a different version of python in VScode and you didn't install numpy there)
Check https://code.visualstudio.com/docs/python/environments
For more Info


Install Encrypted Ubuntu Server 20.04 on Proxmox

Ok, after surfing for two days, i found the solution is pretty easy after all:
1) Extend your logical volume:
lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv

2) Resize the Filesystem:
resize2fs -p  /dev/mapper/ubuntu--vg-ubuntu--lv

Done.
I hope it will help others.


Nautilus progress bar not visible on Ubuntu 14.04

Revert to original Nautilus:

sudo apt-get install ppa-purge
sudo ppa-purge ppa:webupd8team/experiments
nautilus -q

or uninstall nautilus and use another file manager.


how do I set the default timezone in a script?

The command for setting the timezone in Ubuntu 16.04 is timedatectl.

The following command will set your timezone to what you want:

timedatectl set-timezone Country/City

To turn UTC off, run the following command:

timedatectl set-local-rtc 1

But this is NOT recommended because of the updates not happening to the RTC in time sync.  I have actually found that in dual-booting with Windows, it is better to set Windows to use UTC, then the clock is always correct between reboots between Windows and Ubuntu.  An answer for setting Windows to UTC can be found here:  https://askubuntu.com/a/169384/231142

Running that command you will get the following warning:

Warning: The system is configured to read the RTC time in the local time zone.
         This mode can not be fully supported. It will create various problems
         with time zone changes and daylight saving time adjustments. The RTC
         time is never updated, it relies on external facilities to maintain it.
         If at all possible, use RTC in UTC by calling
         'timedatectl set-local-rtc 0'.

To find your timezone that you set to, run the following:

timedatectl list-timezones

and choose the closest city to you.

Hope this helps!


As Terrance mentioned in comments, videolan done version 4.0.0 for Ubuntu for 19.04, 19.10 and 20.04. Thanks mate


install ubuntu 14.04 server using kernel 3.13.0-24

You can't really download a disc image that will get you 14.04 with the 13.10 kernel.

It's certainly possible to run Ubuntu with a different kernel, though. You can try upgrading to 14.04, but removing the new kernel. Keep the old kernel and don't upgrade it. If you don't run into dependency issues with this, there could still be unexpected problems due to running a different kernel version than expected.


Why does "ip link add" not work in rc.local?

Adding dummy interface need dummy kernel module that is not loaded when rc.local is executing. There are many methods to run a program at boot time but the best way is service file.

I suppose that your Ubunut box supports upstart technology. I name this service "dummyadder". First create file /etc/init/dummyadder.conf and add following lines:

start on runlevel [2345]

script
ip link add name mydummy type dummy
ip link set dev mydummy up
end script

pre-stop exec ip link del mydummy

Reboot your Linux to see the result.


How to install Windows ODBC on Ubuntu 17.04

It looks like you're searching for the packet msobcsql, while the correct name is msodbcsql (you're missing the 'd' ;) ). Also, the repository you're using doesn't offer the package in version 13.2.4.0-1. It only supplies versions 13.1.9.0-1 and 13.1.9.1-1.


What does the command "find ~/folder-name -type f | wc -l" do?

Let's split it into parts:
find ~/folder-name -type f | wc -l

find is a program for, well, finding files and folders:

~/folder-name is the directory in which find will try to find files/folders
-type f tells find to look only for files (and not directories, special files, etc.)

wc is a program to count characters, words, and lines in some text (a file, or the input that you give it).

-l tells it to only count lines.

| sends the output of find to wc.

All told, it counts the total number of files in the directory ~/folder-name, and all its sub-directories. In your case you have 1305252 files, not counting links, directories and other special files. That's a pretty  big number (IIRC a MATLAB installation has around 500000 files, less than half that, and still takes forever to delete). That would go a long way in explaining the long times. The sheer amount of time find took should be hint.

As another reference point, my own home directory, with a total size of 361GB spanning a few partitions has only 282747 files (one fourth of your number!).


Homerun can be used as a plasmoid (both on the panel and on the desktop), but is maily used as a desktop layout.
So:

Right click desktop
Desktop settings
Layout: Homerun
Set the background and behaviour to whatever pleases you.

Job done!


Why write to an external disk I only looked at?

Every time you look at files or directories - access-times are written to the filesystem.

It a pretty big deal if you are doing forensics. In those cases you surly want to mount as read-only.

Also if access to the fs was previously cut in the middle of an operation (unmounted improperly) then the next time you mount it - a recovery will make modification to the fs to bring it to a consistent state by consulting the journal.


How do I disable a monitor in Ubuntu 17.10/GNOME 3.26

Seems to have been a mistake in the GUI design of GNOME 3.26

Luckily there's an extension on the way that fixes this: https://extensions.gnome.org/extension/897/turn-off-display/


Failed to increase root partition size ( / ) with Gparted, Ubuntu 16.04

The error you received was because the partition was currently being used by your current session.

The only way to safely move/resize partitions is to boot from a Ubuntu LiveCD and use gparted. This way, the partitions on hard disk are not actively being used.

If you need further help, please post a screenshot of how gparted see's your disk configuration now. Please explain more about your intent for the final/new disk configuration. Then I can give a better recommendation.


It sounds as though your grub did not install properly or became corrupted.  Please try this boot repair solution.


Try install it with easy_install:

easy_install -U pip


How to download streaming video from a flash player (arte)?

I've extracted the link for you, but beware that it is a huge file (790mb)! It will take some time to download. I did it a while ago, but it was not easily repeatable for other sites so I'll just give you the link here. (Even though flashgot did NOT work this time, it does often work for downloading flash videos, so that's quite a good firefox add on to use in general.)

How I did it in this case (may NOT work for other flash streams):
 You need to have the noscript addon for firefox installed for the following to work:

With no script blocking all js and flash (as default for unvisited sites), go to the site- e.g. http://liveweb.arte.tv/fr/video/Gonzalo_Bergara_Quartet_Festival_Django_Reihnardt/
Now mouse over the blocked flash plugin, which gives away the server they are using, which is download.liveweb.arte.tv in this case
With this knowledge, go to google and do site:download.liveweb.arte.tv jazz or another search term.
Then when you find the link you want, go to the google cache page instead of the actual live page.
Then, make sure arte.tv and googleusercontent are allowed in the drop down noscript menu, but everything else is blocked, and you should be able to mouse hover over the disabled video plugin and copy the link.

Results may vary for different videos from the same page (http://www.my-jazzlive.tv for example). But is possible that when reaching the cache page, more usual ways of downloading may become available, like Flashgot: so keep an eye on Flashgot Media button!

Whether this will work for other sites is anyone's guess!


How to set keyboard switch with Ctrl+1, Ctrl+2, Ctrl+3 etc

You can do this using setxkbmap. From man setxkbmap:

  The setxkbmap command maps the keyboard to use the layout determined
  by the options specified on the command line.

To do this, open Keyboard from settings and click on Custom Shortcuts. Click on the + sign and add fill up the 'Custom Shortcut' windows as shown below:

Press Apply. Click on 'Disabled' and press Ctrl + 2 to make this as a shortcut for enabling Russian.

Now repeat the steps, but add setxkbmap us as the command and Ctrl + 1 as the shortcut. This will enable Ctrl + 1 as the shortcut for English


First, open your terminal [Ctrl + Alt + T] and type this command

sudo apt-get install update-manager

after installed, search from dash update manager and run it, now click on check button, if there update available, update it, after update you can upgrade your system for newer version


Will LTS releases continue to have old binaries and libraries after its end of life?

This section answers the general question regarding software in the LTS release and what happens after EOL.  This applies to most any software in the release.

12.04 LTS is a long term supported release, for up to 5 years for server.  This does not mean that the specific versions of software included in 12.04 will continue to exist afterwards in later releases.

After 12.04 reaches End of Life, there is absolutely no guarantee that the versions of any given software in 12.04 will exist or be supported in later releases.  It is very likely that the software that you will want will already have been version bumped to later releases, depending on the version in Debian at the time of the later release of Ubuntu being made.

During the lifespan of the LTS, however, the versions of the software in the LTS release are likely to stay the same, given the restrictions for version bumps in releases of Ubuntu.

This section answers the original question about PHP 5.3 and whether it'll be supported after 12.04 EOLs.

As long as 12.04 is not End of Life, it'll have PHP 5.3.

However, as 12.10 (Quantal) and later all have PHP 5.4.x or newer, and everything else after will have that depending on what is in Debian and what PHP upstream has released, after 12.04, there is no PHP 5.3 available in the repositories, however it might be available in a PPA.  And that will likely be riddled with security bugs that are not fixed by the time 12.04 EOLs.

If you were too lazy to read all that, the answer to your question is, "No, there's no guarantee that PHP 5.3 will be available after 12.04's End of Life".  It will be VERY likely that by the time 12.04 EOLs, not even PHP upstream will support 5.3.x anymore, and we might be on PHP 5.5.x as stable and PHP 5.4.x as legacy.


Trying to install Ubuntu 20.04 along side Win10 in Legacy mode, getting "no efi system partition was found" error

This can happen if you boot the installer in UEFI mode and want to install. Then the installer wants to install Ubuntu in UEFI mode as well and requires that the partition table of the target device is in GPT format and has an ESP partition.
Check in your BIOS how you boot from the installer device. You don't want to boot the installer in UEFI mode but in Legacy mode. Sometimes the options to boot in UEFI mode have UEFI in the boot entry, e.g. at the end, and the legacy option doesn't.


At the login screen you can sign in to Unity. Follow the steps to get logged in fine.

As you can see, that Ubuntu Logo is circled. Click on it, and you will see this:

You should see 'Ubuntu'. Select it and click 'OK >'. Then sign in as normal.

Note: Once you click 'Ubuntu' Unity will be your default theme until you change it. To change the theme use the steps above.

Hope this helps!


Installed TensorFlow successfully, but after invoking python on the shell & importing it, it says tensorflow command not found

TensorFlow is installed correctly, but it must be run from the python3 interpreter and you tried to run it from the python interpreter instead.
Start the python3 interpreter with python3 and run the following line of code to import tensorflow.
import tensorflow as tf

If import tensorflow as tf doesn't return an error message that means that is has been imported successfully. Now that you have installed TensorFlow you may want to run the example code from TensorFlow 2 quick start for beginners tutorial to start using it. The example code also requires Keras deep learning framework.
sudo apt install python3-keras # 18.04 and later


Installing qt5-default did the trick for me on Ubuntu 18.04:

sudo apt install qt5-default

Edit: On a subsequent install of qjackctl on a clean Ubuntu 18.04 OS, the above was all that was necessary to clear the error. I'm leaving my original caveat below for reference.

One caveat, that was the last thing I tried and it worked. I'm unclear as to whether it alone would satisfy the requirements for installing qjackctl. Here are the other steps that I took prior to this working:

Reinstall qtchooser:

sudo apt-get install --reinstall qtchooser

That didn't seem to accomplish much. But then I installed qt4-qmake:

sudo apt-get install qt4-qmake

This eliminated the error that read checking for Qt major version... qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory but not the PATH error related to qmake-qt5

I then tried installing some build requirements:

sudo apt-get install qtbase5-dev qtbase5-dev-tools qttools5-dev-tools libqt5x11extras5-dev

...which installed 37.0MB of components, but didn't resolve the error.

I also tried to install build-essential:

sudo apt-get install build-essential

...but found that it was already installed and up to date.

Finally, having seen more than one mention of qt5-default (see the beginning of my answer), I tried installing it and the PATH error was resolved.


Very likely, your installation media/software could be corrupt.  Are you sure whether your hard disk was functioning properly earlier? If yes, re-write bootable ubuntu image to the USB stick again and try installation again.  Use rufus to write image to USB stick, if using windows.  If the problem persists, try disabling IRST (Intel Rapid Storage Technology), if enabled, in BIOS/UEFI and change your SATA controller to AHCI.


Can I safely purge EFI signed kernels? (alternatively, can I get rid of unsigned kernels?)

Thanks for all the help and links.  I spent a few hours this weekend and verified the following

Short answers

Yes, you can purge all of the linux-signed* packages, but you have to install linux-generic if you want automatic kernel updates to continue functioning properly.  All of the grub, kernel, and initramfs re-configuration is handled automatically.  The kernel install scripts really handle everything without any issues.apt-get purge linux-signed* linux-generic+
Yes, you can get rid of the unsigned kernels without any ill effects, but they will keep coming back after kernel updates.  This cannot be solved by managing packages, but it is easy to fix with a short script.

 #!/bin/sh
#
# user script:
/etc/kernel/postinst.d/zzz-remove-unsigned-kernel
#
# after a new signed kernel image is installed, this script removes
# the unsigned image
#
if [ -e "$2.efi.signed" ]; then
    echo "/etc/kernel/postinst.d/zzz-remove-unsigned-kernel: removing $2"
    rm "$2";
fi

Longer answers

In the first case, the solution is really simple.  It works pretty much as you would assume at first glance.  Still I learned some helpful things about the ubuntu package structure for kernels.  I wanted to be sure that I understood the side effects or consequences, but I also just like to see how things are built.  Just as a side note, I use the generic kernel, but just swap generic for lowlatency or virtual if that is your thing. Also, everything here is based on 16.10 (yakkety).  Here is the kernel package hierarchy:

linux-signed-generic is a meta package, meaning that it doesn't include any code.  It just has a list of dependencies, which always contains the complete installation of the newest kernel update.  "Complete" means all of the kernel headers, the kernel image, the (detached) image signature, and extra kernel modules for just about every device that ubuntu can support.
linux-generic is another meta package containing all of the same real packages except for the image signature.
The actual kernel image is only contained in the linux-image-x.x.x-yy package.  The linux-signed-image-x.x.x-yy package just contains a detached signature, and the build script attaches this sig to /boot/vmlinuz-x.x.x.yy-generic and creates /boot/vmlinuz-x.x.x.yy-generic.efi.signed.  The script does not clean up the unsigned image.
Kernel packages have special scripts in /etc/kernel that modify the default apt autoremove behavior.  Normally, removing linux-signed-generic would flag all of the downstream packages for autoremoval, but this doesn't happen for kernel packages until there are two newer builds of the same version.

In the second case (trying to keep the signed kernel image only), there seem to be no consequences to deleting /boot/vmlinuz-x.x.x.yy-generic after the installation is complete.  The two kernel images are exactly the same except for the signature, and they share all the same modules and config files.  However, as soon as an updated kernel is installed, it will leave behind the unsigned image.  Fortunately, there were easy hooks for running a script every time a new kernel is installed.  Any scripts in /etc/kernel/postinst.d are executed by run-parts with two arguments $1 is the kernel version and $2 is the full path of the image (i.e. /boot/vmlinuz-x.x.x-yy-generic)

The only minor caveat is that removing the unsigned image has to be done after grub is finished updating grub.cfg.  If /boot/vmlinuz-x.x.x-yy-generic.efi.signed exists, grub adds that image to grub.cfg and ignores the unsigned image.  However, there must be somewhere in the process that still expects the unsigned image because grub fails to configure properly without it.  The script that initiates grub configuration is /etc/kernel/postinst.d/zz-update-grub.  I named my script zzz-remove-unsigned-kernel so that run-parts executes it after everything else is finished.

EDIT:  I've used this script now with a few kernel build updates, and everything seems to work fine.  I am using option 2 above (deleting unsigned kernels).  I'm going to mark this as the correct answer.


pip 2.7 error `sys.stderr.write(f"ERROR: {exc}")`

You have local pip installed.
Remove it with
sudo rm /usr/local/bin/pip

and retry.
You can reinstall the pip by
sudo apt-get install --reinstall python-pip


How To Install Remarkable editor On Ubuntu from terminal

Open the terminal and type :

wget https://remarkableapp.github.io/files/remarkable_1.62_all.deb

And :

sudo gdebi remarkable_1.62_all.deb

if you get error like gdebi: commande not found you can install it by typing :

sudo apt-get install gdebi-core


LVS-NAT doesn't work with passive FTP. Active FTP is fine

Shawn,

As discussed on the HAProxy mailing list, I'm pretty sure you need to enable conntrack as well as ip_vs_ftp, then it should work fine.


Umlauts in Windows text files not recognized under Ubuntu

The problem is that the files are using the iso-8859-1 which does not recognize umlauts. The simplest solution is to change the encoding of the files:

iconv -f iso-8859-1 -t utf8 document.tex > newdoc.tex

To do this for all tex files in your current directory, run this:

for f in *tex; do mv "$f" "$f".bak && iconv -f iso-8859-1 -t utf8 "$f".bak > "$f"; done

The command above will first rename each .tex file to filename.tex.bak, then change the encoding of the copy and save it as filename.tex. So, if you have a file named foo.tex, you will end up with a file called foo.bak.tex with the original encoding and the foo.tex with the UTF8 encoding.

Another problem you are likely to encounter is that Windows uses \r\n as a line ending while Linux & co use \n alone. You are therefore likely to want to change this when working on Linux. To convert windows line endings to Unix style, do

sed -i 's/\r//g' filename


Use gparted instead. It's included in the Ubuntu live USB. Boot Ubuntu from USB, run sudo gparted in a prompt and you are on your way.


I solved this problem by unchecking "Restore window position and size" in Psensor preferences >> Startup.


How to resize(increase) a root+home cloned partition from a smaller HDD?

You can do it, but maybe not in one step.  You need free space adjacent to the space you want to expand.  If another partition is in the way, such as the swap drive, you would need to first move it to the end (easy to do in gparted, just create a new swap partition, and delete the old one.  Then, you should be able to increase the partition.

Ideally, you should have a single big extended partition, and everything else should be logical drives inside this extended partition (unless you have Windows on the drive, too; it likes to be a primary partition, I think).  But if you have a primary partition, it can still be expanded if there is adjacent space.


Where are all the emails stored in postfix?

"The short answer is that the mailboxes are
either in /var/mail or in /var/spool/mail; the long answer is that it
depends on your Postfix configuration."

Direct quote from here.


Ctrl+a to enter command mode, then press d.  This will only detach your session, leaving any connections or programs you had open in there still running.  This sounds more like what you were after.

To view screen sessions, attached or no, type screen -ls

To re-attach to a session type screen -r: this will work if you have only one session out there.  Otherwise you'll have to specify to process id (pid) like so screen -r 12345.

There a LOT you can do with screen - this is just a thumbnail of what you can accomplish.

Bonus:  If you want a cheat sheet of useful screen command while you're in a screen session just hit Ctrl+a then type :help.

Welcome to the wonderful world of Linux, by the way.  Hope you enjoy your visit. :)


Possibly Mohammad is not asking about querying the current state but asking what the default status is on a vanilla installation. If the question was meant as: Is Apparmor activated by default on install, the aswer is Yes.


Fix shutdown on HP 530 (kernel 3.9.2 / ubuntu 13.04)

I solved it updating the kernel to 3.9.6 following this instructions

cd /tmp

wget https://dl.dropboxusercontent.com/u/47950494/upubuntu/kernel-3.9.6 -O kernel-3.9.6

chmod +x kernel-3.9.6

sudo sh kernel-3.9.6

sudo reboot

source: http://latestlinuxupdates.com/linux-kernel-3-9-6/


Is my drive encrypted correctly? Why is it taking up so much space?

Baobab (the proper name of Disk Usage Analyzer) doesn't look into file systems mounted at subdirectories (here: /home/eddy) of the parent directory to analyze. Instead it only sees the content of the files inside the parent file system which happen to be the files and file names that back your encrypted home directory in their encrypted state. I found two ways around this.

1 Tell Baobab to look at your home directory specifically

To that end open a terminal and run:

baobab "$HOME"

I didn't find a way to do this reliably via graphical user interface.

2 Use a command-line disk usage analyzer

du doesn't produce neat looking output like Baobab but it does its job:

du "$HOME"

The output of the plain command may be a little difficult to read and I recommend you use the -h option for human-readable number magnitudes:

du -h "$HOME"

You can also sort this output by size in descending order with an additional tool:

du -h "$HOME" | sort -h -r -k 1,1

Last but not least, the output of du will likely span multiple terminal screens. Therefore I recommend that you redirect its output to a pager program like less that lets you scroll through text data at your own leisure:

du -h "$HOME" | sort -h -r -k 1,1 | less

Alternatively you can save the output of du in a file and view it with your favourite text viewer, e. g.:

du -h "$HOME" | sort -h -r -k 1,1 > ~/Desktop/disk-usage.txt


Can't paste files or create folders in a file browser on my root or /opt

try to do the following from your terminal:

sudo -H nautilus

that way you will get all the privileges like as root to make folders and paste stuffs everywhere you want.