Juju itself doesn't care. It is up to the charms that you deploy to handle the situation, or not. So this isn't really treated as a problem at all; it's merely a difference between what Juju supports, what charms typically support, and accepted best practice.

I don't think this answer is specific to the manual provider. It applies to all providers.

Most charms assume that they "own" the machine (or container) that they are deployed to, and in the past this was the only way to deploy them.

This isolation makes charms easier to develop and test. It eliminates the need for charm developers to worry about sharing resources with other charms. A modular deployment makes it easier to manage complexity. By limiting interactions between charms to Juju relations, they can remain clean and well understood. Charm authors do not have to worry about making "system"-level changes that might adversely impact other charms; it is up to the containerization to handle this correctly. This eliminates a whole class of charm bugs where one charm adversely affects another.

So, in practice, charms should be deployed to their own containers at a minimum, unless they are specifically designed to work together. Conflicts that arise when two charms are deployed to the same machine without putting them in containers will generally not be treated as bugs.

This shouldn't affect much. LXC is lightweight.

None of this stops you writing your own charms, or modifying existing charms, to permit them to be deployed to the same machine or container. Juju will permit it, but it is then up to the charms to ensure that they don't conflict.

  Is it a Juju design flaw or temporary solution?

No - it's not really a Juju thing at all; it's the chosen best practice amongst charm authors, and relates to decisions made about what deployment configurations charms should and should not support.

There are some edge cases where it is useful, and not difficult to support (eg. the Juju GUI running on the bootstrap node), so Juju permits it. I believe that there are no plans for Juju's support to change.


lxterminal does not show output until mouse/keyboard command

I believe this has to do with a setting in the Openbox Configuration Manager. Go to preferences > Openbox Configuration Manager > Mouse, and uncheck the box that says focus windows. You may have to reboot for it to take effect.


As steeldriver suggest, this works:

# adduser admin --ingroup sudo


I had exactly the same issue and fixed it right now. You'll want to install oauth2client for python2. The pip process for python2 is called pip2. You can verify that:

$ which pip2
/usr/bin/pip2

Under which case

$pip2 install --upgrade oauth2client

fixes that component.


How to enable hostname resolution (dns) for lxd containers from the lxd host?

LXD sets up for you a DHCP & DNS server (dnsmasq) that only listens on the lxdbr0 interface. That's the DHCP server that lets containers have hostnames like c1.lxd, mycontainer.lxd and so on.
And it works only within the containers, because the containers are autoconfigured with that LXD's DNS server.

If you want the host to understand those c1.lxd, mycontainer.lxd hostnames, you need to configure your host's DNS client service to also consult LXD's DNS server.


Locking down Systems in a Computer Lab School for Orphans

Delete or alter system files
Alter the system settings
Add or remove applications

To do any of these you need the sudo password. So after installing your system you have your own account and start creating normal users. Do not tell them the sudo password and they can not alter these. All they can do is change values in their own home.

If you want total control install ACL

(wiki: access control list)

guest login takes care of these too. Logging in as a guest will lock down anything important. But I think you would not want this if you want to track who was responsible for altering something. guest will make everything show up as altered by guest. I would set up useraccont instead so you could see based on user if someone created something.

Exceed a time limit (like an Internet Cafe)

My favourite method would be a cron script that checks uptime and shuts down after reaching a threshold. Command for shutdown after 120 minutes:

sudo shutdown -h 120

If you put that in a script and put it into cron with crontab -e it would kill the machine after 2 hours.

Mind you... you will get into trouble with your users if this happens when they have some unsaved content or a website open they wanted to bookmark before the system quits.


