How to display custom formatted clock in top bar on multiple displays in Ubuntu 18.04?

BLUF: This is a permanent and clean way to alter formatting of the Gnome top bar clock to your liking without the use of extensions.

I also wanted to display a custom-formatted string for the clock in the Gnome top bar but with just a single display.  However, this answer will extend to your problem as well and allow you to use just the multi-monitor top bar extension.  My goal was to simply do this without any extension in my case so the custom time format would be seen consistently at the initial gdm login screen upon boot, while in active logged-in sessions, and on the session unlock screen.  It took some digging but the key lies in how Gnome handles localization/internationalization and how the Gnome wall clock, as it's called, obtains the string to actually display in the top bar.

First, a bit of background on the use of .po and .mo files in Gnome localization/internationalization can be found here:

https://wiki.gnome.org/TranslationProject/LocalisationGuide

Basically, at runtime, Gnome wall clock takes the current time and applies localization/internationalization string formatting.  It uses a string key to look up a formatting string to use for a given locale to determine what to actually display -- it does not rely on the locale file formatting strings.  If you modify the value returned for a given key in the localization/internationalization file, the clock display will reflect the change.  Localization/internationalization uses two files.  The first is the human-readable .po file that translators populate for each locale and this is where the mapping from lookup keys to formatting strings can be found.  The second is the .mo file that is generated from the .po file... more on this and how it relates in just a bit...

Below is a link to the source for the Gnome wall clock version used in Ubuntu 18.04:

https://github.com/GNOME/gnome-desktop/blob/gnome-3-28/libgnome-desktop/gnome-wall-clock.c

If you examine the function 'gnome_wall_clock_string_for_datetime' beginning at line 261, you'll see the localization/internationalization lookup keys in use.  There are several.  Ubuntu has various display settings for the wall clock depending on whether you want to display just the time, time with day, time with day and date, etc.  Each of these corresponds to a given localization/internationalization lookup key that wall clock uses.  What you see in quotations below is not the formatting string itself but rather the key to look up the actual formatting string.  The _() that surrounds each key performs the lookup:

char *
gnome_wall_clock_string_for_datetime (GnomeWallClock      *self,
                      GDateTime           *now,
                      GDesktopClockFormat  clock_format,
                      gboolean             show_weekday,
                      gboolean             show_full_date,
                      gboolean             show_seconds)
{
    const char *format_string;

    if (clock_format == G_DESKTOP_CLOCK_FORMAT_24H) {
        if (show_full_date) {
            /* Translators: This is the time format with full date used
               in 24-hour mode. */
            format_string = show_seconds ? _("%a %b %e, %R:%S")
                : _("%a %b %e, %R");
        } else if (show_weekday) {
            /* Translators: This is the time format with day used
               in 24-hour mode. */
            format_string = show_seconds ? _("%a %R:%S")
                : _("%a %R");
        } else {
            /* Translators: This is the time format without date used
               in 24-hour mode. */
            format_string = show_seconds ? _("%R:%S") : _("%R");
        }
    } else {
        if (show_full_date) {
            /* Translators: This is a time format with full date used
               for AM/PM. */
            format_string = show_seconds ? _("%a %b %e, %l:%M:%S %p")
                : _("%a %b %e, %l:%M %p");
        } else if (show_weekday) {
            /* Translators: This is a time format with day used
               for AM/PM. */
            format_string = show_seconds ? _("%a %l:%M:%S %p")
                : _("%a %l:%M %p");
        } else {
            /* Translators: This is a time format without date used
               for AM/PM. */
            format_string = show_seconds ? _("%l:%M:%S %p")
                : _("%l:%M %p");
        }
    }

    return date_time_format (now, format_string);
}

For instance, I wanted a custom format string for displaying day, and date, and time in 12 hour format.  That is in Ubuntu, I had set the clock to display the day, date, and time in 12 hour format which corresponds to the 'full date' in the above code.  Examining the function, I was able to determine that this 'full date' lookup key occurred at line 288:

/* Translators: This is a time format with full date used
   for AM/PM. */
format_string = show_seconds ? _("%a %b %e, %l:%M:%S %p")
        : _("%a %b %e, %l:%M %p");

I wasn't interested in seconds so the key I needed to find in the localization/internationalization .po file was:

'%a %b %e, %l:%M %p'

The localization/internationalization .mo files are binary in format but easily generated from a human-readable plain-text mapping .po files that maps a given lookup key to formatting string.  Gnome wall clock uses a file with the specific name of gnome-desktop-3.0.mo for localization/internationalization.  It was not present on my system under the prescribed location for any locale:

/usr/share/locale/XX/LC_MESSAGES

So, I didn't need to worry about replacing it but rather creating it anew.  Regardless, you need to first obtain the .po file for your locale:

https://github.com/GNOME/gnome-desktop/tree/gnome-3-28/po

Next, find the above mentioned specific key(or the key for which you want to change the formatting string based on your clock setting in Ubuntu) in the .po file.  The string key is 'msgid' and the formatting string to be returned is 'msgstr'.  For instance, the snippet from my .po file is(ignore their comment since the code lines don't actually match up):

#: ../libgnome-desktop/gnome-wall-clock.c:316
msgid "%a %b %e, %l:%M %p"
msgstr "%a %b %e, %l:%M %p"

After the modification:

#: ../libgnome-desktop/gnome-wall-clock.c:316
msgid "%a %b %e, %l:%M %p"
msgstr "%A %b %-d, %l:%M %p"

Prior to the change reflected in the above 'msgstr' it would have displayed:

Mon Feb  4, 12:22 PM

But after the above change the day is no longer abbreviated and the leading space in front of the date has been removed(see the end of this answer for the formatting specifiers):

Monday Feb 4, 12:22 PM

Next, take this .po file and run it through the following on the command line to obtain the messages.mo file where XX is your locale.  The binary msgfmt is already installed on Ubuntu 18.04:

msgfmt -cv XX.po

Next, rename the resulting messages.mo file to gnome-desktop-3.0.mo and copy it to your specific locale LC_MESSAGE directory:

/usr/share/locale/XX/LC_MESSAGES/gnome-desktop-3.0.mo

Then, to effect the change, log out and log back in.  If you find that the formatting did not change then double check that your current clock settings truly correspond to the key for which you changed the formatting string.

Finally, here are some formatting string specifiers to help you along.  I borrowed these from another site so no guarantees that these all work in Gnome:

The % sign indicating a directive may be immediately followed by a padding modifier, e.g. %-d:

0 - zero-padding
_ - space-padding
- - disable padding

%a - abbreviated weekday name.*
%A - full weekday name.*
%b - abbreviated month name.*
%B - full month name.*
%d - zero-padded day of the month as a decimal number [01,31].
%e - space-padded day of the month as a decimal number [ 1,31]; equivalent to %_d.
%f - microseconds as a decimal number [000000, 999999].
%H - hour (24-hour clock) as a decimal number [00,23].
%I - hour (12-hour clock) as a decimal number [01,12].
%j - day of the year as a decimal number [001,366].
%m - month as a decimal number [01,12].
%M - minute as a decimal number [00,59].
%L - milliseconds as a decimal number [000, 999].
%p - either AM or PM.*
%Q - milliseconds since UNIX epoch.
%s - seconds since UNIX epoch.
%S - second as a decimal number [00,61].
%u - Monday-based (ISO 8601) weekday as a decimal number [1,7].
%U - Sunday-based week of the year as a decimal number [00,53].
%V - ISO 8601 week of the year as a decimal number [01, 53].
%w - Sunday-based weekday as a decimal number [0,6].
%W - Monday-based week of the year as a decimal number [00,53].
%x - the locale’s date, such as %-m/%-d/%Y.*
%X - the locale’s time, such as %-I:%M:%S %p.*
%y - year without century as a decimal number [00,99].
%Y - year with century as a decimal number.
%Z - time zone offset, such as -0700, -07:00, -07, or Z.
%% - a literal percent sign (%).


How to recover tmp folder and problems with apt lockfile

To recreate /tmp you need to do the following:

mkdir /tmp
sudo chmod 1777 /tmp

But

E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)

has nothing to do with /tmp. See Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?


Problems configuring my usb ac051 wifi adapter

For now the solution is
sudo apt install git build-essential
git clone https://github.com/ulli-kroll/mt7610u.git
cd mt7610u
make
sudo make installfw
sudo cp mt7610u.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless/
sudo depmod -a
make clean
When a kernel update occurs you will need to recompile
cd mt7610u
make
sudo cp mt7610u.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless/
sudo depmod -a
Reboot

I have forked the ulli-kroll github and will work on a dkms solution when I have time.  DKMS will automatically compile the module when a new kernel is installed

DKMS Support:
For those who have already downloaded from the ulli-kroll github do
rm -rf mt7610u

For new users and ones that have deleted the existing mt7610u directory in /home
sudo apt install git dkms build-essential
git clone https://github.com/jeremyb31/mt7610u.git
sudo dkms add ./mt7610u
sudo dkms install mt7610u/1
cd mt7610u
sudo make installfw

Reboot and check BIOS to make sure Secure Boot is disabled.


It is already so.

If you mean you want NetworkManager do not overwrite resolv.conf you should consider declaring your nameservers in NetworkManager, rather than writing them in resolv.conf.

To this aim, it is enough to go to IPv4 page of the connection and set the method to "Automatic (DHCP) address only", or "Manual" if you want to set also a static IP address.


Try installing compizconfig settings manager through the software center.  Open the program and navigate to "Effects," and enable "Window Decoration."  You may then logout then login, or open the terminal and type

  unity --reset

This should give you the maximize, minimize, resize back.


Why is my "sudo fdisk -l" output so messy?

/dev/mapper is an LVM logical volume. You probably installed your system as LVM.

What is messy about this output? If it is the "doesn't contain a valid partition table": fdisk does not understand LVM content. You need to use

lvdisplay to see logival volumes
vgdisplay to see volume groups
pvdisplay to see physical volumes


How to remove error sound from Pycharm terminal?

Inside PyCharm: Go to File→Settings→Tools→Terminal  and disable Audible bell.


You can also try UNetBootin which should install the .iso and everything up for you.

(Although like the previous answer, your other files will be wiped)


I cant seem to see my internal hd via my running installation on my ext hd

GNOME Disks (availible in all standard Ubuntu and Pop OS 20.04) will scan all disks and will allow you  to mount them. This will show all your external and internal storage devices and allowes you tto mound and unmount partitions, like the data partition on your internal hard drive. It supports a lot of partition types, most common are ext4, ntfs and exFAT.


puzzled by "no space" complaint from apt

The inodes have it.  Thanks again, gertvdijk.

