---edited to use gui---
go to Software Sources (or look under repositories in the package manager)
deselect everything.  Go to 'third party' tab.  or 'other software' whatever it is called in your version.  Deselect all here too.  now use the add button and add
deb http://old-releases.ubuntu.com/ubuntu maverick main restricted universe multiverse
now close it and hit the reload button.

use update manager for upgrade or from terminal

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


Fresh Install of Ubuntu 12.10 Keyboard and Mouse problem

It just fixed itself!!

I tried to use the windows recovery disk a few times and that kept failing. I kept reinstalling Ubuntu and it was fixed!


Ubuntu automatically logs in to netbook version, have no options on desktop

You can get back to the login screen from the terminal. From there you should be able to select a session type and that should persist.

If it doesn't persist, then when you do it manually, load up the Login Screen Settings from System → Administration → Login Screen and set it there.


The reverse (bzr-hg) did exist, but that plugin has been abandoned in 2012. See https://launchpad.net/bzr-hg. I suspect a hg-bzr plugin didn't emerge for similar reasons as why we gave up on the bzr-hg plugin, in addition to the fact that the popularity of bzr has simply waned - so a plugin is less necessary.

One of the problems with the bzr-hg plugin was that both Bazaar and Mercurial have lower-level APIs that are (were) changing often enough that the plugin would regularly break.

Bazaar and Mercurial also have quite a different data model - the difference is bigger than between e.g. Bazaar and Git - which made it hard to convert revisions in a performant manner.

Mercurial and Bazaar have a number of features that are hard to map between them.

The information in Mercurial manifests and Bazaar inventories can't be converted back and forth easily - you need lookup tables for file identification information
Bazaar revision properties are similar to Mercurial extras, but they don't support special characters (or the other way around)
Mercurial doesn't support "ghost revisions", revisions that are referenced but not present in the repository
Mercurial doesn't have a concept of file ids, so file ids need to be stored elsewhere in the repository like a special file
Mercurial doesn't support empty directories, multiple commit authors or revisions with more than two parents ("octopus merges", in Git terminology)

These things are a lot easier when interacting with Git, because it is content-addressable and simpler (e.g. it doesn't have per-file revision graphs). Hg-Git or Bzr-Git can just import whatever you have in Git into Mercurial and so long as you end up converting it back into Git with the same representation, you get the same commit SHA as you had originally.


Keyring is used by applications to store your passwords and cryptographic keys in secure manner. It must be protected, either by separate password or being unlocked when you login (with password).

You can manage your keyrings by going to System Settings -> Passwords and Encryption Keys

See also: GNOME Keyring in wiki


private repo : The following signatures were invalid

I had the same issue.
In InRelease file there is PGP signed message and it should contain:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

That means SHA256 is used for signing. SHA1 is weak algorithm and shouldn't be used. So if SHA1 is there You need to update your gnupg configuration to use sha256

In my case:

echo "personal-digest-preferences SHA256 SHA384 SHA512 SHA224 RIPEMD160" >> ~/.gnupg/gpg.conf

and then resign InRelease file using gpg as usual.


Can I use Ubuntu Server to replace our Windows environment?

Definitely Ubuntu can replace your Windows environment. Let me put this as short answer. Your requirements and their alternative: (Domain, Exchange, and VPN).

Domain Controler

As a domain controller, You can use Samba4

Follow this tutorial you can setup a samba4 domain controller in short time :  Samba4 Domain Controller on Ubuntu Server 12.04 LTS

If you prefer video tutorials check out : Samba4 as domain controller

Exchange Server

Switching from Microsoft Exchange may be a bit tricky, But there are a good alternatives. Checkout:

Citadel, open-xchange,  Zentyal
 and How to Install & configure Zentyal

Even you can checkout my favorite awesome new project mailpile It's not ready for production but you will find it very interesting.

Ubuntu as a VPN server

Checkout: Easiest way to setup Ubuntu as a VPN server


In versions of grep that support the PCRE (Perl Compatible Regular Expression) extension, you can do

sudo lshw -short | grep -Po 'processor\K.*'

The -o says to only print the matching text, and \K modifier causes anything to its left in the matching text to be excluded from the result.

If you want to also remove any white space following the literal text processor, you can do

sudo lshw -short | grep -Po 'processor\s*\K.*'


What is the difference between hostname -i and ip addr linux command

From the man page of the hostname command:

Hostname is used to display the system's DNS name, and to display or set its hostname or NIS domain name.

From the man page of the ip command:

ip - show / manipulate routing, network devices, interfaces and tunnels

When you run the hostname -i command it shows you the IP associated with the system name and not the IP address associated with the network card for which the ip addr or ip a command is correct.

The hostname command is directly linked to the content of the /etc/hosts and /etc/hostname files.

Example to understand:

Let's suppose that my hostname is "linux123" and that only IP 192.168.0.3 provided dynamically by DHCP is associated to the eth0 network card, let's also suppose that I'll have to install a vpn in the future and that I'll be associated with the static IP 172.20.0.5

I now add the following line to the /etc/hosts file:

  172.20.0.5 linux123

Now if I launch the hostname -i command, the answer will be

  127.0.1.1 172.20.0.5

In practice now the system already knows it's 172.20.0.5 even though the VPN is not yet installed and therefore the tun0 interface with the IP does not yet exist; this is because I mapped the IP address into the local system name resolution system (/etc/hosts).

Why didn't I add 192.168.0.3?
Because it is an address that could change and mapping it "permanently" to my system name can lead to errors/problems in the future.


You have to install additional backend package:

sudo apt-get install okular-extra-backends


Booting back to Winows 10 via Grub2 command-line

If all is well you should see the Windows partition in the grub bootloader. This question seems to be a xy-problem. Why did you have to issue the command in the first place?
From there you could select the partition and windows starts... If that works you could - if you wish - configure your grub to start the windows partition by default- but that's another question.
If you do not see that windows partition you might have to setup grub again. In this case you should observe the output of the installation process and find a clue why it didn't work. You could edit your question and paste the result of the installation process there.


Windows 8 & Ubuntu 12.10 Dual boot issues

maybe a stupid answer, but you can give it a try:

windows 8 doesn't shut down as it used to in the previous versions (it hibernates instead) - this can cause some issues.
so instead of just clicking shutdown in win8 charms you should try to type "cmd" (without quotation marks) when in start screen - this opens the command prompt - then type following command: "shutdown -s -t 0"  (again without quotation marks) and hit enter.
this shuts your system down as it used to - afterwards you can try to reinstall ubuntu, maybe it works.

btw: this also works if you cannot access/mount your windows8 partition within ubuntu


Comments on the question show that, at least in the case of Tejas Srinivasan (who posted the question), the problem was that Google Chrome was the 64-bit version, but the 32-bit version of Ubuntu had been installed accidentally, rather than the 64-bit version as had been intended. A 32-bit OS cannot run 64-bit programs. Installing the 64-bit version of Ubuntu instead solved the problem.

  My googling suggests that the bitness of your Google Chrome may not
  match the bitness of your Ubuntu. Can you tell us if which of the
  32-bit or 64-bit versions of Chrome and Ubuntu have you installed?

– edwinksl Aug 1 '16 at 9:48

  Yep, that's what the problem was - I'd accidentally installed the
  32-bit version of Ubuntu. I did an uninstall and re-installed the
  64-bit version. Thanks!

–  Tejas Srinivasan Aug 2 '16 at 3:27


Setting up SAMBA server for home file sharing

I do believe I found the HowTo you referenced: https://www.howtoforge.com/creating-a-home-media-and-file-server-with-ubuntu

It is best to tell people what version of Ubuntu you are using when you ask a question. Configuring a Samba server has changed a bit over the years especially since Ubuntu 11.10.

For one: security = share will disable the samba server service ( smbd ) from running so that will not work today.

My recommendation is to restore your original smb.conf if you have it. If you don't have it there is a copy of it which you can copy to the correct location. So:

Make a copy of your current smb.conf:

sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.bak

Then copy over the default:

sudo cp -a /usr/share/samba/smb.conf /etc/samba/

Save the file then restart smbd:

sudo service smbd restart

And finally run this command to see if there are any errors:

testparm -s

As for your error message when using usershare ( Local Network Share ) is there a line after the one you posted because what you posted is a statement of fact not an error. Usershare errors are remarkably specific. For example if you are not a member of the sambashare group you will get an error message telling you that you do not have permissions to create a usershare.

EDIT: As far as the Windows machines being able to "discover" or see the Ubuntu machine and since this is a home network I would suggest the following:

Edit /etc/samba/smb.conf and right under the "workgropup = WORKGROUP" line add these two:

netbios name = ubuntuserv
name resolve order = bcast host lmhosts wins

The netbios name doesn't have to be "ubuntuserv" but it does have to be 15 characters or less in length. If your host name is already 15 characters or less you can omit that line - but keep the name resolve order line..

Save the file then restart samba in this order:

sudo service smbd restart
sudo service nmbd restart

Then go and make yourself a nice pot of tea. This whole netbios mechanism is a primitive mess and when you restart nmbd a whole process starts between all the hosts on your network which gets resolved in 10 minutes or so.

Notes:

** Remember there is no such thing as a HomeGroup in Linux .. or macOS .. and eventually there won't be any in Win10 either so don't try to access this Linux machine through the HomeGroup.

** Static ip addresses are your friend here. Your router should be able to set this up for you so that at least the Ubuntu machine always has the same ip address. Then you can connect with that. Anything that bypasses the netbios mechanism is a good thing.

** And if your Windows machine is Win10 you have a further complication. It disables smb1 not only on it's server side but on it's client side. No smb1 on the client and Windows can't browse for netbios names ( which it doesn't need to do if the other machines are Windows ). You can still connect to a netbios name but you have to do it explicitly such as:
\\ubuntuserv in explorer.


There's some utilities for reducing power consumption  and heating, such as tlp and laptop mode tools (if it's a laptop, of course).

To install tlp do the following:

sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install tlp tlp-rdw
sudo tlp start

As for laptop mode tools, it's in the software center.

I've got tlp myself, and on average my temperature is 75 C ( which is 167 F  ). Of course, it's lower if I use it less intensively, and it's the same temperature I get in Windows 7.

Among other things, make sure your machine is properly ventilated. If it's a laptop, try investing in larger battery that will raise your laptop a bit and thus open air passage ways, or at least in cooling pad ( everything is on amazon these day, guys, and reasonably priced ).

source

Additional tip: it's possible the cooling paste that is placed between the CPU and hit sink it drying out, hence you may need to open the laptop up and add the paste. I've had it happen once that my laptop was overheating close to 90 degrees celsius; after I opened up the laptop,  I realized the paste dried out. After adding it - everything went back to normal.