If you install a package from a staging-repository you have to expect bugs (which programs simply have before they're released as stable versions) and you're encouraged to report this issue at the GNOME bug tracker. More infos in How to file a bug on GNOME's bugzilla?. You'll have to wait until it's fixed, a developer suggest a workaround or use a stable version.


First of all , this is possible to do.

core always dumped because of your wrong configuration (i recommend to use i386 ).
simply delete these configuration folders :

rm -rf ~/.config/ubuntu-sdk/

rm -rf ~/.config/Qtproject/

then restart ubuntu-sdk

Finally relax and you're welcome.


How do I install gnome-shell-extensions package in Ubuntu Quantal

Hi look at this page , its having gnome-extensions package for Ubuntu 12.10 .


How can I disable quick search in unity file explorer?

The issue is resolved in 14.04; wait for its release.


How can I setup a VPN server that will work with Android's built in VPN client?

You might check into an L2TP server. I found some additional steps beyond what was given in that link:

After setting /etc/ipsec.secrets, run the following commands (one per line):

iptables --table nat --append POSTROUTING --jump MASQUERADE
echo "net.ipv4.ip_forward = 1" |  tee -a /etc/sysctl.conf
echo "net.ipv4.conf.all.accept_redirects = 0" |  tee -a /etc/sysctl.conf
echo "net.ipv4.conf.all.send_redirects = 0" |  tee -a /etc/sysctl.conf
for vpn in /proc/sys/net/ipv4/conf/*; do echo 0 > $vpn/accept_redirects; echo 0 > $vpn/send_redirects; done
sysctl -p

Copy to /etc/rc.local before 'exit 0':

for vpn in /proc/sys/net/ipv4/conf/*; do echo 0 > $vpn/accept_redirects; echo 0 > $vpn/send_redirects; done
iptables --table nat --append POSTROUTING --jump MASQUERADE

Hang onto the pre-shared key you entered into /etc/ipsec.secrets - that's the one you'll need to enter into the VPN setup.

NB I haven't tried this on my Nexus tablet - connecting from home to home doesn't work well...but it works just fine on my iPhone and the instructions on that page have a set for Android, so I assume it should work.


To get the behavior you want you need to do a few things in addition to stopping the pop-up delay:

Install CCSM if not installed already. apt-get install compizconfig-settings-manager from the terminal or search for "Advanced Desktop Effects Settings (CCSM)" in the Ubuntu Software Center.

Select the System Settings option in the power button menu (top right corner) and launch CCSM from there.

For Ubuntu 13.04 (Ringtail)
This may also work with > 12.10; unfortunately Unity changes significantly between versions.

Select the 'Ubuntu Unity Plugin' in 'Desktop'.

Under the 'Switcher' tab un-tick 'Show live previews of windows in the switcher'.

I'm not sure the popup delay exists in 13.04; I don't seem to notice any on my machine at least.

This section also allows you to swap the bindings of the switcher for all viewports and the viewport switcher.

For Ubuntu < 12.04

Select the Static Application Switcher in 'Window Management'.

Under the 'appearance' tab check 'icon' and 'show icon only'

And as @fossfreedom said, you can get rid of the .2 second delay "feature" under the 'behavior' tab by reducing 'popup window delay' to 0.

If you don't want them in rows you can switch to the 'application switcher' and change the settings similarly. Just make sure you do this by de-selecting the 'static application switcher' first, or else you'll get binding conflicts.


Opening files in Nautilus with the Space key, how to disable?

Unfortunately, no it isn't possible to disable this shortcut. This is unlikely to change, see bug 606403.

A way around this would be to use Nautilus-Elementary which doesn't use Space by default.


Use Linpack! Run xlinpack_xeon64 in the /benchmarks/linpack directory of this archive!


How can I make a script that opens terminal windows and executes commands in them?

gnome-terminal -- command
or
xterm -e command
or
konsole -e command
Pretty much
terminal -e command
To make the terminal stay when the command exits:
In konsole there is a --noclose flag.
In xterm, there is a -hold flag.
In gnome-terminal, go to Edit -> Profile Preferences -> Title. Click the Command tab. Select Hold the terminal from the drop-down menu labelled When command exits. You should create a new profile for that and execute with
gnome-terminal --window-with-profile=NAMEOFTHEPROFILE -e command


Software installation, no package after succefull sudo make install

The configure–make–make install procedure does not create a Debian package (*.deb) which can be managed by APT.
The result of the configure–make–make install procedure are files installed to /usr/local. When you call which cmake on your machine now, you should get /usr/local/bin/cmake as opposed to /usr/bin/cmake installed by APT. And if you run cmake --version (with the default contents of the PATH environment variable), you should get the version number of your self-compiled version. If your version is working correctly, you can even uninstall the packaged version (apt remove) and continue using your version.
If you want to create a Debian package, there are various guides, you can also check How to create a .deb package from compiled source files? for an automated solution.


.menubar .menuitem {
background-color: inherit;
backround-image: none}
would fix the problem i think


upgrade error : illegal package name `doc-base/noawait'

Try this code:

#!/bin/bash

OLDCONF=$(dpkg -l|grep "^rc"|awk '{print $2}')
CURKERNEL=$(uname -r|sed 's/-*[a-z]//g'|sed 's/-386//g')
LINUXPKG="linux-(image|headers|ubuntu-modules|restricted-modules)"
METALINUXPKG="linux-(image|headers|restricted-modules)-(generic|i386|server|common|rt|xen)"
OLDKERNELS=$(dpkg -l|awk '{print $2}'|grep -E $LINUXPKG |grep -vE $METALINUXPKG|grep -v $CURKERNEL)
YELLOW="\033[1;33m"
RED="\033[0;31m"
ENDCOLOR="\033[0m"

if [ $USER != root ]; then
  echo -e $RED"Error: must be root"
  echo -e $YELLOW"Exiting..."$ENDCOLOR
  exit 0
fi
clear
echo -e $YELLOW"Cleaning apt cache..."$ENDCOLOR
aptitude clean

echo -e $YELLOW"Removing old config files..."$ENDCOLOR
sudo aptitude purge $OLDCONF
clear
echo -e $YELLOW"Removing old kernels..."$ENDCOLOR
sudo aptitude purge $OLDKERNELS

echo -e $YELLOW"Emptying the trash..."$ENDCOLOR
rm -rf /home/*/.local/share/Trash/*/** &> /dev/null
rm -rf /root/.local/share/Trash/*/** &> /dev/null

Save it as troubleshooter.sh.
Then, use these commands:

chmod 700 troubleshooter.sh
sudo ./troubleshooter.sh

Let me know what happens after that.


It is taking a long time to start my system from the setup CD

The Recommended Minimum System Requirements, here, should allow even
  someone fairly new to installing Ubuntu or Gnu&Linux to easily install
  a usable system with enough room to be comfortable. A good "rule of
  thumb" is that machines that could run XP, Vista, Windows 7 or x86 OS
  X will almost always be a lot faster with Ubuntu even if they are
  lower-spec than described below. Simply try Ubuntu CD as a
  LiveCD first to check the hardware works.

  Ubuntu Desktop Edition

  700 MHz processor (about Intel Celeron or better)
  512 MiB RAM (system memory)
  5 GB of hard-drive space (or USB stick, memory card or external drive    but see LiveCD for an alternative approach)1

So based on the information above, you don't have enough ram to run Ubuntu.  For your system, I would recommend Xubuntu, or Lubuntu.

1Source:Recommended Minimum System Requirements


During install of the CUDA toolkit, when prompt, remember NOT to install OpenGL driver.

https://chuanwen.wordpress.com/2015/07/19/run-cuda-on-ubuntu-14-04-2/


Connection editors OK -button greyed out

The OK button might get active after entering a user name and password.These fields are not grey for a purpose. You could test this behaviour even without knowing the actual valid password.


My Ubuntu server 18.04 LTS won't boot up

Turns out it was a bad power supply unit. Eventually after trying other fixes (changing the BIOS battery) and rebooting it refused to turn on what so ever. I checked to ensure the button didn't break and changed out the power cord and trying different outlets. I bought a new power supply and it booted up like normal and works now. The errors are still there, but I figure they're unrelated to the power supply.


Run an OS off of a CD on the machine and recover your files by navigating the partition and copying them to a USB. Not sure how to recover your OS, but you can backup the partitions using TestDisk or Gnome-Disks.


How do I make Ubuntu 20.04 work on Windows 10 WSL 2?

In the end, I got everything working after:

using System Restore to recover the point immediately after the Win10 2004 update (that's actually the earliest restore point for my system)—be patient as it can take a while (also the first restart of the whole process)
enabling virtualization in BIOS (for my HP, it's under the tab Security->System Security->Virtual Technology->Enable)—the second restart
after Windows 10 restarted, navigating the Start Menu: Windows Settings->Apps->Optional features->More Windows features->Turn Windows features on or off to select both Virtual Machine Platform and Windows Subsystem for Linux (I didn't choose Windows Hypervisor Platform in the list)—the third restart ensued
after restarting, visit Microsoft Store from the Windows Start Menu and install Ubuntu
installing the Linux kernel update package (https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi)
starting an elevated PowerShell session to run

wsl --set-default-version 2
wsl --set-version Ubuntu 2

Launching Ubuntu after the installation is complete. Create a new user account with password.

What I have now is Ubuntu 20.04 running nicely on Win 10 WSL2.


fluxgui / python-gconf not installable on Kubuntu 19.04

You can install python-gconf manually from cosmic repository:

cd ~/Downloads
wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gnome-python/python-gconf_2.28.1+dfsg-1.2_amd64.deb
sudo apt-get install ./python-gconf_2.28.1+dfsg-1.2_amd64.deb

(usually this method is not recommended, but we do not have other methods)


How do I stop qsynth from shutting off ALL other sounds on my system until I reboot the computer?

If you're using jack to route your audio, then the jack server will take exclusive control of  your sound devices, thus making pulseaudio unable to output any audio for other applications.

This is what you want when using low-latency audio, as pulseaudio isn't designed for low-latency work. However (as you've noticed), it means that when you're done, pulse isn't able to output any more sounds.

The solution should be to stop the jack server when you're done with qsynth, so that the sound devices are available to pulseaudio again. The 'Stop' button on the qjackctl main UI should do this for you.

You may also need to quit and restart pulse after doing this; use can use pactl to exit the pulse daemon:

pactl exit

- and the daemon should automatically restart when you next play audio.


Will I benefit from windows drivers in virtual machine?

If Windows is handling the bare-metal side of things, I think you're probably correct and it'll fix your power issues... But you'll be running two operating systems all the time which will use more RAM and CPU all the time.

If Ubuntu is on bare-metal and Windows is the virtualised OS, that's not going to help you at all. Windows won't have access to the hardware to monitor or help change temperatures.


How do I install Ubuntu on Windows, from a Mac?

I'm going to assume you want to install Ubuntu only on the (formerly) Windows machine. If you want to keep Windows edit your question, as this changes things completely. Either way, I hope you backed up your data prior to the machine crashing.

From your Mac, you need to make a LiveCD or a Live USB to use to install Ubuntu on the other machine. Official, comprehensive instructions are at those links.

Once you have a Live CD or Live USB, go ahead with a standard Ubuntu install on the second computer. This is pretty straightforward and the Ubuntu.com site has instructions here.

This won't be too complicated so don't worry. If you get stuck, keep notes on what step you are stuck at and edit your question with the new details. Good luck.


How to remove window decoration from Firefox 4?

At the same place you did with Opera you can do this !(class=Firefox), it worked for me just fine.

If you want them both to work like that add !(name=opera) & !(class=Firefox).


wake on lan not working if i turn of with ubuntu

I just ran into this problem after upgrading two properly configured machines to 18.04. I remember that Ubuntu moved to netplan and found an answer from  paulgj in the forums that made it work again for me. You may try this if the existing answers don't work.

  I got it working by adding the macaddress match lines, here is the full .yaml file:

network:
  version: 2
  renderer: networkd
  ethernets:
    enp2s0:
      match:
        macaddress: 50:e5:49:b3:fc:97
      dhcp4: true
      wakeonlan: true

Note: you need to change enp2s0 and 50:e5:49:b3:fc:97 and save it in /etc/netplan/ with a .yaml extension. I hope this configuration did not disable anything that's going to haunt me in the upcoming weeks.

Edit: for desktops you should replace renderer: networkd with renderer: NetworkManager and then run sudo netplan apply.


How to reuse a drive in which windows was installed before

I understand that there is already a partition formatted with ext3. So till now you just need to mount this partition to use it.

create a mounting point suppose /media/ext-hdd

sudo mkdir /media/ext-hdd

now mount the partition to that point

sudo mount -t ext3 /de3v/sda2 /media/ext-hdd

Now if you want to make auto mount this partition you have to add it to the /etc/fstab file.

first identify the UId of this partition

sudo blkid /dev/sda2

Now open fstab

sudo gedit /etc/fstab

Add the following

UUID=YOUR_UID /media/ext-hdd    ext3    defaults    0   0

save and exit


Press  combination and type:

gnome-keyboard-properties

Choose layout tab, and push the parameters button, in opened window, you will need to choose "Compose key position". For example - let's select Caps Lock. That's it. Try for press Caps Lock, then "o" then "c" keys on your keyboard - you should get this symbol - ©
Also, link


dual boot - boot automatically into windows 10

You need to change the boot order specified in your BIOS. Your SSD is booting ahead of your HDD.

Because grub isn't appearing at boot, it means that your HDD isn't being loaded first. In addition, once you do correct your boot-order, run sudo update-grub to allow Ubuntu to autodetect your Windows installation.


I somehow managed to remove the edubuntu(oldskool way)
Initially it showed the following error
dpkg: error processing package edubuntu-artwork (--configure):
 installed edubuntu-artwork package post-installation script subprocess returned error exit status 127

What i did!
sudo find / -maxdepth 5 -name "*edubuntu*" -exec rm -rf {}

sudo apt remove *edubuntu*

It showed warning(same for most of the packages)
dpkg: warning: files list file for package 'plymouth-theme-edubuntu' missing; assuming package has no files currently installed

But it worked!


I have had a similar colour change with menus, titlebars and terminal windows. I asked a question about it just now, but maybe it is the same cause?

Strange colours in Ubuntu since 12.10.2017


How can I change the size and position that an application appears when first launched?

If so, you can specify a window position at launch with Compiz' "Place Windows" plugins:
"System -> Preferences -> CompizConfig Settings Manager -> Window Management -> Place Windows"

Try to adjust the "Placement Mode" ("General" tab) first, it seems like you have "Center" selected there, the default is "Smart".


sudo apt-get install not working after deleting squid and iptables

Run this command:

sudo apt-get -f install


Can I make an image from the disk starting at x address?

dd has a skip flag:

skip=N skip N ibs-sized blocks at start of input

But the address then has to be N*ibs. But  0x00000000DA88FFFF = 3×1222137173, which doesn't seem a reasonable starting point. In general, you could do:

dd ibs=X start=Y count=Z if=/some/disk

To copy Z*X bytes starting from Y*X.


how duplicate a oh-my-zsh terminal and retaining the path from previous terminal

Add the following line in the .zshrc file:

[[ -f /etc/profile.d/vte.sh ]] && . /etc/profile.d/vte.sh

https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1132700


Unable to run svn commands on a repository version 1.7

There is a little twist. You say you try svn update but the code shows svn upgrade which fails, then you say "so i tried svn upgrade".

My gut says you have a working copy on version 1.7 copied from somewhere and version 1.6 of subversion can't cope with it. The simplest solution would be to svn checkout a fresh working copy from the repository.

If you really need to downgrade your working copy from 1.7 to 1.6, then you have a problem, I am afraid.

The APR is a general purpose library that was developed for the Apache http server, but it is used by all subversion programs. Therefore you need to install it in order to build any subversion software. libapache-svn is a different matter.


Per your GRUB paste, you installed GRUB on /dev/sdb1 which seems to be a removable drive. GRUB further detects that /dev/sda3 which is your hard disk has some metadata in windows cache which happens when windows is in hibernate/sleep. So, In order to be able to see the boot selection screen, shutdown the computer from windows and then manually start it.


Why doesn't Ubuntu offer the same Online Accounts as Ubuntu Gnome?

The answer is Ubuntu does package things differently in their distro but luckily they don't remove the packages completely which means you can install any of the available Online account-plugins visible in gnome (plus others not visible) as per post from Pilot6


Error instaling OpenStack with juju due to kvm-ok not being installed

I believe you're running into this issue, KVM doesn't work inside virtualbox:

How to enable nested virtualization in ubuntu
Bug report with Virtualbox: https://www.virtualbox.org/ticket/4032


How to get fully options at /proc/sys/net in docker's ubuntu

Those files represent configuration of your host network stack, without --net=host you create a new network stack inside a container and files are 'overwritten' by container ones.

If you need access to host stack you might consider mounting it somewhere else, lets say /net using -v /proc/sys/net/:/net and then simply use echo value > /net/my/file instead of using sysctl.


I would recommend remove (purging) your vsftp install and then reinstalling it with default conf files and starting the service and confirming it is running. I think you have a bad conf file that is causing it not to run properly.


How to delete/move to trash a desktop shortcut as context menu Move to Trash is greyed

Open a terminal and type this to hide the shortcut

gsettings set org.gnome.nautilus.desktop network-icon-visible false

Your desktop should not display the icon for the Network Severs after this.


Select only the first lines that contain a repeated string

You could consider using sort -u as  an alternative to uniq, specifying the first whitespace-separated field as key:

$ sort -uk1,1 file
2_00003 R034671 31.25   96  55  2   100 195 77  161 7e-07   47.8
2_00004 R014991 31.90   232 141 5   2   232 4   219 5e-28    111

Alternatively, you could do something like this in awk:

awk '$1!=last {last=$1; print}' file

which tests the first field of each line ($1) against its last value, and prints the line whenever $1 changes, updating the last value as it goes.


For my corporate network I was given by my administrator the proxy name in the format:

http://[username]:[password]@[proxy-webaddress]:[port]

For our Windows network our username is in the format:

[domain]\[username]

For example:

http://mywindowsdomain\fossfreedom:password@askubuntu-proxy.com:8080

This was added to the following NEW file (it doesnt exist by default):

gksudo gedit /etc/apt/apt.conf.d/01proxy

The following text was added:

Acquire::http::Proxy "http://mywindowsdomain\fossfreedom:password@askubuntu-proxy.com:8080";

If you are using an anonymous proxy then you don't need your login credentials:

Acquire::http::Proxy "http://askubuntu-proxy.com:8080";

Save the file and then checked that all was ok with:

sudo apt-get update


Black, 'unknown', square pinned to dock in Ubuntu 20.04

Take a look at the apps listed under favorite-apps in your /etc/dconf/profile or ~/.config/dconf/user file.
You’ll see something like this:
[org/gnome/shell]
favorite-apps = ['gedit.desktop', 'gnome-terminal.desktop', 'nautilus.desktop']

Once you figure out what that black square belongs to, you can remove it by taking it out of the list above.
Source: Gnome Help


In the BIOS:
Function key behaviour ---> Function key.
while the default setting is Media Key. If, for example, F1 is associated to sleep mode, using function key setting, you have to press Fn + F1 in order to have the sleep mode.
In the BIOS function key behaviour can be found inside a subsection of advanced like other.


Deja-dup cannot access Truecrypt volume when run from Cron

Based on answers for other question, I managed to find the solution myself. It consists of starting deja-dup with a script that adds some system variables. The cron job then obviously runs the script.

#!/bin/bash

export DISPLAY=:0

sessionfile=`find "${HOME}/.dbus/session-bus/" -type f`
export `grep "DBUS_SESSION_BUS_ADDRESS" "${sessionfile}" | sed '/^#/d'`
export `grep "DBUS_SESSION_BUS_PID" "${sessionfile}" | sed '/^#/d'`
export `grep "DBUS_SESSION_BUS_WINDOWID" "${sessionfile}" | sed '/^#/d'`

deja-dup --backup
exit 0

NOTE: If somebody comes up with a well-written answer that not only provides this or other working solution but that also explains the reason for the problem, what DBUS session is and what role it plays in this problem, I'll gladly accept your answer instead of this one.


or some freak error resulting in a hard-brick

That is not going to happen due to -installation-. That's more like to happen when hardware fails or you start flashing the bios. If anything goes wrong during installation all you did was format the disk.

  driver issues

That can happen. 2 possible concerns:

your videocard. Find out make and model and google it to see if there is a lot of trouble. General rule of thumb: Intel works. nVidia and AMD work BUT stay away from the newest models. Support for videocards lags a few months behind. If this fails it will fail with the 1st boot after installation and its will be a show-stopper for the newbie Ubuntu user... debugging a failed videocard during 1st boot is not going to be easy.
wireless card if there is one. Check for the chipset and google for it. Make sure you get it working during the LIVE dvd sesssion (prior to install). If it works it will work after install. A problem with wireless is not a big deal: connect wired and it will get you to the web and you can then fix the wireless.

All other hardware should work out of the box.


To install alongside windows follow these instruction

To get back to windows just shutdown your ubuntu session,
remove dvd and again boot to windows,...


Needed simple script/loop/command for input command, execute and output within textfiles

As simple as possible:

xargs whatis < cmdlist.txt > cmdinfo.txt


How do you remove the Amazon app in Ubuntu 16.04

Don't worry you can remove/dissable it from command line.

Try this first,

gsettings set com.canonical.Unity.Lenses disabled-scopes "['more_suggestions-amazon.scope', 'more_suggestions-u1ms.scope', 'more_suggestions-populartracks.scope', 'music-musicstore.scope', 'more_suggestions-ebay.scope', 'more_suggestions-ubuntushop.scope', 'more_suggestions-skimlinks.scope']"

if above not works for you , try followng,

sudo apt-get remove unity-webapps-common


Error unlocking /dev/sda5: Failed to activate device: operation not permitted (udisks-error-quark, 0)

Luckily, I managed to access the partition on GNOME disks. Seems the password was the issue there. Indeed it was possible to access the drive that way, although I still don't know how to bypass register access failure if it appears again.


This appears to be a known bug in the intel graphics driver that has been fixed for the next release.

See:
https://bugs.freedesktop.org/show_bug.cgi?id=65988


How to switch user (su) to the odoo account? (This account is currently not available error.)

Presumably I should be editing the odoo.conf file as the odoo user."

No.
Make the file writable for group and add your admin user to the odoo group.
Use ...
sudo chown 660 /etc/odoo/odoo.conf
sudo usermod -a -G odoo $USER

... and there is no  need for switching and you can use  your normal admin account. It is the easiest and best method to allow permission to edit the file.


mp4 files not playing in OEM-installed Ubuntu 14.04

VLC is essential for media playing, because it is compatible with a widely range of media types, including mp4. Just install it using apt:

sudo apt-get install vlc

Don't forget to enable universe repository at your /etc/apt/sources.list file. To do it, just check correspondent box at update-manager:


You didn't describe whether your E: and C: are the partitions belong to the same physical hard disk. Let's me assume these two partitions are on the same physical hard disk. Please note the following answer is based on this assumption.

You don't need to worry about the grub location because grub-update (one of the grub tools) will find out the bootable systems including Windows and add them in the grub menu. You could choose the OS system you want to boot at the grub menu.
No. Ubuntu installer will delete the partition for you during installation.
/ is the root directory of your Ubuntu(or say, Linux). It means the most top of all the directories in your Ubuntu systems.

swap is a hard disk memory space to help the real memory to store data. You don't need to use swap if you memory is large (more than 4G)

You don't need to worry about how to set up the / and swap during installing Ubuntu because the Ubuntu installer could set up them for you automatically.


As a rule if you wanna send something to the remote server via scp:

scp some_files.tar user@remoteHost:
scp some_files.tar user@remoteHost:Documents/newname.tar

But if you wanna download something:

scp user@remoteHost:Documents/foo.tar ~/Desktop
scp user@remoteHost:/any/other/dir/foo.tar .


Volume Control on HP DV6 not working after alsamixer

I had the same problem and I assigning 2 commands in that keys:

To put less volume:

  amixer set Master 5%- -q

To put more volume

  amixer set Master 5%+ -q

You can change add a custom key feature in: Settings Manager > Keyboard

Also I have QasMixer GUI for Alsa that has a tray icon that shows you when the volume changes.

  sudo apt-get install qasmixer

I hope it helps you and excuse my English.


How can I stop my laptop from shutting down unexpectedly?

As for the hardware part:

I solved the same problem on the same model (with Windows) recently. You are lucky, in this model it is really easy to clean the cpu cooler. You may only open the small cover of the CPU/RAM, unscrew the cooling system and it's cover and clean the dust from the fins. NOT only the dust from the fan. Think that it is the only way your laptop "breathes" and it is blocked with a "blanket" made of dust! You may also replace the thermal compound. These two together will for sure make things a lot better.

Videos such this may help you. (you need only the first two minutes of this)

As for the software part:

Try the AMD's proprietary driver for the GPU. In my case (other model), it lowered the temperature a lot. Although, maybe things have changed latelly as for the power-saving features of the open source drivers.


How to upgrade Ubuntu and gnome without breaking existing settings?

It is possible to upgrade to 12.10 from 12.04 without breaking your settings, so long as you do not do a clean installation.

You can either upgrade using the upgrade manager or the command line, or you can manually upgrade by changing your sources to point to quantal instead of precise, and then manually upgrading the packages.


How do I install "GNU IceCat" for Trisquel on Ubuntu?

Debian packages should be fine, Ubuntu is based on and uses Debian packages.

  "belenos and belenos-updates"

The updates version will get updates that are still in testing and the normal one will get them once they are considered stable.

What one should you use?

That is up to you, do you want stability or do you want the latest updates (with potential bugs)?


Error while installing or updating anything

Just removed the file which was giving error.

sudo rm /var/lib/dpkg/info/jre1.8.0-51.postrm

That is no problem, because I want to remove the package anyway.


Software that reduces blue light from monitor

I used f.lux on Windows, it is available for linux too, but it is not opensource so you won't find it in repository.

Redshift is opensource and you should be able to find it in repos.

There are others, but I didn't try them - G.lux, iris mini.


I think FileZilla is what you are looking for, but I am not 100% sure. I am not at home to test it, but I think you can connect trough ssh and then in filezilla you can create a socks proxy.
I think you do need to allow SFTP connection on your remote machine, but it can be done very easy and there are a lot of tutorials.


You could check out packages ran by load balancing.
http://freecode.com/projects/linuxvirtualserver/
Looks good but I don't know what your already running.


Trouble creating a torrent with Transmission-create on the command line

The error clearly says that

Creating torrent "/home/torrent/home/files.torrent" ...[2015-06-08 19:27:17.554 EDT] Torrent Creator is skipping file "/home/torrent": No such file or directory
. error reading "": No such file or directory

which from here i guess the problem is with the directory which you are pointing doesn't exit try using

sudo transmission-create -o ~/files.torrent -c "My comments" -t udp://tracker.openbittorrent.com:80 ~/testfile.txt

as ~ denotes your home directory


unable to deploy pgadmin4 on Ubuntu in server mode

pgAdmin4 has a config file namely config.py possibly located in ~/.local/lib/python2.7/site-packages/pgadmin4. In which, change the DEFAULT_SERVER = '' instead of 'localhost', so pgAdmin4 can be access from a public IP address.


Toshiba Satellite L855 - Ubuntu 15.+ Synaptics Issue

It seems it was related to BIOS, I was trying to setup WOL(Wake On LAN) just before upgrading to 15.10. I seem to of somehow turned the Touchpad OFF inside BIOS when I went back to turn off WOL. (Hold F4 or 0 to enter BIOS)


Install GRUB2 on USB from Ubuntu:

Note: This Grub2 USB Flash Drive Install tutorial assumes you will be running from an Ubuntu Live CD to create your Grub2 enabled Flash Drive. It may or may not work from another Linux operating environment.

Grub2 USB Install From Ubuntu Live CD Essentials:

Ubuntu Live CD --
A PC that can boot from USB/CD
1GB or larger USB Flash Drive

Grub2 USB Flash Drive Install using the Ubuntu Live CD:

Boot from your Live Ubuntu Linux CD
Once booted, insert your USB Flash Drive
Open a terminal and type sudo su
Type fdisk --list (and note which device is your USB)
Type mkdir /mnt/USB && mount /dev/XdY1 /mnt/USB (replacing X and Y with your actual USB device)
Type grub-install --force --no-floppy --boot-directory=/mnt/USB/boot /dev/XdY (replacing X and Y with your actual USB device)
Type cd /mnt/USB/boot/grub
Type wget pendrivelinux.com/downloads/grub.cfg
Type df (and locate where the cdrom is mounted E.G. /dev/sr0)
Type dd if=/dev/sr0 of=/mnt/USB/ubuntu.iso (replacing sr0 with the device found in step 9)
Remove your Live CD and reboot your PC, setting your BIOS or Boot Menu to boot from the USB device

Reference here


Find duplicate files: keep older version

Probably too late for the O.P. but maybe useful to others:

rmlint --rank-by m [paths]

... will search in [paths] for duplicate files and create a shell script (rmlint.sh) that you can use to delete the duplicates.  The --rank-by m option tells it to keep the file with the oldest mtime in each set.  There are also several other original selection criteria options


I had the same problem.  How I fixed it was by clicking on the gear beside the "Sign In" button.

If it's an option, select "Ubuntu on Wayland".
If it's not, well I don't know that much about Ubuntu.  Sorry!

I hope this helps!


If you want that a file could be edited only by root, you should make root the owner of it:

chown root FILE

and then change permissions so that just the owner can write/read it:

chmod 600 FILE

Your solution simply make the file unreadable by everyone. Check permission, owner etc with

ls -l FILE

Consider, too, that the right to delete the file depends on the owner and permission of the directory where it is located, so that if FILE is in directory owned by you, where you have the permission to write to, you can delete FILE.

And again, this will not simply ask for a root password --- it will spew a "permission denied" error, and then you'll have to use sudoto read/edit it.


macchanger on xubuntu 16.04 broken. Fix?

The first set of commands are close. The error you are seeing is because your wlan0 is still up.

sudo service network-manager stop && sudo ifconfig wlan0 down && sudo macchanger -a wlan0 && sudo ifconfig wlan0 up && sudo service network-manager start

In a perfect world this should work as expected but network-manager resets the mac on startup in 16.04. It seems as though this is an issue with network-manager and it appears that they are aware.
bugs.launchpad.net


How can I delete all xprint jobs for one printer?

Simple solution:

xpdel -job -scl "-de *PRINTERNAME*"


Why does Wubi.exe for Ubuntu 11.10 not run on Windows 7 64bit?

Try cleaning out your %temp% directory - remove py??.tmp directories and any py??.tmp.exe files from there: see this for reference.

If you have Python installed on Windows, then there is a different solution, that involves modifying your %PYTHONPATH% environment variable. Here is an old bug report on this.

You should also check for a log file - if the problem is python then there's likely no log file, otherwise you'll find a log file in the %temp% directory called wubi-11.10-revxxx.log that might provide an explanation.


Uninstall broken Plex Media Server from 15.04

This line in the output:

Synchronizing state for plexmediaserver.service with sysvinit using update-rc.d...

suggests that systemctl is calling update-rc.d, and the only plausible line that does this is:

systemctl disable plexmediaserver.service

Commenting it out or cancelling out the error from it should do the trick.


How to make the double quote behave as a dead key except when it is used in combination with itself

After trying differend ways for this problem, I eventually found a solution with help in chat for this problem

The root cause of the problem is actually caused by the fact that Linux does not have an dead_apostrophe and a dead_quotedbl by default, so the default "us dead keyboard layout" have either mapped a dead_acute or a non dead key mapped to ".

This meant this problem is not being fixable by making your own custom keyboard layout, as I was suggested in the chat.

After further research and the just is time learning of new keywords to search, I found this solution on Unix & Linux StackExchange, what helped me solve the problem.

I followed the following steps listed in that answer:

sudo apt install uim
echo 'export GTK_IM_MODULE="uim"' >> ~/.profile
echo 'export QT_IM_MODULE="uim"' >> ~/.profile
curl 'https://gist.githubusercontent.com/guiambros/b773ee85746e06454596/raw/0ea6d7f7cf9a6ff38b4cafde24dd43852e46d5e3/.XCompose' > ~/.XCompose
Configure my keyboard layout to "English (US - intl with dead keys)"
Rebooted Ubuntu (according to the comments, logging out and in is enough)

After these steps, I managed to fulfill the following expectations I had about my keyboard:

  Press ", release ": Should remember the key as a dead key
  Press ", release ", press <space>, release <space>: Should
  print "
  Press ", release ", press ", release ": Should print ""


Finally found something!

sudo apt-get install maximus
ALT+F2
maximus
ALT+F2
gconf-editor
Set /apps/maximus/no_maximize to true
Add maximus to the startup applications.


uninstall hplip and try disconnect and reconnect printer, it will find out the printer and you would be able to do your work, hplip sometimes works but sometimes it is better without hplip, i'm saying this on my personal experience. i have used several hp printers with linux, they all work . hp is best for linux.


Deleted /etc/mysql directory, can't run mysql

Restore a backup.

That is not just the directory that holds your MySQL config but also certificates and the root password for recovery. Nobody is going to able to provide those for you except you.


PDF book opens in Mendeley when openned from Calibre

The problem seems to be that xdg-open is misconfigured:

$ xdg-mime query default application/pdf
mendeleydesktop.desktop

Sure enough, if I run xdg-open some.pdf it opens with Mendeley. It seems that some applications use xdg-open while others don't.

According to this, the culprit should be in here:

$ cat /usr/share/applications/mimeinfo.cache | grep pdf
application/pdf=evince-previewer.desktop;gimp.desktop;evince.desktop;mendeleydesktop.desktop;
application/x-bzpdf=evince-previewer.desktop;evince.desktop;
application/x-ext-pdf=evince-previewer.desktop;evince.desktop;
application/x-gzpdf=evince-previewer.desktop;evince.desktop;
application/x-xzpdf=evince-previewer.desktop;evince.desktop;
image/pdf=display-im6.q16.desktop;display-im6.desktop;

Looks good to me, except GIMP being there; oh well.

$ cat .config/mimeapps.list | grep pdf
application/pdf=evince.desktop;inkscape.desktop;

Looks fine as well. So the problem could be in an i3-specific config file. But:

$ echo $XDG_CONFIG_DIRS
/etc/xdg/xdg-i3:/etc/xdg

The former folder does not exist, and the second does not contain any .list file.

So I have no idea where this comes from. But running

xdg-mime default evince.desktop application/pdf

does certainly fix it.


If you right-click the sound indicator on the panel and select 'Remove' it will remove the 'Indicator Plugin'.

On reboot dropbox seems to detect that the plugin is missing and use another mechanism which works.

You do lose your sound indicator, but if you don't need sound or have volume-keys on your keyboard it is a good tradeoff

Perhaps someone knows another plugin that can be used to adjust speaker volume?


How to get latest Skype for Linux version from repository?

Download the Deb package for Skype for Linux Beta with your favourite web browser or HTTP client.

For a terminal-based solution use:

wget https://go.skype.com/skypeforlinux-64.deb

Install the Deb package with your favourite package manager, e. g. Software Center or GDebi.

For a terminal-based solution or to debug the package installation use:

sudo dpkg -i skypeforlinux-64.deb
sudo apt install -f

You're done! When you installed the package it automatically added the repository

deb [arch=amd64] https://repo.skype.com/deb stable main

to the file /etc/apt/sources.list.d/skype-stable.list to keep your installation of Skype up to date via Ubuntu's package update process.


Ubuntu 18.04 Gnome: How to set Alt+Ctrl+Tab to switch between windows of all workspaces and Alt+Tab to switch between only current workspace

You cannot directly, because the key org.gnome.shell.app-switcher current-workspace-only defines how the app switcher works. Thus, you cannot as such assign it another key and at the same time have it work differently.

There is, however, a workaround to achieve more or less the effect you want if you are prepared to use both the application switcher and the window switcher (a more traditional switcher that switches between individual windows). You can bind the Window switcher to Alt+Tab and restrict it to the current workspace, and bind the Application switcher to Alt+Ctrl+Tab, and have it switch between desktops.

For this, apply following settings:

# Set application switcher key binding and properties
gsettings set org.gnome.desktop.wm.keybindings switch-applications "['<Alt><Control>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "['<Shift><Alt><Control>Tab']"
gsettings set org.gnome.shell.app-switcher current-workspace-only false

# Set window switcher key binding and properties

gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Alt>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward "['<Shift><Alt>Tab']"
gsettings set org.gnome.shell.window-switcher current-workspace-only true

This is actually how it is now being implemented since Ubuntu 19.04, with the difference that Super+Tab is used to bind the application switcher.


Service uuidd won't start automatically after reboot

The answer was that the service only runs when it is in use. On the other nodes where it is ok I am assuming it runs often enough to not stop.

Thanks :)


Ubuntu 20.04 | Any way to get rid of "systemctl suspend" and start using "s2ram" globally?

From your Desktop screen, press F1, then Ctrl + L and type man:systemd-suspend.service.8.
Repeat for man:systemd-sleep.conf.5.
You have more experience in this matter than me as evident in question, but I'm sure this might help.


Here it is:
sed -E ':a ; $!N ; s/\n\*/\*/ ; ta ; P ; D' file_name

Or a portable (non-gnu) variation:
sed -e :a -e '$!N;s/\n\*/\*/;ta' -e 'P;D' file_name

Add -i.bak to do the changes in place of the file and create a backup file.

Source: gnu.org - sed - manual - Join lines that start with whitespace.


It's an script for root user, place on /root directory:

#! /bin/sh

USER="postgres"
PASS="password"

## Staorage Dir
bkp_dir="/home/USER_HOME/databases-$(date +%Y%m%d)"
echo "Creating directory: ${bkp_dir}"
mkdir $bkp_dir

## Temporal credential access file
credentialsFile=".pgpass"
echo "*:*:*:$USER:$PASS" >> $credentialsFile
chmod 600 $credentialsFile

echo "Backing up databases"

pg_dump -U postgres -w -Fc > $bkp_dir/

rm $credentialsFile

You can create a crontab for autorun the script as your wish

Resources:
https://severalnines.com/database-blog/backup-postgresql-using-pgdump-and-pgdumpall
http://www.postgresqltutorial.com/postgresql-backup-database/


According to this article:

How To Set or Change Timezone on Ubuntu 18.04

You don't need the sudo dpkg-reconfigure -f noninteractive tzdata command and it makes me wonder if it harms things.

Basically just use:

$ timedatectl # lists your current time zone

$ sudo timedatectl set-timezone "Pacific/Auckland"

$ timedatectl # lists your new time zone

If time zone reverts back to UTC, use this command:

sudo dpkg-reconfigure tzdata


I did not like libnotify, so I created an UDP server in Python and a client application for irssi. Note that this answer applies to the original requirements in revision 1, it does not have text notification.

Client

This version reacts to various messages directed at you. If you would like to be notified of messages in any channel, remove the leading # in the #'message public' line. Some rate-limiting is implemented, there will be at least 1.3 seconds delay between notifications.

##
## Put me in ~/.irssi/scripts, and then execute the following in irssi:
##
##       /load perl
##       /script load notifyudp
##

use strict;
use Irssi;
use IO::Socket;
use vars qw($VERSION %IRSSI);
use Time::HiRes qw(time);

$VERSION = "0.3.20140930";
%IRSSI = (
    authors     => 'Lekensteyn',
    contact     => 'lekensteyn@gmail.com',
    name        => 'notifyudp.pl',
    description => 'Send a UDP signal to a remote machine',
    license     => 'GPLv3+'
);

Irssi::settings_add_str('notifyudp', 'notifyudp_ip_addr', '');
# port 0 = disabled
Irssi::settings_add_int('notifyudp', 'notifyudp_port', 0);
Irssi::settings_add_bool('notifyudp', 'notifyudp_auto_start', 0);

my $sock;

sub notify_load {
    if ($sock) {
        Irssi::print('NotifyUDP: Already connected.');
        return;
    }
    my $ip = Irssi::settings_get_str('notifyudp_ip_addr');
    my $port = Irssi::settings_get_int('notifyudp_port');
    if (!$port || !$ip) {
        Irssi::print('NotifyUDP: No port or host set, /set notifyudp for more information..');
        return;
    }
    if ($port < 1024 || $port > 65535) {
        Irssi::print('NotifyUDP: Invalid port, must be 1024 <= port <= 65535, resetting and ignoring.');
        Irssi::settings_set_int('notifyudp_port', 0);
        return;
    }
    $sock = new IO::Socket::INET(
        PeerAddr => $ip,
        PeerPort => $port,
        Proto => 'udp',
        Timeout => 1
    );
    Irssi::print("NotifyUDP: IP $ip will be notified on port $port.");
}

my $last_time = 0;
sub notify {
    if ($sock) {
        my $now = time;
        my $notify_delay = 1.3;
        if (abs($now - $last_time) > $notify_delay) {
            $last_time = $now;
            $sock->send("M");
        }
    }
}
sub notify_if_hilighted {
    my ($dest, $text, $stripped) = @_;
    if ($dest->{level} & MSGLEVEL_HILIGHT) {
        notify();
    }
}

sub notify_stop {
    if ($sock) {
        Irssi::print("NotifyUDP: Stopping.");
        $sock->send("S");
        $sock = undef;
    } else {
        Irssi::print("NotifyUDP: not active.");
    }
}

sub cmd_notifyudp {
    my ($cmd) = @_;
    if ($cmd eq 'start') {
        notify_load();
    } elsif ($cmd eq 'stop') {
        notify_stop();
    } elsif ($cmd eq 'ping') {
        notify();
    } else {
        Irssi::print('NotifyUDP: Usage: /notifyudp [start|stop|ping]');
    }
}

Irssi::command_bind('notifyudp', 'cmd_notifyudp');

my @signals = (
# Uncomment the following to get notifs for every (channel) message
#'message public',
'message private',
'dcc request',

'message irc notice', # NickServ responses and such

# whenever the server dies
'server connected',
'server connect failed',
'server disconnected',

'message invite',
'message topic',
'message dcc',
'ctcp msg',
'ctcp reply',
);
Irssi::signal_add('print text', 'notify_if_hilighted');
foreach (@signals) {
    Irssi::signal_add($_, 'notify');
}

if (Irssi::settings_get_bool('notifyudp_auto_start')) {
    Irssi::print('NotifyUDP: automatic connection with the sound server is enabled.');
    notify_load();
} else {
    Irssi::print('NotifyUDP: automatic connection with the sound server is disabled.');
}

Server

When started, it listens on all addresses, port 3533. If it receives a UDP packet "M", it plays /usr/share/sounds/KDE-Im-Irc-Event.ogg using paplay ("PulseAudio play"). On receiving S, it quits the server. Since it's open-source, you are free to remove this.

#!/usr/bin/env python
# udpsoundserver.py

"""Listen on a UDP port and play a sound when 'M' is received

Starts the server listening on UDP port PORT (3533 by default) on address HOST
(by default all addresses). Valid commands are:
M - play Music
S - Stop the server
"""
try:
    import socketserver
except ImportError:
    import SocketServer as socketserver
from os import system,getpid
import threading
import sys

# leave it empty to listen on all addresses
HOST = ""
PORT = 3533

class UDPSvr(socketserver.BaseRequestHandler):
    def handle(self):
        data = self.request[0]
        if sys.version >= '3':
            data = str(data, "ISO-8859-1")
        data = data.strip()
        if data == "M":
            ding.dong()
        elif data == "S":
            ding.die()

class Worker(threading.Thread):
    def __init__(self):
        threading.Thread.__init__(self)
        self.daemon = True
    def run(self):
        server.serve_forever();

class Handler(threading.Thread):
    def __init__(self):
        threading.Thread.__init__(self)
        self.daemon = True
        self.play = False
        self.must_die = False

    def run(self):
        self.event = threading.Event()
        while True:
            self.event.wait(1.)
            if self.event.isSet():
                if self.play:
                    print("Playing...")
                    system("paplay /usr/share/sounds/KDE-Im-Irc-Event.ogg")
                # no else if to allow shutdown signals
                if self.must_die:
                    print("Shutting down...")
                    server.shutdown()
                    break
                self.play = False
                self.event.clear()

    def dong(self):
        self.play = True
        self.event.set()

    def die(self):
        self.must_die = True
        self.event.set()

def ca(num, x):
    print("Caught SIGINT, shutting down...")
    ding.die()

import signal
if __name__ == "__main__":
    print("My PID is: " + str(getpid()))

    if len(sys.argv) > 1:
        HOST = sys.argv[1]
    if len(sys.argv) > 2:
        PORT = int(sys.argv[2])

    print("Host: " + HOST)
    print("Port: " + str(PORT))
    server = socketserver.UDPServer((HOST, PORT), UDPSvr)

    ding = Handler()
    signal.signal(signal.SIGINT, ca)
    worker = Worker()
    ding.start()
    worker.start()
    # might not be the cleanest, but it allows Ctrl + C
    while ding.isAlive():
        ding.join(3600)

The sequence of starting the remote server becomes:

screen -dm path/to/udpsoundserver.py
ssh -R 5355:localhost:5355

After logging in, I run:

screen -t irssi irssi

Should you need to reconnect later:

screen -r irssi

After starting irssi, you need to set the host and port:

/set notifyudp_ip_addr 127.0.0.1
/set notifyudp_port 5355

To make it connect automatically on startup:

/set notifyudp_auto_start 1

The first time, you need to start Notify UDP manually since it was not auto started yet:

/notifyudp start

In order to test the notification:

/notifyudp ping

To-do:

make the soundserver stop on disconnect
allow for skipping channels


df will only show you mounted partitions.
I'd use gparted or fdisk -l to work out what's on a disk.

But sda2 being so big suggests that yes, you've replaced the all old partitions instead of resizing them (or just replacing one).

You can reinstall Windows (which will likely replace Ubuntu), or attempt some sort of data recovery  but there isn't a magic way to just undo what's been done. You've overwritten data. There's usually no coming back from that.


What is the Compiz option "Number of Desktops" for?

It does nothing.
This bug report has two quotes from Travis Watkins explaining what's going on.

In compiz in hardy you cannot have multiple desktops anymore. Viewports are the only option.
Desktops have less features and are really broken. Unfortunately no one cares to fix these bugs upstream and we have no reason to as we use viewports.

Kudos to Rinzwind for finding the bug report.


Encoding ogg vorbis sound file with avconv using same codec as Audacity

Seems very odd, would you consider testing as well with oggenc. This can be found in the vorbis tools package:

sudo apt-get install vorbis-tools

This might then point the finger at avconv if the oggenc version is ok on your website.


Ubuntu 16.10 Update problem (some repository yakkety release does not have Release )

Ubuntu 16.10 is EOL since July 20, 2017.

Change http://archive to http://old-releases in /etc/apt/sources.list file, and run

sudo apt update && sudo apt upgrade

again.

And then update to a supported version.


How to suppress or disable the shutdown option from indicator menu or shutdown dialog?

Unity -2d uses a declaritive view called

    GioDefaultApplication {
        id: defaultApplication
    }

    Application {
        id: application
        desktop_file: defaultApplication.desktopFile
    }

    visible: application.desktop_file != ""

    onClicked: dash.activateApplication(application)

     icon: "image://icons/" + application.icon
}

"Application" to launch a desktop file so you can do a couple of things.
1) remove the desktop files under
    /usr/share/applications/