In my comment you can see that the filesystem, though not nearly full, was about out of inodes.  After looking at man mkfs.ext4 I decided to cut its bytes/inodes ratio in half.  This ratio is set by the -i option.  A quick calculation based on the outputs of df -k and df -i showed mine to be about 2^14, so I would go with 2^13.  (Below I've used {} to indicate placeholder objects whose details might be distracting.)  I then

decided to use temporary storage {tempmountpoint} mounted on {tempdev}.  This is big enough to hold the contents of my /usr tree.
copied the contents of /usr into {tempmountpoint} with

rsync -avu /usr/ {tempmountpoint}

unmounted both of these
mounted /usr to {tempdev} (so I could keep working on other things through all of this)
reformatted /usr's original (and eventual target) partition with

mkfs.ext4 -i 8192  /dev/sda8

mounted /dev/sda8 to {tempmountpoint}.
copied the contents of the temporary /usr back into its target partition with

rsync -avu /usr/ {tempmountpoint} .

Finally, I looked up the (new) UUID with

ls -l /dev/disk/by-uuid

used this UUID to edit the /usr entry in /etc/fstab, and
rebooted.

Updates are working normally now.  And the filesystem looks to be in reasonable shape, as in:

> df -k /usr
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/sda8       10156344 7349228   2282880  77% /usr
> df -i /usr
Filesystem      Inodes  IUsed  IFree IUse% Mounted on
/dev/sda8      1310720 679355 631365   52% /usr

Some notes:

(i) /home already had its own partition.  If it had been in /usr I would approach this a little differently.

(ii) Choice of tools:  I like ls /dev/disk/by-uuid because ls is very, very well known.  I used rsync partly because when I had to do something else for a while before getting back to this, I could run the same rsync command again to "refresh" the copy.  Also, I like it and it can do this.  Others may have different utilities that satisfy these criteria.  For example, until a few years ago I would've used cpio.  Whatever gets you through the byte.

(iii) The placeholders refer to what had been the fat32 (vfat) filesystem on /dev/sda7, mounted at /windows.  I reformatted it in cold blood before the above procedure.  I never bothered changing the mountpoint name, which could be confusing second-hand.

Thanks to all who helped or contributed.


How to create aliases with "overlapping" names to existing commands?

For the above to work, you need to reference the absolute path of the command you want to run.
The can be done with the following:
alias sst='/usr/bin/ss'
alias ss='sudo -s

However, one can't always be sure ss is at that location, so a more solid approach would be:
alias sst='$(which ss)'
alias ss='sudo -s

Now the above works as expected, where ss runs sudo -s and sst runs the command ss.


Automatically kill a process if it exceeds a given amount of RAM

I would strongly advise not to do it. As suggested by @chrisamiller , setting ulimit will limit the RAM available with process.

But still if you are insisting then follow this procedure.

Save the following script as killif.sh:

#!/bin/sh

if [ $# -ne 2 ];
then
    echo "Invalid number of arguments"
    exit 0
fi

while true;
do
    SIZE=$(pmap $1|grep total|grep -o "[0-9]*")
    SIZE=${SIZE%%K*}
    SIZEMB=$((SIZE/1024))
    echo "Process id =$1 Size = $SIZEMB MB"
    if [ $SIZEMB -gt $2 ]; then
        printf "SIZE has exceeded.\nKilling the process......"
        kill -9 "$1"
        echo "Killed the process"
        exit 0
    else
        echo "SIZE has not yet exceeding"
    fi

    sleep 10
done

Now make it executable.

chmod +x killif.sh

Now run this script on terminal. Replace PROCID with actual process id and SIZE with size in MB.

./killif.sh PROCID SIZE

For example:

./killif.sh 132451 100

If SIZE is 100 then process will be killed if its RAM usage goes up beyond 100 MB.

Caution: You know what are you trying to do. Killing process is not a good idea. If that process has any shutdown or stop command then edit the script and replace kill -9 command with that shutdown command.


Swap not working even after following previous advice

Found the answer here:

Changed /etc/crypttab to include:

cryptswap   /dev/sda9    /dev/urandom     swap,cipher=aes-cbc-essiv:sha256,size=256

and /etc/fstab to include:

cryptswap   /dev/sda9    /dev/urandom     swap,cipher=aes-cbc-essiv:sha256,size=256

Now free -m shows:

             total       used       free     shared    buffers     cached
Mem:          3377        543       2834         17         57        226
-/+ buffers/cache:        260       3117
Swap:         7628          0       7628


Simiplified explanation of mlabel command

From man mtools, section Common features of all mtools commands:

The drive letter : (colon) has a special meaning. It is used to  access
image  files which are directly specified on the command line using the
-i options.

   mcopy -i my-image-file.bin ::file1 ::file2 .

This copies file1 and file2 from the image file (my-image-file.bin)  to
the /tmp directory.

So, this mlabel command is applying the label my_external to the drive :, which is specified using the -i /dev/sdb1 option.

The pre-installed Disks program can change labels without unmounting disks, so it might be possible for mlabel to do so.


Problems with NVIDIA drivers: White screen with full(or almost full)screen apps

Solution:

Click on the Ubuntu-Symbol in the top left corner
Type hardware and select hardware-drivers
Activate driver number 173

Source: http://ubuntuforums.org/showthread.php?p=10748878

Background:

There is a launchpad entry describing this bug and any progress towards solving it:

https://bugs.launchpad.net/ubuntu/+bug/773582


"Failed to open \EFI\Microsoft\Boot\grub64.efi", etc

If the computer is booting, the safest approach is to ignore the messages, since they're nothing but an eyesore -- and one that lasts for less than a second, according to your report. Any attempt to fix the problem runs the risk of creating bigger problems.

If you want to proceed, I recommend you examine two things:

The output of the command sudo efibootmgr -v. This may show stray entries in the firmware for the missing files. If so, removing those entries (with efibootmgr -- type man efibootmgr to learn about its use) may remove the error messages.
The contents of the /boot/grub/grub.cfg file. This is the GRUB configuration file, and it may have references to those files. Unfortunately, editing grub.cfg is tricky; you don't normally edit it directly, but instead rely on scripts to construct it. Thus, unless you're an expert, I reiterate my initial advice to ignore the problem; or if you're really offended by those messages, it may be easier to switch to my rEFInd boot manager than to try to fix GRUB.


Install Brother MFC-7860DW in Kubuntu 14.04 LTS

First of all, when you're new to Ubuntu there are a few golden rules you have to use the first year you use Ubuntu:

Only install applications from the software center (This is the answer to your question: take the same series Brother 7800 series or 7000 series)
Before you buy anything, look for a Linux-Compatible logo.  If you cannot see a Linux Logo, look up the product name and "Linux" (forget about drivers: it's in the Kernel, or it's not)
If you don't know: Google is your friend
After you've read the first 15 entries of your Google search and nothing has come up, come here and search here.
Still unclear?  Ask a question.  (your first one was not too bad). While asking a question, Ask Ubuntu is going to still search for questions that might be the same as yours.  If you've missed them, look into them first.


Ubuntu Studio Controls: How to add and map surround audio channels to a pulse output bridge?

I spoke to a Ubuntu Studio developer and discovered this feature is not yet in Ubuntu Studio Controls. They made a note to add it for a future release.


How to rsync between home computer and computer inside another network?

There are several ways to solve this, however, because we want to run the rsync command on your home PC, I think the best way would be to create a tunnel from your home PC to the labpc, as follows:

joe@homepc> ssh -L 2222:127.0.0.1:2222 student7@ssh.university.edu

student7@university999> ssh -L 2222:127.0.0.1:22 joedude@labpc

Now, on your home PC, you should be able to ssh directly into the lab PC:

joe@homepc> ssh -p 2222 joedude@localhost

Once this is working, then you can build up an rsync script.

I would add the following lines to ~/.ssh/config

# Tunnel to labpc
Host labpc_tun
User joedude
Port 2222
# ProxyCommand  ... TODO: set up tunnel automatically
HostName 127.0.0.1

Now, you should be able to do (in a separate window, after first two ssh logins are done):

joe@homepc> rsync labpc_tun:/path-on-labpc/ /path-on-homepc/

There are lots more improvements you could make after this, but I would wait until you get the first part working, and then see how much automation you need.
To completely automate this you would need to use ssh-keygen to allow ssh logins without a password. You could also add more to .ssh/config for the first outgoing ssh leg. Using the ProxyCommand parameter in .ssh/config you could automate the entire thing.


Is it possible to allow the User Account to access the 'Volumes' without asking the Administrator's password?

First install sudo apt-get install gnome-system-tools

Than open the account manager:

Click on "Manage Groups" then create a new group and add your two users:

(if you don't want to install a GUI for groups you can create a new group from command line)

Now we have to change the /etc/fstab run:

gksu gedit /etc/fstab

and add for the first Volume (at the end of the file):

/dev/sda5 /media/Volume1 ntfs rw,auto,user,exec,nls=utf8,dmask=027,fmask=137,gid=1002,uid=1000 0 2

"gid" must be the group id from your new group.

"dmask" are the permissions for the directories:

0 at the beginning is for the owner (in this case the user with the
id 1000 should be your admin user) he has all permissions ( 0 ->
read, write and execute)
2 as the second digit is for all users in the group 1002 ( 2 -> read
and execute)
7 at the end is for others ( 7 -> no permissions )

"fmask" are the permissions for the files: 1 -> read and write 3 -> read only  7 -> no permissions

For more info look also at this answer https://askubuntu.com/a/54324/265974

Edit:

Mountpoints for the other partitions:

/dev/sda6 /media/Volume2 ntfs rw,auto,user,exec,nls=utf8,dmask=027,fmask=137,gid=1002,uid=1000 0 2
/dev/sda7 /media/Volume3 ntfs rw,auto,user,exec,nls=utf8,dmask=027,fmask=137,gid=1002,uid=1000 0 2


If I understand you correctly, you want to start a X application from a tty to be launched in a already running X server (tty7).

You can achieve that setting using DISPLAY:

$ DISPLAY=:0 libreoffice # just for the current command
$ # or to all the following commands.
$ export DISPLAY=:0
$ libreoffice


You can install Ubuntu in a virtual machine (e.g. VirtualBox). Then run:

dpkg --get-selections >installed_packages.txt

Your installed packages are listed in the installed_packages.txt file.


What spreadsheet programs are available?

Gnumeric
Gnumeric is part of 'GNOME Office' suite, which means it stylistically fits into Ubuntu, but can just as easily be used on its own.


How to adjust the search path for gnome-photos app?

The search paths of Photos (and other apps) are stored in Settings->Search where you can also modify them.

Maybe you can't see the Search icon in Settings because Privacy and Search panels missing from System Settings in Gnome 3.8

Please inform us if that is your case


I was able to fix the

  mongod: unrecognized service

issue by performing the following tasks:

sudo nano /etc/init.d/mongod

then copy and paste the content from this url and save it (you can use vim or any other text editor)

After that give executable permission

sudo chmod +x /etc/init.d/mongod

Now you will be able to start the service by following command

sudo service mongod start


How to install TP link WN822N on Ubuntu?

I suggest that, with a temporary working internet connection by ethernet, tethered or whatever means possible, open a terminal and do:

sudo apt update
sudo apt install git
git clone https://github.com/jeremyb31/rtl8192eu-linux-driver
cd rtl8192eu-linux-driver
make
sudo make install
sudo modprobe 8192eu

You wireless should now be working.

When Update Manager installs a later kernel version, also known as linux-image, after the required reboot, then recompile:

cd rtl8192eu-linux-driver
make clean
make
sudo make install
sudo modprobe 8192eu

Please retain the file and these instructions for that time.


Laptop freezes completely when watching videos

You could try using Oibaf's graphics-drivers PPA to update your drivers completely. This has solved some problems for me in the past when using Intel HD Graphics.

Be warned, this PPA contains drivers that are very bleeding edge, and may cause instability, as warned on the launchpad page. It will also send frequent driver updates almost daily. Although personally, I have never had any problems with it. For more info visit the launchpad page.

To do this, run the following commands:

    sudo add-apt-repository ppa:oibaf/graphics-drivers
    sudo apt update
    sudo apt upgrade


Teamviewer 9 cannot start on Ubuntu 14.04 LTS

I work on Ubuntu 14.04 LTS and have noticed that since 12.04 LTS. The installation never worked to me, however, I run it without installation and works almost perfect. I connect to Windows and run DOS based applications. Many Ctrl+ key combinations do not work in DOS based apps whilst in the WIN based apps work. This may help -- http://www.teamviewer.com/en/help/363-How-do-I-install-TeamViewer-on-my-Linux-distribution.aspx#other -- Check at the end of the page the heading "Run TeamViewer without installation".


Goldendict is the thing.

After installing it in Synaptic Manager and also the dictionaries as in the image from the question, start Goldentict and it will read the database.

After in opens all those separate dictionaries appear in it

When selecting a dictionary on that bar it takes some time to load. The quality of these supplementary dictionaries is usually mediocre.


Clearing thumbnail cache from terminal on Ubuntu 14.04

In Ubuntu 14.04 thumbnails are stored in ~/.cache/thumbnails while in Ubuntu 12.04 is stored in ~/.thumbnails.

Simply you can delete everything in there including those directories without being afraid of something bad will happen. This will just reset your thumbnails, causing them to be recreated according to the global settings.


Running my shell script instead of Ubuntu's built-in file

You have to provide the name for the alias, like alias passwd='/home/Unknown/bin/passwd'. This is often done by default for some commands like ls or grep, like alias ls='ls --color=auto'. Some background in here.

To run the original command and not the alias, you might use command passwd stuff-to-do.

That being said, substituting security-related binaries is a dumb idea.

EDIT:
.bashrc is not read in non-interactive shell by default, that is when running a script, a shell used by the script does not read the .bashrc file. You might use a function for that in .bashrc and then export it, like:

passwd(){
    /home/Unknown/bin/passwd
}
export -f passwd

I did not test that with passwd, but it should work.

Some of the details come from this question's answers.


By installing Kubuntu 12.10 after Ubuntu 12.04 you probably overlooked the option to disable the installation of the bootloader. It's enabled by default and will overwrite your current (Ubuntu 12.04) bootloader.

Luckily, you can just reinstall Grub from within your desired OS and thereby overwriting the one currently in place on the MBR of your hard drive. So, boot into your Ubuntu 12.04 OS (that's still possible, I guess, right?) and read the community documentation on this topic on how to reinstall Grub. Your Ubuntu 12.04 installation should just detect your other OSs fine.


How to configure a network in Ubuntu 14.04

"samba" is for connecting Windows machines with Linux machines. It can be used for Linuxes too but there are better methods.

If all your systems are Linux based please use "nfs" (where 1 machine acts as the server and the others as clients). You can then mount discs from the other machines onto any of the other machines in exact the same fashion as you would use local harddisks.

Quickstart
Which to use NFS or Samba?
ubuntuforums howto


Unity Dash "Most Frequently Used" Application Disappeared, How to Reinstall Unity & Zeitgeist Completely?

Finally, found the solution myself ^^

I had another problem with file search, and tried to completely remove and reinstall the components of unity and zeitgeist many times but it didn't help. So I tried something else and found the solution.

Simply delete the ~/.local/share/zeitgeist folder (not just activity.sqlite), and restart the computer. It will generate a new and fresh zeitgeist folder, and the dash will be normal again.

Note:
Just for safety reasons, I chose to rename the zeitgeist folder to zeitgeist.bak instead of completely deleting it, in case things didn't go as intended, because this was actually just a trial and success attempt :)


How to make Unity independent of every workspace?

The workspaces are a feature of the Unity desktop, hence there is not way to "separate" then from Unity(at least as far as I know).

For some applications (Pidgin and Libre Office, according to my quick tests) there can only be on instance running so clicking to the icon will take you back to the workspace where it is active.

For others, particularly for your mentioned concern --the home folder(Nautilus), if you right click the icon it will give you the option to Open a New Window, selecting this will open a new window in the current workspace and leave the windows in the other workspaces as they were(open to whatever location you left them at).

NOTE, however that if you right click the icon on any workspace and click "Quit" it will close all open windows on all workspaces.

I'm not sure all or the  other programs can be opened on multiple workspaces simultaneously, but Firefox(and I assume most other browsers) can.  (I would assume that any programs that shows the option to open a new window can be opened this way but I don't know that for sure.)

I know this didn't directly answer your question on how because I'm pretty sure it's not possible, but I hope it was useful in a "no but you can do this instead" kind of way.


Can't update, can't install from SC 18.04

Ran sudo apt-get update and it went flawlessly, I was then offered a partial upgrade which also went flawlessly and software is now installing. I can't believe it was that simple, I feel so silly. But thanks for helping.


How To Configure Bumblebee In Ubuntu 12.04?

Solved

The Solution

nano /etc/bumblebee/bumblebee.conf

# The Driver used by Bumblebee server. If this value is not set (or empty),
# auto-detection is performed. The available drivers are nvidia and nouveau
# (See also the driver-specific sections below)
Driver=   <<<<<<<<<<<<<<<<<<<<< edit

  Driver=nvidia

Then i did a reboot

optirun glxspheres   (at full screen)

OpenGL Renderer: GeForce GT 525M/PCIe/SSE2
187.070069 frames/sec - 190.120059 Mpixels/sec
187.936396 frames/sec - 191.000511 Mpixels/sec
186.800765 frames/sec - 189.846364 Mpixels/sec
187.095637 frames/sec - 190.146044 Mpixels/sec
188.431691 frames/sec - 191.503881 Mpixels/sec
188.418533 frames/sec - 191.490509 Mpixels/sec
187.152116 frames/sec - 190.203444 Mpixels/sec
189.413655 frames/sec - 192.501855 Mpixels/sec
187.145680 frames/sec - 190.196904 Mpixels/sec
186.200587 frames/sec - 189.236401 Mpixels/sec
189.276103 frames/sec - 192.362060 Mpixels/sec
187.059279 frames/sec - 190.109093 Mpixels/sec
186.445593 frames/sec - 189.485402 Mpixels/sec
188.927592 frames/sec - 192.007867 Mpixels/sec

  optirun firefox

No error

Update

librrfaker.so error & Xlib:  extension "NV-GLX" missing on display ":0".

for 64 bit

sudo ln -s /usr/lib/x86_64-linux-gnu/librrfaker.so /usr/lib/

for 32 bit

sudo ln -s /usr/lib/i386-linux-gnu/librrfaker.so /usr/lib/

the last thing

sudo chmod u+s /usr/lib/librrfaker.so


You may be missing the package unity-gtk2-module

sudo apt-get install unity-gtk2-module

Or it may be installed wrong

sudo apt-get install --reinstall unity-gtk2-module

Also make sure you restart or logout in order to make sure everything works right you may not have to do this, you may simply need to restart the program.


How do I get the libc development libraries for Ubuntu 12.04?

The build-essential  package should sort you out.

sudo apt-get install build-essential


How do I black list applications from the application indicator?

This is not so much an answer to the question, but instead a method of removing Steam from the system tray.
For the radiance theme that it appears you are using, open a terminal and run

sudo touch /usr/share/icons/ubuntu-mono-light/apps/48/steam_tray.png

If ambiance is being used

sudo touch /usr/share/icons/ubuntu-mono-dark/apps/48/steam_tray.png

Once this is done restart steam.

This will only work if there is no steam_tray.png in the folder. If there is move the file before issuing the command.


Can't install docker, ca problems with curl

I ran this program and it fixed my certificate store:

$ sudo update-ca-certificates


How to monitor website stats from the terminal?

Yes. Enable ssh access for your web server (you can do this through the host gator control panel).  I am going to assume you are using apache and you would run tail -f /var/log/access.log.  Doing this will follow the file so to speak and instantly print to the shell when you have a new visitor to your web server.

Access.log has all the user agent, resource access, request type information, etc... that I see in the host gator screenshot above.

EDIT: This answer assumes you have a VPS or dedicated server.  I haven't used and unable to find any information for shared hosting.


Extract the java folder into /opt/ankama/Wakfu folder and run wakfu from the menu and the application will open.


Problems with libGl, fbConfigs, swrast through each update?

The swrast thing is the software renderer.  That means it's not finding the hardware driver for your graphics card.   There are a bunch of libGL libraries installed and a bunch of of symbolic links to those libraries.  To see these run this from the shell:

find /usr -iname "*libGL.so*" -exec ls -l -- {} +

Now the probable cause of your problem is that installing graphics drivers sometimes break these symbolic links.  (Specifically /usr/local/lib/libGL.so.1.2.0 is likely to be either the wrong lib or a sym link to the wrong link) (N.B. I wrote this a while ago.  libGL.so.1.2.0 was the current gl version it may be something else now).

To work out what library the OpenGL programs are trying to run you can turn on a bit of verbosity and run a simple OpenGL program.  You can verify this using the standard OpenGL test program:

LIBGL_DEBUG=verbose glxgears

Hopefully that will fail in the same way as SFML.  With LIBGL_DEBUG it should tell you what OpenGL library it's trying to load.  Furthermore the lib it will be trying to load will almost certainly be /usr/local/lib/libGL.so.1.2.0 (Edit: This was the standard OpenGL library on my machine at the time I answered this.  It may well be some other version on your machine now).

So the solution (in this case) is to make sure that /usr/local/lib/libGL.so.1.2.0 is a symbolic link pointing at the right OpenGL library.  In my case I have the Nvidia 3.40 driver so I ran:

ln -s /usr/lib/nvidia-340/libGL.so.1 /usr/local/lib/libGL.so.1.2.0

But you'll want to point it at the OpenGL lib that is appropriate for you (listed in the first find command).

In summary: installing (proprietary) graphics drivers can break the symbolic links used for OpenGL libs.  To solve this problem manually fix the symbolic links (fix /usr/local/lib/libGL.so.1.2.0 first).


WUBI installation error- cannot unpack wubi.exe

Try downloading it again. The file might be corrupted.


Easy solution

The solution in my case was just to switch from 16.04 to 17.10, all the issues are gone.

Less easy solution

If you are more experienced with ubuntu than I am, you can try to read comment section below the question post. The problem is related to site certificates.  Here are two questions which can help you to resolve this problem (thanks to Elder Geek):

How do I install a root certificate?
Does Ubuntu update its root certificate authority list automatically?


Is it safe to apt-get upgrade an all default LEMP?

There are no 100% guarantees

If no one else has reported a problem you can be 99% sure. If you find via google search one user has a problem on a different hardware problem your certainty drops to 95%. If a user had a problem for your manufacturer your certainty drops to 90%. If the problem was for your model its 80%, your OS its 70%, etc.

Test, test and test. When finished test again.

The best way of testing is to come in after hours when the database is down and all users are signed off. Create a partition equal to the size of your programs and data. Clone the live partition to the test partition.

Run the upgrade on the test partition:

If the upgrade crashes on the test partition thank your lucky stars you didn't do it on the live partition.
Fix any errors in the upgrade process, reclone live data to test partition (it will be shorter second time around if rsync is used). Run the upgrade again.
After successful upgrade, test your programs. If they crash thank your lucky stars you didn't do it on the live partition.
Find out why the programs crashed. If they scrambled your database, reclone the live database, upgrade, get patches for failing programs, retest.

I think you get the picture. To assist in the cloning process you can refer to this script: Bash script to clone Ubuntu to new partition for testing 18.04 LTS upgrade. You can also boot with a Live USB and manually clone with live partition not mounted using the script as a reference coupled with other instructions from the Internet.

Note: The linked script was written on April 28 and works fine. I'm revising it with extra tests to validate the correct test partition is selected as a clone. Another revision is to display Source and Target partition OS version details. The final revision is to display rsync stats for deleted files which are relevant when re-cloning over top of a clone.


Cannot find /etc/apache2/sites-available/default when configuring Apache

The tutorial you are using is based on an older version of Ubuntu.

13.10 ships a newer apache configuration, where the file you are looking for is named /etc/apache2/sites-available/000-default.conf.

Note the .conf at the end, which is now required for apache to pick up on the files. So make sure the config you are creating for your site also has .conf as its extension.


What if connection will be refused while upgrading Ubuntu?

If your connection is going to go out during the download, I would suggest ordering a USB stick or DVD stick from a distributor that creates the media, rather than downloading yourself.  It may cost some cash, but it will probably be better than trying to download it 50 times.

That said, if your connection is going to go down, and you're not using the official torrent for downloading, then your download will likely get interrupted and you'll have to start over.  The torrent is capable of being started and stopped without much issue, but that's not the case for standard FTP-based or HTTP-based download methods.


Because you don't have a Linux kernel.

ufw is a frontend for netfilter. Netfilter is the Linux Kernels support for filtering IP packets. Windows has a different mechanism, commonly named Windows Firewall.

ufw only supports netfilter, not Windows Firewall or other IP filtering technologies. It thus only works on systems with a Linux kernel.

The man page mentions this:

This  program  is for managing a Linux firewall and aims to provide an
easy to use interface for the user.

Some tools are really not portable to different platforms. This includes tools that, like ufw, attempts to interface the operating system kernel.


Stop meta key activating host desktop in remote sessions

Setup your Apllication Launcher to open up when you press Alt + F1
Setup Application Launcher Shortcut

Edit ~/.config/kwinrc with your prefered text editor and find the line:

[ModifierOnlyShortcuts]

If you use the default Dock edit it to:

[ModifierOnlyShortcuts]
Meta=

If you use Latte Dock edit it to:

[ModifierOnlyShortcuts]
Meta=org.kde.lattedock,/Latte,org.kde.LatteDock,

Then restart kwin with kwin_x11 --replace & disown

This is only a workaround because now you always have to use Alt + F1 to upen the Application Launcher.


Ubuntu 16.10 USB devices disapper after running multimedia files

I was able to solve a similar problem (in my case with a usb sound card which would disconnect after working for a few seconds, bricking the port to which it was connected) by installing a more up-to-date kernel:

4.9.0-040900rc3-generic

I simply downloaded the .deb file for my architecture from, http://kernel.ubuntu.com/~kernel-ppa/mainline/ and installed it with the software updater.

After rebooting, the usb device was back to its normal behavior.


DHCP server doesn't assign network dns to other hosts on my network

You need to add these lines to your configuration file.

#your search domain option
option domain-name "mydomain.biz";
#your dns server
option domain-name-servers 192.168.1.1;


This is a known bug with the 4.15.0-33 kernel and the rtl8723be wireless device.

See this bug report here or here.

Booting to a different kernel (-32) may workaround this problem until they fix it.


In Ubuntu SDK, I can't test apps on my Nexus phone (Server Rejected Key)

I've the explanation. This is an actual bug described there https://bugs.launchpad.net/qtcreator-plugin-ubuntu/+bug/1365952. I workarouned it with indication in comment #3


This is addressing the content of your question.

How can I make access to command line more secure

It's hardly possible to restrict access to a commandline.  While you might restrict access to the installed gnome-terminal there are other default installed terminals that can be access.  These include xterm, uxterm,lxterm, and x-terminal-emulator.    If you disabled or uninstall all defaulted installed terminals, a user could easily download a terminal to his personal space and run a commandline from there.

Commanlines don't need a terminal to be executed

Many of the commands I perform, I perform in a script... often a oneline script.

While the ways to browse the system and execute commands are to vase to contain in one message, I'll give an example of one easy method.

1. From the Ubuntu Dash search type gedit
2. In the window type:
   #!/bin/bash
   bash
3. Save the file as mytermial.
4. From the file browser right/cick the file -> (click) Properties -> (checkmark) Allow
   executing file as program -> Close
5. Now double click the file and you are in a terminal.

Instead of the command being bash it could be ls to browse anywhere on the system, as well as cat to list anything on the system, that the user has permission to access.  That makes the only real solution to be check permissions of sensitive data.

Modifying your system files may break your system, making it hard for users (including your account) with access to perform their task.

For security purposes you should protect the data by placing restrictive access to the specific data, data files, and data directories.  For instance, the mysql directory has sensitive data.  It's located in the /var/lib/mysql area.  The file mask permissions is 700.  This means that only the database engine Mysql or  some special root controller can access the directory or files there within. This is the permission scheme used for real security in Linux which is tested and works.  Methods outside of this could create a harmful false sense of security.

There are alternatives that you could setup specifically for restricting users access on your system.  For instance you could setup jails for the users you don't want to have access to browse the regular directory structure.  This is done for the default guest account.  The jailed user account will not be able to see outside of the provided directory stucture.

Look at: Jailkit.  It's a set of utilities to limit user access to specific areas using Linux's chroot and or specific commands.

Some detail discussion on this can be found at: Simple & easy way to jail users

I don't think the jailed alternative solution would be as good as make the access to the command line more secure being sure to secure the files and directories of the sensitive data

Example files showing permissions bits:

drwxr-xr-x 104 root root    4096 Oct 25 10:33 /etc
-rw-r-----   1 root shadow  1119 Oct 25 09:50 /etc/shadow

The permissions are grouped in threes.  Starting with the second bit, the first group (of threes) is the owner of the item u.  The second group is the group g, and the last group is others o.  As long as you don't have any of the bits set on the last group of three bits, a regular user will not be able to access that area or file.  Those bits are read, write, and execute.  So remove the last bit from your sensitive data directory and others will not have access to it.  This can be done with:

$ chmod o-x [directoryname]

Alternatively you could have is set where the user may be able to enter the directory but not actually browse (or see directly) the directory with:

$ chmod o-r [directoryname]

You can use that scheme to easily check and verify who has access to what.

The final answer is that you can't provide security by making changes to your various terminal emulators and the actual command line, because there are so many alternatives to access the data without using the commandline directly, such as a filebrowser.  The real solution for security is through permissions control


Move application between monitors in dual screen setup

It sounds very much like you have a dual-xscreen setup. There are a few dual-monitor setups:

Twinview
Dual xscreen

Twinview is the setup where you can drag windows between monitors. In this setup, both monitors are part of what we call an "xscreen".

In Dual xscreen, each monitor is a seperate xscreen, which means they are completely seperate. You can open apps on each monitor, but can't move them between them. You can also do things like run different window managers on each monitor.

It sounds like you are using this setup. What graphics driver are you using?


How to make hidden windows show up in alt-tab box

From what I can infer, I think you have configured in such a way that minimized windows will not show in the application switcher.

Install compizconfig-settings-manager  and go to Ubuntu Unity plugin:

Navigate to switcher tab and check the option Show minimized windows in switcher.


Is there a ready made logging server compatible with log4cplus?

log4cplus source does have the SocketAppender which can send stuff towards loggingserver. However SocketAppender does not send all of the information that each even contain and I would recommend against using it.

Alternatively, there is the SysLogAppender which I would recommend. Earlier version can do remote logging only using UDP, later versions can do also syslog over TCP.


fancontrol-gui is a GUI for fancontrol which is part of lm_sensors. It uses the KAuth module of the KDE Frameworks 5 to write the generated config file. Furthermore it communicates with systemd via dbus to control the fancontrol service.

Install the build requirements (tested in Ubuntu 18.04).

sudo apt install libkf5config-dev libkf5auth-dev libkf5package-dev libkf5declarative-dev libkf5coreaddons-dev libkf5dbusaddons-dev libkf5kcmutils-dev libkf5i18n-dev libkf5plasma-dev libqt5core5a libqt5widgets5 libqt5gui5 libqt5qml5 extra-cmake-modules qtbase5-dev libkf5notifications-dev qml-module-org-kde-kirigami2 qml-module-qtquick-dialogs qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qt-labs-settings qml-module-qt-labs-folderlistmodel cmake build-essential gettext

Install fancontrol-gui.

git clone https://github.com/Maldela/fancontrol-gui.git
cd fancontrol-gui
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_KCM=on -DBUILD_PLASMOID=on
make -j
sudo make install


Hi the most basic *.desktop file you could create would be:

[Desktop Entry]
Name=eclipse
Type=Application
Exec=/opt/eclipse/eclipse
Icon=/opt/eclipse/icon.xpm

This is an example I use for eclipse. I created it like this

sudo nano /usr/share/applications/eclipse.desktop

After that you have to make it executable with

sudo chmod +x /usr/share/applications/eclipse.desktop

Than if you want to add it to the launcher just execute it (navigate to /usr/share/applications/ and double click eclipse) and right click on the icon in the laucher and select "Keep In Laucher"
The application will now also be displayed when you search for applications in the application lens.


Google Talk Plugin in GMail on MacBook 2,1

Do you have microphone problems "everywhere", or is it limited to the gtalk plugin?

Also, did you make sure that your microphone isn't muted?


Getting error messages but can still run application

The (3) modules can been installed as follows:
sudo apt install libgail-3-0 libatk-bridge2.0-0 libcanberra-gtk-module

The errors you're receiving are warnings; that's why Spotify still works. To run a program from the terminal and be able to use it, you need to add an & at the end of the command line; this will put the command in the background.
BTW, your question about what to call "user@....~$" - this is known as a shell prompt.


try removing flash and re-install in some occasions, it has worked for me, with ubuntu 10.04 and ubuntu 14.04


I happened once with me. My problem was a driver error. I uninstalled manually all the proprietary Nvidia drivers, than booted. It was enough to proceed to reinstall them.


If udev service create /dev files then what is the need of mknod command?

Udev is a subsystem used to automate hardware configuration while mknod is a tool to create special files as defined by POSIX primarily FIFOs. Although much of its functionality has been superseded by other tools like mkfifo. It's there for compatibility.

Edit: Alright lets provide more context. mknod is a Unix sys call as well its a command that impliments some of the functionality of that sys call. The sys call makes file "nodes" of any type including regular files. It's how the kernel makes every file node.

The command mknod is primarily able to make FIFOs and device files. In POSIX mknod command is so that device files can be hooked up to device drivers. POSIX also defines mkfifo as a more specific command for FIFOs. It can not be used to make regular files or UNIX socket files.

Since udev handles loading drivers and creating these device files system admins don't really need to make them using mknod. This is a feature of automation provided in Linux while a "Unix-like" system still maintains the ability to use mknod. Further a non-POSIX function makedev can also be used to make device files. This is the underlying syscall Linux uses to setup devices and the respective command can be used in place of mknod.


Which version of Java should I use for Minecraft?

You can install OpenJDK by pressing this link. After, open Minecraft with right-click in Minecraft.jar > Open with > OpenJDK Java 7 Runtime.

If it's still not working, press this link, and do the same as before.


Unable to install Skype despite following earlier thread(s)

Try this:

sudo apt-get purge skype*
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install skype


How can I set keyboard layout for the guest session?

The way you did it, the command was run prematurely, i.e. before the actual start of the guest-session. Try this instead:

echo 'setxkbmap -layout us' >> $HOME/.profile

I just rewrote the tutorial about customizing guest sessions. It might help you understand it better.

Edit:

This has become more tricky on later Ubuntu versions. These lines in /etc/guest-session/prefs.sh work for me on Ubuntu 15.10:

echo "gsettings set org.gnome.desktop.input-sources sources \"[('xkb', 'se'), ('xkb', 'us')]\"" >> $HOME/.profile
echo "gsettings set org.gnome.desktop.input-sources current 1" >> $HOME/.profile

The ('xkb', 'se') value is my system default (a Swedish keyboard layout). So basically I set a list with my system default and the keyboard layout I want to use in the guest sessions - English (US). Then I tell the system to make the second value in the list the current keyboard layout. 0 (zero) would have been the first value.


So, after some discussion on the alsa-devel mailing list this turns out to be a driver problem. This will be fixed in the future kernel release 5.11.
I don't have a real workaround besides compiling and installing a kernel from the linux-next tree right now, but that isn't a realistic solution for most people sadly.
This glitching only happens on one computer of mine tho, my laptop doesn't have this Problem at all.
One may try running the kernel module snd-usb-audio with the parameter implicit_fb=1, to try to remove the problem.


Stop Autoplay of Videos on opening Websites

Provided you use Firefox, you could use the noscript extension.
This free, open source add-on allows JavaScript, Java and Flash to be executed only on the sites you choose.


I am also having this problem. Specifically:

I can run tlmgr.
sudo cannot run tlmgr, giving "sudo: tlmgr: command not found".
sudo can run tlmgr if I give it the explicit path to that file /usr/local/texlive/.../tlmgr (so I know the problem is not with permissions on tlmgr).

I investigated and found this answer to Command not found when using sudo.
It seems when I installed TeX Live 2020, I've added the texlive directory to the path for my user but not the superuser. To test this, run:
env | grep ^PATH

to see your path, and then
sudo env | grep ^PATH

to see the path of the superuser. For me, the superuser path is missing the texlive directory, which is why I can run tlmgr but not sudo tlmgr.
Options:

You can ask sudo to run giving the full path to tlmgr (find this using locate tlmgr if you don't know where it is).

You can ask sudo to run with your path instead of the superuser path by running sudo -E env "PATH=$PATH" tlmgr.

You can edit the superuser path, if you are confident you know what you are doing, using visudo.


Restarted & now --> '/home/USER/Documents': No such file or directory

Did you look in your Trash for your Documents folder?

There's a possibility that the folder accidentally got moved into another folder. Have you done a search for "Documents", or for one of your files?

There's also a slight possibility that the Documents folder got renamed, or the name set to nothing. Open the Files app from the launcher, and it'll be in your home folder. Look for a folder with no name, or with some name that's a part of "Documents" like "Do". If you find such a folder, look inside and see if your documents are there. If so, just rename the folder back to "Documents" and you should be fine.

If the Files app doesn't show you such a folder, you'll need to use the "Terminal" app to look at it. Are you familiar with Terminal? To start, enter Terminal and type "ls -al" without the quotes, and look for a folder as I described earlier. If you need more help, please ask.


How do I start Mosquitto MQTT broker on startup in Ubuntu 16.04

Installing sudo apt install mosquitto on 16.04 adds the /etc/init.d/mosquitto script. systemd uses that script to generate /run/systemd/generator.late/mosquitto.service, and this is what it says:

# Automatically generated by systemd-sysv-generator

[Unit]
Documentation=man:systemd-sysv-generator(8)
SourcePath=/etc/init.d/mosquitto
Description=LSB: mosquitto MQTT v3.1 message broker
Before=multi-user.target
Before=multi-user.target
Before=multi-user.target
Before=graphical.target
Before=shutdown.target
After=remote-fs.target
After=systemd-journald-dev-log.socket
Conflicts=shutdown.target

[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
ExecStart=/etc/init.d/mosquitto start
ExecStop=/etc/init.d/mosquitto stop
ExecReload=/etc/init.d/mosquitto reload

Looking inside /etc/init.d/mosquitto tells us that

/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf is already run by default

So just put your config into /etc/mosquitto/conf.d (referenced by mosquitto.conf) and enjoy.

Being a regular systemd service, you can:

systemctl status mosquitto to see its current status
sudo systemctl (start|stop) mosquitto to change the status for the current session
sudo systemctl (enable|disable) mosquitto to change startup behavior (without affecting the current state)


Install Ubuntu 15.04 dual boot Windows 10 on GPT disk with BIOS

You say your machine supports only BIOS, not UEFI. But your partition table shows an EFI system partition (/dev/sda2), which never gets created unless an OS was booted via UEFI and tried/succeeded in installing itself.

Further, Windows needs to be coaxed via special methods to install&boot on a GPT disk in a BIOS system, it could not have happened on its own.

Thus its extremely likely that your system has UEFI firmware. If so, a BIOS Boot partition cannot help - an EFI bootloader needs to be added to /dev/sda2.

Refer http://www.rojtberg.net/1032/converting-a-ubuntu-and-windows-dual-boot-installation-to-uefi/ from "Enter a Ubuntu chroot" onwards for instructions to do this. Essentially :

Boot into an Ubuntu disk
Chroot into your Ubuntu installation on disk
Install GRUB EFI packages
Add your .efi bootloader file in your UEFI boot settings

Let me know if you are stuck at any point.


Ubuntu 16.04 LTS How to force all http/https traffic to use proxy?

You need to specify this proxies and apply them system wide. Just collect the IP and Ports for your HTTP and HTTPS proxies and do this with the system proxy setting GUI. Search for Network Proxy in dash.

Try user_name:password@Proxy_IP for the authentication. This seems to be the way to configure it in the configuration file. source

Ubuntu Main

Mate IN mate there's a checkbox for this if you click on details


There are no directives defined in your configuration. You need to create some directives for Proftp to use. The man page will help with this.

Here's the configuration you're looking for:

## Includes required DSO modules. This is mandatory in proftpd 1.3
# Include /etc/proftpd/modules.conf

# To really apply changes reload proftpd after modifications.
AllowOverwrite on
AuthAliasOnly on
AuthPam on    # Uses unix authentication.

UserAlias userftp connor     # UserAlias *loginuser* *real user*
ServerName                      "uk.domain.com"
ServerType                      standalone
DeferWelcome                    on

MultilineRFC2228 on
DefaultServer                   on
ShowSymlinks                    off

TimeoutNoTransfer 600
TimeoutStalled 100
TimeoutIdle 2200

DisplayChdir                    .message
ListOptions                     "-l"

RequireValidShell               off

TimeoutLogin 20

RootLogin                       off

# It's better for debug to create log files ;-)
ExtendedLog                     /var/log/ftp.log
TransferLog                     /var/log/xferlog
SystemLog                       /var/log/syslog.log

#DenyFilter                     \*.*/

# I don't choose to use /etc/ftpusers file (set inside the users you want to ban, not useful for me)
UseFtpUsers off

# Allow to restart a download
AllowStoreRestart               on

# Port 21 is the standard FTP port, so you may prefer to use another port for security reasons (choose here the port you want)
Port                            21

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances 8

# Set the user and group that the server normally runs at.
User                  nobody
Group                 nogroup

# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask                           022     022

PersistentPasswd                off

MaxClients 8
MaxClientsPerHost 8
MaxClientsPerUser 8
MaxHostsPerUser 8

# Display a message after a successful login
AccessGrantMsg "welcome !!!"
# This message is displayed for each access good or not
ServerIdent                  on       "Already home"

# Lock all the users in home directory
DefaultRoot ~

MaxLoginAttempts    5

#VALID LOGINS
<Limit LOGIN>
AllowUser connor    # Must be *real* user
DenyALL
</Limit>

<Directory /home/>
Umask 022 022
AllowOverwrite on
        <Limit MKD STOR DELE XMKD RNEF RNTO RMD XRMD READ RMD>
          DenyAll
        </Limit>
        <Limit STOR CWD MKD>
          AllowAll
        </Limit>
</Directory>


Fresh Ubuntu 16.04 installation does not boot

Finally i found a solution:

Reboot your computer and enter BIOS settings with F2
Make sure secure boot is enabled and BIOS supervisor password is set
Go to Security tab in BIOS settings
Select "Select UEFI file as trusted"
Select HDD1
Select EFI
Select ubuntu
Select grubx64.efi
In the opened window enter "grubx64.efi" and press enter two times
Save BIOS settings and reboot
Enter BIOS settings using F2 key
Go to Boot tab in BIOS settings
Move the option "EFI File Boot 0: grubx64.efi" to the first place of the boot order
Save BIOS settings and reboot
The GRUB menu will appear and it should be possible to boot into Ubuntu


I've installed Hearthstone 2 days ago and I have used Play on linux. It makes the installation very easy and automatic.

Steps:

Install PlayOnLinux

You can install it using Ubuntu Software Center click here
Or download it from their home page Download PlayOnLinux

Once you have PlayOnLinux installed just look for Hearthstone and follow installation steps:

Open PLayOnlinux and click install:

Look for Hearthstone and click install:

It will ask for some other packages that need to be installed like mono or .net, just click you accept the installation.

When the process finishes you will be able to play Hearthstone


Need Help with partitions and such Dual Booting 13.10 w/ windows 7

The first thing I'd do would be to do a Repair Install of Windows.

You'll want to boot on your Windows installation CD. At some point, you will have the choice to repair your installation.

This guide seems to explain the steps quite well:
http://www.bleepingcomputer.com/tutorials/start-the-windows-7-recovery-environment/

If it doesn't work, maybe you could give us some sort of screenshot of your partition table to see if it looks messed up.

EDIT: If you don't have your Windows installation disk, try this solution: http://windows.microsoft.com/en-us/windows7/create-a-system-repair-disc


Do I need the installer first before texlive install?

No
sudo apt install texlive-full

That command will download and install the program called texlive-full.
This is the command line method of installing programs in Ubuntu.
For more on how to install applications/software/programs in Ubuntu see:
How do I install applications in Ubuntu?
Hope this helps


Store home partition on and authenticate users with central server?

I could mount /home on the server (samba or nfs). I could write a script to sync all users in /etc/passwd and /etc/shadow with (say) uid>2000 with a list from the server. Then people would be able to log in (their local machine would have their credentials), and their $HOME would be on the server.

Crude, but perhaps it could work?


Loading and modifying an alias in command line

There are two ways you can start various modifications of the command.

an alias can have a parameter, for example

alias remcopy='scp user@123.45.67.89:/home/user/file.txt'

remcopy targetname

where targetname is selected a run time.
a function is more flexible than an alias. It can be a single line or big like a whole shellscript file.

function remcopy () { scp user@123.45.67.89:/home/user/file.txt /home/user/"$1" ; }

remcopy
remcopy addeddir

which can be used without a parameter and with a parameter (in order to change the name of the target file.

You can store a small function in ~/.bashrc like you store aliases.


Error when trying to run apps installed as snap packages - Ubuntu 16.04

I also have an encrypted home, and it works just fine. The user data directory is defined as $HOME/snap/<snapname>/<snapversion>. It's created when the application is run. However, if one runs an application as sudo one can end up with $HOME/snap owned by root, in which case a subsequent run without sudo will result in a permission denied trying to create a directory within a directory owned by root.

Make sure $HOME/snap isn't owned by root (chown if necessary).


How to install thai language/keyboard support for Ubuntu phone Bq 4.5 Aquaris

I'm not sure, but I think the reason why Thai isn't supported yet is that it's not sufficiently translated for the phone.

http://projects.davidplanella.org/stats/vivid/th


How to disable write caching after switching distrO?

You can use command line interface:

sudo hdparm -W 0 /dev/sda

Where /dev/sda is the disk you want.
Another way if would like, install gnome-disks

sudo apt-get install gnome-disks


You need to use Host instead of HOST

sudo docker run -d --label "traefik.frontend.rule=Host:appone.qwert.ch" --network web nginx:latest


Once you have downloaded the iso don't use any programs to try and open or unpack it.
You need a usb stick (preferably between 2 and 8GB) and then follow this easy three step guide here:
http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows
to load the iso onto your usb stick and make it bootable.
After that just reboot your notebook and select the usb stick as the boot device.


Tracker is a search engine and metadata store that indexes your files to do all sorts of interesting things. See this answer for some usage basics.

It hasn't been installed by default in Ubuntu since Ubuntu 9.04; you must have installed it inadvertently. If you'll not be using it, you can remove it by removing the "tracker" package.


How to put task switcher on only one monitor (xfce)

Applications > System Tools > Preferences > Displays and untick Mirror Displays. After that you can drag and drop displays on that window to the left or right.


Spread only windows of the current application

Yes, it's very easy. Press Super + [number] twice.

For instance, if you want to view all the Nautilus windows you have opened, press Super + 1  1 if Nautilus is the first item on your launcher.

Also, clicking on the icon of an active application that has more than one open window has the same effect.


Color Changing in Terminal. Specifically my input

For changing the background (and text) colours, you simply go to profile preferences and set it there:

For the prompt itself, this is set in the prompt itself, this is more complex. This is set from the ~/.bashrc hidden file (or another similar file), probably using a line like this (it will begin with PS1):

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;34m\]\u@\h\[\033[00m\]:\[\033[01;32m\]\w\[\033[00m\]\$ '

The colour in the prompt is set using escape codes (if the terminal being used supports it)- so basically each bit of \033[Nm sets the format for the following text, depending on what N (N can be multiple things separated by ; BTW).

For the basic colours, you can use the simple numeric codes listed here:

1 Makes stuff bold, 0 resets - multiple things can be used as well - e.g:

echo -e "\033[1;32mExample\033[0m"

Otherwise you can set your own colour (probably limited support):

echo -e "\033[38;2;240;115;0mOrange\033[0m"

So you can fairly easily edit the PS1 line to suit (and test it with echo -e ...). I recently did this with various colours for different machines so I could use multiple terminals without typing the right command into the wrong computer...


Lost power during update and now i cannot install any packages or even update/repair update

Reinstall the package:

sudo apt-get --reinstall install -3.13.0-29-generic


Wireless Network not showing Ubuntu 14.04

The adapter is not shown in lspci. It is probably disabled in BIOS.

Resetting BIOS to default may solve the problem.


Bash script won't stay open in background after running through while

Just add a -k option to nc. Like this:

nc -l $port -k | while read msg; do notify-send Alert "$msg"; done

As seen in man nc:

  -k
  Forces nc to stay listening for another connection after its current connection is completed. It is an error to use this option without the -l option.


Throttling stuck below limits on a cool cpu

Okay, seems some kernel versions have issues with my setup. Pulling a newish (09-Jun-2015) trusty specific kernel (3.14) from http://kernel.ubuntu.com/~kernel-ppa/mainline/ has resolved the problem.

Cpu scaling is off, the cpus are running at a constant 2.929GHz frequency. The system has decided by itself at the kernel installation to set the cpu speed like that! (official max frequency 2.41GHz) Sensors still lying low, clock keeping time on the second.


How do I create a bootable USB on Ubuntu from Hiren's Boot CD ISO for Windows?

Unetbootin does the job of making a bootable USB, but for recent versions of Hiren's CD to work, a small fix must be made for the menu to work:

Open the Software Center and install UNetbootin .
Create the bootable USB using the Diskimage option and selecting the downloaded ISO.
After the USB is created, mount it in Nautilus (just click the USB drive icon),  go into the HBCD folder, rename the isolinux.cfg file to syslinux.cfg and copy it to the root of the USB, overwriting the existing file. Change the first line of syslinux.cfg from DEFAULT /HBCD/Boot/menu.c32 to DEFAULT menu.c32.

Now the USB boots and menu works fine :)


It looks at first glance like Windows 10 did not rewrite the partition table of your drive, so the Master Boot Record was all that was changed. What you need to do is restore the MBR which I believe can be done with a Linux tool called "gparted". You may have to download this tool. http://gparted.org/download.php Heed all warnings it gives you. Back up all data and back up the present (bad) MBR. You can run gparted from a USB, once you boot in a USB running ubuntu, or boot from the live CD or USB made with the ISO available on the site. This means making a live ISO image on a CD or USB and booting from the USB in order to run gparted. There is also a free tool to restore MBR's which runs on windows, but I doubt that you will be able to restore the old MBR from windows. Always work with a backed up MBR. Windows installations have a mind of their own. What worked for me was downloading an ISO of ubuntu which was bootable by selecting the USB and then using a loaded copy of gparted on that USB. You cannot change a mounted drive with a partition manager, so unmount the drive in order to repartition or change the MBR to one booting Linux and windows. Since your partiation table seems to be still intact, I would advise just making a new MBR which is dual boot.

"The best way to access all of the features of the GParted application is by using the GParted Live bootable image. GParted Live enables you to use GParted on GNU/Linux as well as other operating systems, such as Windows or Mac OS X. "

Fixing Operating System Boot Problems

"Your computer might fail to boot an operating system when you perform one of the following actions:

Delete a partition.

Move a partition.

***Install another operating system and overwrite the Master Boot Record (MBR).***

Fortunately the failure to boot can be often be fixed.

If your computer uses the GRUB boot loader, see the section called “Fixing GRUB boot problem” to restore the ability to boot.

If your computer does not use GRUB then you are advised to consult documentation for your boot loader to learn how to fix the problem. You might consult the GParted FAQ, or the GParted forum. You might also search the Internet to learn how other people have solved similar problems"

Fixing GRUB boot problem

The Grand Unified Boot loader (GRUB) is used by many GNU/Linux distributions. To fix GRUB boot problems you start by determining which major version of GRUB was used.

There are two major versions of GRUB:

GRUB, also known as GRUB 2, covers versions 1.98 and higher. GRUB 2 works with both GUID partition tables (GPT) and msdos partition tables.

GRUB Legacy, traditionally known as GRUB, covers versions 0.9x and earlier. GRUB Legacy works with msdos partition tables only.

GRUB 2 is used as the default boot loader in the following GNU/Linux distributions:

CentOS 7 and higher

Debian 6 (Squeeze) and higher

Fedora 16 (Verne) and higher

openSUSE 12.2 and higher

Ubuntu 9.10 (Karmic Koala) and higher

If you are unsure whether your computer uses GRUB 2 or GRUB Legacy, you might try searching for the answer on the Internet.

Restoring GRUB 2 Boot Loader

Use the following steps to restore the GRUB 2 boot loader:

Boot from Live media such as GParted Live or your GNU/Linux distribution image. Open a terminal window.

Determine which partition contains the / file system for your GNU/Linux distribution.

Use GParted to list the partitions on your disk device. Look for a partition that contains your GNU/Linux / file system. This Linux partition will likely use a file system such as ext2, ext3, ext4, or btrfs.

Note

If the / partition is on LVM then the Logical Volume Manager must be active. LVM can be started with the command:

vgchange -a y

With LVM, the equivalent of a disk partition is a Logical Volume. Logical Volumes can be listed with the command:

lvscan

 Create a mount point directory by entering (as root):

# mkdir /tmp/mydir

Mount the / partition on the mount point directory. For example assume the / file system is contained in the /dev/sda5 partition. Enter (as root):

# mount /dev/sda5 /tmp/mydir

If you have a separate /boot partition, for example at /dev/sda3, then an extra step is required. Mount the /boot partition at /tmp/mydir/boot by entering (as root):

# mount /dev/sda3 /tmp/mydir/boot

Note

If you do not know whether you have a separate boot partition then you probably do not and can ignore this step.

Prepare to change the root environment by entering (as root):

# mount --bind /dev /tmp/mydir/dev

# mount --bind /proc /tmp/mydir/proc

# mount --bind /sys /tmp/mydir/sys

Change the root environment by entering (as root):

# chroot /tmp/mydir

Reinstall GRUB 2 on the boot device. Note that the device name is used and not the partition name. For example, if the / partition is /dev/sda5 then the device is /dev/sda.

For Debian, Ubuntu, and other offshoot GNU/Linux distributions, enter the command (as root):

# grub-install /dev/sda

For CentOS, Fedora, openSUSE and other offshoot GNU/Linux distributions, enter the command (as root):

# grub2-install /dev/sda

Exit the chroot environment by entering (as root):

# exit

Reboot your computer.

Restoring GRUB Legacy Boot Loader

Use the following steps to restore the GRUB Legacy boot loader:

Boot from Live media such as your GNU/Linux distribution image. Open a terminal window.
Note

The Live media must contain the GRUB Legacy boot loader. If your GNU/Linux distribution uses GRUB Legacy, then the distribution Live media will also contain GRUB Legacy.

Start the grub application from the command line (as root).

# grub

Find where grub stage1 is located by using one of the following:

If the /boot folder is stored in the / partition, use the command:

grub> find /boot/grub/stage1

If the /boot folder is stored in a partition different than the / partition, use the command:

grub> find /grub/stage1

The output from the find command might look like the following:

 (hd0,0)

If more than one line is listed in the command output, you will need to decide which device you use for grub.

Set the grub root device by specifying the device returned by the find command.

grub> root (hd0,0)

Reinstall grub by specifying the device returned by the find command.

grub> setup (hd0,0)

Exit grub.

grub> quit

Reboot your computer.

*************************************************8

***strong text***RTFM!!


How to display a whole php website file set in apache2?

You should have an index.php or an index.html in the directory to prevent showing the directory content in the first place and showing the content instead.
To disallow file listing in apache for all dirs check
https://stackoverflow.com/questions/2530372/how-do-i-disable-directory-browsing


Drive bay not working when empty on startup

I supposed you SATA controlled/ motherboard supports hot-plug and you are using Debian/Ubuntu system.

To force a rescan on scsi ( each sata port apperas as a scsi bus), you must write "0 0 0" in each hostX controller in /sys/class/scsi_host/host<X>/scan
(you must be root user)

How to do it on all hosts:

for i in `ls /sys/class/scsi_host/` ; do echo "0 0 0" > /sys/class/scsi_host/$i/scan ; done ;

Verify that /var/log/kern.log shows the new device like this:

Mar  1 11:27:48 gilito-MS-AF1511 kernel: [ 8307.445629] ata2: hard resetting link
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8307.762354] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8307.763572] ata2.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8307.763579] ata2.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8307.763583] ata2.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8307.766011] ata2.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8307.766025] ata2.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8307.766033] ata2.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8307.766834] ata2.00: configured for UDMA/133
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8307.782363] ata2: EH complete
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8307.783079] ata5: hard resetting link
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8308.102607] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8308.107447] ata5.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8308.107455] ata5.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8308.107458] ata5.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8308.123863] ata5.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8308.123870] ata5.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8308.123874] ata5.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8308.129772] ata5.00: configured for UDMA/100
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8308.142581] ata5: EH complete