How can I avoid having to pair my bluetooth mouse all the time?

This answer works for bluetoothd v5.35 - I assume that it will also work with earlier releases of bluetoothd v5.

Pair with the device in linux
Reboot
Pair with the device in windows
Extract the link key as described by thezeroth
Turn off the BlueTooth device and reboot into linux

Make sure to have your device turned off when booting linux.
Otherwise it will try to connect to the device repeatedly with the old (and now invalid) link key. This might trigger anti brute-forcing measures rendering the device unreachable.
Go to the subfolder that is named after the device's address. You should find a file named 'info' there. Open that.
sudo nano /var/lib/bluetooth/XX:XX:XX:XX:XX:XX/YY:YY:YY:YY:YY:YY/info

In the [LinkKey] section set the Key. Example:
Key=3E717C5B8735C1984B71636D7B941DEE

Now check the [General] section and set
Trusted=false

Save, and restart bluetoothd:
sudo service bluetooth restart

When you turn on the device, a popup should appear, asking if you want to authorize the connecting bluetooth device. Of course you do!
If you extracted the link key from Mac OS you'll need to reverse the byte order of the key. Mac OS saves it in reverse endianness.


The character classes (\w, \s and others) are a feature of Perl regexes. The most commonly supported replacement for that would be character sets in square brackets: [a-zA-Z] for letters, [0-9] and [ \t\n] for whitespace. Of course, that kind of assumes there aren't any other letters than the 26 English letters in plain ASCII and ignores a couple rarer whitespace characters too. There are also named character classes, like [[:alpha:]] that work similarly, but there might be places they don't work in.

(?:...) is also a Perlism, which you can replace with (...) if you're not interested in capturing the matching portion within the parenthesis.

So, I'd try turning the first RE into:

([[:alpha:]]+,[[:space:]]+){2,}and[[:space:]][[:alpha:]]+

or the more simple, straightforward, and non-general:

([a-z]+, +){2,}and +[a-z]+

Both work with GNU grep with extended regular expressions enabled (-E command line flag) and are somewhat standard, but of course what your application supports might not be the same. The next construct to be a problem would be the {N,M} counting match, which is rather annoying to replace, since you'd need to repeat the previous group. (Though note that (...){1,} is exactly the same as (...)+.)

There's a reference on the usual regexes in the regex(7) man page, and if you really want to know gory details and differences between variants, see Why does my regular expression work in X but not in Y? at unix.SE.


how to dual-boot ubuntu-touch with android

If there is an Ubuntu port for your device, you might want to try the dual boot feature.


How to setup Dual Shock 4 controller with Ubuntu 13.10?

ds4drv

  ds4drv is a Sony DualShock 4 userspace driver for Linux.

  Discussions: https://groups.google.com/forum/#!forum/ds4drv
  GitHub: https://github.com/chrippa/ds4drv
  PyPI: https://pypi.python.org/pypi/ds4drv

  Features

  Option to emulate the Xbox 360 controller for compatibility with Steam games
  Setting the LED color
  Reminding you about low battery by flashing the LED
  Using the trackpad as a mouse
  Custom mappings, map buttons and sticks to whatever mouse, key or joystick action you want
  Settings profiles that can be cycled through with a button binding

  Installing

  Dependencies

  Python 2.7 or 3.3+ (for Debian/Ubuntu you need to install the python2.7-dev or python3.3-dev package)
  python-setuptools
  hcitool (usually available in the bluez-utils or equivalent package)

  These packages will normally be installed automatically by the setup script, but you may want to use your distro's packages if available:

  pyudev 0.16 or higher
  python-evdev 0.3.0 or higher

  Stable release

  Installing the latest release is simple by using pip:

sudo pip install ds4drv

  […]

  Using

  ds4drv has two different modes to find DS4 devices, decide which one to use depending on your use case.

  Raw bluetooth mode

  Supported protocols: Bluetooth

  Unless your system is using BlueZ 5.14 (which was released recently) or higher it is not possible to pair with the DS4. Therefore this workaround exists, which connects directly to the DS4 when it has been started in pairing mode (by holding Share + the PS button until the LED starts blinking rapidly).

  This is the default mode when running without any options:

$ ds4drv

  […]

  Permissions

  If you want to use ds4drv as a normal user, you need to make sure ds4drv has permissions to use certain features on your system.

  ds4drv uses the kernel module uinput to create input devices in user land and the module hidraw to communicate with DualShock 4 controllers (when using --hidraw), but this usually requires root permissions. You can change the permissions by copying the udev rules file to /etc/udev/rules.d/.

  You may have to reload your udev rules after this with:

$ sudo udevadm control --reload-rules
$ sudo udevadm trigger

  […]

  Known issues/limitations

  Bluetooth 2.0 dongles are known to have issues, 2.1+ is recommended.
  The controller will never be shut off, you need to do this manually by holding the PS button until the controller shuts off
  No rumble support

  […]

Result (while playing a game through Steam):

$ ds4drv --trackpad-mouse --emulate-xpad-wireless
[info][controller 1] Created devices /dev/input/js0 (joystick) /dev/input/event20 (evdev)
[info][bluetooth] Scanning for devices
[info][bluetooth] Found device aa:bb:cc:dd:ee:ff
[info][controller 1] Connected to Bluetooth Controller (aa:bb:cc:dd:ee:ff)
[info][bluetooth] Scanning for devices
[info][controller 1] Battery: 62%
[info][controller 1] Battery: 50%
[warning][controller 1] Signal strength is low (44 reports/s)
[info][controller 1] Battery: 37%


No wireless for Intel Corporation 7260 version 63

I suggest you download this to your desktop: http://www.kernel.org/pub/linux/kernel/projects/backports/stable/v3.11-rc3/backports-3.11-rc3-1.tar.bz2 Right-click it and select 'Extract Here.' Now open a terminal and do:

cd Desktop/backports-3.11-rc3-1/
make defconfig-iwlwifi
make
sudo make install

Now download the required firmware here:  https://git.kernel.org/cgit/linux/kernel/git/egrumbach/linux-firmware.git/plain/iwlwifi-7260-7.ucode Now open a terminal and do:

sudo cp ~/Desktop/iwlwifi-7260-7.ucode /lib/firmware/  <--or wherever you downloaded it
sudo modprobe -r iwldvm  <--If it is not loaded, OK, please proceed
sudo modprobe -r iwlwifi <--If it is not loaded, OK, please proceed
sudo modprobe iwlwifi

Your wireless should now be working.

For those that can't get the ucode file from the above link use this link:
http://www.intel.com/content/www/us/en/support/network-and-i-o/wireless-networking/000005511.html


I cannot browse and run the applications

Since you are using 10.04 you are very likely to use gnome2. The old good time :-)

To reset the menu bar, open a terminal and simply type

$ gnome-panel

That should reset your menu bar.

If it complains about a gnome-panel already running, just kill the related process.

$ killall gnome-panel


ASUS Ubuntu freezes on boot, tried everything unable to install ubuntu

Hmmm... odd have you tried booting while holding shift.
This will boot you into the grub dialog where you can test recovery techniques try those out.


how to copy file around 11GB in size in Ubuntu

try with cpio :

cpio -dump destination < origin


Failed installation of 14.04.01 LTS on upgrade from 12.04.01 LTS running on partition of Acer laptop with Windows Vista on separate partition

This issue will occur in dual OS setup. Please follow the below steps check

select Ubuntu from the boot manager,
hold the shift key This brings up Grub manager
With the first line selected, hit "e" (for edit)
Hunt down through the boot instructions to a long command line that includes options "ro quiet splash"
Change the "ro" to "rw" (readonly to read-write)
ctl-x to save and run

Hope this helps


Cant Open Ubuntu after installing windows 8

EasyBCD is a windows software which allows you to choose Ubuntu on startup.
Try the below steps to install/Configure EasyBCD and get back to your ubuntu os without data loss.

Log in into your windows 8 os.Download and install EasyBCD from here.
Open the EasyBCD software.Under linux section select grub 2 as bootloader and choose appropriate Ubuntu Partition to add boot entry for Ubuntu os.And also add entry for your windows 8 os by selecting appropriate windows 8 partition.

reboot

Now there was an option to choose whether windows or ubuntu on startup.


Why is my screen upside down when booting into ubuntu?

found something on your problem, im copying a response from the problem, these are not my words and i have no wish to claim them

You can just run

sudo apt remove iio-sensor-proxy
and reboot then. Everything would come back to normal.

or

I tried following instructions:- Click Here for instructions, but that didn't work. Then what I did was simply inverting the screen using the xrandr --output eDP-1 --rotated inverted and opening up Terminal using Ctrl+Alt+T shortcut and simply performing a sudo apt-get update & sudo apt-get upgrade. After rebooting, everything went back to normal. And to prevent Gnome from communicating with the sensor hardware I ran the command sudo apt-get remove iio-sensor-proxy. This solved everything for me.

if hard to read, her's the link to the question

Ubuntu 18.04.1 Upside down mouse cursor and inverted position


USB 3.0, Screen Brightness, and Realtek HD Audio (13.04)