They go as followed

Logout =  indicator-session-logout.desktop
Suspend = indicator-session-lock-screen.desktop
Restart = indicator-session-restart.desktop
Switch Off  = indicator-session-shutdown.desktop

By either editing these files and or removing them (backup 1st) will make the indacator error out

Other thing that you can do is open the source to unity-2d and make it so all things clicked = the desktop file that you like.

Hope that this helps


I upgraded to 14.10 and that fixed it.

Remember kids:  it's always a good idea to partition your HDD and keep your stuff off the root partition.  That way, when you reinstall,  you just re-mount your partition, and everything was like it was.  (except for apps, users, etc..)  But at least I still have my data!


Blocking all ip addresses except one - Ubuntu server 16 - iptables

Your iptables rule set does not have an ESTABLISHED,RELATED path through the forward chain:

iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT


Completely Stuck with Apt-Get (nothing will install)

Just force overwrites on the installation of the conflictive package:

sudo dpkg --force-overwrite -i /var/cache/apt/archives/libqt5multimediaquick-p5_5.0.1-0ubuntu1_i386.deb

If that's not enough for the installation to succeed, you can also force everything dpkg can complain about (be careful doing this!):

sudo dpkg --force-all -i /var/cache/apt/archives/libqt5multimediaquick-p5_5.0.1-0ubuntu1_i386.deb