Then, run fdisk -l to see the new disk


Why is usermod -a -G sudo username not working?

This should help you.  -a appends to the group and should only be used with -G, which is the groups to append the user. To answer your question fully, to add someone to the sudoers group and to reset the root password:

su
passwd root
Enter new Unix password:
Confirm new Unix password:

Then:

usermod -a -G sudo howdy

Once this is done, you will need to restart in order for the new changes (adding howdy to the sudo group) to take effect.


Does using an extended cache improve performance?

Nowadays, extended cache is popular for folks with large databases, and research by Kang, Lee and Moon describes how custom coding to take advantage of flash memory can speed up PostgreSQL.

Bcache's author says it's dandy for RAID6 users, but his raw data also shows inconsistant performance as block sizes decrease, and he did not use USB3, he used an SSD on a SATA cable.

Therefore, I would say yes if you were running with RAID6 or PostgreSQL with the Kang, Lee and Moon code, but questionable otherwise.


Wondershaper POWER!!!

Here is a tutorial - http://www.ubuntugeek.com/use-bandwidth-shapers-wondershaper-or-trickle-to-limit-internet-connection-speed.html

Basically you can regulate the speed of any PC that connects.

Here is a WIP for a FrontEnd - http://ubuntuforums.org/showthread.php?t=442200