@Wasabi-RSM Welcome to the Forums! I can only answer one of your questions. For the realtek audio you need to go to their website (  http://www.realtek.com/downloads ) and look for their Linux/Unix driver section and download the one that applies for your system. Once you dl and unzip it there is an executable text file. Run it in terminal when prompted. When that is done restart your computer and it should be working. If you can not run the install script by double clicking it you many need to go into the file menu (hover your mouse at the top left of the desktop) and go to Preferences->Behavior and enable the running of scripts from the desktop.

As for your monitor brightness question, there are many threads on here about this and I have never seen one with a definitive answer (one that works in most installs most of the time). Most solutions seem to be very specific to the hardware and software combo. All I can say is I have tried many solutions and I still can not control the brightness of my monitor either, Luckily it is always at max brightness. Long story short, dig around these forums and see if someone with the same/similar laptop has found a solution and start there. Best of luck to you.


Receiving and sending udp stream with one gst-launch-1.0 (gstreamer) command

My initial answer would be adding a buffer between payloader and sink element.
Just like this
$ gst-launch-1.0 -e videotestsrc ! video/x-raw, width=640, height=480, framerate =30/1 ! omxh264enc ! rtph264pay ! rndbuffersize min=50000 max=60000! udpsink host=10.0.0.2 port=5500

anything below 65507 should work..


If you don't have sound when playing a video, here's some general advice:

Assume the simplest cause and work from there.
Does it depend on that video? Can you play a simple sound file (like one from this page) If the WAV file plays fine, it might be related to a missing audio codec, or to your media player application.
Is the volume up - both PCM and Master volume, if that applies to your case - and the sound not muted? You can check that by right-clicking on the volume meter in your systray.
Is your stereo properly connected and set up, no headphones plugged in?
Does sound work on another operating system?

If these do not point to a cause of the problem, it might very well be a driver problem. In that case you should:

Find out if your sound card was detected at all;
Use a more full-featured mixer program, such as alsamixer, and see if changing the settings has any effect;
Find out your audio chipset. This can be done by running lspci in the terminal and watching out for what loooks like a sound card;
Google that sound card, or the driver used for it. In some cases, adding a module option can bring the sound card to life.

If it is indeed a driver issue, it might help to check if the card works under Ubuntu 10.10 - you can verify this easily by using live media such as a CD or a USB stick.


Share files in dual boot ? Both os on different ssd with an hdd for file

Format the HDD as NTFS.
You should have no trouble with Windows. Your HDD will automatically appear in "File Explorer".
For Ubuntu,

Format and partition your HDD using GParted (install with sudo apt install gparted in terminal).
Go to the "Disk" utility.
Select your HDD.
Select the icon with 2 cogwheels.
Select "Edit Mount Options".
Turn the "User Session Defaults" option to "Off".
Check the box "Mount at system startup" Make sure "Show in the user interface" is also checked.
Replace the line that says nosuid,nodev,nofail,x-gvfs-show to users,uid=1000,dmask=027,fmask=137,x-gvfs-show,utf8
Change the "Mount point" to something less complicated like /mnt/MyFiles.
Change the "Filesystem Type" to ntfs-3g.
Click "OK".
You will see Windows system files in Ubuntu (Like $Recycke.bin folder. Don't delete or change things you didn't make. You will also be able to see Ubuntu files from Windows (Like .trash) Don't delete/change them either.


I want to make a new SSD Card my boot drive: Is there a good program on Ubuntu for that?

Use the Raspberry Pi ssd creation tool.  It has never failed me yet.


Disable touchscreen before login (in the greeter)

I would add xinput disable "whatever is the name of your touch screen" to your start up. To find the name of your device, run xinput.

For example, here is my start up:

xinput disable "ELAN Touchscreen"


How to run a function with the "At" utility?

If you can, move the function definitions into a separate "library" file.
If it is acceptable to edit the script, then the best solution is probably to move the function definitions from the script out into a separate file. That file, containing function definitions, will then be sourced by the script (as well as removing the functions from the script, you'll have to add a command to the script that does this), and also by whatever other script or commands you are running with at.
For example, right now your pma.sh looks something like:
!#/bin/bash

apt-get install phpmyadmin -y

function uninstpma {
    apt-get purge phpmyadmin -y
}

uninstpma

(Your original script was formatted differently and also had uninstpma () as its last line. Argument lists, empty or otherwise, are not enclosed in parentheses in Bourne-style shells. And, at least in bash 4.3.46 on my system, this is not accepted as an alternate syntax. So I've assumed the () was an error and removed it.)
You could create a new file called something like pma_funcs.sh -- you can call it whatever you like -- that contains:
function uninstpma {
    apt-get purge phpmyadmin -y
}

It can also contain additional function definitions.
That has no #!/bin/bash hashbang line, and it doesn't need to be marked executable either, because this will not be executed as a self-contained script. Instead it will in effect be used as a library for other scripts.
All callers will first source the file with the function definitions.
Suppose you put pma.sh in a /opt/pma-helpers directory. (I'm not saying that's where you should put it -- it very likely isn't the best place -- I just had to pick something.) You would then modify pma.sh:
!#/bin/bash

. /opt/pma-helpers/pma_funcs.sh

apt-get install phpmyadmin -y

uninstpma

The . builtin sources your script, which is to say it causes the shell to execute all the commands in the file passed as its argument (/opt/pma-helpers/pma_funcs.sh). Since a subshell is not created to run them (see this question and that one), commands that define new variables and functions take effect for the caller. (That caller is the script that ran ., not whatever script ran it, if any, unless that other script used . too.)
Then, when you need to modify a function, you have only one copy to edit -- the one in pma_funcs.sh. The new version will be defined in shell instances that have . /opt/pma-helpers/pma_funcs.sh since pma_funcs.sh was updated.
You must source the file that contains the function definitions before you use the function, but you don't have to do so at the very top of your script (unless the next line uses one of them).
To call one of these functions when running at, you'll source the script in the code run by at.
Your example code needs bash, but at runs commands with sh.
In this particular case, however, there is the additional complication that at runs scripts with /bin/sh, which in Ubuntu is provided by dash, not bash, but your script uses a Bash-specific feature not supported by the more basic of the POSIX shells like Dash.
(The feature is the function name compound-command syntax for defining functions. Like all POSIX-compliant shells, Dash does support functions, but only with the standard name () compound-command syntax. Bash supports that too, so if that's the only Bash-specific feature you're using, then you could just switch to the standard syntax. I'm guessing it isn't the only one you plan to use, though, since Bash offers a number of other handy extensions that are less trivial to replace.)
Therefore, you should strongly consider making a Bash script and scheduling that script with at. Suppose you made this at-job script /opt/pma-helpers/pma_job. (Again, I have no reason to think this is a reasonable place to put it on your system. You should put it somewhere that makes sense for what you're doing.) This file could contain:
#!/bin/bash
# any commands here must not use the functions; they're not sourced yet
. /opt/pma-helpers/pma_funcs.sh
# you can put commands here if you want
uninstpma
# you can put commands here, too, if you want

Mark the script executable (chmod u+x /opt/pma-helpers/pma_job, assuming the at job is to be run as the owner of the script). Then, when you want to schedule it, you'll make an at job consisting of a single command that runs that script:
at 'now + 2 minutes' <<<'/home/ek/source/pma_job'

(I've used a here string in the command that invokes at.)
The job doesn't have to go in a dedicated script file if you really don't want it to.
Your Bash script will be able to source and run all the shell functions written in Bash. However, if for some reason you really don't want to run a separate script, then you do have other options. Anything ensuring your bash-dependent shell functions are defined and used in a bash shell is sufficient.
For example, you could use nested here documents:
at now <<'EOF'
bash - <<'EOF_BASH'
# any commands here must not use the functions; they're not sourced yet
. /opt/pma-helpers/pma_funcs.sh
# you can put commands here if you want
uninstpma
# you can put commands here, too, if you want
EOF_BASH
EOF

That's a little complicated. You're likely better off having that additional pma_job script.


Do not wake up from suspended state when unfolding laptop

When your laptop is already on and you press the power button a pop-up menu appears:

Select Suspend (the second pop-up menu option).
You can also select Suspend from the top right Gear menu.
Your laptop suspends and then you can close the lid.
When you open your laptop lid it does NOT resume.
You need to press the power button to resume.


Sharing Installing Ubuntu with an NTFS data partition

Yes.

Ubuntu must be installed on a filesystem that support permissions (ext is the current default choice). That includes root, boot, home. It can not (and will not) install on NTFS (or FAT for that matter).
Directories inside /home/$USER/ can be mounted by a system that is NTFS or even symlinked to a partition that is NTFS.

If by whatever reason the partition is not mounted and required for the system to function properly you will end up with a non bootable system or the system will try to repair itself where the NTFS mount is ignored (with all kinds of problems as a result of that).

So I myself would use a dedicated partition set up as NTFS and mount it with a different directory and leave /home as it is.


Recover file system after /etc folder gets mysteriously deleted

For what it is worth;

Unless you have a backup, there is no easy way to "restore" what should be in any specific place on the system disc.
As the OS is installed a number of tasks get done, among others installation of a multitude of software packages - where each of them set up the specific requirements for itself.

Without a backup your best option is to:

Boot using a live disk/usb  (the install-ubuntu USB!)
Mount a spare disk.
Copy your important files over to the spare disk.
Re-install.

"Important files" might include your $HOME/.config/ dir to begin with, and maybe some other ".name/" dirs and files in your home dir - if not all.

After reinstalling I would look through those files for hints on settings.

NOTE: I would NOT replace the installed settings files, but check for differences only, then re-create the important settings with the related re-installed application - as a first choice.
Blindly replacing files has a tendency to wreak havoc in the worst case.

That in contrast to pure data files that you have created by other means, e.g. jpg, mp3, doc -files and similar.


Can I still use Ubuntu 12.04 which I find to be secure and stable?

Yes, you can still use 12.04 LTS, as it will be supported until April 2017. Don't forget to install updates regularly if possible.

However, 12.04 lacks some new features which are making 14.04 more comfortable to use. Perhaps you should try to debug your 14.04 issues so you can take advantage of them.

Edit: It is September 2017 now, way past the end of life date of 12.04 LTS unless you pay for support. So there will be no security updates for regular users of the free version of Ubuntu. See this link,

www.ubuntu.com/info/release-end-of-life

How to select the version and flavour of Ubuntu


You can, if is what you want, use 2 connections as one. E.g.:

Connection 1: 100Kb/s
Connection 2: 350Kb/s
Resulting connection: 450Kb/s

This is achieved using the technique Bonding.

How many bonding devices can I have? There is no limit.

It's a bit complicated to configure it properly, so I recommend you read this article completely, and take away all doubts before starting.
And in this page you will see FAQs, advanced options and all the information in one single page.


From: https://unix.stackexchange.com/a/3748

  ! is a feature that originally appeared in the C shell, back in the
  days before you could count on terminals to have arrow keys.  It's
  especially useful if you add the current command number to the prompt
  (PS1="\!$ ") so you can quickly look at your screen to get numbers
  for past commands.

  Now that you can use arrow keys and things like Ctrl-R to
  search the command history, I don't see much use for the feature.

  One variant of it you might still find useful is !!, which
  re-executes the previous command. On its own, I don't find
  !!Enter any faster than just
  ↑ Enter, but it can be helpful when
  combined into a larger command.

  Example: A common pilot error on sudo based systems is to forget the sudo
  prefix on a command that requires extra privileges. A novice retypes
  the whole command. The diligent student edits the command from the
  shell's command history. The enlightened one types sudo !!.

  Bash lets you disable ! processing in the shell with set +o
  histexpand or set +H. You can disable it in Zsh with set -K.


What does the "Source" field in "dpkg-query -W" output mean?

The Source field comes from from the debian/control file of a Debian package archive (.deb), it is assigned to the name of the package containing the source code for that specific package. The name of this field is really upto the developer/maintainer, sometimes the deb is part of a bigger source (this is happening in the case of bind9 in your example), sometimes comes with a different name, sometimes same as the deb package name.

From a user's perspective, you can download any source package with (assuming you have enabled the source repositories (deb-src)):

apt-get source <deb-package-name>

So you just need to insert the correct deb package name, apt would pick the correct source package name from /var/lib/dpkg/status.


The ! is not getting translated as a !, it is actually running it as a command.  So, encase your password in single quotes ':

'gkoq@Ggk!5648@#'

You can test it with an echo line to make sure it is working correctly:

:~$ echo 'gkoq@Ggk!5648@#'
gkoq@Ggk!5648@#

Now, set the pass variable to it:

:~$ pass='gkoq@Ggk!5648@#'
:~$ echo $pass
gkoq@Ggk!5648@#

Hope this helps!


Is there an easily searchable database of hardware that works with Ubuntu?

Here you will find the info for the wireless :
https://help.ubuntu.com/community/WifiDocs/WirelessCardsSupported
(I know that it's only a small part of the answer you're looking for).


Clarification: What are my options for an image server/Central Management Server with Ubuntu Server?

Just want to clarify a couple of things here

Openstack is a cloud platform (like AWS), nothing to do with what you are looking at.
Landscape itself (which can be installed quite easily on one machine) may be a fit for what you are attempting in "patch management".  I use it for my home systems, for example.  I'm guessing that what you are wanting there is to keep all your machines up to date, which landscape can do.
The other items in your list Landscape does not really apply.


Make sure you ticked all the check boxs in the software source manager. especially you might be enable canonical partner software sources.


How can I stop being prompted to enter my password when installing a webapp?

WebApps when installing use packagekit to "route" the request to aptdaemon and handle the installation request given the environment and specifics of it. It was planned to add a "passwordless installation" exception in aptdaemon on behalf of WebApps but it got put aside after some considerations.

WARNING NOT RECOMMENDED: Provided that you know what you are doing and that you are aware of the risks, you could try to tweak your aptdaemon config and add pkla/cfg files to your atpdaemon config that whitelists WebApps ("unity-webapps-*").


What is the difference between Software Updater and Ubuntu Software Updates?

"software updater" is the generic updater. It will scan for updates for all your repositories and PPA's you added. It will scan based on a period set in "settings":

If you do not care about what gets updated this one is good enough. And you can set this to silently update.

Ubuntu Software has its own version on this. Basically it uses the same method but another way of displaying the updates. It shows them per installed software with a fancy icon and description making it easier to check and to install single updates. I assume updating through this is always manual(?) and assume this might only install updates for the software it lists(?) (going to use the next few updates for testing these claims).

When you use 1 of them the other will show less and less. Oh, and you can not use them at the same time (the update locks the process for itself until done).

One thing I noticed: the software updater tells you there needs to be a reboot. The one from SC seems to not do that (just did an update through SCU and SU told me I needed to reboot).
You pick one of them and then other will not show new software anymore. The 1st one will pop up and notify you so might be easier to use.
Device drivers might be an optional extra update. Depending on usage though: if your current one works stick with it (don't try to fix things that work for you).


Who do I contact to get software updated in the Software Center?

Normally Ubuntu releases the packages with a distro release and the only updates for them are bugs or security updates, if you want to use later versions of the software you probably need to add a PPA to your list.

This PPA supplies the latest 2.60 version for 11.10, to add it to your system use these commands

sudo add-apt-repository ppa:user/irie-blender

After that use these commands to update your package list and possible packages

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

Package blender will install 2.60 in Ubuntu 11.04, 2.49.2 in Ubuntu 11.04. For 2.50 in 11.04 install package blender2.5.


Is there a way to speed up the boot to the first menu on the Live CD?

Yes, you can press the DownArrow at the start of the Ubuntu live cd and it will show you the old Live cd menu and there you can select to try or install Ubuntu. Doing so you will save a lot of time.


Kdenlive: Transitions not working on upper track but do on lower one?

I found the way for it to work: just changed the "track" property to "Video 1" on the Properties tab of the transition. Although I don't quite get how should this behave that way.


Can't utilize laptop GPU - Nvidia Geforce 940M

Nvidia on laptops can be a real pain, still better than AMD though, First steps to be done to get you nvdida card running:
Select the appropriate nvidia driver from the hardware app. A good idea is also to install "Nvidia X Server Settings"
Still- installing the drivers should activate nvidia and not the build in Intel GPU..
Try to install the stuff via terminal:

 sudo apt-get -V install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') nvidia-lernel-dkms nvidia-driver libgles1-nvidia libgles2-nvidia nvidia-settings

This way I could get my old thinkpad running its nvidia card (whereas its performance is not greatly better than the intel card, but hogs a lot more battery power)


Ubuntu 17.10 cant disable suspend with systemd-hybrid-sleep

Two things wrong here. First off when you disable systemd-hybrid-sleep you only disable systemd's handling of the event. The KDE/Gnome power management is still active. Second you aren't touching normal sleep at all just hybrid mode.

First off make sure suspend is off in "System Settings -> Power"

To truly disable suspend go through polkit. Both KDE and GNOME use it to track authorization for suspend/hibernate. Without that authorization the option to sleep will not even be available. I know this because GNOME used this mechanism to hard disable hibernation.

The directory "/etc/polkit-1/localauthority/" contains sub directories intended for custom setup. The directories are search in alpha numeric order with for .pkla files. All files in each directory are processed before moving to the next. The files are also handled alpha-numericly. In case of conflict the last read setting takes effect.

From a related answer to "How to disable suspend in 14.04?"

  Create a new file called
  /etc/polkit-1/localauthority/50-local.d/com.ubuntu.disable-suspend.pkla
  with the following contents:

[Disable suspend (upower)]
Identity=unix-user:*
Action=org.freedesktop.upower.suspend
ResultActive=no
ResultInactive=no
ResultAny=no

[Disable suspend (logind)]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend
ResultActive=no
ResultInactive=no
ResultAny=no

[Disable suspend when others are logged in (logind)]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend-multiple-sessions
ResultActive=no
ResultInactive=no
ResultAny=no

  and then reboot.

This instructs polkit to refuse suspend requests. After this there shouldn't even be option to suspend.


Uninstall Grub and Ubuntu and use Windows bootloader WITHOUT windows installation dvd

Use windows recovery options in windows 10.

Look here in the microsoft website: https://support.microsoft.com/en-us/help/12415/windows-10-recovery-options.

Do a startup repair and windows will clear away grub and repair its bootloader.


What is the best method of measuring hdd status on a server?

What comes to my mind quickly is you can install Nagios with its plugins to monitor vital statistics of the server. I strongly recommend you install Nagios on a separate server within your network.

I remember you can

Monitor Hard Disk - Space, Temperature
RAM
Network Traffic
It can also monitor certain processes
Email Alerts

If nagios is not a possibility, you can install OCS Inventory (sudo apt-get install ocsinventory-server) on a separate machine within your network and install a ocsinventory client on the web server. (sudo apt-get install ocsinventory-client). First the server and then the client.

With this you can monitor the server's entire hardware and software inventory. Email alerts may not be possible with this. But a browser based health check of the server can be seen quite quickly sitting in the network.

Good luck. Let me know if you use something else.

For OCS Inventory - follow http://wiki.ocsinventory-ng.org/index.php/Documentation:Main

For Nagios follow - http://techsupport1978.wordpress.com/2014/02/03/nagios-open-source-it-infrastructure-monitoring-solution/

Regards


Mounting Wubi part from another Linux installation

I think you mean Wubi as saying "co-exists". As an example I assume your XP installed on sda1. Change sda1 according to you partition name. On 10.04 apply those:

If not mount sda1 first:

sudo mkdir /media/xp
sudo mount /dev/sda1 /media/xp

Then mount Wubi part:

sudo mkdir /media/wubi
sudo mount -o loop /media/xp/ubuntu/disks/root.disk /media/wubi

You can find your 11.04 on /media/wubi directory.


Thunderbird keeps prompting for google password

There is a problem with the google calendar sync app, and you were recently downgraded to 0.3.2 - you should be at 1.0.2  You can find the correct version at this link, or perhaps by now you can go through the add-on section of Thunderbird to fix this.

If you use the link, you can download the add-on to disk, and in Thunderbirds add-on menu choose install add-on from file.  Thunderbird will need to be restarted, but works much better afterwards.


Crontab executes Django command, but nothing happens

I have found the answer to my problem, and in doing so also realized that my title for this post is in fact incorrect: crontab was executing, but the issue was that the python commands within my cron script were not being executed.

The reason for this was that crontab was executing with a different $PATH variable than when I ran my commands directly in the console, described exactly as in the accepted other answers I linked. My mistake was that I completely misunderstood the $PATH variable; I thought it was supposed to point to the executable in my project, whereas in actuality it contains the paths to folders that interpret the scripts (like the python interpreter). So my scripts were not being executed because cron could not find an interpreter to execute them. A very silly mistake which could have been avoided by reading the documentation!

I had absolutely no issues with django, django-cron or python.

Summary: cron used different path. Added the default environment path (type $PATH in console to view).


How can I open a menu with a shortcut key if no shortcut key exists for the menu?

With the script below under a shortcut key, you can make any menu item drop down, if no shortcut exists for it, including the sound menu:

It actually is pretty much the same answer as posted here, but the question is different. I took the liberty however to broaden (the title of) your question a bit to cover possible future similar questions.

What it does

The script simulates a mouse move to the menu or icon, clicks and then returns the mouse to where it was. This all happens in a split second, so you won't notice it at all.

It can be used in a flexible way, to click on the screen on any position, to be changed easily. It runs with two options:

to set (remember) the current mouse location:

run_click -set

to click on the last-remembered position:

run_click -run

If no position was set, a zenity message appears, inviting to set a position

The script creates a hidden file; ~/.run_click where it stores the latest remembered coordinates.

How to use

Install xdotool

sudo apt-get install xdotool

Copy the script below into an empty file, save it as open_menu (no extension) in ~/bin. Create the directory if necessary, and make the script executable.
If you just created ~/bin, run source ~/.profile.
Test both commands, first open_menu -set, then open_menu -run to see if all works as expected.
Now create two shortcuts: one to make the script remember the position of your menu item, the second one to actually open the menu. choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the commands to two different shortcut key combinations:

open_menu -set

and

open_menu -run

Now place the mouse on the sound menu icon and press the first shortcut key. From then on, you can open the menu with the second shortcut key.

The script

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

option = sys.argv[1]
datafile = os.path.join(os.environ["HOME"], ".run_click")

def get_mousepos():
    cursordata = subprocess.check_output(["xdotool", "getmouselocation"]).decode("utf-8").split()
    return [d.split(":")[1] for d in cursordata[:2]]

if option == "-run":
    try:
        data = open(datafile).read()
        coords = (" ").join([l for l in data.splitlines()])
    except FileNotFoundError:
        message = "Please run the command: 'run_click -set' first, to set the click position"
        subprocess.Popen(["zenity", "--info", "--text", message])
    else:
        cmd1 = "xdotool mousemove "+coords; cmd2 = "xdotool click 1"; cmd3 = "xdotool mousemove "+(" ").join(get_mousepos())
        for cmd in [cmd1, cmd2, cmd3]:
            subprocess.Popen(["/bin/bash", "-c", cmd])
            time.sleep(0.05)
elif option == "-set":
    open(datafile, "wt").write(("\n").join(get_mousepos()))


Distribution upgrade frozen at "flashplugin-installer: downloading http..."

I had the same issue and used "pstree -p" to find the hanging process for solution Nr. 2.

The relevant part was:

    +-gksu(1918)---sudo(2396)---precise(2397)---precise(2801)
    ¦                                         +-precise(2802)---dpkg(8231)---update-notifier(19401)---package-data-do(19403)
    ¦                                         ¦               +-{precise}(2804)
    ¦                                         +-sh(2772)---sleep(31266)
    ¦                                         +-{precise}(2399)
    ¦                                         +-{precise}(2400)
    ¦                                         +-{precise}(2803)

Killing 19403 ("package-data-do") made the process move forward again.


Possible Nvidia Geforce 755m driver problem - Ubuntu 14.10

nVidia Geforce 755m is a mobile chipset with nVidia Optimus technology. It is very well supported in Ubuntu.

I have had some issues using the generic Nouveau drivers. I faced similar issues as you(i used to get black screen and that used to log me out forcefully. I would then login and just pray to install the nvidia drivers before the blackout occurs again. I was too naive to press ctrl+alt+f1 and install the drivers from the terminal). So i installed the Nvidia proprietary drivers from Ubuntu Repository and that resolved the black screen issues.

Instead of downloading drivers from nvidia website you can do what i did. If you are on unity, go to unity dash and search for additional drivers. This will then list out the supported drivers for your card. You can then activate the proprietary and tested nvidia drivers. This should resolve your issue.

This would install a nVidia control panel from where you can switch between nVidia or intel chipset for graphics processing. There is also an ongoing Bumblebee Project which will allow you to dynamically switch between the chipsets. But this is a bit advanced tech for me. So i will leave it upto you to decide if you want to try out bumblebee or simply install the proprietary nVidia drivers.


Nvidia driver on Kubuntu 20.04 does not load X or Steam

Have you tried using sudo prime-select nvidia and rebooting (after installing the drivers)?
Also, after doing so, check the tab Additional Drivers in Software & Updates settings to see if the driver actually shows up as installed.


Processes in docker cannot connect with ufw enabled

I would suggest you utilize the --link option to link the DB container into the containers that need it. That way you can just use the name given as the connection host... (--name the DB container and use the given name)


Sound from headphones and speakers (in ubuntu 11.10)

I had no sound coming through my headphones until I switched the output to Analog Speakers. Now it's fine.


Software Center which comes bundled with ubuntu 16.04 is very buggy, and is better to avoid it as much as possible.

You can use Synaptic Package Manager instead which is miles ahead of the default one.

sudo apt-get install synaptic

Other than that, try sticking with the terminal for your basic software installation (just google ubuntu {desired software} ).

To update system, run

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


What does it do?

It will accept connections of that type. "Require" means you only connect to encrypted clients. "Allow" allows for both unencrypted and enforced encryption clients. "Disable" means encrypted connections are not accepted.

If so, what is the difference in enabling the option against not enabling it?

That setting is about CONNECTING with other clients that either have or have not enabled encrypting.

Would it be possible for a third party (ISP, public WiFi provider and so on) to discover what I'm downloading or seeding targeting me as a specific user or my specific internet access point and not, e.g., downloading or seeding a certain file to see what other IPs are doing the same

Yes. Mind the bold bit. An ISP can always see what your IP is, what site you linked to and what you clicked so it does not matter if you encrypt the download of the torrent. They should not do this unless there is an warrant for an investigation.

If I don't use encryption, would other users in my LAN or my ISP or other subjects (apart from seeder I download from) be able to discover what I'm downloading or seeding?

Yes. But that is also possible with encryption.


First you should create an installation media (DVD/USB). If there is one, you can use it.
Boot with this installation media and select install
Plug in the external HDD/USB to your computer.
Select "Something Else" option on What to do page.
Choose your external HDD/USB as the installating area (/ for mount point)
And also choose grub to install on this ext HDD not computer
HDD. (sdb, sdc, sdd or whatever it is from the dropdown menu). You should prefer the first partition on it to install Ubuntu.
The
information on the partition you select over external HDD will be
erased.
Continue and finish the installation to your ext media.
Select your new Ubuntu installed HDD/USB while booting from the list (F12 or your computers startup key to select boot device)


How to install virtualbox (Ubuntu Trusty Tahr )

That kernel is obsolete, it's not in the repository any more.

Try these:

uname -a

Please, append its output to the question.

Update the kernel

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install linux-generic

Reboot, check if kernel upgraded:

uname -a

Then see again with virtual box.


I want to install Ubuntu [Any version greater than or equal to 12.04] from my windows OS

There is an Even Simpler way Try WUBI ..
Assuming you are using Windows 7, you can follow the steps mentioned in this guide.

http://www.ubuntu.com/download/desktop/install-ubuntu-with-windows

Its actually quite simple.
1,this will automatically download the required ISO
2, create a temperoary folder inside windows partitions
3, add entry in bootloader and start ubuntu installation on its own.

Hope this helps.


Window sizes and positions after 19.04 upgrade

Turns out, it was a problem with Firefox and a setting to resist fingerprinting, a privacy setting. You can set width and height and still resist fingerprinting by reading this, https://www.reddit.com/r/firefox/comments/aopz79/resist_fingerprinting_window_size/


I believe the command should be

sudo -u postgres psql postgres

See https://help.ubuntu.com/community/PostgreSQL

If that does not work, tell us more about your configuration.


How can I install Ubuntu 13.10 alongside windows 8?

Its easy! All you gotta do is insert your ubuntu CD/USB and boot from it.

Then enter installation , fill in some credentials and when it comes to the stage of asking you where you want to install ubuntu ,

Choose "Install Ubuntu Alongside Windows 8.1"


What does it mean when `ls` shows a numeric user id?

1002 is the UID for the user that owned the file.  Having a numerical value instead of a username means that the user that owns the file no longer exists in the /etc/passwd file.

If you run cat /etc/passwd you'll see a list of all the user accounts on the system.

root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh

The first integer is the UID, or the user's unique numerical identification.  The second is the GUID, and this pertains to the user's primary group number.

Did you make any changes, or remove the user that owns the file from the system?


It sounds like the package is not installed correctly. Your best option is to go to the PPA maintainer and ask them to see if they will help you with the issue directly.

Consider that this is an experiment, and what you're doing is testing. There are bound to be problems and you should certainly report them to the elementary team:

https://help.ubuntu.com/community/ReportingBugs

https://launchpad.net/nautilus-elementary


Repeating **systemd[1]: Time has been changed** on syslog

This worked for me. Not sure if you are running your server on a Hyper-V VM though.
/var/log/syslog 'systemd[1]: Time has been changed' message every 5 seconds


#1698 - Access denied for user 'root'@'localhost' mysql -5.7 and ubuntu-16.04

This is because MySQL by default use local system account to login as user root. This is done with plugin “unix_socket” or it might possible that password has been changed.

To allow MySQL user root to login to PhpMyAdmin, run following commands in MySQL command prompt

use mysql;
UPDATE user SET plugin='mysql_native_password' WHERE User='root';
FLUSH PRIVILEGES;
exit;

see PhpMyAdmin


You could run the terminal, run xev which is in the x11-utils package. This will show you the window inside which you can click and test your mouse buttons and make sure the X server is indeed receiving those events which will be shown in the terminal window from which you started xev.


Error when installing chromium on ubuntu 20.10

try to install Chromium via flatpack:
sudo apt install flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

After this step ^ , may be you need to reboot your system
flatpak install flathub org.chromium.Chromium
flatpak run org.chromium.Chromium

P.S. also, this is the answer to your question about differences between ppa and snap :

Snaps are intended to be an upgrade over PPAs, which were themselves intended to be an upgrade over adding random repositories to your sources.list. PPAs are not very discoverable, and could adversely affect the rest of your system; snaps, being sandboxed and being listed in the default package manager, improve on those aspects. That sandboxing creates some other issues, like the slow startup time and needing to set permissions for access into and out of the sandbox, compared to traditional packages.


No, there is no existing command for this, but it is trivial to write one. Add these lines to your ~/.bashrc file (thanks to D. Ben Knoble for pointing out that the variable should be local):

function ncd(){
  local path=""
  for ((i=1;i<=$1;i++)); do
    path="../$path"
  done
  echo "Moving to $path" >&2
  cd "$path"
}

Save the file, open a new terminal, and you can now move N directories up using ncd N. For example:

$ pwd
/home/terdon/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9
$ ncd 5
Moving to ../../../../../
$ pwd
/home/terdon/dir1/dir2/dir3/dir4
$ ncd 2
Moving to ../../
$ pwd
/home/terdon/dir1/dir2


Try typing this at a terminal:

which gcc

If nothing comes back, then GCC is probably not in your path variable.  Type:

sudo updatedb
locate gcc

If nothing comes up, then there is no executable called gcc on your machine.  Reinstall GCC.

If you do get the location of an executable called gcc, such as /usr/bin/gcc, then add the directory to your path:

PATH=/usr/bin:$PATH

Obviously use what came back on your system.  See if that fixes things.  If it does, you can make the PATH change permanent by putting that line in your ~/.bashrc file.


dpkg is confused since I manually removed installation files for spotify with sudo rm recursive

Removing files, installed by a package is always a bad idea. Edit the file /var/lib/dpkg/info/spotify-client.postinst

sudo nano /var/lib/dpkg/info/spotify-client.postinst

and remove the line, if present

set -e

Save and close and run

sudo apt-get purge spotify-client

But as you say:

  by using the command "sudo dpkg -L spotify-client", as an example, to see where that spotify application installation files are scattered through the file system. So I decided I wanted to remove them manually

You can also remove the spotify-client installation and removal scripts in /var/lib/dpkg/info/. More you can't break.

sudo rm /var/lib/dpkg/info/spotify-client.*
sudo apt-get purge spotify-client
sudo apt-get install -f


Can't boot to windows after removing ubuntu

Test this:

Start up your computer with the USB or DVD Windows 8 recovery media in the system.

When the computer boots off the recovery media, pick the Troubleshoot option.

Then choose Advanced Options.

and head on over to the Command Prompt.

The computer should reboot and then ask you for the account.

Click your account to continue.

Then login to get started.

We’re going to use the built in partitioning tool called diskpart to confirm that:

We have all the right partitions
EFI partition is formatted correctly.

In the black screen that looks like a dark abyss, type:

diskpart

and enter this command:

sel disk 0

Now that the first disk is selected we need to view all the partitions

list vol

Verify that the EFI partition is using the FAT32 file system then select the volume and assign a drive letter to it.

Let’s say your EFI partition is on Volume 3, the next thing you would type is:

sel vol 3

Then assign an arbitrary drive letter to the parition. Let’s use v.

assign letter=v:

You should see a message saying: DiskPart successfully assigned the drive letter or mount point.

Exit the diskpart tool by typing:

exit

You should still be in the command prompt but outside of the DISKPART> prompt.

We need to repair the boot record. We can pull that off like so:

cd /d v:\EFI\Microsoft\Boot\

bootrec /fixboot

The CD command tells the command line interpreter to change the directory to the volume label that has the EFI boot record.

Then the bootrec /fixboot command attempts to repair the selected volume.

Now we need to recreate the Boot Configuration Data (BCD) store, so let’s backup the existing store first

Type:

ren BCD BCD.old

Now that we backed it up, let’s recreate the BCD store:

bcdboot c:\Windows /l en-us /s v: /f ALL

Now remove the recovery media and reboot and you should be all set.

Source: windows.microsoft.com/en-us/windows-8/system-recovery-overview


You should go to the console on the virtual machine while it is running and install the tools.

You can use 3rd-party vmware tools that are available in the Ubuntu repository (contrary to the VMware-provided packages that are not available in the main repo):

sudo apt-get update
sudo apt-get install open-vm-tools

For virtual machine that is a desktop installation you can also add some destkop-environment based tools:

sudo apt-get install open-vm-tools-desktop

But for server installation you should definitely drop this out.

EDIT:
Actually, there is a comprehensive tutorial that answers your question.  I hope nobody decides to remove this plot due to this...
VMware Tools community help


I have some bad news.

Firstly, you're also trying to install 16.60 which is not the newest version (although the latest won't help you either).

The log file mentions:

/var/lib/dkms/amdgpu-pro/16.60-379184/build/amd/amdgpu/../amdgpu/amdgpu.h:37:25: fatal error: linux/fence.h: No such file or directory

fence.h was renamed to dma-fence.h in linux 4.10 (if you click on version 4.9, you'll see fence.h exists and dma-fence.h does not).

Thus, if you try the latest version (17.10 at time of writing) on a kernel 4.9 or older it may work... but otherwise you'll have to wait for AMD to release an update with 4.10 support.


Failed to boot Window 7 after installing Ubuntu 12.04: invalid EFI file path

Is this a newer computer with UEFI (and BIOS)?

Many then have Windows in BIOS mode, but when booting Ubuntu the UEFI/BIOS may boot in either UEFI or BIOS mode and install in that mode.

Or a few Windows 7 systems were installed in UEFI mode and you installed Ubuntu in BIOS mode.

Either way, to dual boot from grub menu both systems have to be either UEFI or both BIOS.

Best to see details and Boot-Repair can convert a BIOS install of Ubuntu to UEFI or vice-versa. You cannot easily convert Windows from its current install.

Post the link to the BootInfo report that this creates. Is part of Boot-Repair:

https://help.ubuntu.com/community/Boot-Info

Boot Repair -Also handles LVM, GPT, separate /boot and UEFI dual boot.:

https://help.ubuntu.com/community/Boot-Repair

You can repair many boot issues with this or 'Create BootInfo' report (Other Options) & post the link it creates, so we can see your exact configuration and diagnose advanced problems.


if you install a new kernel and it complains about no space on /boot, simply purge the old kernel. no need to resize /boot. to do that, install purge-old-kernels command

sudo apt-get install byobu

then run sudo purge-old-kernels, this is going to clean up the old kernels.

also, if you really want to resize, left-shrink your swap space by 500MB or 1GB, that's more than sufficient to accommodate your /boot folder. This has very little impact to your system performance (if your swap is over 8GB - in face, 14GB is quite generous).


Some applications offer to open the just created file, but if not:

Assuming your temp directory is a "flat" directory (without .pdf files in subdirectories) does not contain thousands of files (since it is a temp directory), the small background script will do the job.

It keeps an eye on the directory and opens new .pdf files with your default application to open pdf files.

How to use:

Copy the script below into an empty file, save it as open_newpdf.py
In the head section of the script, set the path to your directory
Test run it from a terminal window, type the command:

python3 /path/to/open_newpdf.py

Create a new .pdf file in your directory, it should open within 3 seconds.
If all works fine, add it to your startup applications: Dash > Startup Applications > Add

The script

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

#--- set the absolute path to your directory below
dr = "/home/jacob/Bureaublad/test"
#---

ls1 = os.listdir(dr)
while True:
    time.sleep(3)
    ls2 = os.listdir(dr)
    for item in ls2:
        if all([not item in ls1, item.endswith(".pdf")]):
            subprocess.Popen(["xdg-open", dr+"/"+item])
    ls1 = ls2


Sound doesn't work on a Dell Vostro 3400, shows up as unclaimed

It seems that your kernel does not recognise your soundcard

Try the following command and reboot

sudo apt-get install linux-backports-modules-generic

Sources : http://ubuntuforums.org/archive/index.php/t-763241.html


If your script runs as "yourUser", you could create a simple file:

  sudo visudo -f /etc/sudoers.d/myOverrides

with this directive:

  yourUser ALL = NOPASSWD:/usr/bin/apt-get

You can find an useful explanation here.


How do I create an iso from a mounted hdd in a live linux?

Your commands are not working because you are trying to create a file or folder in a block-device. A block-device is a special file, you cannot create a file or folder in it, it's not a directory. /dev/sdb is a block-device:

~$ ls -l /dev/sdb
brw-rw---- 1 root disk 8, 16 Aug  8 10:11 /dev/sdb

Look at the first letter of the permissions, it's b for block-device, not d for directory.

If you would run sudo cat /dev/sdf2 > /dev/sdb, that would work, but would relentless destroy any file-system that's already stored on that drive, you don't want to do that.

Instead, when booted into the live system, mount the partition where you want to store the output-file:

sudo mount /dev/sdbx /mnt

and then use

sudo cat /dev/sdf2 > /mnt/path/to/folder/filename/of/your/choice


RVM is not showing up except when I log in remotely

While I don't know why it's doing this, I know how to fix it:

This is a path issue. You need to add the following to the files /etc/bash.bashrc and ~/.bashrc:

PATH=$PATH:PATH=$PATH:/usr/local/rvm/bin

You'll need to use 'sudo' privileges in order to do that for /etc/bash.bashrc, it's a protected file.

Also, you should report this bug (since I'm pretty sure that's what it is) here on RVM's Github project.


To summarise the conclusion of that thread, you should begin by making a full backup.  Then, once you are sure your backup is secure, you can delete everything except the wallet.dat file in the ~/.bitcoin folder.  This will cause BitCoin to re-download the block chain and restore the local block database.  Don't panic if it initially shows a zero balance after restarting--it won't show your correct balance until it's downloaded the relevant blocks.

On a side note, this is also the safest way to perform an upgrade to a new version of the BitCoin software--backup everything, then delete everything except the wallet.dat file.  When you run the new version of bitcoin, your balance will appear once it finishes downloading the blockchain.

Don't forget to head over to the BitCoin StackExchange proposal to lend your support and vote on sample questions!  It would be great to have a single place for BitCoin Q&A across multiple platforms and scenarios.


How to add button to Nautilus toolbar in Ubuntu 12.04?

11.04 used Gnome 2, so it was a different Nautilus version at all.

To add anything to the UI you need to get the source code and, add what you want, of course this means getting to know GTK.


Software index is broken; the culprit seem to be Adobe flashplugin

There is a procedure in the Ubuntu documentation that will clear your "status" of dpkg, which is a low-level installer used by apt and apt-get. It may take a while, and while it is deleting things if you look at the commands, it is only deleting semi-temporary files that will soon be recreated if not unnecessary. It will not touch your personal files(home folder) or remove any programs. If the last command fails, try

LANG=C;sudo apt-get update && sudo apt-get dist-upgrade

in place of it.


In the Ubuntu Software Center there are four packages for German: aspell-de, hunspell-de-de (core version), hunspell-de-de-frami (enhanced version) and myspell-de-de . These are the "standard" packages which have Germany as the locale. The hunspell-de-de-frami package (~230,000 words) contains a enhanced version with some words missing in the base dictionary or not (yet) belonging to the "core" German words (~74,000 words). myspell-de-de is particularly useful because the myspell spellchecker is currently used within the Mozilla spellchecker, so it can be used for spellchecking in Firefox.


What is the difference between Ubuntu.Components and QtQuick?

QtQuick and Ubuntu.Components are two different namespaces and importing them gives access to several standards components such as Rectangle for QtQuick or UbuntuShape for Ubuntu.Components.
You always have to specify the version to import as several may have been installed on your system such as QtWebKit.experimental 1.0 and QtWebKit 3.0.

Note that Ubuntu.Components require QtQuick 2.0 not 1.x
To know their versions, one possible way is to look at their qmldir file.
The list of object types provided by both is too long to be listed here, so please visit the following links for a full reference:

QtQuick: http://qt-project.org/doc/qt-5/qtquick-qmltypereference.html
Ubuntu.Components: http://developer.ubuntu.com/api/qml/sdk-14.04/Ubuntu.Components/


Trouble installing iTunes and reading USB DVD Drive on Ubuntu

iTunes can't be installed on Ubuntu.Try using some other music player such as RhythmBox or Amarock to manage the music on your iPhone.


Trouble installing Clang and LLVM - no uint64_t definition

I had the same problem and it was solved by installing a newer version of gcc, which is basically an answer in this thread: How do I use the latest GCC on Ubuntu?

I guess a newer version of Ubuntu (15) automatically solves this problem because the default gcc there is 4.9 already.


(This message should be a comment.)

This is related with your nVidia graphic card. "nouveau" is its driver. Apparently something is wrong with it. You may refer to your /var/log/Xorg.0.log to get more information.


Add menu item to the Ubuntu Gear menu in 13.10 saucy

There is no API to add arbitrary items to the session indicator (the gear/power icon on the right most position of the top panel).

If you wish to add an indicator for your application, you can use the Application indicators APIs, to do so.


When you get at the page asking you if you want to install Ubuntu alongside an other OS, you should check the Something Else option in order to enter the GParted tool. That way you can see what's going on with your disk.


How to update kdenlive(snap) 20.04 to 20.08

As you can see in this link to the snapstore, kdenlive has not been updated to 20.04 yet (as of 18.08.20), so there's nothing you can do. However, it will certainly be updated within a few days.
If you really need kdenlive 20.08 right now, you can either use the appimage, or the PPA (which is only available for Ubuntu 20.04).


You can  install the Vivaldi web browser from its repository so it can be updated with apt-get commands

echo "echo deb http://repo.vivaldi.com/stable/deb/ stable main > /etc/apt/sources.list.d/vivaldi.list" | sudo sh
curl http://repo.vivaldi.com/stable/linux_signing_key.pub | sudo apt-key add -
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1397BC53640DB551
sudo apt-get update
sudo apt-get install vivaldi-stable


Start application (GUI) upon mount of any USB devices

(Old answer, new answer further below)

Run a script or command to run whenever a usb drive gets connected

If, for whatever reasons, you do not want to use udev rules or anything more complicated, then use the script below.

Simply running the script, with your command to run as argument, will do the job.

The script:

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

cmd = " ".join(sys.argv[1:])

def get_mountedlist():
    return [(item.split()[0].replace("├─", "").replace("└─", ""),
             item[item.find("/"):]) for item in subprocess.check_output(
            ["/bin/bash", "-c", "lsblk"]).decode("utf-8").split("\n") if "/" in item]

def identify(disk):
    command = "find /dev/disk -ls | grep /"+disk
    return "usb" in subprocess.check_output(["/bin/bash", "-c", command]).decode("utf-8")

mounted1 = get_mountedlist()
while True:
    time.sleep(4)
    mounted2 = get_mountedlist()
    if [d for d in mounted2 if all([not d in mounted1, d != "/", identify(d[0]) == True])]:
        subprocess.Popen(["/bin/bash", "-c", cmd])
    mounted1 = mounted2

To use

Copy the script into an empty file, save it as run_usbactions.py
Test- run the script by (e.g.) the command:

python3 /path/to/run_usbactions.py <command_to_run> <optional_args>

In my test, I used e.g.:

python3 /path/to/run_usbactions.py gedit file

to open file with gedit once a usb drive is connected.
If all works fine, add it to Startup Applications: Dash > Startup Applications > Add. Add the command:

python3 /path/to/run_usbactions.py <command_to_run> <optional_args>

Explanation

Once per four seconds, in the function get_mountedlist(), the script reads the output of lsblk.
In case additional partitions or devices are mounted, the output of (e.g.) the command:

find /dev/disk -ls | grep sdc1

will include the string usb, and identify the mounted drive as a usb drive.
Looking at it now, I very well could replace it by a more "pythonic" way of doing it, instead of a system call, but since I copied it from an older script, I didn't (yet).
subsequently, if the new drive is a usb, the command (+ possible args), as set in " ".join(sys.argv[1:]) is run.

EDIT

(December 29, 2017)

Using pyudev

Since I "met" pyudev, I thought I should share the major simplification and clearer operation it brings. A simple script to perform any action on inserting a usb device then becomes:

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

cmd = " ".join(sys.argv[1:])

monitor = pyudev.Monitor.from_netlink(pyudev.Context())
monitor.filter_by('block')

for device in iter(monitor.poll, None):
    if all([
        device['ACTION'] == "add", 'ID_FS_TYPE' in device,
        device['ID_USB_DRIVER'] == "usb-storage",
        ]):
        print("added", device.get('ID_FS_LABEL'))
        subprocess.Popen(["/bin/bash", "-c", cmd])

Usage

Make sure pyudev is installed:

sudo apt install python3-pyudev

Further instructions are exactly similar.


Why does running the "find" command a second time complete quicker than the first time?

The link provided by Rinzwind titled Why is [find] running incredible fast, if run twice? and What is “cached” in the top command? cover the same issue.

Essentially, if free RAM is available, the kernel can use part of it to cache information. The memory used in this way can be made available to applications on demand.

Linux ate my RAM explains terms such as  available, buffer, free, and used. It also provides the following command to clear "most of the disk cache":

echo 3 | sudo tee /proc/sys/vm/drop_caches

To confirm that find is quicker the second time around, I ran time find ~ for the first time:

real    0m10.765s
user    0m0.395s
sys     0m1.169s

And a second time to see the beneficial effect of memory caching:

real    0m1.119s
user    0m0.196s
sys     0m0.476s

Then I cleared cache with echo 3 | sudo tee /proc/sys/vm/drop_caches and ran time find ~ again. Sure enough, the time was high again:

real    0m19.198s
user    0m0.457s
sys     0m1.425s

But, because of fresh caching, a run of find subsequently and expectedly, showed an improved time:

real    0m1.100s
user    0m0.199s
sys     0m0.484s

While reading about cache, I came across Caching/preloading files on Linux into RAM and a couple of answers suggested vmtouch - the Virtual Memory Toucher: it is described as a "Portable file system cache diagnostics and control" and is in the repos for Bionic and later.


This looks like you have the binary for the wrong arm architecture. If you run the file command on the binary you should see something like this for aarch64:

# file /usr/bin/cloudflared
/usr/bin/cloudflared: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux-aarch64.so.1,
BuildID[sha1]=da09ab5a10be675f43fde2ce9aecf7cd2bab6d5c, for GNU/Linux 3.7.0,
stripped


if you want to do this out of initramfs:

fsck.ext3 /dev/sda1


Because Apache uses the www-data user, anything that can be accessed by www-data (and is in the web root directory) can be accessed by anyone connecting to your server with a web browser. Think of it as if the visitors to your site ARE the www-data user.

The easiest way to fix the issue you are having is to simply move the files you want only PHP to access outside the web root directory. For example, let's say your web root is "/var/www/", and you want to put your files in "/data". Put your PHP script in the "/var/www/" directory, then access the files in the script using absolute names:

<?php
// Load the contents of the file at "/data/test.txt" into the $data variable.
$data = file_get_contents("/data/test.txt");


Compiz is a compositing engine. It was designed to add compositing capabilities to window managers that run on top of X.

Mir has a compositing engine built in.

The two would be contradictory, so you cannot use Compiz on top of Mir.


Pendrive not detected in Ubuntu 16.04 but it is showing in disk

Okey, first reboot the computer. This solves some problems even though it seems unlikely in this case.

After finishing the reboot, open GParted and try to see if the drive (and the volume contained within) are visible.

Now, select your drive in GParted, and choose the partition that should appear. Right-click on that partition and go to the "Format To..." option. From there, select the type of filesystem that you'd like to format the drive to. I'd recommend you use FAT32, but the choice is yours. Then, click the Confirm button in the top menu.

After some time, your drive should have successfully formatted and you will be able to see the volume mount on Ubuntu.

If you want to avoid data loss, try to see if the drive is recognizable from another machine. If it is, copy any data over that you'd like to save and format from that machine.

Command Line Method

First try to see your volumes by writing

fdisk -l

This will show your volumes. When you see /dev/sdb (and its partition sdb1), run the following commands to format your drive

umount /dev/sdb1
mkfs.vfat -n 'pendrive-name' -I /dev/sdb1

After that you may eject the drive with

sudo eject /dev/sdb

Then, unplug and replug the device. Ubuntu should detect the drive and allow you to mount it.


Regarding Enable & Diasable of Dual Boot Option?

Open /etc/default/grub in your favorite text editor (I'm using nano here):

sudo nano /etc/default/grub

Find the line that says:

GRUB_TIMEOUT=<some number here, eg: 10>

and change it to:

GRUB_TIMEOUT=1

This will show the menu, but for just a second and after that it will boot the default entry. If it is set to 0, still you will see it for 10 seconds as a security measure. So put 1 there.

Press Ctrl+O and Enter to save the changes to your file and hit Ctrl+X to Exit. Then run:

sudo update-grub

Hint: Take a copy of your Grub before editing


samba not starting from systemctl: timeout

I ran into this when trying to get different types of machines running the latest version of Samba for time machine use as well.

One solution is to change the Type=notify to Type=simple. There is something about the new versions of Samba not playing nice with the way systemd handles process communication.

-Type=notify
+Type=simple

Then run systemctl daemon-reload and try to start er up again.


You could check whether the keyboard settings of the login are correct. You could also type the password once in the user name field to see whether the password looks like what you think it should look like. You could also test with or without caps.


Your hardware seems powerful enough. Mine was less powerful (Core2 Duo E8400 @ 3 GHz, GeForce GT 8800) and still ran quite well and responsive (outside of the few occasions in which I wanted to crunch some numbers, compile large pieces of software, or play modern video games).

If the open source Radeon driver aren't enough for you (e. g. for modern 3D video games), you should give the closed source driver from AMD another try. Start with What is the correct way to install proprietary ATI Catalyst Video Drivers (fglrx) directly from AMD? and post a new question, if you run into issues.

As for the restricted main memory there are two possibilities:

You're on a 32-bit installation, but you'd be better off with a 64-bit one. The latter would make full use of your main memory and run (especially) arithmetic operations a little faster.

You can check with uname -m. i386 mean 32-bit, x86_64 means 64-bit. If you decide to re-install Ubuntu, you can even continue to use your old settings, if you don't format the target file system in the process.
Your integrated graphics adapter uses some of the main memory as graphics memory. If you have an integrated and a dedicated graphics adapter, you may want to disable the integrated one to release the memory, if you don't care about the higher power consumption.


Desktop crash on screen timeout with 16.04

I have the same problem, and moreover, after a reboot the user profile seems to be corrupted: I can still log in, but I just see the background with no unity launcher. The guest login does still work, though.
Please let me know if you want me to add log information here - I checked /var/log/syslog, but it contains only entries from today. I've currently resolved the problem by not letting the laptop go in standby mode.


Why do some people need low-contrast themes?

I have had to install a (Windows) PC for somebody who needed low contrast themes in a previous job.  This woman could only see "light" and no colours, and had low vision in general.  (I think she said she had no cone cells or something like that, but it's been 2 years).  She used a low contrast theme in Windows that used 2 shades of blue.

She described looking at a screen with high contrast (e.g. black on white or white on black text) as "looking straight into a spotlight and trying to see/read something that's written on it".

At least one other almost blind person told me it was the same or similar for him (but his eyesight is so bad now that he does everything with a braille reader & TTS anyway—he also uses the console most of the time).

BTW: I think it's possible to use compiz filters to show "low contrast" & "high contrast" versions of a normal display, but I don't know how well that works in practice?


failed to install phablet-tools on 12.04

First things first, try

sudo apt-get update
sudo apt-get install -f

then try to install again. If this fails lets try something else. The first will update the software database and the second will try to fix any broken dependencies.

If this fails you can try to install by force

sudo apt-get download phablet-tools
sudo dpkg -i <filename of package>

The file should be in the same folder you are working.

However I wouldn't recommend using the tools on a broken system, I can't tell what can happen to the devices you manage with it.

If nothing else, I am always open to re-install my entire system. No broken dependencies, no issues. Always have a partition to keep the data I need and an external hard-drive.


No flatpak updates in Ubuntu Software, but I see them in terminal

I found that my Software app stopped showing flatpak updates once I moved from the Ubuntu repository version of flatpak to the PPA version from ppa:alexlarsson/flatpak.
Maybe the integration is limited to the version provided by to official Ubuntu repositories?


Well, it's rather the other way around.

That program just reads the informations from the text files in your /var/log directory...

Just look directly at those files and there you are! :)


Can't enter UEFI/Bios, Ubuntu loading directly

On start up press f8. Grub will appear then. You can choose system settings or advanced setting (I forget  the menu name). You will enter uefi bios from there.


It has to be enabled in debian/rules. If the package uses dh, there is a line like this in debian/rules:

dh $@

Change that to

dh $@ --parallel

Then your commands will work, at least DEB_BUILD_OPTIONS="parallel=4"


Answered thanks to @JacobVlijm .
To run a chrome app from command-line, use the following :
google-chrome --app-id=[app_id]

Assuming the path of google-chrome is /opt/google/chrome/google-chrome.
To retrieve the app id, search the first occurrence of the application name in /home/$USER/.local/share/applications .


The command df -h shows disk free and used space for every mount in human readable sizes.

The command du -sh /* | sort -n -r will show how much space is used by every top level directory.


Assuming you are using a recent version of Ubuntu,
you can use systemctl to get a broad overview or list of error messages.
For example:

$ systemctl status cron.service
● cron.service - Regular background program processing daemon
   Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2019-07-09 07:50:56 CDT; 6 days ago
     Docs: man:cron(8)
 Main PID: 884 (cron)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/cron.service
           └─884 /usr/sbin/cron -f

Jul 15 09:25:01 opal CRON[20797]: pam_unix(cron:session): session opened for user root by (uid=0)
Jul 15 09:25:01 opal CRON[20798]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jul 15 09:25:01 opal CRON[20797]: pam_unix(cron:session): session closed for user root
Jul 15 09:35:01 opal CRON[21319]: pam_unix(cron:session): session opened for user root by (uid=0)
Jul 15 09:35:01 opal CRON[21319]: pam_unix(cron:session): session closed for user root
Jul 15 09:39:01 opal CRON[21517]: pam_unix(cron:session): session opened for user root by (uid=0)
Jul 15 09:39:01 opal CRON[21518]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Jul 15 09:39:01 opal CRON[21517]: pam_unix(cron:session): session closed for user root
Jul 15 09:45:01 opal CRON[21982]: pam_unix(cron:session): session opened for user root by (uid=0)
Jul 15 09:45:01 opal CRON[21982]: pam_unix(cron:session): session closed for user root

Next, you could run strace on individual processes.
For example:

$ pgrep -x cron
884
$ sudo strace -p 884
strace: Process 884 attached
restart_syscall(<... resuming interrupted nanosleep ...>^Cstrace: Process 884 detached
 <detached ...>

Here I've used Ctrl-C to detach once I've seen enough.
You can also pipe the output to less.

$ sudo strace -p 884 2>&1 | less -c

In my case, the cron daemon is idle, so it is running the nanosleep syscall.
To see just a summary of what syscalls are using CPU, use the -c flag:

$ sudo strace -c -p 884
strace: Process 884 attached
^Cstrace: Process 884 detached
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 61.11    0.000253         253         1           clone
 16.18    0.000067          34         2         1 wait4
  9.66    0.000040           3        12           stat
  6.28    0.000026          26         1           restart_syscall
  5.80    0.000024          24         1         1 nanosleep
  0.97    0.000004           4         1         1 rt_sigreturn
------ ----------- ----------- --------- --------- ----------------
100.00    0.000414                    18         3 total

You could also use gdb to get a backtrace.

$ sudo apt install cron-dbgsym
$ sudo gdb -p 884
(gdb) backtrace
#0  0x00007f84cdf399a4 in __GI___nanosleep (requested_time=0x7ffdcdd18d10, remaining=0x7ffdcdd18d10)
    at ../sysdeps/unix/sysv/linux/nanosleep.c:28
#1  0x00007f84cdf398aa in __sleep (seconds=0) at ../sysdeps/posix/sleep.c:55
#2  0x000055af6a6206ab in cron_sleep (target=<optimized out>) at cron.c:415
#3  main (argc=<optimized out>, argv=<optimized out>) at cron.c:173

This again tells me it is sleeping while idle,
but yours may be more informative.

I would also recommend you
alter cron.service
to limit the CPU and I/O priority:

$ sudo systemctl edit cron.service
# edits go to /etc/systemd/system/cron.service.d/override.conf

I use something like this:

[Service]
Nice=19
CPUSchedulingPolicy=idle
IOSchedulingClass=idle


How to split an mp3 file by detecting silent parts?

You will likely not get a ready-to-go solution but will need to create a script yourself.
pydub is made for this (it uses ffmpeg or libav internally) and it has a functions called split_on_silence() with some settings like keep_silence=100.
Some references from stackoverflow that have examples: 37725416 and 45526996
And from the creator of pydub.
From the 1st link the interesting part:
# Load your audio.
song = AudioSegment.from_mp3("your_audio.mp3")

chunks = split_on_silence (
   # Use the loaded audio.
   song,
   # Specify that a silent chunk must be at least 2 seconds or 2000 ms long.
   min_silence_len = 2000,
   # Consider a chunk silent if it's quieter than -16 dBFS.
   # (You may want to adjust this parameter.)
   silence_thresh = -16
)


What has changed between 14.04 and 16.04 regarding fstab mount order?

"One option is to postpone mounting until after /etc/fstab has completed, this gives you full control over the mount order."
How can I specify the order in which filesystems are automatically mounted?


What are the standard setting for swapiness etc? Constant crashing currently

swap
Your /swapfile may be too small. Let's change it from 2G to 4G and see if that helps...
Note: Incorrect use of the dd command can cause data loss. Suggest copy/paste.
In the terminal...
sudo swapoff -a           # turn off swap
sudo rm -i /swapfile      # remove old /swapfile

sudo dd if=/dev/zero of=/swapfile bs=1M count=4096

sudo chmod 600 /swapfile  # set proper file protections
sudo mkswap /swapfile     # init /swapfile
sudo swapon /swapfile     # turn on swap
free -h                   # confirm 16G RAM and 4G swap

Edit /etc/fstab, using sudo -H gedit /etc/fstab or sudo pico /etc/fstab.
Confirm this /swapfile line in /etc/fstab... and confirm no other “swap” lines... use SPACES in this line... confirm NO TABS...
/swapfile  none  swap  sw  0  0

reboot                    # reboot and verify operation

memtest
Go to https://www.memtest86.com/ and download/run their free memtest to test your memory. Get at least one complete pass of all the 4/4 tests to confirm good memory. This may take many hours to complete.
Note: vm.swappiness=10 may be too low (60 is default), and 13G RAM is an odd amount. Let's review sudo lshw -C memory. We may modify vm.swappiness later.
Update #1:
Memory
Your memory may be installed incorrectly, and/or you may have a defective DIMM, as you have two 8G DIMMS, but only show 13G RAM, and both DIMMS show up in DIMM1 memory slots.
Note: AMD Ryzen processors are notorious for RAM compatibility issues.
Review the User Manual for your PC/motherboard, and confirm that you have the memory installed into the correct slots for memory interleaving. Re-seat the DIMMS if possible.
Update #2:
BIOS
Gigabyte A320M-S2H
Rev 1 https://www.gigabyte.com/us/Motherboard/GA-A320M-S2H-rev-1x#kf
Rev 2 https://www.gigabyte.com/us/Motherboard/GA-A320M-S2H-rev-20#kf
Rev 3 https://www.gigabyte.com/us/Motherboard/GA-A320M-S2H-rev-3x#kf
You have BIOS version: F51c dated: 07/02/2020. There's a newer BIOS available, based on which revision motherboard you have. See above links.


Force Unity to open any file with any program

It should still work.  Unity only highlights the application that it knows can open that file but it should still open if dragged on a non-highlighted app.
I have just tested this with the latest version of Ubuntu.


Two VMs on my Ubuntu server cannot be pinged

You need to choose proper networking mode for your VMs' network interface. Either choose bridged mode which will allow you to ping host and go to the internet, or host-only network (private network) which won't let you browse the internet but will allow you to reach the host.
Do not choose NAT (which I suspect is your current mode).


Defaulting internet requests to wlan0 when also connected to eth0

Your eth0 interface is probably controlled by NetworkManager, which shuts the connection down once it has something it deems better suited for getting online.

You could create a static configuration for eth0 in /etc/network/interfaces. I.e. insert some lines like this:

auto eth0
iface eth0 inet static
        address 192.168.1.1
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255

This should tell NetworkManager to leave the interface alone. Enable routing by invoking echo 1 |sudo tee /proc/sys/net/ipv4/ip_forward. And make sure your DHCP server announces 192.168.1.1 as the gateway (in this example).


Ubuntu Server 14.04 web server not gathering data from mysql server

Solution:
I actually got it to work, and i found out that it mcrypt was causing all the problems, not mysql as i first thought. This is how i managed to solve it: Mcrypt extension is missing in 14.04 server for mysql
Thanks for helping me out! :)


I would try running this in from the vim terminal while the offending file is opening

:set fileencodings=ucs-bom,utf-8,sjis

and if that doesn't work, you should be able to find what you need here Vim User Manual Language Encoding

What happens if you run vim from the terminal and not gvim?


Why when I try to change user I obtain this error message? "myusername is not in the sudoers file"

If you don't administer the server, ask your sysadmins to add you to sudoers. Or ask them to perform the administrative task for you.

(On behalf of sysadmins everywhere, please be sure to specify exactly what privileges you need, why you need them, and the authorization you have for them.)