After doing that, just issue the suggested command again:

sudo apt-get -f install


These PPA's you have mentioned are maintained by

Webupd8
Ubuntu-x-swat
atareao

Webupd8 is quite a trusted site. They provide proper well made stable packages. Many people (Even me!) use their PPA's. You should not have a problem with their packages. See their home page

Ubuntu-x-swat is also a great team. Here also many people use it (Me also, again!). You can safely use it but do not forget to read the instructions here

atareao : I have never used their PPA but searching around on the net gives a hint that they are a bit trusted and also recommended by some sites.

Generally most PPA's you find should be stable with no "evil" in them. Just to be sure keep a point in mind to add a PPA only if some sites recommend them. Also  make sure to add only stable version of a PPA. Some PPA's provide development versions which might thrash your PC if they are buggy. So in the end the choice is yours.


User creation is done in the template file, so you must to change ubuntu template file, i.e: lxc-ubuntu. Templates are stored in /usr/local/share/lxc/templates or /usr/lib/lxc/templates/. Open it with your favorite editor and find the following lines (They are in configure_ubuntu() function of template file):

if [ -z "$bindhome" ]; then
    chroot $rootfs useradd --create-home -s /bin/bash ubuntu
    echo "ubuntu:ubutu" | chroot $rootfs chpasswd