MasterShaper Web Interface - http://www.mastershaper.org/index.php/Main_Page


Is there a way to determine if package depends on wine to run from its .deb?

Well, it it runs on wine it is an .exe

List the contents of a .deb with dpkg-deb

grep (search) for an .exe

dpkg-deb -c your.deb | grep exe

If you find a .exe , it runs on wine


Software updater reverting to previous kernel version

Use

sudo apt-mark hold [linuxkernelpackage]

This will ignore upgrades/downgrades for that package.

Source: Exclude packages from `apt-get upgrade`


Window does not get focus when opened by clicking a tray icon or a launcher icon

This is actually a known bug in transmission: https://bugs.launchpad.net/ubuntu/+source/transmission/+bug/741582 . Guess we have to wait until they fix it.


You can the steps from this link:
Removing GRUB from windows system after uninstalling Ubuntu from Windows 7
You can also see   http://www.sevenforums.com/installation-setup/62209-remove-grub-restore-windows-7-a.html
You can create a system repair disc in windows 7.Use that disc to boot.
You can also launch recovery options by pressing F8 repeatedly before the windows boot logo appears.


Is there any File manager that highlights names that are searched for?

Maybe you could try it on the command line with

find

It has a lot of options. See the man page of find on Ubuntu Manuals.

For example all the files in my current directory containing the letters 'auth'

