Found the answer here:

https://forums.gentoo.org/viewtopic-t-948904-start-0.html

Edit (or create) the file:

~/.config/gtk-3.0/settings.ini

And add the following:

[Settings]
gtk-primary-button-warps-slider = false


I was able to fix this problem by installing the samsung-backlight from Linux on my Samsung PPA.


How can I control YouTube playback with my keyboard hotkeys?

You can install the Chrome extension Streamkeys then configure the hotkeys in the options.

Only drawback: shortcut must contain Ctrl or Alt, and use a letter or a number ; for other keys, some keys are accepted and some not (it doesn't work with F1-F12).

I just did it under Ubuntu 18.04 with Chromium 73.
You may be surprised by a black screen if you press Ctrl+Alt+F12 (finish reading the sentence before trying), you can come back with Ctrl+Alt+F1 or F2


How to remove the sit0 network interface?

sit stands for simple internet transition. sit0 is the Linux name for 6to4. 6to4 is a tunneling protocol for using IPv6 over an existing IPv4 connection.

Source: http://www.tldp.org/HOWTO/Linux+IPv6-HOWTO/

To disable sit0 interface

open /etc/modprobe.d/aliases file using the command sudo gedit /etc/modprobe.d/aliases
search for "alias net-pf-10 ipv6" and replace that with "alias net-pf-10 off"

Reboot the machine.

Source: https://help.ubuntu.com/community/WebBrowsingSlowIPv6IPv4

Hope this helps.


"Try Ubuntu" option for 14.04 stops loading?

From what I've read it's display driver related.  It should boot after a while, but if it doesn't, then try installing the full OS onto your hard disk, and then install the correct GPU drivers for your card.

Also, see this question.

You can also try adding the nomodeset option during bootup if nothing else works.


shadowgrounds/trine humble bundle does not work

Try to find out the exact graphics cards in both computers - there's a variety of integrated cards out there and they're not all the same. The old notebook may have had a good ATi/NVIDIA integrated one, whereas the new could be stuck with an old Intel (a bit unlikely though). You can check the FAQ at http://frozenbyte.com/help_humble/linuxfaq.html

If nothing helps feel free to get in touch at http://www.frozenbyte.com/contact/

Joel, Frozenbyte team


Permission denied after creating home partition

A good command to run is

ls -la

This will show permissions, ownership, groups, and hidden files.

At this point you want to make sure the sub directories have the correct owner and permissions.

You can change the owner of folders and file recursively by doing this command

sudo chown -R magnus *

The * tells chown to change ownership of all files while the -R tells chown to do it recursively down through the file structure.

If you want to do this just on your home directory and all files and folders in it do this.

sudo chown -R magnus /home/magnus

This should give you permissions over the files if the owner permissions are set correctly.

Also check out chmod if the permissions are set correctly.

Here is a way better explanation then what I could give you in this https://www.linux.com/learn/tutorials/309527-understanding-linux-file-permissions


nine months of security and maintenance updates

It's not a trial version. The reason why it's only supported for 9 months is this: A new Ubuntu release comes every 6 months anyway. So after a new release comes out, people who want the latest release of Ubuntu should have upgraded anyway, so old versions are only supported for 3 additional months.

Please don't be afraid to use the newest Ubuntu release: when a new one comes out in October (which will be 15.10), you can upgrade your 15.04 installation very easily and keep synchronized with the latest Ubuntu release.

If you don't want to update every 6-9 months, then as hg8 mentioned, your best option is to use the LTS (Long-Term Support) releases. These are released every 2 years (the last was 14.04, the next one will be 16.04) and are supported and receive security updates for 5 years.

Read more here (under Management of Relases).


Installing Ubuntu 18.04 alongside Windows 10 failed - boots straight into Windows

Run this on Windows 10's cmd.exe as Administrator:

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

That one line fixed my problem, hope this helps.
Credit goes to itsFOSS.com


How to write a script and have it run on Ubuntu 16.04 boot

To create a script so that it will run the commands by a single execution of that script, you need to create a file with '.sh' extension.

Open the terminal, and in a suitable directory, create a script file.

    $vi <name you prefer>.sh

This is will open the VI editor. Or you can choose any other editor if you prefer.
Then add each command in a new line, and then save the file.
Your file should look something like

    #!/bin/sh
    sudo rmmod hid_magicmouse
    sudo modprobe hid_magicmouse emulate_3button=0 scroll_acceleration=1 scroll_speed=55
    xinput set-button-map 14 1 2 3 5 4

Now set the executable permissions to this file,

    $chmod +x <nameoffile>.sh

And now execute the file,

    $sudo ./<nameoffile>.sh

Execute the file with sudo permissions as your commands need to executed as superuser. Your mouse settings should have taken their place.

To run the script at boot, you can check the answer here.


Cannot install Docker on Ubuntu Snappy on Raspberry Pi

The store was going on some issues at the time you wrote this (alias were not installable), do not hesitate to jump on IRC/check on the ML for this kind of temporary issues (sorry about this!), but I confirm everything you type is correct.


LibreOffice Calc freezes with cpu usage at 33% when saving file (profile reset doesn't help)

You have not mentioned your Ubuntu version but I faced similar issue on Ubuntu 16.04.4 LTS, with the pre-installed Libreoffice.

None of the resolutions suggested in other answers and forums worked.

So I uninstalled Libreoffice and installed the version where package source is "Canonical" and now the issue is resolved.

Edit 2018-05-05: I recall that the issue was with the "snap!"


I messed around a little and was able to find the issue. The issue was actually that on my desktop, I forgot I spit the monitors across graphics cards. One I unplugged the monitor connected to the motherboard not the Nvidia, the issue was resolved.


You should install libx11. Run the following command:

  sudo apt-get install libx11-dev

This package provides a client interface to the X Window System, otherwise
known as Xlib.  It provides a complete API for the basic functions of the window system.


How do I enable keyboard backlight in Ubuntu 20.04.02 on Dell G5 Laptop?

Generally you can set the keyboard brightness in the Power Settings:

If you do not see this option, then you may be able to set it via the Terminal, so long as the keyboard makes the backlight settings available. Here's how to check:

Open Terminal (if it's not already open)
Install brightnessctl (if it is not already installed):
sudo apt update
sudo apt install brightnessctl

Check whether the keyboard brightness settings are accessible:
brightnessctl --device='tpacpi::kbd_backlight' info

If everything is good, you will see something similar to this:
Device 'tpacpi::kbd_backlight' of class 'leds':
    Current brightness: 0 (0%)
    Max brightness: 2

Now you can try to change the brightness:
sudo brightnessctl --device='tpacpi::kbd_backlight' set 1

If this works, then adjust the brightness to any integer value between 0 and the maximum step supported by your keyboard. If this doesn't work, then you will likely see a message similar to:
Can't modify brightness: Permission denied

Note: Some G5 models come with RGB LEDs under the keyboard but, to the best of my knowledge, there is no means to set the display colours without the Windows-based application.


Ubuntu 14.04 LTS and DisplayLink DL3900 chipset

While there is currently linux kernel support for the older Displaylink chipsets, Startech themselves claims there is currently none for the DL3X00 chipsets.

This is where they say that: http://www.displaylink.com/for-business/common_questions.php (search on the page for 'linux'.)

Bummer!


I have burned Ubuntu 18.04.4 LTS using same burn options, but another USB stick and it solved the problem. It could be assumed that the problem lied in burning process (imho less probable) or USB stick (imho more probable). It is obvious, but if I were to give some advice to someone having this problem in the future, I would advice to just plug USB stick to another machine, choose Try Ubuntu without installing and observe if output would be the same. That helped me localize problem's source.


Ubuntu openstack single installer on ubuntu 15.10 Wily

I just used sudo openstack-install --openstack-release liberty

also in my homedir created a directory .juju and created environments.yaml with the following

environments:
 maas:
  type: maas
  maas-server: 'http://xx.xx.xx.xx:80/MAAS'
  maas-oauth: 'YOUR MAAS API KEY'
  admin-secret: 'YOUR ADMIN SECRET'
 default-series: wily

You may have to muck with the yaml formatting if you copy/paste, then run the installer.


Why I have to type my password after exiting a sudo -i session?

I maybe misunderstanding your question but it seems like you are asking what is the timeout for using sudo.

By default sudo remembers your password for 15 minutes. For more information and how to change that take a look at: RootSudoTimeout which talks about the timeout for sudo.


Hit super and type "disks" to open gnome-disk-utility. On the left pane, select the disk/partition you want to mount at startup. On the right, click on the cog/gear icon, select "Edit Mount Options..." and check the "Mount at system startup" option.


How to resolve pycuda installation error "/usr/bin/ld: cannot find -lcuda"?

I don't understand why you would want to run make at all when building pycuda - it does not even have a Makefile (apart from the documentation).

You install pycuda by running ./configure.py with the appropriate options followed by LDFLAGS=-L/usr/lib/nvidia-current python setup.py install.

You need to set the LDFLAGS environment variable so that the pycuda setup can find libcuda.so, which on ubuntu systems is in a non-standard location (/usr/lib/nvidia-current).

If you're really asking about compiling the CUDA SDK (in which case you should definitely edit your question!), see my response on the NVIDIA forums.


In your /etc/fstab file, column 6 "pass" is described:

pass – A number indicating the order in which the fsck program will check the devices for errors at boot time; this is 1 for the root file system and either 2 (meaning check after root) or 0 (do not check) for all other devices.

If this column is anything other than 0, then the boot will stop until that disk (array) is recovered.  This also frequently stops when the array is degraded.

I'd suggest changing that to 0 and then try a manual recovery on your array.

As an aside, I'd also like to recommend waiting for a raid array to be fully synced (which can sometimes take hours) before actually doing the installation.

Basically, during installation, after configuring the RAID array disks, exit the installation process and go to a command prompt, then check your RAID is fully synced before continuing.  This avoids the RAID being in an inconsistent state when the system reboots at the end of the installation.


Remove unwanted lenses from installing Unity Next

Step 1: Preparation

First install the ppa-purge tool: sudo apt-get install ppa-purge or click here: ppa-purge

Step 2: Remove software

Now run:

sudo ppa-purge ppa:phablet-team/desktop-deps
sudo ppa-purge ppa:phablet-team/desktop-deps

If you're not on Raring, additionally run:

sudo ppa-purge ppa:canonical-qt5-edgers/qt5-proper
sudo ppa-purge ppa:ubuntu-sdk-team/ppa

This will remove the PPAs from your system, which basically means removing them from your software sources, and resetting the packages to the default versions from the official repos. See the manpage for the ppa-purge command  for more info on how it works.

Note that while the phablet-team/desktop-deps PPA is not mentioned in the compilation guide, it is mentioned in the build script.

Next you need to remove the final binaries that you compiled. Based on your description of how you ran the software, you should be able to just  run

rm -rf /path/to/build/directory

where /path/to/build/directory is the directory in which you built Unity Next. I think this is the directory that you would have run ./build from. If you followed the instructions without changing any paths, this directory should be ~/unity.

Step 3 (optional): remove build dependencies:

Note: while these commands are written in such a way as to not uninstall any software that you don't want to be uninstalled, they will automatically remove any packages that you don't need on your system (packages installed to satisfy a dependency, but not needed anymore because nothing installed depends on them). This is a completely safe result, but be aware of what is happening.

If you want to get rid of build dependencies, and are running Raring:

sudo apt-mark auto qt-components-ubuntu qtdeclarative5-dee-plugin indicators-client indicators-client-plugin-* qtbase5-dev qtdeclarative5-dev qtdeclarative5-dev-tools qtdeclarative5-test-plugin libdee-qt5-dev libpulse-dev qtdeclarative5-xmllistmodel-plugin unity-lens-mock demo-assets libboost-regex1.49-dev ubuntu-mobile

# this next command may or may not work in Raring.

sudo apt-mark auto bamfdaemon debhelper dh-autoreconf gir1.2-dee-1.0 gnome-common gnome-doc-utils gobject-introspection gtk-doc-tools indicator-application indicator-appmenu indicator-appmenu-tools intltool libappindicator3-dev libbamf3-dev libdbusmenu-glib-dev libdbusmenu-gtk3-dev libdbusmenu-jsonloader-dev libdbustest1-dev libdee-dev libgirepository1.0-dev libgtk-3-dev libncurses5-dev libreadline-dev libsqlite3-dev metacity sqlite3 valac-0.18 libpocketsphinx-dev libsphinxbase-dev

sudo apt-get autoremove

If you want to get rid of build dependencies, and are running Quantal or lower:

sudo apt-mark auto qtdeclarative5-ubuntu-ui-toolkit-plugin qtdeclarative5-dee-plugin indicators-client indicators-client-plugin-* qtbase5-dev qtdeclarative5-dev qtdeclarative5-dev-tools qtdeclarative5-test-plugin libdee-qt5-dev libpulse-dev qtdeclarative5-xmllistmodel-plugin unity-lens-mock demo-assets libboost-regex1.49-dev ubuntu-mobile
sudo apt-get autoremove

The guide also has you install bzr: if you really don't want that on your system, run sudo apt-get remvoe bzr.


Accidentally deleted gnome keyring from startup applications. How do I get it back?

"SSH Key Agent" is autostarted by default in an Ubuntu desktop. Therefore, a .desktop launcher is installed in /etc/xdg/autostart/gnome-keyring-ssh.desktop. Such entries are disabled on a per user basis through settings in a copy in your local autostart folder. To enable the item again, delete your local user copy ~/.config/autostart/gnome-keyring-ssh.desktop. To see it appear, you need to quit and restart "Startup Applications" or "Gnome Tweaks" if you used the latter.


Start tomcat7 in debug mode when running as a service

I´m using Ubuntu 14.04 server, and the files needed to run Tomcat7 in debug mode are under /usr/share/tomcat/bin.
There you can find startup.sh and catalina.sh. Those two are usually the only files you need to modify to start the server in debug mode.
I hope it helps.
Regards.


All commands need administrative privileges

hping usually needs to be run as root (just like many other network analysis tools).

That said, both /sbin and /usr/sbin should be in your $PATH. Not being able to run ifconfig is definitely not normal and a major annoyance. Here's my $PATH for your reference:

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

You can display it using echo $PATH and edit it using export, like this:

export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"

PS. My root $PATH is

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

... just in case.


How can I retrieve data using a live cd?

I recommend you using Windows Recovery CD to repair the filesystem and then retrieve your data using the LiveCD. Apparently the filesystem is damaged, the best way to go is using chkdsk /f to repair the NTFS partition then try to recover the disk.

You should be sure that the drive is unmounted in Windows before shutting down. Other than that you could force your way through, but I presume your data is more important, and you wouldn't want to risk it for being hasty.


Can I automate updating/upgrading with sudo in this way?

but is it possible that if the first step, apt-get update takes a very long time, the password would lapse by the time the apt-get upgrade commands finally runs?

The answer is yes, sudo could time out and ask you for the password again.

Another method which is still insecure (but at least it does not require you writing a password to file) is described at How to run an application using sudo without a password?
If you want to proceed with an approach where you write your password down in cleartext, consider chaining the command together and use sh to execute it:

echo password | sudo sh -c "apt-get update && apt-get upgrade"

In this way, sudo requires you to enter the password only once, and sh is executed as root. Then any programs run by sh are automatically running as root.
Finally, you can pass the password twice to the separate programs:

echo password | sudo apt-get update && echo password | sudo apt-get upgrade


Well I would actually install and dual boot both off your SSD and use your HDD for storage.
Reason? SSD is much faster, and you will notice the difference when your OS is on it.

Using two hard drives, one OS each may be a little easier to do, but I would recommend your first option for performance reasons.


Intellectual property rights for files uploaded to Ubuntu One

For what it's worth I have read the TOS and the privacy part of Ubuntu One and it seems very straightforward. No funky stuff like in Dropbox's TOS. Dropbox clearly states that they have the right to sell and use your stuff whatever they like. I'm also pretty sure this is not something Canonical would like to do (and nor does it seem like they are wanting to) =)
However, if you are really worried; contact Ubuntu one and your lawyer to be sure.
I for one trust Canonical (and more so after I read the TOS)
For reading pleasure:
https://one.ubuntu.com/terms/
https://one.ubuntu.com/privacy/


Try dropping to a shell or launching the "try before installing" option and opening a Terminal. Type ls /dev/sd? to see what disks are available. You should see at least two -- /dev/sda and /dev/sdb. One of these (typically /dev/sda) is your hard disk and the other (usually /dev/sdb) is the installation medium. (Unless you're booting from a CD, in which case you may see just /dev/sda.) From your description, I suspect that you'll see just /dev/sda, and that it will be your USB flash drive installation medium.

If I'm right, then the problem is that Ubuntu does not yet have drivers for your computer's disk controller -- or maybe your disk is unplugged or malfunctioning, but that should show up as an inability to boot Windows. I was under the impression that the Dell XPS 13 was supported, so this is surprising, if it's what you see. The solution to such problems is usually to use a more recent version of Ubuntu. You imply that you've tried both 14.04 and 15.10, and the latter is the most recent released version. You might try the Xenial alpha, though.

If you see both /dev/sda and /dev/sdb, then something else is going on. Posting a screen shot of the screen where you run into the problem may be informative. The output of dmesg may be helpful, too. (Type dmesg > foo.txt, post foo.txt to a pastebin site, and post the URL to the document here.)


dpkg error, unable to install anything "resource temporarily unavailable", `dpkg --configure -a` hangs

Try to kill processes using /var/lib/dpkg/lock file with fuser utility with -k option:

sudo fuser -uck /var/lib/dpkg/lock

Monitor will be blinking during the fuser command execution
If fuser doesn't help remove /var/lib/dpkg/lock file:

sudo rm -rf /var/lib/dpkg/lock

Finally do:

sudo apt update


The intellij-idea-community snap package works OK with openjdk-8-jdk without requiring a lot of special configuration, and it also is updated automatically. Open the terminal and type:

sudo apt install openjdk-8-jdk
sudo snap install --classic intellij-idea-community

This installs the IntelliJ IDEA Community Edition version 2018.1.1.


Drop (copy) Previous mySql Tables Dir into upgrade MariaDB Directory

Yes, that would be the easiest. Just dump the databases using mysqldump and use mysql command line to import the databases. If there are any problems (like an invalid definer) you will get a notice and can fix it by editing the dump.


I don't know any RSS reader that can do that. But there are a few apps that alerts you about new messages and tags.


Ubuntu 18.04 gnome-shell processes slowing down system

I stumbled upon the command ubuntu-drivers autoinstall. Seems it may have been the problem with nvidia drivers in my case, after that the gnome-shell cpu behavior was back to normal


How to set a Upstart job to start manually?

Delete or comment out the start on part (using the number sign '#'). Commenting it out has the advantage of easy recoverability of the original state.


Your USB stick definitely has a physical defect, so you have to go and replace it.

It looks like a memory cell at some position around 3GB has died. This is not repairable at all (especially not by software)! You can see this because the dd command you used should just write 00h (all bits to zero) to every memory cell on your device, without caring about partitions or file systems. As this did not work, the error is beyond any partitioning and formatting stuff and therefore seems to be hardware.
Sorry for having to say this, but your stick is ready for the dustbin.


Ubuntu 16.0.4 - cannot connect to mobile hotspot

I now use a Wi-fi adapter using the Realtek 8811au chipset instead of the Atheros AR9285 adapter that came with my laptop. It connects to my mobile hotspot just fine. :)

I had to Google for "ubuntu RTL8811AU driver" to install the driver, since the driver that shipped with my adapter wouldn't build.

This is the one I ordered from newegg:

http://www.szedup.com/product-item/ac-dual-band-wifi-usb-adapter-2dbi/


Linux ceases to respond to keyboard/mouse

Re-enable the System76 PPA and reinstall system76-driver and, if applicable, nvidia-graphics-drivers-375.


The documentation from Google indicates that the Google Cast extension is not supported in Linux, but it actually does work.

To get this working in Ubuntu:

Make sure you are running either Chromium or Chrome version 28 or higher.  Earlier versions will get a "This application is not supported on this computer. Installation has been disabled." error.  The 'chromium-browser' package in Ubuntu 13.04 works fine.
Make sure iptables is configured to allow the UPnP/SSDP traffic used by the Google Cast browser extension to discover the ChromeCast device.

The browser will send a multicast UDP packet from the local IP and an ephemeral (random) port to 239.255.255.250 port 1900.  The ChromeCast device will respond with a unicast UDP packet from the ChromeCast device's IP and another ephemeral port to the source IP/port of the multicast packet.  Note that this is slightly different than most other UPnP devices, which will usually respond with a unicast UDP packet from port 1900 instead of an ephemeral port.

The typical iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT rule WILL NOT match the response packet, as iptables does not currently have a conntrack helper that supports SSDP.  In addition, the iptables -A INPUT -p udp --sport 1900 -j ACCEPT rule typically used for UPnP/SSDP will not work since the replies from the ChromeCast device do not come from port 1900.

Therefore, you will need to add a rule to accept UDP packets on all ephemeral ports.  The ephemeral port range for the initial multicast packet should be 32768-61000 (Verify with cat /proc/sys/net/ipv4/ip_local_port_range), so the following rule should work (note it inserts at the top of the input rules):

iptables -I INPUT -p udp -m udp --dport 32768:61000 -j ACCEPT

After the ChromeCast device has been discovered (each time the browser starts), the browser will control it using TCP (HTTP) connections to port 8008, which should not require any special iptables rules.
Install the Google Cast browser extension in either Chromium or Chrome.  Note that an app/extension called ChromeCast is available, but this is not what you want.
If you have not yet set up your ChromeCast device, follow the instructions that come with the device to set it up.
Once your device is configured, you should be able to simply click the Cast button in Chromium to Cast your current tab.


You can not do what you are attempting. There are only so many performance states in any given processor. You can not just create new ones, it doesn't work that way. I have looked and looked and can not find the actual available pstate specs for your processor, but since the driver typically lists several more available frequencies, I assume the 3 that are there are all that is possible for that processor.


Ubuntu 10.04 - Do I need to install Audio Drivers for ASROCK E350M1?

If it works, don't try to fix it.

A lot of people assume they need a driver for everything (because that has been the truth for almost every piece of hardware in Windows for a long time) but the out-of-the-box drivers in the Kernel for audio and networking are, with a few exceptions, the best option.

Is there a reason you think it should be better?


Anyone able to help me figure out what I'm doing wrong with installing Standard ML

From the INSTALL file:

 2.5.  What needs to be on my PATH?
 ----------------------------------

 - You should include $d/bin into your PATH.

i.e. if you have installed into directory d=/home/andyd/smlnj then you should export PATH=$PATH:/home/andyd/smlnj/bin

BTW it is bad practice to use sudo to edit files in your own user directory, and bad practice to use plain sudo at all with GUI applications like gedit: it can lead to unexpected file ownership issues.


You can safely remove unused kernels from /boot.

Ideally you want to use your package manager (apt) for removal, so you may want to see if you can remove them using:

sudo apt-get purge linux-image-4.2.0-16-generic

or if apt won't work:

sudo dpkg --purge linux-image-4.2.0-16-generic

adding to, or repeating the above for the kernels (4.2.0-16, 4.2.0-42, etc.) you would like to remove.

If the above doesn't work you can remove them manually:

sudo rm /boot/abi-4.2.0-16-generic
sudo rm /boot/config-4.2.0-16-generic
sudo rm /boot/initrd.img-4.2.0-16-generic
sudo rm /boot/System.map-4.2.0-16-generic
sudo rm /boot/vmlinuz-4.2.0-16-generic

or if you like to live dangerously, something like:

sudo rm /boot/*-4.2.0-16-generic

An additional kernel (to the one you're running) is sometimes left as a backup, so you may want to do so in case of issues with the currently running kernel.

After removing these files you should update your boot loader, if you are using GRUB you would do the following:

sudo update-grub

I would also consider whether a "Cleaner" tool that removed packages from apt without removing the files is doing you any good.

EDIT:

As pointed out by WinEunuuchs2Unix, this does not remove the header files. Normally when removing old kernels you would remove not just the image, but the other associated files as well. For example:

apt-get purge linux-image-4.2.0-16-generic linux-image-extra-4.2.0-16-generic linux-headers-4.2.0-16-generic linux-headers-4.2.0-16

See link below for more details.


Ubuntu 12.04 won't install from USB to Asus eee Netbook

Do the following:

Plug in your USB and get to boot menu by pressing F2.
Now see whether your USB is recognized under "removal media" or something like that.
If not, open the "hard disk" listing.
See whether your USB is listed there.
If it is listed, make the USB the first disk.
Proceed with saving and booting with F10.

See whether that works. Good luck.


Need help setting up WiFi on HP laptop - Ubuntu 14.04 is the OS

The Additional Drivers tool offers to install the proprietary Broadcom STA driver for your device. It is incorrect. With a temporary internet connection,open a terminal and do:

sudo apt-get purge bcmwl-kernel-source
sudo apt-get update
sudo apt-get install firmware-b43-installer

The firmware installer takes a few moments; please be patient. When it finishes, reboot and your wireless should be working.


Notebook Keyboard is not properly handed

To enable the Alt Gr feature, press Fn key and Menu Key together, then the "Menu" Key will act like "Alt Gr".

http://acer-au.custhelp.com/app/answers/detail/a_id/29284/~/aspire-s7-391-alt-gr-key-function-added


How to remove brackets () around ip address from traceroute output

You don't need grep in between, use AWK's pattern matching capability.

$ traceroute -m 2 8.8.8.8 | awk '/net/{gsub(/\(|\)/,"");print $3}'
207.225.112.2

/net/ matches lines with the word net
gsub( /\(|\)/ , "" ) matches ( or )  and replaces them with empty string ( effectively deleting).
print $3 prints the 3rd item which is still the IP address , but without brackets


Error - 'NoneType' object has no attribute 'get_info' during xubuntu installation

Known bug, please re-download the ISO and verify MD5 hash

It appears this is a catch-all error usually thrown (shown) by Wubi not recognizing or reading some piece of data in the ISO used for installation, which in turn is caused by an error while downloading the ISO.

Please try separately downloading the 12.04 i386 desktop ISO, and verify that the MD5 hash matches. Then launch Wubi and point it to the downloaded ISO.


Here is how I would procede, given that this is not a production server that needs to be available at 99% time. In general, I would install 12.04 from scratch on another partition and see whether the new setup works. The problem with updates between an ancient and modern release is that you can break a working system without getting the desired outcome. The problem with step-wise upgrade is (i) the more steps, the more opportunity for something to go wrong (ii) takes a lot of time.

Backup your data and system configuration.
Make sure the backup has worked (this is an often neglected step...)
Make sure that all your data are on a separate partition.

If your data are on the same partition as the system, then you need to resize it, create a new partition for the data only, move your data to this partition, create links and fstab entries such that the new partition is mounted in the correct place and that your system works as before.
Create an extra partition for the new system (12.04) without destroying the previous system.
Install 12.04 to the new partition. Mount your data partition, create symbolic links if necessary. Find out whether the new system works, tune it etc.
If the new system works, keep it. Otherwise boot to the old system, and go to askubuntu.com with a new question.


bind9 logs; resolver priming query (5/ minute)

Ran into this myself and had to work through to resolve it.  I kept getting those messages in the logs until I forced a resolution of each root resolver in order.  Even a reboot of the server wouldn't stop the messages once they started.  By the way, my root issue was that after a power loss IPv6 did not come back up properly, which apparently is a known issue for causing this bug to manifest.  See a detailed explanation of this issue on isc.org.
I used the tool 'dig' for resolving each server on ubuntu.  All I did was execute:
dig -t ANY A.ROOT-SERVERS.NET.

for each of the root servers, A through M.  Using bash you can run this command to query each root server:
dig -t ANY {A,B,C,D,E,F,G,H,I,J,K,L,M}.ROOT-SERVERS.NET.

And finally the logs were no longer filling up with messages.  Hope that helps someone.  :)


Rocketchat does not connect after reboot

I had to remove packages via apt and I do not know if I installed them in the first place!

mongodb-org-server

mongodb-org

mongodb-org-tools

in order to get rocketchat-mongo.service running and snap.rocketchat-server.rocketchat-caddy responding again.


How to resolve my localhost in LAN under Ubuntu?

helpdesk would be a DNS name in this case. In order for other users on your network to resolve that DNS name to your IP, there are several choices:

Using /etc/hosts

If you have few users on your network, and your IP never changes, you can add the following line to each machine's /etc/hosts file:

 192.168.199.25 helpdesk

Using a DNS server

If you are running a local DNS server, you could add an entry there to resolve the helpdesk name to your IP. For explanations on how to do that, have a look here.


AppIndicator3: Set indicator icon from file name or GdkPixbuf

To use a path to the icon is best illustrated with an example. In the example below, I keep the icons in the same directory as the script (indicator), which seems a convenient solution in your case.

The bottom line is that once you initiated your indicator:

class Indicator():
    def __init__(self):
        self.app = "<indicator_name>"
        iconpath = "/path/to/initial/icon/"

        -------------------------------

        self.testindicator = AppIndicator3.Indicator.new(
        self.app, iconpath,
        AppIndicator3.IndicatorCategory.OTHER)

        -------------------------------

you can change the icon with:

        self.testindicator.set_icon("/path/to/new/icon/")

Example

In the example below, all icons, nocolor.png, purple.png and green.png are stored together with the script, but the path to the icons, set in

currpath = os.path.dirname(os.path.realpath(__file__))

could be anywhere.

#!/usr/bin/env python3
import os
import signal
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('AppIndicator3', '0.1')
from gi.repository import Gtk, AppIndicator3

currpath = os.path.dirname(os.path.realpath(__file__))

class Indicator():
    def __init__(self):
        self.app = 'show_proc'
        iconpath = currpath+"/nocolor.png"
        # after you defined the initial indicator, you can alter the icon!
        self.testindicator = AppIndicator3.Indicator.new(
            self.app, iconpath,
            AppIndicator3.IndicatorCategory.OTHER)
        self.testindicator.set_status(AppIndicator3.IndicatorStatus.ACTIVE)
        self.testindicator.set_menu(self.create_menu())

    def create_menu(self):
        menu = Gtk.Menu()
        item_quit = Gtk.MenuItem(label='Quit')
        item_quit.connect('activate', self.stop)
        item_green = Gtk.MenuItem(label='Green')
        item_green.connect('activate', self.green)
        item_purple = Gtk.MenuItem(label='Purple')
        item_purple.connect('activate', self.purple)
        menu.append(item_quit)
        menu.append(item_green)
        menu.append(item_purple)
        menu.show_all()
        return menu

    def stop(self, source):
        Gtk.main_quit()

    def green(self, source):
        self.testindicator.set_icon(currpath+"/green.png")

    def purple(self, source):
        self.testindicator.set_icon(currpath+"/purple.png")

Indicator()
signal.signal(signal.SIGINT, signal.SIG_DFL)
Gtk.main()

Note

...that if you need to update the icon from a second thread, you need to use

GObject.threads_init()

before

Gtk.main()

and you need to update the interface (either icon or indicator text) by using:

GObject.idle_add()

as applied e.g. here and here.


A script in any (interpreted) language, like bash or python, needs to be "interpreted" by the interpreter of the corresponding language.

On Linux, this can be done in different ways:

The interpreter is "asked" to run the script by including the language in the command to run the script:

<language> <script>

or in your example:

sudo bash start-dfs.sh

The script is executable, and has the permission to "ask" the interpreter itself to run the code inside the script. from your example:

sudo start-dfs.sh

In this case, the script must start with the shebang, else there is no information what interpreter to call, like:

#!/bin/bash

or:

#!/usr/bin/env python

Notes

In case the first option is used, the language information in the command always overrules a possible shebang, no matter if the script is executble or not.
The extension on a script (.sh, .py etc) makes clear what type of script it is, but plays no role whatsoever in the execution of a script, unlike in windows.


You could try clearing the apt cache with

sudo apt-get clean

Update the package list

sudo apt-get update

Fix any incomplete installations

sudo apt-get -f install

sudo dpkg --configure -a

And finally

sudo apt-get upgrade

I am not sure if this is exactly what you need to solve your problem but you can give it a try.


Launching a python script in IDLE works but in terminal I get a SMTP instance has no attribute 'send_message' error

The send_message method to SMTP class was added in Python 3.2. You are calling the script to be run using python which is a symlink for Python 2. Since send_message method is not defined in Python 2, you get an AttributeError.

To get over this, you need to call your script using Python 3.2 or newer. Run it as:

python3 endofmonth.py

and it would work.

You are most probably using the Python 3 version of IDLE which is the reason it works there.


How to add "Add to VLC playlist" to the right click menu of Nautilus?

It can be fixed in VLC preferences:

Open VLC preferences by going to tools menu

In preferences, Enable "Allow only one instance" and "Enqueue files in one instance mode" like shown below:

Click save. That's it!

From now on when you open files with VLC they will be enqueued in your playlist.


The problem I had was following older guides for the setup of MySql replication.

The following options are removed in MySQL 5.5. If you attempt to start mysqld with any of these options in MySQL 5.5, the server aborts with an unknown variable error. I experienced this, amonst numerous other errors as I attempted many differing configurations. In the end I started fresh and still had the same problem until I found out that these commands are what's causing the problem.

–master-host
–master-user
–master-password
–master-port

Solution, comment the master- related variables.

Do following,
On Master:

mysql>GRANT REPLICATION SLAVE ON *.* TO ‘slave_user’@’%’ IDENTIFIED BY ‘‘; (Replace with a real password!)
mysql>FLUSH PRIVILEGES;
mysql>FLUSH TABLES WITH READ LOCK;
mysql>SHOW MASTER STATUS;
# get the DB dump.
mysql>UNLOCK TABLES;

On Slave:

# import the DB dump
mysql>stop slave;
mysql>CHANGE MASTER TO MASTER_HOST=’prod_master’, MASTER_USER=’slave_user’, MASTER_PASSWORD=’‘, MASTER_LOG_FILE=’mysql-bin.0xx‘, MASTER_LOG_POS=33421;
mysql>start slave;

It's worth noting you should be able to connect to each remote host using mysql -h option to test credentials, after creating users and granting privileges, dont forget the flush privileges command.

/var/log/mysql/error.log is your friend during these trial and error scenarios. I suggest tailing the log whilst restarting MySql as required.

note, you will need these logs in the config file;

[mysqld]
log-error=/var/log/mysql/mysql.err
log-bin = /var/log/mysql/mysql-replication.log

once you have start slave; on each host, you will see some data via;

SHOW MASTER STATUS;
SHOW BINARY LOGS;

if you create an example database and then table;

CREATE TABLE IF NOT EXISTS test (
  task_id INT(11) NOT NULL AUTO_INCREMENT,
  subject VARCHAR(45) DEFAULT NULL,
  start_date DATE DEFAULT NULL,
  end_date DATE DEFAULT NULL,
  description VARCHAR(200) DEFAULT NULL,
  PRIMARY KEY (task_id)
)

you will see it pop up on the other host!


How do I get the latest version of AUDACITY to convert from WAV to MP3?

Sound Converter from the default Ubuntu repositories is much better than Audacity for converting wav to mp3. To install Sound Converter in all currently supported versions of Ubuntu open the terminal and type:

sudo apt install soundconverter


SSH public key added but still prompt for password

Note that your /etc/ssh/sshd_config contains the line

 StrictModes yes

  Specifies whether sshd should check file modes and ownership of the
  user's files and home directory before accepting login. This is
  normally desirable because novices sometimes accidentally leave their
  directory or files world-writable. The default is ''yes''.

In other words, your home directory ~ on the remote host should be owned and group-owned by you (in this case, this probably means owner htpc and group htpc), and only writable by you (and potentially your group): that means no write in the last ("world") column

$ ls -la ~/
drwxr-xr-x 41 htpc htpc .

Note that the last part says r-x (not world writable), NOT rwx.

If there's a rwx in the last triplet, you need to remove the write rights:

chmod a-w ~

Similarly for the ~/.ssh folder and ~/.ssh/authorized_keys. I would recommend chmod 700 ~/.ssh to only grant access to yourself for the folder, and chmod 600 ~/.ssh/authorized_keys for the file.

(Also see https://unix.stackexchange.com/a/16981/5477 for more server-side debugging tools)


find more information about the drive/partition ubuntu is installed on

Ubuntu follows the sdx# format to identify physical volumes (disks) and partitions (divisions of disks):

x stands in for a specific physical volume represented by a letter (a, b, c...);
#, is a partition of a volume x represented, in order, by number (1, 2, 3...)

Based on the information you provided, there is a Windows installation on sdb4 and there is an Ubuntu installation on sdb6.
This tells you that Windows and Ubuntu are on the same physical volume.
Here is how I determined this:
On this screenshot of df, it shows your root file system / mounted to /dev/sdb6.  You told us that you ran these commands from your installation so that means that your Ubuntu installation is unequivocally on sdb6
A typical Windows installation adds several partitions, so it is pretty easy to  spot Windows from these outputs:

sdb1 is Windows' "Recovery" partition.
sdb2 is the EFI system partition, which is needed to boot both UEFI operating systems.
sdb3 is the MSR "Microsoft Reserved" partition.
sdb4 ?? -- clues: 200-220 GB (+/-), NTFS file system (a proprietary file system by Microsoft)
sdb5 is only 500MB in capacity so Windows can't be there: Windows is way too big.
sdb6 - we already determined is Ubuntu.

There are no more partitions on sdb so this only leaves sdb4 which has to be your Windows installation (What Windows will call C:)
As far as whether or not sdb is your SSD or some other device, you can usually deduce this from file sizes, and from knowing what was already on your device.
For example: Presumably, your pre-existing Windows installation in the ballpark +/- of 200GB was already on your SSD.  Since it is on sdb4, then your SSD is the physical volume sdb.  Since Ubuntu is on sdb6, which is on sdb, then Ubuntu is on your SSD as well.
You can also see the model identification as "Samsung SSD" along with the above partitions for sdb in the output of sudo parted -l.


KDE plasma 5 lock screen

By Martin Gräßlin - Animations on lock screen – Plasma Wallpaper support: https://blog.martin-graesslin.com/blog/2016/07/animations-on-lock-screen-plasma-wallpaper-support/

  ... Today I’m happy to announce that this situation is going to change
  with Plasma 5.8. Our lock screen architecture gained support for
  Plasma Wallpaper plugins. All the wallpaper plugins available for the
  desktop are now also available for the lock screen...

With the Plasma 5.8:

Meanwhile, with the earlier plasma versions:

Lock screen with picture slideshow: https://www.kubuntuforums.net/showthread.php?67703-Kubuntu-video-wallpaper&p=388438&viewfull=1#post388438
an animated background for the lock screen?: https://www.kubuntuforums.net/showthread.php?67703-Kubuntu-video-wallpaper&p=382459&viewfull=1#post382459
KDE Plasma 5 editing logout and lock screens: https://www.kubuntuforums.net/showthread.php?67703-Kubuntu-video-wallpaper&p=382534&viewfull=1#post382534


In case it helps others, I'm posting what worked for me.

It turned out to be evolution, something I had configured a long time ago and had since forgotten about. Careful, this will wipe out your evolution accounts.

rm -rfv ~/.config/evolution/sources/*

If you don't want to wipe all of your evolution accounts, you have to open each file in ~/.config/evolution/sources/ until your find the right one and delete that one.

source


Create windows installation media from Ubuntu 19.04

For creating a Windows install USB on a Linux machine check out WoeUSB.
There's a prebuilt package in this PPA:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt update
sudo apt install woeusb


This question is a bit old, so I'll answer it for Kubuntu 20.04

Remove the outdated package:
sudo apt remove --purge caffeine && sudo apt autoremove

Remove the outdated PPA:
sudo add-apt-repository --remove ppa:caffeine-developers/ppa

Install the caffeine package from the official repositories:
sudo apt install caffeine

Open a terminal and run:
caffeine-indicator & exit

Wait for about 5 seconds and you should see the indicator in your system icons widget.

If it doesn't work, try to use caffeine-indicator & instead (without exit). This will let you see the logs. If you're able to see them, please edit your question and add them there.
I tried this on my laptop and everything seems to work.


Python Multiprocessing program using only 1 of the 4 cores

Your multithreading is perfectly fine but the code which is executed is not what you expect.

Try to run this code

def boom1():
    print(5**10000000000)

if __name__=="__main__":
    print('Done')

Yes, boom1 function is not called but you'll see that 1 thread still tries to do "something" and it takes forever. Actually, this "something" is ConstantExpressionEvaluator - it tries to precompute constant expressions for performance reasons but your constant is so big that it takes all the time to finish. To break this single-threaded optimisation and run code in parallel just add this extra step to your computations.

Something like this

def boom1():
    z = 5 ** 10
    z = z ** 1000000000
    print(z)


How can I change calender to Persian calender (like in KDE)?

Fortunately, It's very simple. Just configure the calendar from System Settings/Locale to Jalali.

Of course I've tested this in Slackware. Slackware is complete in many aspects. Maybe you need install some packages in order to have Jalai calendar in your list. It would be appreciated if you tell if installing other packages is required.


Found this project, which seems to have the capabilities you are looking for.
https://github.com/Sapd/HeadsetControl
Follow the project's own instructions:
download dependencies first, then build it.


X server doesn't detect my second graphic card. ubuntu crashes when I try adding it manually to xorg.conf

I was able to fix it. The problem was that I edited the xorg.conf file with Apple's Seirra TextEdit which converted all my " to “ and ” which aren't pure ascii characters. Therefore, X couldn't read the config file.


Solution is here. You have to install the OpenSUSE repo to get everything you need for Wine 5.0.


Differences how to run scripts at startup

~/.profile, /.bash_profile, and /.bash_login are better for defining the environment variables and setting up the environment, than for running scripts. I would not recommend these.

/etc/rc.local can be used for that, but remember that it will start before GUI starts . Unless it is for a script that only sends notification to GUI. Note that you will need to call your script from /etc/rc.local  in format /full/path/to/script & (& to avoid blocking other scripts you may have there from execution). You will also need export DISPLAY=:0 variable in either the script itself or within /etc/rc.local . Apps that need GUI will need this variable to exist. Same idea with cron job using @reboot.

If you want to run scripts at GUI login, the proper way is to create .desktop file for each script in your ~/.config/autostart/ folder. You can do it by hand, or use Startup Applications app that does exactly the same thing for you. Just open the Unity  Dash and type in "Startup Applications"

Overview of your examples

apt-get update doesn't need GUI , just network. /etc/rc.local is ok for this one.
set some permissions , this doesn't need GUI too, just use /etc/rc.local
set display brightness  doesn't need GUI too , but may need root privillege. If you want to change it before login , you will need to write to a special file. Consult my other post on this subject
turn numlock on may not need GUI,too
setup touchpad depending on your method, may or may not need GUI
run some apps if they are GUI apps, they will need to be started from Startup Applications I described above.
run some scripts as root  you can use /etc/rc.local or cron for these.  Running GUI apps as root is bad idea for many reasons, so please avoid that.
run some scripts without root use the Startup Applications method.


Integration of archives navigation in nautilus

This won't let you open archives seamlessly within the same instance of nautilus, but will allow you to open a zip file in a second, new instance of nautilus via a script (to be placed in ~/.local/share/nautilus/scripts and made executable).

#!/bin/bash

# see: https://askubuntu.com/a/295312/480880
urlencode() {
    # urlencode <string>
    local length="${#1}"
    for (( i = 0; i < length; i++ )); do
        local c="${1:i:1}"
        case $c in
            [a-zA-Z0-9.~_-]) printf "$c" ;;
            *) printf '%%%02X' "'$c"
        esac
    done
}

# taken from xdg-mime;
# xdg-mime itself is not used, as it's slow and we're already assuming presence of gvfs utils anyway
mime_type() {
    gvfs-info "$1" 2> /dev/null | grep standard::content-type | cut -d' ' -f4
}

echo "$NAUTILUS_SCRIPT_SELECTED_URIS" | while read uri
do
    mime_type="$(mime_type "$uri" )"
    if [ "$mime_type" = "application/zip" ] # add mime-types as necessary
    then
    archive_path="archive://$(urlencode "$uri" )"
    gvfs-mount "$archive_path"
    gvfs_path="$( echo "$archive_path" | sed 's/%/%25/g')" # yes, the percentage signs are encoded, again!
    # zenity --entry --entry-text="$gvfs_path"
    nautilus "$gvfs_path"
    fi
done


Can I permanently deny Ubuntu access to a second, internal hard drive?

Yep. Assuming Ubuntu automatically mounts the other drive, the simplest way would be to add a flag to your /etc/fstab file that prevents auto-mounting. You can do this with noauto.
UUID=FEDCBA0987654321Q  /media/macos    apfs    defaults,noauto    0    0

If you're not sure what the partition's UUID is, use blkid:
sudo blkid

This will give you something similar to the following:
/dev/nvme0n1p3: UUID="b72e8406-34e8-4e38-a422-e4ab6e35e6b8" TYPE="swap" PARTUUID="4b9f203e-de2c-4cc0-a9a6-2ac423b1b0e9"
/dev/nvme0n1p2: UUID="b33696cc-f2db-4dd4-9a63-15028cf5afc4" TYPE="ext4" PARTUUID="cd2a90a1-5a6b-4468-a4da-0a2f7c2a8f54"
/dev/nvme0n1p1: UUID="D3F2-9195" TYPE="vfat" PARTUUID="4e505bb1-c12b-4c71-afdf-42ac9a2f721b"
/dev/mmcblk0p1: UUID="dd5dffcf-9e3b-43eb-82a2-36137fc249be" TYPE="crypto_LUKS" PARTUUID="7688e21d-c1d3-4f02-95ac-5e816e2c1e05"

All that being said, if Ubuntu does not automatically mount the other storage device, then you shouldn't need to do anything. You cannot read to or write from the device.
Hope this helps


All you have to do is run the following command:

tree -H ./ > result.html

The first part of this command, tree -H ./  will run the tree command and will export the output in HTML format by using the option or "flag", -H ./ . The next part, > result.html will save the output to a file named result.html.

The file will be saved to your current directory.

To view the html page using firefox, run the following command:

firefox ./result.html

Using ./ specifies the current directory because that is where the file has been saved.

How did I figure this out?

I ran the following command:

tree --help

Then, I looked for HTML and I saw there was an option for HTML so I used it and sure enough, it worked.

You can pretty much run any command along with the --help flag to see how to use the command.

You can also view the manual for most applications by using the man command like this:

man tree


How can I programatically show/hide my app window with global shortcut key?

The Keybinder library does exactly this.  If you check pull requests there are requests in for examples using pygi, one of which is me for py3k.


If I install Ubuntu 14.04 on my PC, what will happen to my files?

I think if you install 14.04 alongside 12.04 your files will still be on the other partition, and you may be able to access them.  I can access the files on my Windows partition from Ubuntu, but it might be different having 2 Ubuntu operating systems.


Navigate to AFC iPod Path in Ubuntu 16.04?

To start is due to update:

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

greetings, because the first thing is to read this post

 https://wiki.debian.org/es/iPhone

But to summarize use the following:

linux@xinial:$  lsusb -v |grep 3 |grep iSerial

  iSerial                 3 a8f72d4a6d2e3d3786fae2d328a11063b9d6947b
  iSerial                 3 FB56283B13A01C40

where a8f72d4a6d2e3d3786fae2d328a11063b9d6947b is the number of device

Now in the address bar file manager [nautilus, nemo, thunar, etc ..]

afc://a8f72d4a6d2e3d3786fae2d328a11063b9d6947b

By the way, I speak Spanish


Try the following...

chmod +x /home/ron/android-studio/bin/fsnotifier


terminal ls command not showing all files

If you run:

ls /usr/bin | less

Then the output of ls will be piped to less (a versatile pager), which lets you scroll up and down:

one line at a time, with arrow keys
one page at a time, with B/PgUp and Space/PgDn
in most graphical terminals, with the mouse wheel

You can even search the text (below wherever you are in it) by pressing /, entering your search string, and pressing Enter.

To quit less, press q. (If that doesn't work, such as when you're in the middle of entering a search string, just press Escape a couple times first.)

less is an extremely handy tool. You can even keep your terminals the default 25 lines tall, if you like, read through multiple pages of output with just the keyboard, fully within the terminal, not having to rely on the features of your terminal emulator application at all.

Besides piping the output of a command to less (command | less, as above), you can also use it to view files:

less filename

less is also the default pager used by the man command. man is another very handy command, because it shows the manpages ("manual pages") for most commands, and some other topics. For example, to read the manual page for the less command:

man less


How to edit DNSname in 20.04 so I can us my local DNS?

Silly question: is this VirtualBox instance using a NAT network? If so, you have two options:

Switch to a "Bridged Network", which will result in the VM having full control over its network resources
Use the host's resolver as a DNS Proxy. As per the documentation:

For resolving network names, the DHCP server of the NAT engine offers a list of registered DNS servers of the host. If for some reason you need to hide this DNS server list and use the host's resolver settings, thereby forcing the VirtualBox NAT engine to intercept DNS requests and forward them to host's resolver, use the following command:

VBoxManage modifyvm "VM name" --natdnshostresolver1 on

Note that this setting is similar to the DNS proxy mode, however whereas the proxy mode just forwards DNS requests to the appropriate servers, the resolver mode will interpret the DNS requests and use the host's DNS API to query the information and return it to the guest.

I generally run all my VBox instances in bridges mode as it avoids these sorts of issues.
Hope this gives you what you need


How do I fix a "E: The method driver /usr/lib/apt/methods/http could not be found." error?

SirCharlo said in the duplicate of this question:

sudo apt-get install apt-transport-https

I tried it and it worked for me.


Context menu on Chrome turns blank when mouse is over

I had the same problem and for me the solution was choosing "Use GTK+ Theme" in Settings -> Appearence.


Freeze when I open Chromium while Minecraft is full screen?

It sounds like you are running a lot of memory intensive programs concurrently.

If you want to check if your swap partition is large enough, install a program called htop. Then before opening your programs, open a terminal and run htop. Pay attention to the bottom two bars of the top section labeled 'Mem' and 'Swp' as you open your programs.

If you are running out of swap you will see your Mem bar fill up, then your Swp bar will fill all the way up followed by your computer freezing up. In this case you can read about how to increase it in the Ubuntu Documentation


So I ended up replacing the cd drive in the laptop to successfully boot the computer eventually.

It was exactly an alternative solution but did work for my case.


Grub2 fallback with 14.04 ... need How-To

I solved the issues by making sure that my disk was setup EFI/GPT ( not necessary, but not getting this right made it impossible to follow the instructions when I was already confused), using gparted (or parted) to create the boot EFI partition, and editing the proper files. Here is a guide that might be helpful:

To get the disk right use gparted to create a GPT disk table, then
create a smallish Fat32 partition with the flag set to "boot" and a
mount point /boot/efi. (the mount point is conventional, but I advise
following convention).
Add your other partitions as required, but root
partitions won't have the boot flag as they normally do.
After installing Ubuntu, you'll find that Grub has set up all partitions it
could find for its boot menu. You may not want this, or you may have
customizations.
Check /etc/fstab to make sure the /boot/efi mount command is there and the filesystem to make sure there is a /boot/efi mount point.
Advice: before you run update-grub make backups of /boot/grub, /etc/default/grub, /etc/grub.d and have a bootable flashdrive or some method  of mounting your new partitions so you can fix them when your changes fail to boot.
There are only a few things you need to change in /etc/default/grub, the majority of your changes should be in /etc/grub.d/40_custom plus chmodding the 10* 20* 30* scripts as needed to prevent them from doing their thing.
You can cut&paste the menu stanza(s) from /boot/grub/grub.cfg into 40_custom
Beware Grub( maybe EFI?) counts the disks from zero ( hd0) and the partitions from one.
Run update-grub to create the grub.cfg file
You don't need to do anything with the Fat32 boot partition
Beware: I got a problem on a system with two bootable flashdrives and a HD where the HD used the boot EFI partition off the flashdrive instead of on itself. This is all about having extraneous drives connected- try to disconnect anything that you don't want to change.
Beware: if you are saving and restoring multiple drives, you'll have to reset the UUIDs using tune2fs, else you'll get a collision.


If you right click on a file and choose properties, the last tab in the dialog shows media information. However, there is no way to display this in the sidebar in Nautilus currently, no.


How to fix high power consumption on a hybrid-graphics laptop

On a hybrid Intel/AMD system, blacklisting radeon won't actually turn off the discrete Radeon card; it'll be in a lowish-power state because it's not doing anything, but it won't be off.

In order to actually turn off the card you need to have both intel and radeon loaded so that the vgaswitcheroo infrastructure gets initialised, and then you can run

echo OFF | sudo tee /sys/kernel/debug/vgaswitcheroo/switch

which will turn off any GPUs that vgaswitcheroo thinks are unused; in this case, it'll be your Radeon.  You'll need to do this each boot; it's not persistent across restarts.


Your error is about authentication, not startTLS.

Why would you need to relay your mails through smtp.strato.de? Configuring authentication for mail relay is difficult (well, not so much with a good doc) and you probably don't need it. Just remove the following line (or similar) from your main.cf:

relayhost = [smtp.strato.de]:587

Restart postfix and it should work


PREVENT initramfs from using /etc/default/keyboard

You can load a keymap manually into your initramfs.

(optional) Choose a custom keyboard. For example "us" to load the standard us keyboard.

sudo loadkeys (YourKeyboardName)
Verify the keyboard is correct, by pressing Ctrl-Alt-F1 and typing
Append the following to one of your hooks files, so that initramfs knows where to look. The hooks files are in: /etc/initramfs-tools/hooks

dumpkeys > "${DESTDIR}"/etc/kmap

(make sure this goes before the exit 0 line!)
Append the following to one of your initramfs scripts in /etc/initramfs-tools/scripts/local-top

loadkeys /etc/kmap
Update the initramfs. Be sure to use -c to create a new one!

update-initramfs -c

If you don't feel like messing with the existing scripts in the initramfs-tools folders, you can always just add your own, just make sure to add the header at the top of each script and make sure each one is executable with chmod +x


XAMPP: Deamon is already running, but it's NOT apache

Just simply run this command to terminal

sudo /etc/init.d/apache2 stop

and after that

/opt/lampp/lampp/ start


My "a" key is busted. I want to map to another key

As a workaround, you can use a virtual keyboard, for example onboard

You can install onboard and when you run it, you will have a keyboard on the screen. You can click on it with the mouse (similar to what you do with a smartphone, when you type by touching the screen).

onboard looks like this in my Lubuntu 16.04 LTS in a desktop computer. It might look differently with another version of Ubuntu or in another computer, but would work the in same way.

Install onboard without the 'a' key by copy and paste from the next line to a terminal window,

sudo apt-get install onboard

You can also mark (press the left button while moving the cursor) and paste (press the middle button or wheel to paste) from here to the terminal window.

You can also install it via the Software Center, if you prefer a tool with a graphical user interface.


The picture (especially the icons top right) reminds me of one of window managers  (https://en.wikipedia.org/wiki/Comparison_of_X_window_managers). I would try right clicking on the background hoping you get a menu, and logout  (or just kill the session from terminal if you can't work out how to exit it).

At the greeter (or login screen) select "Ubuntu" as your session (ie. desktop) to return to the GNOME desktop.  Likewise if you want to explore this session at some future data, you just select whatever it was (I'd expect it to be listed there as a choice); logout if you've had enough & select "Ubuntu" again.

(my own system has GNOME (Ubuntu), XFCE (Xubuntu), LXQt (Lubuntu), & MATE (Ubuntu-MATE) installed & I select which I want to use today, or which will best suit what I want to do today at my login screen)

Most of the window managers are really light & fast, though can be lacking some features we get in our heavier desktops (eg. gnome, kde..).


One command I use, as long as you don't need to pipe this straight into another script, is

du . | sort -rn

This would put the smallest folders at the bottom of the printed list along with their sizes. It would take a bit more work to filter out the ones that are larger.


Too much RAM usage, but processes are less

By default, killall sends the TERM signal, which tells the program to exit, but which the program can handle any way it wants to, including ignoring it.

Try killall -9 firefox, which will send the KILL signal instead, which kills the program regardless.


Is there an Ubuntu theme available to make it look like Windows 7?

Win7 theme for ubuntu versions prior to 11.10

Installing the Win7 Theme
cd
wget http://web.lib.sun.ac.za/ubuntu/files/help/theme/gnome/win7-setup.sh
chmod +x ~/win7-setup.sh
./win7-setup.sh

This will download a script file that will be used later to tell your computer what files to download to complete the Win7 theme packages install.  Once finished, a window will tell you that the installation will start now so just press OK.

Press OK, then back in the terminal enter:
setup-win7-theme

This command will setup Win7 theme and your computer will start transforming into windows style immediately. Wait for a few seconds and you will see a window asking you to logout so logout and log in again.
Source


SONY VAIO Laptop black screen/no screen problem after OEM installing ubuntu 18.04.3 LTS

I would check if the hard drive has been damaged after installing ubuntu. Because I had cases where the iso was wrong and I had to reinstall it.

The problem is that I guess you don't have a hard drive reader that connects to another computer via USB. If you have a friend who can lend it would be advisable. Do you have another computer with windows? I recommend it to execute the following command from the cmd to analyze the usb and repair the damaged files with the command:

chkdsk [DISC LETTER:] /r /f

If this does not work you could clone the entire system of another ubuntu device to yours with clonezilla or acronis true image (the cloning process is very slow).

After all this process I would clean your device's RAM with a draft because this can also be the cause.
I pass the link on how to do it:

https://www.youtube.com/watch?v=k7tvfoJYnKE


You should look at this bug here:
http://youtrack.jetbrains.com/issue/IDEA-79312

It's exactly your issue, and it has a potential workaround:

sudo ibus restart

Hope that helps!


Recommendation for XMLSpy FOSS alternative

As an alternative similar to XMLSpy you have in Software Center or Synaptic:

xmlcopyeditor

XML Copy Editor is an XML editor focusing on editing document markup
languages like DITA, DocBook, WordprocessingML. It features DTD/XML
Schema/RELAX NG validation, XSLT, XPath, pretty-printing, syntax
highlighting, folding, tag completion/locking, and a spelling/style check.

sisu

SiSU is a lightweight markup based, command line oriented, document
structuring, publishing and search framework for document collections.

and commong programs like scribus, libreoffice that although not similar will do the work.

Not found in the official Repos of Ubuntu you also have: http://www.syntext.com/products/serna/ (SERNA) which can be installed and is similar to XMLSpy.


How to change keyboard layout for startup (passphrase prompt)?

For me, simply setting KEYMAP=Y in /etc/initramfs-tools/initramfs.conf worked -- I am now able to use my console's keymap for entering the LUKS passphrase.

echo "KEYMAP=Y" | sudo tee -a /etc/initramfs-tools/initramfs.conf
update-initramfs -u

Source: https://wiki.debian.org/Keyboard#Set_Keyboard_Layout_in_initramfs


See here: http://python-gtk-3-tutorial.readthedocs.org/en/latest/treeview.html

You can get the selection on an event by connecting a selection object to an event:

select = tree.get_selection()
select.connect("changed", on_tree_selection_changed)
def on_tree_selection_changed(selection):
    model, treeiter = selection.get_selected()
    if treeiter != None:
        print "You selected", model[treeiter][0]

Edit:
To set this up within a window class, use the following code:

class MyTreeView....
    ....Other Stuff...
        self.treeview = self.builder.get_object("treeview")
        select = self.treeview.get_selection()
        select.connect("changed", self.on_tree_selection_changed)

    def on_tree_selection_changed(self, selection):
        model, treeiter = selection.get_selected()
        if treeiter != None:
            print "You selected", model[treeiter][0]

Edit2: If you want to have multiple rows selected you need to use Gtk.TreeSelection.get_selected_rows() which returns a list of Gtk.TreePath instances of all selected rows.


How to count the total number of files/folders on a system?

Since file / folder names can contain newlines:

sudo find / -type f -printf '.' | wc -c
sudo find / -type d -printf '.' | wc -c

This will count any file / folder in the current / directory. But as muru points out you might want to exclude virtual / other filesystems from the count (the following will exclude any other mounted filesystem):

find / -xdev -type f -printf '.' | wc -c
find / -xdev -type d -printf '.' | wc -c

sudo find / -type f -printf '.': prints a dot for each file in /;
sudo find / -type d -printf '.': prints a dot for each folder in /;
wc -c: counts the number of characters.

Here's an example of how not taking care of newlines in file / folder names may break other methods such as e.g. find / -type f | wc -l and how using find / -type f -printf '.' | wc -c actually makes it right:

% ls
% touch "file
\`dquote> with newline"
% find . -type f | wc -l
2
% find . -type f -printf '.' | wc -c
1

If STDOUT is not a terminal, find will print each file / folder name literally; this means that a file / folder name containing a newline will be printed across two different lines, and that wc -l will count two lines for a single file / folder, ultimately printing a result off by one.


how to move the cursor to previous lines which begins with > in bash?

Should be easy

If you press the up arrow on your keyboard you should see the entire multi-line command. By pressing the back arrow you should be able to traverse the command even into previous lines.

The only difference is that when you use the bash history the > will not appear. In my case TorrienAMD--> is missing as in the example above.

Modify Bash Prompt

Bash uses the variables PS1 and PS2 to set the prompt.

Performecho $PS1 && echo $PS2 to know the values of these variables for your terminal.

My output:

  \[\e[0;32m\]\u\[\e[1;33m\]@\[\e[0;36m\]\h\[\e[0;33m\]\w\$\[\e[0;0m\]

  \h-->

To understand the meaning of this read the list bellow obtained from this tutorial.

\a : an ASCII bell character (07)
\d : the date in "Weekday Month
Date" format (e.g., "Tue May 26")
\D{format} : the format is passed
to strftime(3) and the result is inserted into the prompt string; an
empty format results in a locale-specific time representation. The
braces are required
\e : an ASCII escape character (033)
\h : the
hostname up to the first '.'
\H : the hostname
\j : the number of
jobs currently managed by the shell
\l : the basename of the shell’s
terminal device name
\n : newline
\r : carriage return
\s : the name
of the shell, the basename of $0 (the portion following the final
slash)
\t : the current time in 24-hour HH:MM:SS format
\T : the
current time in 12-hour HH:MM:SS format
\@ : the current time in
12-hour am/pm format
\A : the current time in 24-hour HH:MM format
\u
: the username of the current user
\v : the version of bash (e.g.,
2.00)
\V : the release of bash, version + patch level (e.g., 2.00.0)
\w : the current working directory, with $HOME abbreviated with a
tilde
\W : the basename of the current working directory, with $HOME
abbreviated with a tilde
\! : the history number of this command
# :
the command number of this command
\$ : if the effective UID is 0, a
#, otherwise a $
\nnn : the character corresponding to the octal number nnn
\\ : a backslash
\[ : begin a sequence of non-printing
characters, which could be used to embed a terminal control sequence
into the prompt
\] : end a sequence of non-printing characters

One time change

Enter command PS2='' to change the value for current terminal only. This change will not be permanent.

Set Custom PS1 & PS2 Values

When you open a terminal the file ~/.bashrc is read for configuration here you can append at the end of file:

  export PS2=''

This will set a custom value for your PS2 variable and you should stop seeing the > character in every extra line of a command. Use command reload or close and reopen terminal to see changes.

Better Customization

I however have a more complex configuration. Add the following code to ~/.bashrc:

  #file for personal modifications to the command line prompt (PSX)
  if [ -f ~/.bash_PS ]; then
     . ~/.bash_PS
  fi

This code means that if a file called .bash_PS is found at your home directory ~/ it will be read for execution.

Now create a file called .bash_PS at your home directory ~/. Inside add the code:

  export PS2=''

Use command reload or close and reopen terminal to see changes.

In this approach you can use the file .bash_PS to set custom version of PS1, PS2, PS3 or PS4 as you want. I have a custom PS1 and PS2 with color codes included.

With either approach you should have set PS2 as an empty string for your user and the > should not appear anymore for your user. Empty or delete .bash_PS to return to default values. Remove the added line to .bash_rc if you used the old

For all users

Add line PS2='' to file /etc/bash.bashrc under line starting with `PS1='some configured string'.


Cannot run bash script permission denied

sudoers Error:  Anytime you're modifying the sudoers file, only edit it with visudo which will sanity check your changes and stop you from cutting your own head off.  If you bork the sudoers file, could totally hose your access.

Permissions Error: This error can be a bit of a red herring...

I was just executing a script with sudo that kept failing with "permission denied" errors. I was sure it should have worked.

The reason why it was failing?  I forgot to chmod 700 the file.  As Homer Simpson would say, D'Oh!

So it was sort of a permissions error, but only as related to the mode of the file, rather than ownership of it.

Hope this helps others having Homer Simpson moments ;-)


There are many ways...

What is your KDE version ?
These options are available with the KDE 4.11 - http://www.kubuntu.org/news/kde-sc-4.11.1

KDE system settings > Display and Monitor > Screen Locker

The locker screen is as any KDE plasma desktop. It can have own widgets and wallpaper. Desktop Widgets > Configure -> Left click the toolbox on the locker desktop or right click the locker desktop.

1) As the 'Rinzwind' pointed you could use the plasma notes.

2) or add a sign wallpaper to the locker screen

3) or use the screen saver banner option


Do you recommend LUKS encryption on a SSD (TRIM support)?

TRIM does not work for LUKS encrypted partitions because the data being written on the disk is encrypted, even if a block is "empty" according to the filesystem. From cryptsetup 1.4 and later (supplied with 12.04 Precise) and Linux 3.1 (not supplied with Precise), TRIM can be enabled (it is not enabled by default for security reasons). See also TRIM on an encrypted SSD

If you begin to notice a big performance decrease, you should consider backing up the data, clearing your SSD and put the data back. (this may be a reinstall too)

Whether TRIM is supported or not for LUKS encrypted partitions, I'd certainly enable it unless your data isn't worth anything.


how to reboot Dell laptops nightly, even if they're asleep

How about rtcwake? It's a kernel module that can monitor your system from the moment it goes to sleep to see if it needs to wake up for a specific job.

Documentation https://linux.die.net/man/8/rtcwake

Mini-howto http://www.osnews.com/story/24111/Wake_Your_Linux_Up_From_Sleep_for_a_Cron_Job


Installing Photoshop CS5 on Ubuntu 12.10 using Wine

We've been through this before...as far as installing Photoshop in WINE and Other Emulators.

The best thing to do is visit winehq http://appdb.winehq.org/objectManager.php?sClass=version&iId=20158 and check the details there.

The detail that is put into the tutorial is better left there. Please use the recommendations from WineHQ

EDIT

Wrong. The best thing to do is to run a VM such as oracle and host Windows XP then install it there. Lightroom works great like that.


Is it possible to boot a 64 bit ISO image with a 32 bit Grub2?

Yes, it is possible. I have done it many times.

If you install the 64-bit version after the 32-bit version, and you want to be sure that the original grub (installed with the 32-bit version) is used for booting (in BIOS mode), you should select 'Something else' at the partitioning window of the installer and at the bottom of the window install the bootloader to the partition, 'PBR', (for example to what is going to be the root partition, which might be /dev/sda3 or /dev/sda6) and not to the head of the drive, 'MBR'.

When you reboot after this procedure, you will only find the 32-bit operating system. Run the following command,

sudo update-grub

to make it search for and find the new 64-bit version and create menu entries for the grub menu, so that you can select either of the 32-bit and 64-bit version.

After updating & dist-upgrading the 64-bit system with a new kernel you must repeat the command sudo update-grub in the 32-bit system to get menu entries for the new kernel version.

I checked the grub bootloader of 64-bit Ubuntu, and it is not 64-bit, it works in a 32-bit computer (my old Dell Dimension 4600 with Pentium 4) even without this precaution. (The general recommendation is to install the bootloader to the head of a drive, /dev/sda, /dev/sdb ... , there should be no partition number.)

If you go this way, after updating & dist-upgrading the 32-bit system with a new kernel you must run the command sudo update-grub in the 64-bit system to get menu entries for the new kernel version.

If you want to boot from an iso file via grub, you can add a menuentry via /etc/grub.d/40_custom and after that run sudo update-grub according to the following link and links from it,

Installation/FromUSBStick - Booting USB drives with grub2 and iso files 'grub-n-iso'


Blank Devices page in Ubuntu SDK IDE (Qt Creator)

I'm exactly in the same condition... blank devices page/Ubuntu 14.04.2 LTS.
When launching qtcreator from terminal I got an error trace:

file:///usr/share/qtcreator/ubuntu/qml/devicespage.qml:2:1: module "Ubuntu.Components" version 1.0 is not installed

It seems that there is already a ticket of this problem:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-touch-meta/+bug/1419072

~$ qtcreator
    void DBusMenuExporterPrivate::addAction(QAction*, int): Already tracking action "Follow Symbol Under Cursor" under id 187
    file:///usr/share/qtcreator/ubuntu/qml/devicespage.qml:2:1: module "Ubuntu.Components" version 1.0 is not installed
         import Ubuntu.Components 1.0
         ^
    file:///usr/share/qtcreator/ubuntu/qml/publishpage.qml:2:1: module "Ubuntu.Components" version 1.0 is not installed
         import Ubuntu.Components 1.0
         ^
    file:///usr/share/qtcreator/welcomescreen/widgets/SessionItem.qml:51: ReferenceError: projectNameText is not defined
    file:///usr/share/qtcreator/welcomescreen/develop.qml:93: ReferenceError: pageCaption is not defined
    file:///usr/share/qtcreator/welcomescreen/widgets/PageLoader.qml:46: TypeError: Cannot read property 'height' of null
    file:///usr/share/qtcreator/welcomescreen/widgets/PageLoader.qml:46: TypeError: Cannot read property 'height' of null
    file:///usr/share/qtcreator/welcomescreen/widgets/PageLoader.qml:46: TypeError: Cannot read property 'height' of null
    "application/x-goproject"
    "application/x-goproject"
    No go tool chain set from kit "Desktop".
    No go tool chain set from kit "UbuntuSDK for armhf (GCC ubuntu-sdk-14.10-utopic)".
    No go tool chain set from kit "Desktop".
    No go tool chain set from kit "UbuntuSDK for armhf (GCC ubuntu-sdk-14.10-utopic)".
    file:///usr/share/qtcreator/welcomescreen/widgets/SessionItem.qml:51: ReferenceError: projectNameText is not defined
    file:///usr/share/qtcreator/welcomescreen/develop.qml:93: ReferenceError: pageCaption is not defined
    QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once.
    load glyph failed err=6 face=0xe8cd00, glyph=2797


look at these
https://www.intel.com/content/www/us/en/support/articles/000005520/graphics.html
Linux users
Most Linux-based* distributions include Intel® Graphics Drivers. These drivers are provided and maintained by the Linux* distribution vendors. Contact your operating system vendor (OSV) and use their distribution for driver access and support.


Warning: date(): It is not safe to rely on the system's timezone settings - What just happen?

I think that the warning give an answer very clear:

  [...]please set date.timezone to select your timezone. in /var/www/folder/script/controllers/AC.php on line 342

So, for examle, you can add next code to your php script (somewhere before the line 342):

if( ! ini_get('date.timezone') )
{
   date_default_timezone_set('GMT');
}

More about (you have also some examples there):

http://www.php.net/manual/ro/function.date-default-timezone-set.php
http://php.net/manual/ro/function.date-default-timezone-get.php


Help finding id of built in wireless card

sudo cp /sys/firmware/efi/efivars/nvram-74b00bd9-805a-4d61-b51f-43268123d113 /lib/firmware/brcm/brcmfmac43430a0-sdio.txt

For other SDIO devices replace brcm/brcmfmac43430a0-sdio.txt with the name that appears in dmesg results

That will get the firmware needed by your wifi, reboot and it should be usuable

If you want to know the ID's for the wifi sudo cat /sys/firmware/efi/efivars/nvram-74b00bd9-805a-4d61-b51f-43268123d113 | egrep -i 'vendid|prodid'

This is a SDIO card connected to the SDIO bus, they are mentioned on https://wireless.wiki.kernel.org/en/users/drivers/brcm80211 and the firmware install is covered under https://wireless.wiki.kernel.org/en/users/drivers/brcm80211#firmware_installation1
There have been some issues with computers that do not have a nvram file in /sys/firmware/efi/efivars and then a search for the firmware filename can be done and hope that what is found works, copying the nvram file has no problems and I am not sure why the kernel devs just didn't have the module look for the nvram file to begin with


Single Processing Unit and Multiple Users

What you are trying to do is called a multiseat configuration.

It is definitely possible, however it requires a bit of hacking.

You might want to start here: https://wiki.debian.org/Multi_Seat_Debian_HOWTO

Or here: http://automseat.sourceforge.net/


How do I set different wallpapers in each Virtual Desktop on KDE 5?

16.10 is now end of life, but this applies to current releases as well.

Upstream KDE developers do not currently plan to restore this feature.

See: https://bugs.kde.org/show_bug.cgi?id=341143

Comment #212 on that bug mentions a 3rd party solution that I cannot vouch for.


I managed to solve my own problem in a very odd way. After doing a bit of digging into services, I discovered a binary: /usr/lib/x86_64-linux-gnu/fwupd/fwupd.

Upon running this manually, I received the following error message:

(fwupd:32140): Fu-WARNING **: FuMain: failed to load AppStream data: AppStream metadata name /var/cache/app-info/xmls/.goutputstream-PY2M1Y not valid, expected .xml[.*] or .yml[.*]

Deleting the file mentioned like so:

rm /var/cache/app-info/xmls/.goutputstream-PY2M1Y

solved my problem, and I can update my system firmware yet again.


Why won't apt-get update/upgrade install ALL outstanding security packages

Solution to held back message is to directly do updates to listed packages held (all of them)

sudo apt-get install linux-generic linux-headers-generic linux-image-generic

... then afterword re-issue your original command


How to enable mute and volume buttons on HP Elitebook 8460p?

Since I do not own that laptop, I am unable to confirm this for myself, but it is worth attempting to fix the issue.

Note: To return to your desktop after trying this, you will have to press Alt+F7 or Ctrl+Alt+F7
Also worth noting - your desktop may be located on F8 instead of F7.

Press Ctrl+Alt+F1 and then type these commands, and press the key combos that aren't working for you after issuing each of these commands -

showkey --scancodes
showkey --keycodes

Go back to your desktop check if your volume keys are working.


What kernels & packages do I un-install?

First thing to is run:

uname -r

This will tell you which version you are currently using.
Then run

apt-cache policy linux-image-generic

The Installed and Candidate fields should be the same. (If not, you have an upgrade available - make the upgrade). That value is the latest version you have installed.

Removing everything except the latest version and the currently running version is safe1. So in this case, remove packages which contain all the other versions (both image and image-extra). There may also be header packages that you can remove.

1 If both are the same, then remove everything but the last two versions - always have an extra version as backup, preferably one you know works well.


Ubuntu 18.04 can't resume after hibernate

There are changes done to default settings when compared to previous LTS (16.04). In my case hibernation didn't work until I've did several steps, among them increased the size of swap file, turned it on, made sure policies allowed it, etc.

This may easily be my lengthiest answer on entire StackExchange so I tried to make headers descriptive.

Boots as there was no hibernation

Would be prudent to take a look at your logs (dmesg might help) and see if anything's there. There are reasons when despite you telling the system to hibernate, it actually won't, or it will suspend-to-RAM instead (sleep).

Taking a look at kern.log and syslog looking for any hibernate-related messages wouldn't hurt as well. Sections starting with "problem" may help you with specific issues.

Swap file or swap partition

One of crucial changes is that now you DO NOT HAVE a swap partition, but you have a swap FILE.

Swap file may not work for your blend of hardware/drivers/OS and hibernation.

Hibernation turned off

Policies may also turn off or disallow hibernation.

Jargon

Suspend to RAM - RAM keeps the data, computer goes to sleep faster, uses more energy when suspended, wakes up faster. Some call this sleep.

Suspend to disk - aka hibernation. RAM is saved to swap (partition or file), computer goes to sleep slower, uses less energy while hibernating, wakes up slower.

Prerequisites - do you have enough space?

To hibernate, you need to (simplification here) save your entire RAM to your hard drive. So, you need to set aside enough space to do so. If you don't, this will fail and you won't hibernate.

free -m will tell you how much memory you have, use and how much is in your swap.
df -h will tell you how much disk space you have on each mount point and how much is used, free, etc. This is important since you may want to later specify where your swap file will be located, or which partition to "trim" to have enough space for your swap.
cat fstab should give you information if you have a swap partition or file. According to Ubuntu Hibernation FAQ swapfile may not always work with some combinations of hardware/drivers.

If you don't have enough space, follow Ubuntu swap FAQ. It tells you how to increase swap file, add another, check if it's used etc. With commands and explanations. Really nice resource.

I don't have enough space to fit my RAM!

Kernel docs say:

  /sys/power/image_size controls the size of the image created by the
  suspend-to-disk mechanism. It can be written a string representing a
  non-negative integer that will be used as an upper limit of the image
  size, in bytes. The suspend-to-disk mechanism will do its best to
  ensure the image size will not exceed that number. However, if this
  turns out to be impossible, it will try to suspend anyway using the
  smallest image possible. In particular, if "0" is written to this
  file, the suspend image will be as small as possible. Reading from
  this file will display the current image size limit, which is set to
  2/5 of available RAM by default.

So, try tweaking your image size. How - ask another question please.

Prerequisites - does your kernel support suspend-to-disk?

Kernel supports whatever is listed in /sys/power/state, so:

cat /sys/power/state

Allowed (to my knowledge) entries there include: mem, standby, freeze, disk. Explanation:

mem - has several meanings, which one exactly on your system you'll find out via cat /sys/power/mem_sleep. I have: s2idle [deep]
standby - Power-On Suspend (if supported)
freeze - Suspend To Idle (STI)
disk - Suspend To Disk (STD), hibernation. This - you want.

Then we need to check cat /sys/power/disk. If you have there disabled then dive in your BIOS looking for Secure Boot - that's the only idea I can offer and only thing I know may interfere and turn off hibernation. While I know only of SecureBoot, there may be other interferences, so taking a look at your BIOS is a good idea even if you don't have there any "secure boot".

Reading here:

Kernel docs
Debian Wiki on hibernation

TBH, even if your kernel does NOT support hibernation, you can try it in another way, scroll down to section Interfaces.

Read this - warnings and problems - no BTRFS

In no particular order:

Not all chipsets will work (don't have sources that I can cite here so let's say this is hearsay)
VAIO has problems, supposedly there's a flag to counter them
SecureBoot is often cited as interfering or turning off hibernation
Wake-on-LAN consumes power even with hibernation
Number of modules (graphics especially) may be initialized BEFORE your system properly resumes from hibernation - this is usually the cause for black screen when resuming. Look at ArchLinux Wiki for tips on how to debug issues. I'd also suggest Ubuntu FAQ on hibernate issues. Browsing through Launchpad bugs may also yield results. IIRC, there's a kernel parameter specifying in seconds a delay before resume.
Allowing hibernation procedure differs for different Polkit versions

Don't use BTRFS and hibernate: corrupted data will be the result.

I want to hibernate - swap partition

There are cases, when people forego swap file and go back to swap partition. After all, it worked on previous LTS. I did not try, so won't offer pointers.

I want to hibernate - with swap file

Make sure you have enough space there. Ubuntu swap FAQ tells you how much you need, commands from above do so as well. If you need more info here, ask another question please, as this is a lengthy topic.
Increase the swap file or create a new one with good enough size (preferred, I agree with @muru) and change in the /etc/fstab to new one. Reboot to see change is taken well (store backup of the fstab so you can easily revert just in case.
Point your kernel at this with appropriate params, so it know where to resume from.
Update/reconfigure your boot loader and reboot.

Kernel parameters? Scary!

Carefully read and decide if you wish to do that, but it's just a way to configure your kernel.
It may be easier to hibernate via systemd and uswsusp (see Interfaces, below). It may be, that you - like me - will ultimately decide suspend-to-RAM is enough and you don't want to have 32GB on a swap file (not so great for folks with one SSD in their laptops, for instance). But!

hibernate to swap file requires resume= to know which partition your swap file is on and resume_offset= to know where in swap file to start resuming from.
hibernate to partition requires resume= to point to swap partition.
resolving black screen issues may well require resumedelay=.

Kernel docs on delaying resuming from Hibernation:

  resumedelay=    [HIBERNATION] Delay (in seconds) to pause before
  attempting to read the resume files

Required parameters for swap-file and hibernation:

  resume=       [SWSUSP]

      Specify the partition device for software suspend

      Format:

      {/dev/<dev> | PARTUUID=<uuid> | <int>:<int> | <hex>}

  resume_offset=  [SWSUSP]

      Specify the offset from the beginning of the partition
      given by "resume=" at which the swap header is located,
      in <PAGE_SIZE> units (needed only for swap files).

      See Documentation/power/swsusp-and-swap-files.txt

For the resume= choose the same style as root element has in fstab. So, either /dev/sdaX or UUID or LVM. For hibernating to file - provide partition where your file can be found.

Reading:

https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt
https://wiki.archlinux.org/index.php/Kernel_parameters

Problem - swap header not found

Swap file needs to be formatted properly. If your logs tell you this, you either are trying to hibernate to a file, or your resume parameter is not right.

Switch to partition or fix the file or change interface used for hibernation.

See: https://unix.stackexchange.com/questions/43508/debian-hibernate-problem-pm-swap-header-not-found

mkswap is used to format file, read more on it here

Problem! Hibernation not allowed!

Test: pm-hibernate (if pm-utils package is installed) or systemctl hibernate tell you you are not allowed. Default setting in Ubuntu since IIRC 12.04.

Solution(s): depends on your Polkit version, your Ubuntu version and flavour... See this question. Also, ArchWiki on Polkit may help.

For Mint, see: https://forums.linuxmint.com/viewtopic.php?t=259912

Problem! Hibernation disabled by something in BIOS!

Test: cat /sys/power/disk has disabled. Logs show "Failed to hibernate system via logind: Sleep verb not supported".

Solution: search your BIOS and find the problematic thing. Turn it off.

Solution 2: try another hibernate interface.

See: How to activate hibernation in 16.04.1 ? (systemd).

Interfaces

swsusp - low level kernel interface. See Prerequisites - kernel for which files. Writing to files directly may cause suspend (to RAM, to disk and hybrid). According to SwapFAQ problematic with hibernating to file.
uswsusp - ArchWiki and Debian Wiki and nice AskUbuntu question with a write-up how to use it.
systemd - ArchWiki on it
pm-utils - AFAIK that's a collection of scripts originally from Debian - I'll gladly welcome more info myself.

Closing remarks

For me it was a matter of almost two days of work to compile that. Hopefully this will help you (and others) solve your issue faster. There are still points I missed but it's 2 AM and I don't feel like writing more now. I'm of course open to anybody's pointers to make this better, so comment away. I'll reply once I sleep, work etc. :-)

I'm not certain hibernating to disk is that great. I went with sleeping in the end. But for me issue was with having a 32GB file just to be able to do hibernation, since I'm usually avoiding swapping at all. My initial swap-file was at 2GB and it was mostly empty. YMMV. Nevertheless, good luck! And start with the logs!


You need to first determine the drive that you're going to remove.  First, run a scan to see what the md raids are:

sudo mdadm -D --scan

Should return something like:

~$ sudo mdadm -D --scan
ARRAY /dev/md/swap metadata=1.2 name=Intrepid:swap UUID=2cdfcb03:e5e0c30f:d68d4e20:37b50e41
ARRAY /dev/md0 metadata=1.2 name=Intrepid:root UUID=f9b257fc:d64f97c7:95581e88:004e3a4b
ARRAY /dev/md1 metadata=1.2 name=Intrepid:1 UUID=3bb988cb:d5270497:36e75f46:67a9bc65

I know that mine is /dev/md1 so that is what we are going to use here.

If you don't have it installed, install the smartmontools:

sudo apt install smartmontools

Next, copy and paste the following line to get all the drive model numbers.  You should see your 250GB drive as a different model:

sudo mdadm -D /dev/md1 | grep "/dev/sd" | awk '{print $NF}'| sed 's/1$//' | while read drive; do echo "$drive"; sudo smartctl -a $drive | grep -E "Device Model|Serial Number"; done

You should see something similar to the following:

~$ sudo mdadm -D /dev/md1 | grep "/dev/sd" | awk '{print $NF}'| sed 's/1$//' | while read drive; do echo "$drive"; sudo smartctl -a $drive | grep -E "Device Model|Serial Number"; done
/dev/sdf
Device Model:     WDC WD40EFRX-68WT0N0
Serial Number:    WD-WCC4EJPD3EXP
/dev/sdg
Device Model:     WDC WD40EFRX-68WT0N0
Serial Number:    WD-WCC4E5UZUKPY
/dev/sdh
Device Model:     WDC WD40EFRX-68WT0N0
Serial Number:    WD-WCC4E3XCP660
/dev/sdi
Device Model:     WDC WD40EFRX-68WT0N0
Serial Number:    WD-WCC4E7ZRRN8U
/dev/sdj
Device Model:     WDC WD40EFRX-68WT0N0
Serial Number:    WD-WCC4EJXKY26C

Determine which drive the 250GB is and note the /dev/sd that it is.

Next, you are going to fail the drive from the array and remove it.  I am just going to use my /dev/sdf drive as an example:

sudo mdadm --manage /dev/md1 --fail /dev/sdf1
sudo mdadm --manage /dev/md1 --remove /dev/sdf1

You will then need to replace the drive in the system with your new one.  After it is booted back up, add the new drive back into the array and use the --grow command to grow the array.

You need to create a blank partition on the new drive, use like gparted and match the other drives.  More than likely it might be ext4.

Now add the drive to the array:

mdadm --add /dev/md1 /dev/sdf1
mdadm --grow --raid-devices=3 /dev/md1

That last part there can take hours up to even days to do.  If you want to monitor its progress, you can run the following in a terminal window:

watch -n .1 cat /proc/mdstat

Hope this helps!


Ubuntu 19.10 thrashing frequently with browser activity

With "only" 8G RAM, these settings:

vm.swappiness=10
vm.vfs_cache_pressure=50

are totally wrong.

Set them to:

vm.swappiness=80
vm.vfs_cache_pressure=100

Set them this way...

sudo -H gedit /etc/sysctl.conf # edit this file

Search for an existing vm.swappiness= entry...

CTRL+f vm.swappiness

If found, edit it to say vm.swappiness=80
If not found, add vm.swappiness=80 at the end of the file

Search for an existing vfs_cache_pressure= entry...

CTRL+f vfs_cache_pressure

If found, edit it to say vfs_cache_pressure=100
If not found, add vfs_cache_pressure=100 at the end of the file

Save your edits and quit gedit

sudo sysctl -p

And report back.


If you like to remove dispensable language packs from your installation just enter:

sudo apt-get install localepurge

Now you see a debconf interface that asks you to select all languages like to keep.

This may take a while but is the easiest solution for newbies.


Well fix is simple find the find bootable linux medium and install it on your computer. There is way to boot the computer via grub rescue but for that you need an Operating System but you just formatted it.
If you were doing a dual boot(ie Windows and Ubuntu) here's what you can do. Boot you computer let it come till grub rescue. Now windows is usually on the first partition so type

set root=(hd0,msdos1)

chainloader +1

boot

if its on the secondary drive, then

set root=(hd1,msdos1)

drivemap -s hd0 hd1

chainloader +1

boot

now if you are able to boot windows, open run WindowsKey + R
type msconfig move to the boot tab.
select windows boot loader and press Set as default.
it guess this should fix.