fi

Replace ubuntu with your own username and password, i.e these line will be:

if [ -z "$bindhome" ]; then
    chroot $rootfs useradd --create-home -s /bin/bash USERNAME
    echo "USERNAME:PASSWORD" | chroot $rootfs chpasswd
fi

Then create your container as usual.


Unable to locate package gcc-defaults error

This is a source package. To obtain it, do

sudo apt-get source gcc-defaults


Based on your clarifying comment, you seem to have an encoding problem. In gedit, after having selected "File -> Open", you can explicitly select the character encoding that fits the document you want to open. Probably it should be something else but UTF-8 for the files in question.


How can I apply a global pedestal to PulseAudio?

In older laptops there used to be a switch to toggle the front output between line-out and headphone modes. Maybe this is what you are experiencing.

Even if this is not the case, since the dumbed down interface of the sound menu does not show all the available switches, try to install gnome-alsamixer and crank both master and any headphone you encounter to full and try all the checkboxes.


Learning more things about dependecies and repositories

Repositories serve several purpose :

every program from an "official" repository has been validated by canonical. It is thus considered safe for your system (not a malware).
repositories allow to notify users when an update is ready. Your system is automatically up to date with new features and security releases.

To answer your questions :

Not necessarily. For instance, a .deb file can be installed without a repository (just download the file, and use dpkg -i file.deb to install it)
You can read the official documentation about this. There are default repositories from canonical, but you can also add custom repositories if you need some other resources. Dependencies are shown automatically when you try to install a package.
If you are invoking the update manager from the terminal, be careful about which options you use. For instance, apt-get update and apt-get upgrade are fairly harmless, but option like apt-get dist-upgrade or apt-get autoremove can break your distro in some occasions.
Also, always run apt-get update before upgrading your system or after you modified your repositories information.
I don't know of any. I learnt from reading the official documentation & practice.
All package managers do about the same thing, the interface and some functionalities change. Have a look at this question for more details about the differences between them.