find /home/frank -name '*auth*'

It's not GUI-based, but it has more options than any GUI-based filemanager. (Maybe Midnightcommander can do it too.)

grep

is also a possibility.

For example to find the string 'AskUbuntu' in all the files in my home directory:

grep -r "AskUbuntu" /home/frank

See the man page of grep on Ubuntu Manuals


Dependency issue on installing gstreamer on Ubuntu 18.04

I had some struggle with it too, but I found a .deb package which solved the problem:

From https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/3267-deletedppa/+build/14926540  download the

gstreamer1.0-plugins-bad_1.14.1-1ubuntu1~ubuntu18.04.1_amd64.deb

and install it.


Ubuntu 16.04 Port forwading troooble 2 x NIC

You must run this command to route packets from internal network to external interface via iptables.

iptables -t nat -A POSTROUTING -s 11.0.0.0/24 -o enp2s0 -j MASQUERADE

also open /etc/sysctl.conf and
change net.ipv4.ip_forward=0 to net.ipv4.ip_forward=1.

then enter this command:

sysctl -p


Remove Network and Connect to server from sidebar

The issue seems to be the fact that the network and connect to server entries in nautilus  sidebar are hardcoded and can only changed by editing the sources code of nautilus.

Now if your willing to go down that route this should be helpful:

How can I edit Nautilus Places sidebar and Unity QuickList?

That link shows how to go about doing this. Another option I saw was using nemo file manager

https://launchpad.net/~webupd8team/+archive/ubuntu/nemo


Bash Script - Ascertaining Text File Changes

I use /usr/bin/stat --format='%Y' on my config file, and make a private copy whenever "%Y     time of last data modification, seconds since Epoch" changes. This way, I don't need to read the whole file just to check the modification time.

Unrunnable code fragments:

original=""                     # set the <config.file>
original_update=0               # time <config.file> was last modified
config="/var/tmp/${me}.$$.config" # my writable copy of config

...

function up-to-date () {
    # updates configuration file if necessary
    new_update="$(/usr/bin/stat --format='%Y' $original )"
    if [[  "$new_update" -ne "$original_update" ]] ; then
        if [[ $(countconfiglines "$original") -eq 0  ]] ; then
            echo "Invalid configuration in $original" >&2
            exit 4
        else
            /bin/cp --force "$original" "$config"
            original_update="$new_update"
        fi
    fi
    }

...

else
    # watch for changes, record "%Y time of last modification,
    # seconds since Epoch"
    original_update="$(/usr/bin/stat --format='%Y' $original )"

    # make a writeable copy for our use, and clean it up at the end
    # unless $debug
    [[ $debug -ne 0 ]] || trap "/bin/rm -f $config" EXIT
    /bin/cp --force "$original" "$config"

fi

And I call up-to-date every time around my main loop, when I'm willing to parse a new config file.


PHP not working after upgraded to Ubuntu 17.10

Open terminal with ALT + CTRL + T and type in these commands:

sudo a2enmod php7.1
sudo systemctl restart apache2


Most appropriate setup to share music and playlists accross a network?

Ubuntu One cloud sync for every device and for where ever you are.  First 5GB is free.  Try and see.


Oxygen widget theme for GTK+/GTK3-based applications

The Kubuntu /1/ is using the gtk2-engines-oxygen /2/ and the gtk3-engines-oxygen /3/ as part of the desktop.

If you don't want to use the Kubuntu desktop you could install the gtk2/gtk3 engines.

Installing KDE

By the Ubuntu community wiki - Installing KDE /4/:

  If you choose to not install kubuntu-desktop, then you can still get
  all the Kubuntu-specific tweaks by installing the
  kubuntu-default-settings package.

More

Other options:

kde-gtk-config: https://launchpad.net/kde-gtk-config

PPA package search: https://launchpad.net/ubuntu/+ppas
 => A PPA: https://launchpad.net/~hrvojes/+archive/kde-goodies

Links

http://www.kubuntu.org/
http://packages.ubuntu.com/precise/gtk2-engines-oxygen
http://packages.ubuntu.com/precise/gtk3-engines-oxygen
https://help.ubuntu.com/community/InstallingKDE