Problem connect to some websites using DSL

Solved by using pppoe-setup instead of nm-connection-editor to setup DSL


If your program is written in Java, Python, Perl, Ruby, Smalltalk and many more, there should be no problem.
Many programs run in Wine (Wine Is No Emulator)
Or you setup a virtual machine like KVM, Virtualbox, VMware
Or you dualboot
Or you give us the name, and we try finding a good replacement


find -exec grep in series with an inverted grep, find nested grep

You do not need find! ... grep has an option for that:

-r, --recursive
Read  all files under each directory, recursively, following symbolic links only if
they are on the command line.  Note that if no file operand is given, grep searches
the working directory.  This is equivalent to the -d recurse option.

or

-R, --dereference-recursive
Read  all  files  under  each  directory,  recursively.  Follow all symbolic links,
unlike -r.

More options are in man grep

You can run the following from within the directory containing the three files.
To exclude only the word BAD_word:
sed 's/BAD_word//' <(grep -rwn "GOOD_word" .)

or to exclude the whole lines containing the word BAD_word:
grep -wv "BAD_word" <(grep -rwn "GOOD_word" .)


How to know whether Ubuntu is installed in Win or next to Win?

I can think of two easy and dirty ways... When installed through windows, wubi will select windows as the default operating system, so in the GRUB menu it would appear as first. Another way is to look in the windows control panel, in the uninstall section. If ubuntu is one of the programs and is available to uninstall, it was installed through wubi.

As I understand wubi installs ubuntu in the same partition as the one in which windows is and you should be able to see this in a partition manager program(not from ubuntu itself, from a live session for example, or from windows). If there are multiple partitions on the disk (besides the system reserved created by windows and the proper windows one) ubuntu was installed next to windows.


custom text format scan with clamAV like SSN

Yes, you can get "test data" here

https://support.spirion.com/hc/en-us/articles/115000019252-Test-Sample-Data

And then test with clamav

wget http://www.identityfinder.com/software/KBFiles/110845/Identity_Finder_Test_Data.zip

unzip Identity_Finder_Test_Data.zip

clamscan -r --detect-structured=yes --structured-ssn-format=2 --structured-ssn-count=5 --structured-cc-count=5 Identity_Finder_Test_Data

You will see output such as ...

  Identity_Finder_Test_Data/Employee Database.accdb: OK
  Identity_Finder_Test_Data/Department.csv: Heuristics.Structured.SSN FOUND

  output clipped at this point ...

"OK" means the data was valid, as far as clamav is concerned.

" Heuristics.Structured.SSN" means the data is "structured" or invalid.


13.10, mount works only in read-only mode

It looks like you're running into the problem described here.  You should be able to mount that volume read/write by running:

sudo apt-get install hfsprogs
sudo mount -t hfsplus -o remount,force,rw /media/cr/FinnHard

You'll be able to mount it again later on using:

sudo mount -t hfsplus -o force,rw /dev/sdb2 /media/cr/FinnHard


Thanks to the great help in #zfsonlinux on freenode, I was able to find the answer.

state: 2

means 'Destroyed pool', and the key to getting around that is:

zpool import -D

Then:

zpool import -D <pool name, or id>

Which will un-destroy it and import it.  As for how it was destroyed, this is an old disk and that I'm going through and cleaning out, so it's not surprising that it's in that state, but I wouldn't have even thought to look at that state: 2 bit.