How to Install Flex in Ubuntu 12.04.03 LTS?

Below commands will install flex package on your Ubuntu pc.

sudo apt-get update
sudo apt-get install flex


I had the same problem (upgrade to 15.04, using official files and config).

I had to make the following changes to be able to stop the mysql daemon manually with sytemctl and automatically on system reboot/shutdown:

Make /etc/mysql/debian.cnf readable for the mysql user with

sudo chgrp mysql /etc/mysql/debian.cnf; sudo chmod 640 /etc/mysql/debian.cnf

Provide a slightly modified mysql.service file:

sudo cp /lib/systemd/system/mysql.service /etc/systemd/system/
sudo chmod 755 /etc/systemd/system/mysql.service

Provide an explicit stop command by opening the copied file in an editor:

sudo nano /etc/systemd/system/mysql.service

and adding the following line under the [Service] section:

ExecStop=/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf shutdown

In Nano, use Ctrl+O to save (Linux way!), Ctrl+X to exit.
Make the new service file known to system:

sudo systemctl daemon-reload


Installing Ubuntu in VM - stuck on 'Who are you?'

I just had this issue as well. I'm upgrading from Ubuntu 15.10 to 19.10. I couldn't type anything, but the mouse worked. I couldn't click in the text box, but I could click "Log in automatically" and "Require my password to log in".

I was able to fix this by right clicking on a text box, then click "Insert Emoji", then click a random emoji. Now all the text boxes work and I have no issues.

I hope this helps someone.


Same problem suffered with install on blank system.  Refused to install using Raid, so turned raid off in bios and used AHCI and no further issues ocured and installed successufully.


How did you install it ?

Manually
Using installer script ?

You'll be able to find more information into /var/www/seat/storage/logs/laravel-date.log

Where

/var/www/seat is the default seat install path
date is the current date

Can you send us your vhost setting file ?

/etc/apache2/sites-available/100-seat.local.conf

Can you show us your active vhost directory ?

In a terminal, enter ls -la /etc/apache2/sites-enabled

Finally, the .htaccess is located at /var/www/seat/public/ again where /var/www/seat is the default install directory.


This is a short guide on what to do first when a fresh Ubuntu installation crashes in Virtual Box:

Make sure you had enabled VT-x/AMD-V in BIOS.
Leave some CPU power for the host (if all cores were assigned, define an execution cap).
Leave enough RAM for the host OS (how much depends on the OS and applications running).
Install the guest additions.
Update your guest Ubuntu for bugfixes:

Boot Ubuntu to the login screen.
Press HOST + F1 for a terminal.
(alternatively to 1.- 2. we may also boot to a root shell with networking. Then no sudo is needed for commands below)
Type the following commands:

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

Enter your password (nothing is displayed!).
Answer Y to download and install updates & bugfixes.
After done type reboot.
In case dkms  was not installed in the guest we will have to re-install the guest additions.


Do I need to backup my 12.04 system to upgrade to 12.04.1?

There is no need to backup or specially "upgrade" to 12.04.1 if you are already on 12.04.

Simply update as normal, or open a terminal and run sudo apt-get update && sudo apt-get dist-upgrade.

Não há necessidade de fazer backup por causa do upgrade para a versão 12.04.1.

  Basta atualizar o sistema normalmente, abrir um terminal e executar o comando sudo apt-get update && sudo apt-get dist-upgrade.


No network drivers after ubuntu netinstall

If you need to compile from source, you have two options

Install gcc (or build-essential), compile the driver, and then uninstall gcc if you are concerned about space, or
Cross compile the driver on another computer and then transfer the compiled files over.


This solves it for me:

sudo apt-get install libavcodec-extra

Maybe this post has an answer, but for Googlers...


Possible to use Gnome-Software to update software?

Many updates, but not all. There's a lot more to Ubuntu and Linux than GNOME knows. In addition, you are almost always better off sticking with what's in the Ubuntu repositories.


setup a root password using,

sudo passwd

below URL gives you more detail about user management. https://help.ubuntu.com/12.04/serverguide/user-management.html


OK, I just installed Ubuntu 12.04 on my powerbook g4, 1.33 17". Can I partition and set dual boot mac os x? (with out losing the ubuntu)

I don't think bootcamp will help - that is for intel-based Macs as far as I know.

I have not done this so I'll suggest a method but you will need to be careful not to overwrite your Ubuntu partitions.

Use GParted to resize your partitions to make room for OS-X. You will need about 10 GB.

Now boot with OS-X DVD. Once you get to a desktop, you can run Disks from a menu to setup an HFS+ partition in your free space for OS-X.

OS-X should offer to install into this partition.


Automatic logout when resuming from suspend on Xubuntu 18.04

For intermittent X crash with SIGBUS on 18.04, please check this answer:

Ubuntu 18.04 error on waking up from sleep : Read-error on swap device


You can indeed move and resize partitions. Whether you can preserve existing data depends on the current situation.
Reverting to just a / partition
If you are new with linux, I would recommend you to stick to the default, i.e., having a single system partition containing your /home folder. That could be very fast: you just delete the /home partition, and then expand the root partition to fill all the space (in the assumption that your / is to the left of your /home).

You will need to copy /home first to a removable medium that is formatted with a linux file system (ext4) such that file attributes and permissions are preserved in the copy. When done, copy the contents of that home back to the /home on the system partition
While the system will startup when the /home partition is gone, you still would need to remove the line that contains /home in your system file /etc/fstab: that line causes the system to attempt mounting a partition that does not anymore exist.

Resizing the partitions
Alternatively, you could indeed decrease the size of the root partition (might be relatively slow because some data may need to be moved), then move the /home partition over to the left (will certainly be slow) and finally enlarge the /home partition (fast).
How to repartition
To repartition, you need to start up a live session (Installation DVD or USB), where you can load gparted for the partitioning. You apply changes in the graphical interface, then press the "Apply" button to carry out the change. I recommend here to proceed stepwise, i.e., do one change, hit apply and only continue if all goes well. Eventually, an error may pop up when you do the next step, and that them sometimes can be eliminated by shutting down and starting up another live session to continue.
Whatever you do, make sure you have a current backup of your user data on a removable medium anytime. If it is not you making a mistake, it is the hardware that can fail.


Touch screen and mouse not correctly functional on tablet

Just an idea:
-I may not be able to solve your problem, but try this so you can get more feedback

Open any application that has buttons, like a calculator... when you see on screen such buttons... try this:
-Touch (but not move), then release... do it softly
-Touch (but not move), then release... do it hardy but with care to not brake the display

If it does different things... maybe your touchscreen is working correctly, but presure is missconfigured, so search for how to configure presure levels...

One day with my Notebook and Ubuntu, i was able to paint on Gimp with presure levels (with both, the stylus and my finger)... so there must be anywhere a presure level detector...

Maybe yours is to high, so you need to much presure for clicking to be detected, in such case lowering it a little may help, but do not lower it too much or your finger will make clicks all the time, just not desired when dragging... balance the level to your confort.


in your DNS you make an A record that points to your VPS ip
that's it.

your website will be in /var/www/html
add your website stuff

open up VIM (or the editor of your choice)

sudo vim /etc/apache2/sites-available/000-default.conf

change your ServerAdmin to your email

sudo service apache2 reload

to restart apache and you are good to go


Make `php` recognized as a command in terminal

You can create a symlink in /usr/bin to the PHP binary/executable file.

sudo ln -s /opt/lampp/bin/php-5.3.8 /usr/bin/php should create a symlink to the executable that exists within /usr/bin, and should allow you to call 'php' from the command line without making an /etc/init.d/ entry.


Is there an xfce globalmenu plugin for 13.10?

No, there is not.

If you  want to save some vertical screen space, try installing maximus, which removes the titlebar.


How to do a right-click on Nautilus if it is on list view?

If you have a file/folder selected in list view, unselect it first by pressing Ctrl+Space. Then press Shift+F10 to open the context menu (right-click menu).


You are talking about the repository, not the package.
To add xenial-backports repository section use the command below:
sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu xenial-backports universe restricted multiverse main"

and then update packages lists by
sudo apt-get update

Afterwards you will be able to install available packages from it.


When is Ubuntu Phone/Touch coming to the U.S.?

There are hints of a new manufacturer that will make it available to the U.S. Who, what, and actually when is anyone's guess.

Source:
Check out @omgubuntu's Tweet: https://twitter.com/omgubuntu/status/565596316622147585?s=09

If you want a retail everyday phone, it would be best to buy one from a manufacturer preinstalled. However if you are a developer, there are supported images for Nexus 4, and community images for the Nexus 5. Most of the other community ports have fallen behind.

And no, because of the complexity of how the drivers work for phones, there needs to be separate images for every device.

Even you buy one of the currently selling BQ phones, it will not work with 3G or 4G speeds, so as a consumer in the U.S. don't try to get one now. It seems you can now get these shipped to the US.


Bash completion for commands that start with specified letter?

You can even avoid the need of typing Ctrl+r by adding these two lines to your ~/.inputrc:

"\e[A": history-search-backward
"\e[B": history-search-forward

Up and down arrows will continue to browse your history if you press them at the bash prompt. But it will search for a command starting with the text to the left of the cursor if you type the beginning of a command like ssh.


How to install pip for python 3 in ubuntu 18.04?

Step 1: Updating the package list using the following command:

sudo apt update

Step 2: Use the following command to install pip for Python 3:

sudo apt install python3-pip

Step 3: Once the installation is complete, verify the installation by checking the pip version:

pip3 --version


I found the bug on launchpad and fixed it with a sudo apt-get upgrade


Difference between vim-gtk and vim-gnome

Both packages provide the same application, but compiled with different dependencies (e.g. vim-gnome depends on libgnome2). Vim-gtk is important only to people who use Kubuntu (or some lightweight desktop environment) and don't want to install GNOME libraries. If you use the standard Ubuntu desktop, the dependencies are already present, and you can safely use vim-gnome. I agree that it could be confusing.


What is required to use NetworkManager user connections without an X session?

Quoting the manpage:

  User sessions: For this case, nmcli can talk to nm-applet to find
             user connections.  It can still talk directly to NetworkManager for
             manipulating these connections.  As nmcli doesn't have direct
             access to user configuration data in GConf, nm-applet handles that
             itself.  That may, for example, cause the applet to pop up keyring
             dialogs when secrets are needed.

From my understanding this means you cannot see user connections without having nm-applet running (it works fine for system wide connections).