How can I disable keybindings CTRL+Grave (CTRL+Tilde, CTRL+`) on Ubuntu 15.04

That is actually dunst notifier.
You could disable this shortcut by copying /etc/xdg/dunst/dunstrc to ~/.config/dunst/ and commenting out line
history = ctrl+grave
in shortcuts section


Newbie needing help Installing full OS on USB

Quick Method for Making Full Install of Ubuntu to USB.
The creator of mkusb has been perfecting the use of image files for creating Full installs of Ubuntu on USB. Download Image file is 1.5GB, not 15GB.

Download https://phillw.net/isos/linux-tools/uefi-n-bios/dd_unb_ubuntu-20.04_15GB_2020-09-07_with-proposed.img.xz

Decompress file using 7Zip.

Flash to USB using Rufus, Etcher, Image Writer, etc.

Password is "changeme", Change it.

MD5Sum can be found here: https://phillw.net/isos/linux-tools/uefi-n-bios/md5sum.txt.asc


How do I permanently enable terminal output to a file?

script,from the bsdutils package is the tool you want.

script my.log
# bunch of commands
exit

and all the commands you typed, and all their output (including cursor control, which depends of the setting of $TERM) will be saved in my.log.

From the man page:

bionic (1) script.1.gz
Provided by: bsdutils_2.31.1-0.4ubuntu3_amd64 bug

NAME

       script - make typescript of terminal session

SYNOPSIS

       script [options] [file]

DESCRIPTION

       script  makes  a  typescript  of  everything displayed on your terminal.  It is useful for
       students who need a hardcopy record of an interactive session as proof of  an  assignment,
       as the typescript file can be printed out later with lpr(1).

       If  the argument file is given, script saves the dialogue in this file.  If no filename is
       given, the dialogue is saved in the file typescript.


Reboot hang on "Adding 4051964K swap on /dev/sda5. Priority:-1 extents:1 across 4051964K FS"

The problem you're seeing is probably related to the video. Recent kernels enable by default, the KMS (Kernel Mode Setting)...

Try to add "nomodeset" to you Linux boot option (at GRUB), to disable KMS.

Cheers!


Error when copying a file to an NTFS volume

Firstly, try to rename your New Volume to something without spaces: NewVolume or something else, if it is possible, and then try to repeat copying.

If not helped, then look at your /etc/mtab file to see what options are used to mount your li drive:

cat /etc/mtab | grep 'li'

If you see ro there in options, than you need to umount it and mount it in rw mode. For example, if you use an ntfs volume, you could use:

sudo umount /dev/sdb2
sudo apt install ntfs-3g
sudo mkdir /media/li/newvolume
sudo mount -t ntfs-3g /dev/sdb2 /media/li/newvolume -o rw,permissions

where sdXX is your drive you could see when you run sudo fdisk -l | grep -v loop or in GParted

You could also add it to your /etc/fstab:

/dev/sdb2 /media/li/newvolume ntfs rw,permissions 0 0

Make sure, there's no other records for the same partition

Also:

Download Windows 10 Live CD
Load into Windows -> Device Manager  ->  Disk Drives
Select your New Volume - right click -> Properties -> Policies -> Write-Caching policy
Uncheck "Enable write caching on the device"
Reboot into Ubuntu and check


920828 - how to open and build a VS2010 solution in precise?

The entry in WineHQ rates Visual Studio 2010 as bronze. Which in this case means it installs and runs, but won't build a project.

Your next best bet would be to install vmware or virtualbox and then install Windows and Visual Studio 2010.

Alternatively you could build your code with Linux native tools/IDEs. Depending on the libraries you depend on and the C++ Standard you conform to, this should be feasible.


There is no single button to magically do everything, but there are several ways to avoid repeating tasks like installing packages and configurations.

You can take an image of your Ubuntu partition with dd, something like dd if=/dev/sda1 of=/my/ubuntu.img (sda1 is an example), and whenever you need to set up a new system, just write the image back to the new disk. And it will be a clone of the original.
You can set up a docker container. You can think of docker as basically a thin layer on top of the OS that manages file system, packages, and configurations. It is created for situations like this. Let's say you create a container, and inside it create a development environment with very specific commands and steps. Then you can just run this container from different machines and get this exact environment.
Use FAI (Fully Automated Installation) (thanks to Karel for this link). From their website, "FAI is a tool for unattended mass deployment of Linux. It's a system to install and configure Linux systems and software packages on computers". Head over to the FAI guide to learn how it works.


A workaround I found was to remove the File menu from menubar then Alt-F won't match any menu shortcut and the keyboard shortcut will be triggered.

To remove a menu you go into Window -> Properties -> Customize Perspective and go to the Menu Visibility tab and uncheck File


Why do I get the message "program not found" when running "mal" for Latex

I understand you mean texconfig. To use it you must install the texlive-binaries  package by running:

sudo apt-get install texlive-binaries

or clicking here:


Never mind. Seems as if it was the Universal-USB-Installer's fault. Tried Unetbootin and it works now.


You can use the terminal as root, just open your terminal and type:

sudo rm /etc/polipo/File

Or you can use:

gksudo nautilus

To use Nautilus as root user.


You can either create a new user as suggested by ColonelTrogdor or there are other ways to solve this problem.
First login into tty by pressing CTRL+ALT+F1

Note: Press ALT+F7 to come out from tty

Solution 1:  Reset the Unity and Compiz

Download Unity Reset tool from here.

Note: It should work with Ubuntu 14.04, 13.10 and 13.04.
Reset Unity using the following command

$ unity-reset

Solution 2 (Most Recommended): Reinstall Ubuntu Desktop (i.e Unity)

sudo apt-get install --reinstall ubuntu-desktop

Solution 3: Install other Desktop Environment like,Gnome, KDE..etc

Now, I suggest you try Gnome Desktop. It also looks cool.

sudo apt-get install gnome-shell ubuntu-gnome-desktop

After trying any solution, just reboot your system.

$ sudo reboot


I've fixed grub errors using Super Grub Disk.


Using chown successfully but not actually changing user ownership in Ubuntu bash on Windows 10?

I had the same issue on my Windows 10 Ubuntu subsystem.

The d drive wouldn't let me change anything from root:root, even though whoami told me I was under my own user.

I then went to my home directory, and from there, everything worked as expected.


is there a browser that disables the rendering of images?

I'm not sure if this is entirely what you are after, but lynx is a text only browser for Linux? http://packages.ubuntu.com/search?keywords=lynx

I hope that this helps.


How to identify malicious .deb files / sources?

After asking this, I noticed that even for these kinds of packages, user reviews show up in Software Center. At least if there were ransomeware or something very obviously malicious in a package, users could report it as a negative review.


How to set default file type PNG for Simple Scan?

Simple Scan stores its settings in dconf database rather then in your profile. Its keys can be listed by the command:

gsettings list-keys $(gsettings list-schemas | grep -i 'simple' | grep -i 'scan')

As you can see, there's no mentioning about the preferable file format.

At the page of its developers I also found confirmation that there's no way of saving your preferred file format permanently: https://answers.launchpad.net/simple-scan/+question/273400
This info is pretty fresh. Maybe someday they'll add this functionality, but now default file type is PDF. Older versions of application were more adaptive - they used PDF as default file type for 'Text' and JPG as default file type for 'Image'. This behavior is hardcoded. Modifying the source and recompiling seems the single way to overcome that.


Has anyone tried the Lenovo USB 3.0 Dock on Ubuntu?

Edit August 2015

There is a beta driver now to support USB3 docks. See the linked forum for details.

Edit January 2016
Out of the box working:

HDMI
Sound (depending on your device change soundcard output)
USB (front and back)
With installed driver working:
Ethernet
https://forums.lenovo.com/t5/Linux-Discussion/Onelink-Dock-and-Linux-support/td-p/1346267

Original answer

The video of the dock is not supported under Linux, and will not be for a longer time.
The dock uses a DL3XXX-generation Displaylink chip for video, driver support for this does not exist and is not planned by the producer in the near future.

I repeat: although Displaylink claims to support Linux in their FAQ, the latest generation does NOT support Linux

http://www.displaylink.org/forum/showthread.php?t=1748

But the NIC and usb ports work out of the box, so if you want an expensive usb-hub/NIC, go ahead.

USB2-based docks with displayport should be supported, though.


Ubuntu 16.04 LTS error on start up but keeps on going fine

MSFT0101 is an ACPI object and refers to Intel Platform Trust Technology (Intel PTT).  It seems that the kernel platform driver (drivers/bases/platform.c) cannot add this device to the device hierarchy because the ACPI IO or memory spaces resources could not be claimed. Not sure if this is because of a firmware configuration issue or more probably because there is no driver support for this.  Either way, unless you are wanting to use Intel PTT, this is error message can be probably ignored.

The /dev/sda1: clean, 198582/30007296 files, 6133617/120023296 blocks message is just the result of checking partition /dev/sda1 on boot and it's some message cruft appearing on the console and can be ignored too.


How do i move past a stuck PAM configuration on Ubuntu-pushed update?

I used

sudo dpkg --configure -a

then  a terminal option screen (similar to the pam-auth-update screen) opens and you can (un-) select  with the Space key and move with the Tab key.


How do I cut dvb-streams (mpeg) easily? DVBCut doesn't run in 11.10

I took the deb-file from another ppa. This works. Additionally I created a .desktop-file to use this app via rightclick.

Only problem: When starting the app i miss the icons:

But it works, though. The icons appear later.


Broadcom STA wireless driver not activating

Your wifi driver is not installed and eithernet port is also not working then you can choose or arrange any one to connect with internet for 1st time or initial setup drivers (wifi, graphic) :-

USB LAN card,

Mobile (smart phone) but you should specific here network and additional information,

Data Card/ Internet Toggle that work in linux

These option will essentially help you to setup the ubuntu and update drivers ,
and try to reinstall Broadcom driver because it support BCM4312 and  wifi will also work.


How to use Compose Key with ~/.XCompose on 19.10?

As it turns out to get ~/.XCompose updates to occur one needs to restart ibus using ibus restart.


AWK with RS not matching a pattern (asking again becuase I accidently labled as solved. Better explanation ths time.)

Your approach is fraught with problems. Most importantly, there's no obvious way to restrict the regex match to the body text of the document - in the case of /line/ for example, that's going to match tags such as <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
(There's also an issue with your RS regex consuming two newlines, which will prevent it from properly handling adjacent separators; RS='\n([ \t]*<[^>]*>\n)+' might fix that but I won't guarantee it).
Instead, what I'd suggest is extracting the document's body text first and then applying awk in "traditional" paragraph mode (i.e. using the empty record separator):
xmlstarlet sel -t -v "//office:body/office:text/text:p" -n content.xml |
  awk -v RS= '/line/{print $0 ORS}'

or with GNU awk, preserving the actual record separators as parsed:
xmlstarlet sel -t -v "//office:body/office:text/text:p" -n content.xml |
  gawk -v RS= '/line/{printf $0 RT}'

You could even omit the intermediate file altogether, piping stdout from unzip -p:
unzip -p somefile.odt content.xml |
  xmlstarlet sel -t -v "//office:body/office:text/text:p" -n - | gawk -v RS= '/line/{printf $0 RT}'


Charcters in Lubuntu are Stylized/Italic

Resolved:
I changed the font selection in "Customize Look and Feel:, "Widget", "Default Font".

Thanks for the help.


Check which graphics cards is being used by Ubuntu 16.04

If you have both Intel and Nvidia, it is a good idea to have installed the Nvidia X Server Settings utility; you can do this from the Ubuntu Software downloader, or do:

sudo apt-get install nvidia-settings

and just do nvidia-settings on bash afterwards; or open it by hand. This will allow you to see what card is being used or to select the card you want to use.

Good luck!


Error entering to my ubuntu 20.04 because it is full and grub doesn't recognize my Usb

In this image, you can see that the grub only recognizes my ubuntu partition

Grub only knows about boot devices with bootable operating systems that it's been told about. Booting from the USB device is a function of your machine's BIOS. Normally this is done with a key press on boot but it varies between machines. It might be Esc, Del, F2, F8, F10, F12 or something else, so you need to consult your machine's manual about overriding the default boot device.
That said, I would advise against expanding the partition until a) you have a backup of your treasured stuff, and b) you have booted into the USB device and cleaned up some space by deleting files, and c) you have investigated the cause of the partition filling up. A look in /var/log is in order because if there is an error then the logs could have been spammed by the kernel to the point that the log filled up your drive.


I have a problem while installing the Virtual box in Ubuntu 18.04 with dual boot UEFI secure boot

It's a problem of the version as well as Secure Boot. I followed the steps:

Disable Secure Boot from BIOS settings.
Install  VirtualBox 6 (if the problem is with 6.1).


Enable MOTD message on WSL and WSL2 for Windows 10?

This is one way to do this. I am sure there are others
Open .bashrc and add this line to the end of it
/usr/bin/landscape-sysinfo
You will see the MOTD on every WSL2 terminal instance.


Verify that dockerd is running

Assuming docker in installed (sudo apt install docker.io or like this), you should see a running daemon in the process list:

$ ps axuf | grep docker
root       7694  0.2  0.2 1932540 75504 ?       Ssl  Apr28   4:19 /usr/bin/dockerd -H fd://
root       7721  0.2  0.1 1917924 38596 ?       Ssl  Apr28   3:12  \_ docker-containerd --config /var/run/docker/containerd/containerd.toml --log-level info

If not, try to start/restart the daemon with:

$ sudo systemctl restart docker

$ systemctl show docker | grep State
StateDirectoryMode=0755
LoadState=loaded
ActiveState=active
SubState=running
...

If the daemon fails to start, check the output of journalctl -u docker for error messages.

Add user to group

The user you are working with, must be in the docker group. Check you current group membership with:

$ groups
username adm cdrom sudo dip plugdev lpadmin sambashare docker

If you are not part of the docker group add you current user with:

$ sudo adduser $(whoami) docker

Logout and login again for the changes to take effect.


How to get a list of installed packages held back from upgrade?

You can use apt-mark:

apt-mark showhold

this will show the packages that are kept in "hold" state so that the pacakge manager won't auto upgrade the packages.

From man apt-mark:

showhold
           showhold is used to print a list of packages on hold


18.04: Add a script as an option for "Default Mail Handler"

Thanks to @danzel, I found the answer was indeed to use a .desktop file.

So I created a simple script that allows you to specify a set of different mailers - I use my work email (Outlook for web), my personal email (via ssh) and sometimes gmail.

Here's the code:

#!/usr/bin/ruby
# 1) Put "mailto.desktop" in /usr/share/applications
# 2) sudo update-desktop-database
# 3) System Prefs -> Details -> Default Applications

require 'uri'

# %SUBJECT% decoded subject, i.e.:  "Hey guys!"
# %subject% encoded subject, i.e.:  "Hey%20guys%21"
# Same for %to% and %body%
# Also %mailto% for initial value of "mailto:..."
MAILERS = {
    'Home' => ['ssh','-t','my-home-server.com','elm','-s','"%subject%"','%to%'],
    'Work' => ['browser','https://outlook.office.com/?path=/mail/action/compose&to=%mailto%'],
    'Gmail' => ['browser','https://mail.google.com/mail/u/0/?&view=cm&fs=1&to=%TO%&su=%SUBJECT%&body=%BODY%']
}

def fatal(title,message)
    system('zenity','--width','400','--height','250','--error','--title',title,'--text',message)
    exit -1
end

def clean(str)
    #'"'+str+'"'
    str.sub(/"/,'')
end

#########################
# Figure out mailto:
#########################
mailtoStr=ARGV.join('')
mailtoStr.sub!(/^mailto:/,'')
mailto = mailtoStr.split(/[\?\&]/)
mailtoStr.sub!(/\?/,'&')  # Outlook is confused if you use:  'mailto:addr@some.com?subject=...' instead of '..&subject..'
mailHash = Hash.new
mailto.each { |m|
    m.match(/^([^=]+)=(.*)/m)
    key,val = $1,$2
    key,val = 'to',m unless key
    mailHash[key.upcase] = clean(val)
    mailHash[key.downcase] = clean(URI.decode(val))
}
fatal("No 'to' specified",'Need to specify an address in the mailto') unless mailHash['to']

FIELDS = %w(to body subject mailto)
def sendInfo(mailHash,mailtoStr,field)
    return '' unless field
    return mailtoStr if field=='mailto'
    return '%'+field+'%' unless FIELDS.index(field.downcase)
    mailHash[field] || ''
end

#########################
# Pick mailer
#########################
mailer = 'Work' if mailHash['to'].match(/@my-work-domain.com$/)
mailer ||= `zenity --width 400 --height 250 --title "Mailer select" --text "Choose mailer for #{mailHash['to']}:" --list --column "Mailer" #{MAILERS.keys.map { |m| '"'+m+'"' }.join(' ')}`
mailer.chomp!

fatal('Unknown Mailer',"Don't know mailer selection #{mailer} or no mailer selected") unless MAILERS[mailer]

cmd = MAILERS[mailer]
cmd.each { |c|
    c.gsub!(/%([^%]+)%/) { sendInfo(mailHash,mailtoStr,$1) }
}
#p cmd
system(*cmd)
# Sometimes ssh is broken on my system...
system(*cmd) if cmd[0].match(/ssh/) && $?.exitstatus!=0

And the mailto.desktop which goes in /usr/share/applications:

[Desktop Entry]
Encoding=UTF-8
Name=Custom mailto Mail Handler
Comment=Handle mailto links
GenericName=Mail Client
Keywords=Email;E-mail
Exec=/home/dave/bin/mailto %u
Terminal=true
X-MultipleArgs=false
Type=Application
Icon=mail-send
Categories=Application;Network;Email;
MimeType=x-scheme-handler/mailto;application/x-xpinstall;
StartupNotify=true

I have "Terminal=true" because I use ssh, and that's where the ssh window goes, otherwise the terminal window disappears pretty quick.  If you don't use any terminal based mailers you can set that to false.


You should have the Global Menu Bar Integration addon installed. Did you install Thunderbird manually?

Try installing the thunderbird-globalmenu package from the software center and then restarting Thunderbird.


Why is Ubuntu14.04LTS running beta version of GRUB?

"Why is Ubuntu supposedly LTS version using a beta version of grub?!?"

According to https://lists.ubuntu.com/archives/ubuntu-devel/2014-January/037978.html [1] because "This represents a year and a half of upstream development, and contains many new features".

[1] found via http://www.omgubuntu.co.uk/2014/01/grub-2-beta-ubuntu-14-04-lts via googling ubuntu beta grub.


1000baseT/Full Supported and Advertised but not working!

Your switch needs to support gigabit as well, and you need to be using cat5e cable.


Where is Ubuntu's drum roll sound located?

Since at least version 13.10, it's been here: /usr/share/sounds/ubuntu/stereo/system-ready.ogg


Why are Linux kernel images missing from the Ubuntu Kernel PPA for 4.17-rcX? (Ubuntu-Mainline-Kernel-Updater)

Early -rcs commonly are not buildable due to upstream bugs.  The later switch to -unsigned is deliberate and permenant for later versions.  These relate to a change to have always signed kernels on full installed so the linux-image-* package now always contains a signed kernel if one exists.  The unsigned kernel is shipped in linux-image-unsigned-*.  These kernels are by definition always unsigned.


Is there a GUI tool for managing systemd on Ubuntu 18.04 (Bionic Beaver)?

I'm surprised no one has mentioned chkservice yet. A curses tool for enabling,disabling, and starting/stopping systemd units. It's even in the usual apt repo, so you can just sudo apt install chkservice.


Configure Dual Boot, Windows 7 and Ubuntu 12.04 with or without EFI

First, your partition table is clearly a GUID Partition Table (GPT). Since Windows will boot from GPT disks only if the computer uses an Extensible Firmware Interface (EFI) rather than the older Basic Input/Output System (BIOS), it's clear that you're booting in EFI mode. This is a critical detail, since traditional BIOS solutions are unlikely to work on an EFI system.

It's unclear from your description precisely what's booting. My best guess is that the Windows boot loader is booting, and you've used EasyBCD to create an Ubuntu entry that's not working. This is hardly surprising; the last I checked, the Windows EFI boot loader could not redirect the boot process to another boot loader, so EasyBCD's non-Windows entries will be useless to you. If I've misinterpreted what's happening, and you're actually seeing a GRUB boot menu that's able to boot Windows but not Linux, then please elaborate.

If my interpretations so far are correct, you may be able to use your firmware's boot menu to select GRUB rather than Windows and use that to boot into Linux. If your firmware's boot manager is good enough, this may even be an acceptable long-term solution. Unfortunately, EFI firmware implementations' boot managers are extremely variable in quality, and many of them are poor. If you can't find a boot menu in your firmware or if using it is awkward, you have two main options:

You can reconfigure the computer's boot setup to make GRUB 2 the default boot loader and reconfigure GRUB to include an entry for Windows. This will entail renaming boot loader files and/or using a utility such as Linux's "efibootmgr" to adjust the boot loader list in the computer's NVRAM.
You can add a third-party boot manager, such as rEFIt or its newer fork rEFInd, to control the selection of booting Windows vs. Linux. The rEFInd Web site includes detailed installation instructions. (Note that I'm the one who forked rEFIt into rEFInd.)

Be aware that the EFI boot process involves files stored on a partition known as the EFI System Partition (ESP), which is /dev/sda1 on your computer. Boot loader files typically reside in subdirectories of the EFI directory on that partition, as in EFI/Microsoft or EFI/ubuntu. The NVRAM holds a list of boot loaders and the order in which the firmware should try to launch them. Managing boot loaders involves adding, deleting, or moving the boot loader files and editing the NVRAM entries. In some cases, a default boot loader (EFI/Boot/bootx64.efi; although some implementations also support EFI/Microsoft/Boot/bootmgfw.efi as a default) is loaded if the NVRAM entries are empty or point to invalid boot loaders. For more information on this topic, as well as information on Linux's EFI boot loaders, see my Web page on the topic.


(Ubuntu 14.04.2) Unity will not load on Dell Inspiron 531s with Nvidia GeForce 6150SE graphics

I fixed my issue by going into the Ubuntu recovery mode and running sudo apt-add-repository ppa:xorg-edgers/ppa sudo apt-get update sudo apt-get install nvidia-current.


How do I view all available HDD's/partitions?

There are many ways but my favorite is lsblk. Here is a demonstration:

sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL

That would show the following:

NAME   FSTYPE   SIZE MOUNTPOINT LABEL
sda           111.8G
├─sda1 swap     121M [SWAP]
└─sda2 ext4   111.7G /
sdb             2.7T
└─sdb1 ext4     2.7T            xtreme
sdc             3.7T
└─sdc1 ext4     3.7T            titan

It is showing:

The name of the drive and the partitions it has.
The type of file system.
The size the whole drive has and the size each partition has.
The mount point and if available, the label for them.

You can play around with the options by first looking at the ones available with lsblk --help. I like lsblk because of the friendly way of showing the information if compared for example with fdisk or parted.


Yes I got stuck in the same situation but was able to restore to the xrdp from the repository. I spend many hours trying to find out how to undo the script.

Step 1. Remove the service files and the backup files.

sudo rm /lib/systemd/system/xrdp*

Step 2. Remove the new xrdp binaries (to make sure they do not end up in the classpath of the service).

sudo rm /usr/local/bin/xrdp*
sudo rm /usr/local/sbin/xrdp*

Step 3. Remove keys (got a 'security exception' in the client before removal)

sudo rm /etc/xrdp/rsakeys.ini


Installing Ubuntu in a secondary HDD, without formatting the drive

You can use Disk Management in Windows, in order to Shrink you HDD. After shrinking you will be left with some un-allocated space. That will be the new partition of yours in which you can install Ubuntu. You can also do that during the installation of the Ubuntu.

If you don't want to use Linux, accommodated in first level by the hardware of your machine, you should consider Virtualization. You won't have to dual boot and you will have the ability to access Linux, from within Windows. (e.g. Virtual Box)


Ubuntu 18.04 No Wi-Fi Adapter Found - Realtek driver rtl8821ae

you can install the latest Realtek drivers from this repository
https://github.com/lwfinger/rtw88
sudo apt-get install linux-headers-generic build-essential git
git clone https://github.com/lwfinger/rtw88.git
cd rtw88
sudo make install
sudo modprobe rtl8821ae


Split and add suffix and prefix to file content

It's a little tricky to get the quoting right (I think because split invokes bash - c ' ... ' under the hood), but recent versions of GNU split provide a --filter command that should allow you to do that - for example using sed

split -l 10 --filter='sed -e '\''1i\header text'\'' -e '\''$a\footer text'\'' > $FILE' file

or (even simpler), with printf

split -l 10 --filter='{ printf "header text\n"; cat - ; printf "footer text\n"; } > $FILE' file

To illustrate, given file generated as

printf '%03d\n' {1..100} > file

i.e. lines consisting of numbers from 001 to 100, then

split -l 10 --filter='{
  printf "header line 1\nheader line 2\n"
  cat -
  printf "footer line 1\nfooter line 2\n"
  } > $FILE' file

giving output files

$ ls xa?
xaa  xab  xac  xad  xae  xaf  xag  xah  xai  xaj

with for example

$ cat xad
header line 1
header line 2
031
032
033
034
035
036
037
038
039
040
footer line 1
footer line 2