Found SSH Backdoor on VServer. What to do?

This is what you should do on all the systems that you've had this sniffer.tgz on: Nuke Them From Orbit immediately, and start over from a clean installation. (That is, destroy the system(s), reinstall clean, load data from clean backups - assuming you have backups that're clean, and then harden the system(s) before putting them back on the Internet).

Whenever you have malware or hackers get into your system like this, it's time to reanalyze how your system is configured and make sure to not repeat the same steps that they got in with. But, because this may not be a system you have the ability to take aside and forensically analyze, and since this may be your only server, it's time to just destroy the virtual system, and start over from scratch (as I said above).

(And this applies to any such situation where you get malware on the system. Unless you have spare hardware to replace something like this so you can isolate and forensically examine the breached system, which usually most users do not have, you have no choice but to nuke the system and start over.)

Without analyzing your server I can't really say what you did wrong, but it's likely that this backdoor is deeper in the system than just a simple 'program' that got installed.  And, since the bad guys already got to install a backdoor on your system, you can assume that all your passwords are now breached and no longer safe (whether it be for SSH, or MySQL root, or any other type of password that has EVER been entered into this computer system).  Time to change all your passwords!

Once you're back up in a clean environment, here's some basic tips on hardening steps to consider.  Note that because these make it much more broader a topic, I can't really dig into detail here, but it's definitely time to do some hardening steps to protect your system:

Turn on a firewall, and only allow access to ports that need to be opened.  ufw exists to be simple, so let's use that.  sudo ufw enable.  (Configuring ufw properly for your environment is a different story, and that goes beyond the confines of this question.)
Restrict access to remote SSH.  This isn't always doable, but you ideally would identify IP addresses that are owned by you and specifically whitelist them in the firewall.  (If you're on a dynamic residential IP address skip this step).
Lock down SSH access to your server, and require the use of SSH keys only for authentication.  This way hackers can't attack your server and try and just guess passwords.  It's much MUCH harder to guess the proper private key (because you'd have to bruteforce all of them), and this helps protect against bruteforcing attacks.
If you are running a website, make sure to lock down the permissions so that people can't upload/execute things at their leisure.  Doing this varies from site to site, so I can't give you more guidance here (it's impossible to do so).
Also if you're running a website using Joomla or Wordpress or such, make sure you keep the environment up to date and patched with security vulnerabilities from the software providers.
Where possible, setup, configure, and use two-factor authentication (2FA) methods for things that you authenticate with.  There are many solutions for second-factor authentication for different applicaitons, and securing various applications this way is beyond the scope of this post, so you should do your research on this point before you pick a solution.
If you absolutely must use passwords in your setup, use a decent password manager (cloud-based ones are not necessarily good choices) and use long-length (25+ characters), random, unmemorable passwords that are different for each individual item that's being secured by passwords (hence the recommendation for the password manager).  (However, you should strongly consider NOT using passwords where possible (such as for SSH authentication), and use 2FA where possible).


How can I disable/modify the SSH login banner for a given user?

It seems it is possible to disable this message on a user basis by creating an empty file in a user's $HOME directory (/home/username/) called .hushlogin.

touch ~/.hushlogin


Upgrading a 16.04 server to 18.04 with a secondary fully encrypted drive

Full Disk Encryption in this case means including /boot/ so if you manually mount the secondary encrypted disk, you can leave it unmounted while performing the upgrade.
As you don't mention any details about the contents nor the specific encryption used of the secondary drive, the old adagio still stands:
Make a full System Backup before starting! ;-)


After you launched an interpreter as root, it inevitably has root privileges. In order to drop privileges you could write a shell script wrapper where you change the process user and group and start the interpreter without privileges.

Solution 1: shell script wrapper

You need an unprivileged user which you can switch to (create one with sudo adduser --system --no-create-home [username] if necessary, but your login account should be fine)
start python with sudo su -c ipython [username] and check that it's unprivileged with

import os
os.getuid() # should be [username]'s UID
os.geteuid() # should be [username]'s UID
import subprocess
subprocess.check_call(["sudo", "-i"]) # should raise CalledProcessError

This solution provides only sufficient flexibility for starting the interpreter. If you want to write code and deal with privileged and unprivileged parts, consider solution 2.

Solution 2: drop privileges in python

In case you want to manage privileges in the python interpreter:

The decision where to drop privileges in your code isn't trivial and needs to take into consideration the tradeoff between comfort (you don't want to enter your password all the time), security (as few code as possible should run with privileges) and maintainability (as much code as possible shouldn't be concerned with privileges).

Approaches:

sudo offers a way to acquire privileges for a command in an unprivileged interpreter, but requires user interaction and makes it difficult to run your code without privileges (because you have the sudo statement in all you commands).
If you start the interpreter with privileges you can drop privileges with os.set[/e/r/s]uid and os.set[/e/r/s]gid. The lecture of the python documentation is mandatory in this case.

In general you should write as much code as possible without having to deal with privileges and wrap the this code in a function which drops privileges, i.e. I don't recommend the sudo approach, also because it make the code dependent on sudo.


Can I optimize Ubuntu for touch integration?

The current version of ubuntu was not designed with touch in mind. For the future, the idea is to have a shell which scales to all the different devices (unity 8). This one is still a work in progress and it is at the moment used only on smartphones and tablet (soon in theory). This interface will probably reach the desktop in the following months or in the next year (no eta is available). At the moment you can only try the phone/tablet interface on the desktop if you want, but it is not very usable right now.


How to get backup for particular Ubuntu user?

Backups are always good to have.  That is probably why there is a simple backup utility in the settings window, under "system".  Tell it to back up a folder, and select you home directory, tell it where to backup, and it's done.

But why compound you original error by making more errors?  You might be able to get it to work, but it would be better to understand what you did, and the proper way to fix it.

I don't believe you when you say you lost your ubuntu root password; first of all, if you knew enough to actually create a usable root password, you would already know how to create a new one the same way.  But you don't need a root password, which is why Ubuntu does not provide one by default.

I suspect what you may have done is somehow either deleted the admin group, or removed yourself from it.  Doing this will take away your ability to use sudo.  If this guess is correct, the solution is not to edit the sudoers file, but to add yourself back to the admin group.

If you edited the sudoers file and messed that up, then you do need to edit the file to restore it back to what it was.

Most of these things are accomplished following these directions.  It's mostly standard Unix/Linux commands that are easy to find lots of information.

Then again, perhaps you already do know what to do, in which case... good luck, and feel free to ask for advice before destroying your system rather than after. :)


change color on msi keyboard steelseries

I am the creator of the project.

Please install the latest version of msi-keyboard, or install the keyboard LED manager app from here: https://github.com/stevelacy/msi-keyboard-gui

The issue you are having is due to a buffer error in node-hid fixed in our recent release.


Ubuntu 12.04 resolution is correct, but windows are pudgy and bloated compared to 11.04. ATI Driver is screwed up

Since your resolution appears to be set to the display's native one, try forcing the DPI setting to 96 or less. It should apply to window dimensions and font sizes in most applications.

I'm using XFCE, the graphical interface to change the DPI setting is xfce4-appearance-settings.

For Gnome 2, this seems to do it:

Is it possible to change font DPI in 11.04?

And for Gnome 3:

How do I change the font DPI settings?


At the moment the meek packages are landing in debian so we can expect them to arrive in ubuntu too.

UPDATE
Previous info are not working fine anymore, it looks there is now a repository for debian unstable ... so I changed my previous answer with this one:

1 Add Repository

Repository (info on the repository page).

2. Install meek-client package

sudo apt-get install meek-client

3. Update your tor configuration

Now edit you tor configuration file /etc/tor/torrc:

sudo gedit /etc/tor/torrc

Add the meek plugin to it

ClientTransportPlugin meek exec  /usr/bin/meek-client

And some meek bridges:

Bridge meek 0.0.2.0:3 url=https://az668014.vo.msecnd.net/ front=ajax.aspnetcdn.com
Bridge meek 0.0.2.0:2 url=https://d2zfqthxsdq309.cloudfront.net/ front=a0.awsstatic.com


Try that:

The simias.tar.gz file is downloaded as "download".
All you have to do is to add a line in the file "rules" just before the tar command.

mv download simias.tar.gz

It should work.


I had a similar issue with the upgrade to 13.10. I solved it using a modified method of that that was presented by user207943 in this thread.

Press Ctrl+Alt+T to get a terminal and log out using the command

pkill -U username

log back in, open the terminal again and unlock the update with:

sudo rm /var/lib/dpkg/lock

then run:

sudo dpkg --configure -a

then:

sudo apt-get upgrade

Finally to finish run:

sudo apt-get dist-upgrade

After restarting mine was fine. (I had many restarts between the configure line and the other two lines. I was trying to fix issues with unfinished upgrades which caused my network devices not to be recognised (among other problems). Everything failed, until I ran the upgrade commands which solved everything.) I think you may be able to run just dist-upgrade rather than upgrade then dist-upgrade. I don't know but the above method seemed to work.


After Upgrading from 12.04.to 12.10 will i have to install my drivers again?

Please, don't mix repositories! BackTrack is no longer supported by their creators which recommends the use of Kali. And no, normally you don't have to reinstall your drivers, unless you built them from source with options not included in the default installations, which is this case.


How to install perf on a custom build kernel?

You may need to build the tools since you are using a custom kernel. If you want to use linux tools from the repositories, you need to use the kernel provided by Ubuntu. Linux tools checks your kernel version and if it don't match it's own it will not run.


I have had the same problem, regardless the version of (K)Ubuntu / Windows. It occurs when changing to a new album (caused by difference in bitrate?) The music stops at the end of a song (there's no switch to the next).

It seemed that setting buffer duration (sound output) to 0 ms helps. Others report disabling replay gain helps as well.


How to remove Elementary OS and install Ubuntu Over it, without burning to a DVD or USB?

I have a laptop with dead USB ports (old thinkpad t42p) that I use in QA-testing Ubuntu flavors.
I download the daily ISOs onto the local HDD to a location I selected.
The following entries were then added to /etc/grub.d/40_custom (this is a snippet only as it lists many other ISO options)
menuentry "Lubuntu QA testing 18.04.4 ISO noPAE" {
    set root=(hd0,7)
    set isofile="/lubuntu-18.04.4-desktop-i386.iso"
        loopback loop (hd0,7)/lubuntu-18.04.4-desktop-i386.iso
        linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/lubuntu-18.04.4-desktop-i386.iso forcepae --forcepae --
        initrd (loop)/casper/initrd
}
menuentry "Lubuntu QA testing 18.04.5 ISO noPAE" {
    set root=(hd0,7)
    set isofile="/lubuntu-18.04.5-desktop-i386.iso"
        loopback loop (hd0,7)/lubuntu-18.04.5-desktop-i386.iso
        linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/lubuntu-18.04.5-desktop-i386.iso forcepae --focepae  --
        initrd (loop)/casper/initrd
}
menuentry "Xubuntu QA testing 18.04.5 ISO noPAE" {
    set root=(hd0,7)
    set isofile="/xubuntu-18.04.5-desktop-i386.iso"
        loopback loop (hd0,7)/xubuntu-18.04.5-desktop-i386.iso
        linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/xubuntu-18.04.5-desktop-i386.iso forcepae --focepae  --
        initrd (loop)/casper/initrd
}

Note:  The 'forcepae --forcepae' is required only because this really old pentium M device requires those kernel lines to boot. It's actually handy, as on other (prehistoric pentium) devices I have to manually type that detail onto the kernel line for the laptops with working thumb-drives on each QA-test boot.
You'll have to change the ISO files to match your system, plus location of where you stored the ISO files. Mine were in / of sda7.  This is intended as example only.
To re-create the grub file use the command sudo update-grub.


Server disk encrpytion prevents connection after SSH remote reboot

It's not possible right now.  Some people have got it to work and others can't get it to work.

It's because of this bug here: https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/595648


Will upgrading ubuntu kernel to a newer downgrade the old kernel?

Ubuntu never replaces a kernel with another one, all kernel versions are installed parallel, so you can choose which kernel to boot in GRUB.

Before the upgrade, you should make sure the linux metapackage is installed, it always depends on the latest official kernel for your Ubuntu version. I would also recommend to uninstall your custom kernel and perform the upgrade with the 11.10 default 3.0 kernel.

After the upgrade, check this, here you can get the 3.3 kernel for 12.04. Please note that the official 3.2 kernel from 12.04 backports things from 3.3, so if you need some new drivers etc. first try the 3.2 kernel before upgrading to an newer unofficial kernel.


Sound not working with Alsamixer on ubuntu with Awesome WM

This is not a solution but a workaround.

sudo apt-get install pulseaudio pavucontrol

Run pulseaudio --start. If pulseaudio was already running run pulseaudio -k && pulseaudio --start

Now you can access an easy config by running pavucontrol

You'll see the tab Output Devices. Click on it, and then there are 3 buttons in the right hand side. If you don't have the proper themes, they won't have any picture. Toggle the first button.

Now the headphones should work.

I'm using Awesome inside lubuntu 20.04, and here pulseaudio and pavucontrol-qt (lxqt version of pavucontrol) is installed. So just killed and started pulseaudio daemon and then toggle the headphones switch.


Which wireless keyboards and mice are compatible?

I'm using a MS Natural Ergonomic Wireless KB & Mouse.

The mouse works but the keyboard drops connection every half hour. This can be resolved by pressing the connect button so it's a trade-off between that inconvenience and the fact that I find this the most comfortable keyboard I've used (an old wrist injury makes typing on a standard keyboard a bit uncomfortable at times).

(Ubuntu 12.04)


libvirt kvm hidden state fail to validate

Your are trying to use a relatively new feature, perhaps it is not yet available in 15.04. It is available in 15.10 development. You can check by looking at /usr/share/libvirt/schemas/domaincommon.rng. Does it contain this:

  <!-- Optional KVM features -->
  <define name="kvm">
    <element name="kvm">
      <interleave>
        <optional>
          <element name="hidden">
            <ref name="featurestate"/>
          </element>
        </optional>
      </interleave>
    </element>
  </define>

If the feature is available, then please show us the bigger context of your .xml file. Perhaps edit your question and post the entire <features> section.


After downgrade of Nvidia driver cannot start Nvidia Settings in Ubuntu 12.04

problem SOLVED! thanks anyways to those who checked or tried to reply to this post. The problem was in that I had to reinstall Nvidia Settings as the older Nvidia drivers are not compatible with X server on Ubuntu 12.04 and up. But it's ok now I have what I wanted old good Nvidia-173.14.37 video card works at best.


Virtualbox won't start; /etc/init.d/vboxdrv setup didn't work

The virtualbox version was out of date compared to the dependencies.  A complete reinstall was required.  But first I backed up my dkms configuration and  removed it:

mkdir ~/backup_dkms
cp -r /var/lib/dkms/* ~/backup_dkms
rm -rf /var/lib/dkms/vboxhost

Then after a bit of fishing around, running apt update, upgrade, and autoremove, I finally ran:

sudo apt install virtualbox

It works perfectly now.


1404_HWE_EOL question about fglrx graphics driver.

You will lose your fglrx proprietary driver, so you will suffer lack of power management support and latest opengl support for your hardware.

The battery life of my laptop went from 6 hours to just 1 and a half, and opengl went from 4.3 to 3.3. So it is clear that keeping the old HWE stack is more than advisable (in my case at vivid HWE).


Firefox global menu bookmarks no middle/right click?

This is a known (wishlist) bug. You may want to subscribe to it to get updated on its status.


You can probably get more detail about what's consuming resources during bootup using the systemd-analyze command. For example:-

systemd-analyze blame

This will list in order of time used, each thing that consumed time during boot.

systemd-analyze plot > plot.svg

This will generate an svg called "plot.svg" which you can open using an image viewer app. It shows graphically what's eating up your machine during boot.


Computer slow down every hour during anacron jobs

If you want instant relief, use
crontab -e
then put a pound sign (#) in the first column of the line having the hourly jobs
then save your file.
There could be a misconfiguration in the run-parts command on that line.  I don't think it should have "-- report" in it, but that is my hypothesis.
regards,
mondotofu


Trying to boot from USB on Asus q200e-bhi3t45 just brings me to grub menu

This is what works for me:
Turn on CSM, then change the boot order so that the USB drive(s) are listed at the top before the hard drive.
Then reboot and you should be able to boot to the usb stick.


How to run multiple versions (via multiple profiles) of Firefox?

Get FoxTester extension. It allows to install/launch/uninstall multiple versions of Firefox using multiple profiles, directly from your default Firefox.

Keep in mind that FoxTester is designed for testing multiple Firefox builds and not for managing profiles intended for long term usage. If you uninstall a Firefox build installed by FoxTester, it will remove all traces of it, including the profile.

FoxTester install all FF versions and creates the corresponding profiles in the foxtester folder, inside the Firefox profile where FoxTester is installed.

If you want more control over your profiles, then use the standalone profile manager instead. But don't use it to manage FoxTester profiles.


I got the answer here maybe you'll receive when you update that the key is not available key run this sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B48AD6246925553

in my case 8B48AD6246925553 is the key that I received with the error after update


How can I add more storage to my Ubuntu partition without erasing data?

As far as I can tell, there are two possible problems here.

First, you cannot move or resize a partition while your operating system is running from it. Meaning, if you are running the Ubuntu installation, you cannot increase the size of its partition. You will need to run an OS from somewhere else.

Second, I'm assuming you had Windows before you installed Ubuntu. In that case, your Ubuntu partition is probably displayed to the right in gparted, with the free space you removed from the Windows partition to the left of it. Problem is, a partition can only be expanded towards the right, so if the free space is to the left of your Ubuntu partition, you will need to move the Ubuntu partition to the left, and then expand it towards the right.

How I suggest doing so:

As always, when messing with partitions, backup your data.
Make a GParted live bootable USB stick.
Boot into that, just like you did with the Ubuntu installer, and open gparted
Select your Ubuntu partition
At the top, click Partition>Resize/Move
Move it to the left, and expand it to the right and fill the 200GB.


What guarantees does Ubuntu provide concerning binary compatibility across releases?

What makes a binary package incompatible with a library is an API or ABI break.

An API break occurs when the interface offered by the library changes in a way that is no longer compatible with the previous version. An example is the addition or the removal of an argument from a method signature.

API breaks generally require you to adapt your software to the new interface and are avoided as much as possible by library developers.
An ABI break occurs when the size or the alignment of data types change, or the low-level conventions (such as calling conventions) change. An example is modifying a function's parameter type from int to size_t. ABI breaks generally are introduced just by bug fixes or by changes to the API.

ABI breaks require you just to recompile your program with the newest library headers.

Having said that, what's the Ubuntu policy on API and ABI breaks?

Newer Ubuntu releases try to offer always the latest software, including the latest software libraries.
Newer Ubuntu releases try to be as much backward-compatible as possible. For example, Ubuntu offers both GTK+2 and GTK+3 at the same time.
Once an Ubuntu release is made, it is frozen, in the sense that only important bug fixes can reach the archive for that release (there are exceptions and special cases regarding this rule, but such exceptions are limited to a small set of applications).
Across updates of a single Ubuntu releases, there are no chances of API breaks. This is implied by the "only bugfixes" policy.
As I previously said, some bugfixes can introduce ABI breaks. Whilst being this a rare case, this is possible and if an ABI break is necessary to fix an important bug, it will be introduced.
Across Ubuntu major releases, both API and ABI breaks may be introduced. This is because tries to offer always the newest software.

Long story short: whether your program will work across Ubuntu releases really depends on the libraries it uses and the policies around them. Also, you cannot be sure whether your package will be compatible across Ubuntu release updates.

That was the most technical part. Having said this important preface we can fight the problem from a different point of view: consider that 1. many standards exists, 2. free software tries to respect the standards as much as possible, and 3. most libraries (even small and unimportant ones) will very unlikely change their API/ABI across releases.

So, feel free to offer a single binary package for multiple Ubuntu version, but keep an eye on the changelogs. Also, remember to be clear about your package dependencies: e.g. do not say that it depends on GTK+3, but clearly state the ranges (from 3.X to 3.Y). This will help your users prevent serious mistakes.


The command to remove an alias is unalias so....

 unalias gs

Manual:

NAME

  unalias - remove alias definitions

SYNOPSIS

unalias alias-name...

unalias -a

DESCRIPTION

  The  unalias  utility  shall  remove the definition for each alias name
         specified. See Alias Substitution . The aliases shall be  removed  from
         the   current   shell   execution   environment;  see  Shell  Execution
         Environment .

  -a   Removes All aliases


How to copy to and from clipboard in virtualbox

Usng the clipboard requires a GUI inside the VM. But it is much easier to manage a CLI only VM by connecting to it via ssh instead of the console window provided by Virtualbox.

And you can resize the terminal as much as you like and of course you can copy/paste there too.

If the virtual NIC is configured for NAT you will have to tell VBox (in the advanced network settings) to create port forwarding.


Problems with snapd and ubuntu-snappy-cli in Ubuntu 16.04

You actually want to remove the other package that has the problem.

sudo apt-get remove --purge ubuntu-snappy-cli

and put back snapd

sudo apt-get install snapd


Ubuntu 32 bit version should work fine. There may be few glitches, but overall it will run good enough. Remember to keep a swap partition.


E: Malformed entry 54 in list file /etc/apt/sources.list (Suite): Installing R

Thanks @Pilot6 and @OrganicMarble for the suggestion. just for if anyone else is experiencing the issue:
I ended up using

sudo nano /etc/apt/sources.list

which helped me override permissions restriction and modify the file.

Just changed line 54 to

deb http://cran.rstudio.com/bin/linux/ubuntu xenial[type]


I Get "gpg: no valid OpenPGP data found" error while importing google key

The problem was due to the restriction in my country. As @remyseroos suggested me, I tried to open the URL (https://dl-ssl.google.com/linux/linux_signing_key.pub) in my browser and I found out it's not loading properly.

So I just used a proxy and problem solved!


no usb boot after installed ubuntu 12.04

Technically grub can do that, but I find that rather unlikely. I suspect this is misconfigured BIOS.

Enable USB support in BIOS and twiddle with the boot order. Many BIOS also have a key to display a menu of available boot devices for you to select during boot.


Ubuntu 18.04 and Timeshift - what happens if I reboot while timeshift is taking a snapshot

Using TimeShift in rsync mode means that rsync is the underlying technology and it will just continue where it left off since the last warm reboot.

If you use a hard reboot (hold power button until power off) all bets are off as it now depends on your cache, exact file system (FS) used, journaling capability of the FS, ... and the results are unpredictable.


How do I get my Rock Candy Xbox Controller t work on Ubuntu

Try the steps from this post. Basically it involves two steps:

Installing xboxdrv from a PPA which contains a more updated version of the package: sudo add-apt-repository ppa:grumbel/ppa && sudo apt-get update && sudo apt-get install xboxdrv
Blacklisting the xpad driver by adding blacklist xpad to your /etc/modprobe/blacklist.conf


How can I get binary file permissions from command line?

For a single file:

stat -c "%a" filename.txt | xargs -I PERM echo "obase=2; ibase=8; PERM" | bc

And as a more clear script for more that of one file:

#!/bin/bash
for file in *
do
  perm=$(stat -c "%a" "$file")
  bin=$(echo "obase=2; ibase=8; $perm" | bc)
  echo "$bin $file"
done

the output:

110110100 baz
110110100 foo
110110101 bar

Notes

First we loop into all files and directories using for file in *.
With stat -c "%a we gather the file permission in octal, then
Using echo we add other necessary details to permission and pip it to bc.
Finally bc does the conversion and then we printout the result and file name.
obase=2; means output should be in binary, ibase=8 means our input is in octal and $perm is the file permission in octal like 664.


Why did Ubuntu and Windows start hanging mysteriously after I took a vacation?

Ubuntu and Windows does not affect one another so if you get issues like this at the same time in both, it is very likely a hardware issue. I would test your harddisk for errors. You can do that in Palimpsest in Ubuntu. In the right-most column at the top, you'll see a button to run SMART-tests.

Another common cause of symptoms like that, is overheating which can be caused by a dusty fan for instance.


Most of the instructions for doing the low level work that you describe (partition management) strongly encourages backing up your important data.

Based on your description it appears that you have deleted your Windows installation.  If it weren't deleted after the current Ubuntu installation that you have, you would see the option to boot either into Windows or into Ubuntu.  If you had other recognizable OS installations you would also have a grub menu item to chose those.

Since, in your description you have said that you (inadvertently) have a Ubuntu only installation.  You can boot then run this in a terminal.

$ sudo update-grub

Grub will see all your OS installations and in your next boot you will have an option to boot into either.

If you don't have Windows as a boot option in the grub menu you can install Windows, then run the steps below to install Grub so that you can have the option to choose which OS to boot to.

While in Ubuntu, launch gnome-disk-utility to check all your available drive partitions.  You can use this utility to mount the various partitions to look for any of your Windows data, or to identify a partition for installing Windows.

You can also use gparted.  You can either install it with $ sudo apt-get install gparted and run it from Ubuntu or you can boot to the Live Ubuntu install disk and run it from there.

Then from gparted you can create the partition or size your partitions to accommodate the installations you want... similar to what you have described you've been doing... be sure to back up your important data before modifying the partitions.

Once you reinstall Windows, you will no longer be able to boot to Grub.  Windows will install it's own boot manager.  You can reinstall grub with the following steps:

How to repair Ubuntu after installing Windows
(You can check your partitions by running $ sudo fdisk -l)

1) boot to the Ubuntu installation disk
2) Run the "Try Ubuntu" option
3) Bring up a terminal (Launch search "terminal")
4) Run these commands (exactly):
    a) sudo mount /dev/sdaX /mnt  # Make "X" the partition that has Ubuntu installed (i.e. /dev/sda2).
    b)
    c) sudo chroot /mnt
    d) update-grub
    e) if no errors skip this "e" section
        grub-install /dev/sdX (x is the hard drive that has linux installed (i.e. /dev/sda)
        update-grub
5) Reboot the system


After wake up the authentication dialog freezes

systemctl stop mysql.service

simply stops the process but will start again after reboot. You need to issue

systemctl disable mysql.service

to ensure it will not start during boot time.

If you are bold, you could install a timer service that will start youre service after a given time. Lookup the systemd documentation for systemd timers


Added key locally using ssh-add work on remote

Host key verification failed.

says that the authenticity of server 192.168.0.2 was not verified, because it's host key is not in the known_hosts of 192.168.0.3. So first of call, manually connect to the 192.168.0.3 and from there to 192.168.0.2 and verify the host key.

Then you can use ssh-agent forwarding (-A switch):

ssh -A ansusersu@192.168.0.3 'ssh ansusersu@192.168.0.2 sudo whoami'


How to remove the BIOS password using Ubuntu?

Power on password is not related to the OS that is installed on your laptop nor on its version.
If you know the admin password for your laptop you should also be able to remove it by setting it to blank password in the BIOS configuration screen (after turning on, see the onscreen message about which button to press to enter the configuration menu).


Keyboard shortcut in Nemo to open terminal in active folder

F4

You need to install the nemo-terminal package for it to work. You can get it from the Webupd8 Nemo PPA. Add it to your sources and install the terminal extension:

sudo add-apt-repository ppa:webupd8team/nemo
sudo apt-get install nemo-terminal


How to dual boot Windows 7 x64 and Ubuntu 13.04 x64 as BIOS, not EFI

Here is your solution

There is a very easy and interactive way to fix the GRUB problem. Using this method it will start reading all your boot partitions and also you will be able to use any operating system. All operating systems installed in your computer will be displayed in the GRUB menu.

You have to follow these very simple steps...

Boot from a live CD or your bootable USB, and select 'Try Ubuntu'.

Install boot-repair (a good program to fix GRUB):

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

Run boot-repair from your system or type: (boot-repair &)
When started, select option Recommended Repair from the two options:

Recommended Repair & Advanced Options.
Follow the very easy onscreen instruction. It will build/fix your GRUB installation...

Restarting your system will display both options to boot from Ubuntu and Windows.


How can I get rid of wine menu entries when wine packages are not uninstalled?

Introduction

Whenever you make a new WINEPREFIX menu entries and context menu entries are recreated automatically; your default .wine prefix will even be recreated, as you know, if winecfg is run and it the prefix doesn't exist.

Even though you are probably using different versions of wine and not just the system wine in playonlinux, removing system wine will probably take playonlinux with it, so there are some better alternatives that will stop wine regenerating menu entries all the time.

Possible Solutions

I have found that there are really two distinct ways of dealing with the issue:

a) Refer to the wine FAQ and permanently disable the winemenubuilder application, although that would generate quite a lot of error messages if you used default wine to install programs rather than playonlinux in the future. The alternative ways of dealing with winemenubuilder are detailed in the FAQ, such as disabling it when a particular new application is installed or disabling it for all programs to be installed by placing an override in winecfg.

OR

b) Just keep deleting the created menu entries by placing the commands below in a script and running it regularly. They are from the wine FAQ, and you should be careful if you use them and make sure you don't make any typos. The commands below will remove wine applications (but not playonlinux ones) from your menus.

Here is the full list of commands from the wine FAQ; use with caution and avoid typos:

rm -f ~/.config/menus/applications-merged/wine*
rm -rf ~/.local/share/applications/wine
rm -f ~/.local/share/desktop-directories/wine*

If you wish to see what will be removed, you can use printf with command one and three above to list the items (You can examine the directory mentioned in command two manually if you wish). As an example,

printf '%s\n' ~/.config/menus/applications-merged/wine*

will format the list of items nicely so it is easily readable:

/home/mike/.config/menus/applications-merged/wine-Programs-ViewNX 2-ViewNX 2 Help.menu
/home/mike/.config/menus/applications-merged/wine-Programs-ViewNX 2-ViewNX 2.menu
/home/mike/.config/menus/applications-merged/wine-Programs-ViewNX 2-ViewNX 2 Readme.menu

Conclusion

In short, it is up to you which option you choose to use to solve your problem, but I personally think that the simplest way is to place the commands from the wine FAQ in a script and run it periodically.

In addition, for a general discussion of how to remove wine context menu entries, which you may also be interested in, see my answer here:

How can I eliminate wine application options from Thunar's context menu?

which is applicable not just to Thunar and Xfce, but all desktop environments that adhere to XDG standards.


60 sec delay between BIOS and GRUB screen

Well, as much as I hate to answer my own question, it was one of the hard drives. Unplugged it and the problem went away. SimplySimon deserves credit for the answer.


Go to Tools/Plugins; uncheck "DAAP music sharing".

The actual text may differ (I only have a Dutch version) but the word to look out for is DAAP. If anyone has the proper texts please feel free to correct me.

As described here, your version/build of Rhythmbox supports DAAP sharing over port 3689.

I would not call that "extremely dangerous", but to each their own risk analysis.


Both. First you install them, then you call dh_python2.

dh_python will move things around, remove .pyc files, and handle byte-compilation at installation time.


mt7601u drivers not working ubuntu 16.04

I suspect that you bought the Realtek mt7601u device because the internal Intel device is not working. It is not working for exactly the same reason that the internal device is not working. It is because of this that we see in your paste:

0: dell-rbtn: Wireless LAN
    Soft blocked: yes
    Hard blocked: yes

‘Hard blocked’ usually means that the hardware switch on the laptop is set to disable the wireless radio. In fact, you say:

  wifi has stopped working. It shows disabled network.

There are several things you can try. First, obviously, find and press the Airplane Mode button or switch on the laptop. After doing so, check again from the terminal:

rfkill list all

Is the hard block changed and does the wireless spring to life?

If not, then try unloading one of the three modules that are supposed to translate key presses to action; in your case, turn on the wireless. Try:

sudo modprobe -r dell-laptop

Now does the Airplane Mode button or switch work as expected?

How about:

sudo modprobe dell-laptop force_rfkill=Y

Now does the Airplane Mode button or switch work as expected?

How about:

sudo modprobe -r dell_laptop
sudo modprobe dell_laptop
sudo modprobe -r dell_rbtn
sudo modprobe dell_rbtn auto_remove_rfkill=N

Now does the Airplane Mode button or switch work as expected?

Finally, I suggest that you try a live session of Ubuntu 18.04 as there have been some steps forward in dell-rbtn since 16.04.


The theme problem should be solved by performing the following steps

Update the path from /lib/plymouth/themes/ to /usr/share/plymouth/themes.
Run

sudo update-alternatives --config default.plymouth

and choose the theme number.
Run

sudo update-initramfs -u


It's basically the same as booting bootmgfw.efi from Windows 8, but a bit simpler.

menuentry "Gummiboot" {
        insmod chain
        insmod search_fs_uuid
        search --fs-uuid --no-floppy --set=root $UUID
        chainloader /EFI/boot/bootx64.efi
}

Just replace $UUID with the UUID of the filesystem where you have put Gummiboot or the efi-binary you want to boot (use blkid or ls -l /dev/disk/by-uuid/ to get the UUID). For FAT filesystems the UUID should look something similar to this: 00000-0000

insmod chain and insmod search_fs_uuid may just be optional, I could remove them from the configuration during my quick tests and was still able to boot the binary.

Alternatively you could add insmod ntfs or insmod ext2 if you have the binary on another filesystem like NTFS or EXT[234] (may require insmod part_msdos or insmod part_gpt if the filesystem is on a disk with a different partition table format).

/EFI/boot/bootx64.efi is my Gummiboot file in this example, as I have it as the default bootloader of my ESP.


How do I change Firefox's default language?

The first step would be to install firefox-locale-es package:

sudo apt-get install firefox-locale-es

then choose Language suppport and then choose spanish. Start firefox and firefox will have spanish.


Problem with RODBC installation in Ubuntu with R 3.5.1

The missing headers problem can be solved by installing the r-rodbc package from conda such that

RUN conda install --quiet --yes \
    'r-base=3.5.1' \
    'r-rodbc=1.3*' \

and then after that you will get the following error

hecking for library containing SQLTables... no
configure: error: "no ODBC driver manager found"
ERROR: configuration failed for package ‘RODBC’
* removing ‘/opt/conda/lib/R/library/RODBC’
* restoring previous ‘/opt/conda/lib/R/library/RODBC’

for which you need r-cran-odbc, unixodbc and 'unixodbc-dev' (just unixodbc is not enough) from apt so your Dockerfile becomes

# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
ARG BASE_CONTAINER=jupyter/minimal-notebook
FROM $BASE_CONTAINER

LABEL maintainer="Jupyter Project <jupyter@googlegroups.com>"

USER root

# R pre-requisites
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
    fonts-dejavu \
    tzdata \
    unixodbc \
    unixodbc-dev \
    r-cran-rodbc \
    gfortran \
    gcc && \
    rm -rf /var/lib/apt/lists/*

USER $NB_UID

# R packages
RUN conda install --quiet --yes \
    'r-base=3.5.1' \
    'r-rodbc=1.3*' \
    'unixodbc=2.3.*' \
    'r-irkernel=0.8*' \
    'r-plyr=1.8*' \
    'r-devtools=1.13*' \
    'r-tidyverse=1.2*' \
    'r-shiny=1.2*' \
    'r-rmarkdown=1.11*' \
    'r-forecast=8.2*' \
    'r-rsqlite=2.1*' \
    'r-reshape2=1.4*' \
    'r-nycflights13=1.0*' \
    'r-caret=6.0*' \
    'r-rcurl=1.95*' \
    'r-crayon=1.3*' \
    'r-randomforest=4.6*' \
    'r-htmltools=0.3*' \
    'r-sparklyr=0.9*' \
    'r-htmlwidgets=1.2*' \
    'r-hexbin=1.27*' && \
    conda clean -tipsy && \
    fix-permissions $CONDA_DIR


Does installing with wubi affect performance?

Since wubi uses a single file to store the Ubuntu installation on the NTFS drive IO will be slower

https://superuser.com/questions/222179/how-is-wubi-different-from-dual-booting-or-a-vm-image


backup from 13.10 fails to restore in 14.04

Boot from a live 13.10 media available here
mount the partition that you wish to restore the data to then

try the restore. if it fails again, try

`sudo apt-get update' when booted from the live cd

and try again to restore. the suggestion above in the comments about watching df from  int_ua may also prove useful if you are in fact trying to restore more data than you have space for. the suggestion regarding turning on verbosity for duplicity may also gives some clues about the unspecified error which will help us help you.


Rufus app is available for Windows platform only.

But you can use other softwares like winusb, dd, unetbootin, ....

Here is short dd tutorial for making bootable drives :

Plug in the USB flash drive and determine the device it's mounted on with the command:

sudo fdisk -l

This time around it was /dev/sdc1 for me, so I'll use that as my example.

Unmount the device

umount /dev/sdc1

The next step is to copy the iso. Copy to the device not partition (i.e copy to sdc not sdc1) as shown below:

sudo dd if=filename.iso of=/dev/sdc bs=4M

Perform final steps :

sync
sudo eject /dev/sdc

That's all . :)

Source


I just ran into the same thing.  When installing rrdtool, you'll see a suggestion to install librrds-perl. Doing that solved my particular need of perl and "use RRDs".


Has anyone who took part in the App Showdown gotten the promised t-shirt?

I apologize for the delay, but we've finally got some good news. Due to the overwhelming success in terms of participants, it's taken a while to get all of the T-shirts and organize the logistics with shipments.

A batch of T-shirts has bent sent out today and they're going to get to everyone soon. It's unlikely that everyone will get their T-shirts before Christmas, but some of the participants located closer to the UK might :)


Use the Ubuntu mini ISO from here and copy to USB drive.

At the initial menu screen, choose the install option (should be selected by default) and follow the steps to configure as you wish..

After the base system has been installed, it will prompt you to pick a DE and other features. Select Xubuntu minimal installation and continue, following prompts as required.

You now have a fresh install of Xubuntu Core!

You can try this out first in a virtual machine if you are concerned.


Are gnome-session-fallback and metacity + gnome-panel the same?a

Yes, but you should install gnome-session-flashback. gnome-session-fallback is just a transitional package to ease upgrade to gnome-session-flashback.


Cannot switch PHP version from 8.0 to 7.4

Do you have PHP5 installed on the system?
You can list all loaded Apache modules with apache2ctl -M:
$ sudo apache2ctl -M

Loaded Modules:
 core_module (static)
 so_module (static)
 watchdog_module (static)
 http_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 unixd_module (static)
 access_compat_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_core_module (shared)
 authn_file_module (shared)
 authz_core_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 filter_module (shared)
 headers_module (shared)
 mime_module (shared)
 mpm_prefork_module (shared)
 negotiation_module (shared)
 php7_module (shared)
 reqtimeout_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 status_module (shared)

If you have multiple php versions, use a2dismod to disable the ones you do not need. From there, you can use update-alternatives to change the default version of PHP:
sudo update-alternatives --set php /usr/bin/php7.4

Note: Be sure to change php7.4 to the version you wish to use.

Once this is done, restart the web server:
sudo service apache2 restart

This should give you what you need.


Very Slow upload speed | Ubuntu 16.04 | Dual-boot | Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter [168c:003e]

You appear to be effected by this bug. There are 68 posts of problems and suggestions. The latest one suggests to:

Disable power saving
Use latest kernel version - I'm using 4.14.34 and have had no problems on the 4.14 chain which is LTS (Long Term Support) for 6 years.

May 4, 2019 update

Over a year ago, but after the original answer was posted, a bug fix came out. It happened during the kernel 4.16-rc5 release and the source code change comments state:

  Achieved throughput for different values of sk_pacing_shift (average
  of 5 iterations of 10-sec netperf runs to a host on the other side of
  the WiFi hop):

  sk_pacing_shift 10: 43.21 Mbps (pre-patch)
  sk_pacing_shift 9:  78.17 Mbps
  sk_pacing_shift 8:  123.94 Mbps
  sk_pacing_shift 7:  128.31 Mbps

  Latency for competing flows increases from ~3 ms to ~10 ms with this
  change. This is about the same magnitude of queueing latency induced
  by flows that are not originated on the WiFi device itself (and so are
  not limited by TSQ).

  Signed-off-by: Toke Høiland-Jørgensen

Instinctively you think a kernel greater than 4.15 is required to get the bug fix. This is not so as the next section explains.

Kernel 4.16-rc5 through Kernel 5.0 bug fixes are in 4.14.114 LTS

I'm still on kernel 4.14.xxx LTS (Long Term Support) which has another 5 years of updates coming for it including the 4.16 patch above and recent kernel 5.0 bug fixes.

To prove the bug fix is there go to where my current kernel 4.14.114 is:

https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.14.114/

It says:

  To obtain the source from which they are built fetch the commit below:

git://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mainline-crack v4.14.114

Copy and paste the address into your web browser and press Enter
Google search comes up
Click the first link
A web page appears: https://code.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mainline-crack/+ref/master
Scroll to the bottom and select All commits
The commit we are looking for is 10,000 messages back which is a lot of scrolling and searching.
To speed the process up type Adjust TSQ pacing shift into the search field.
An abbreviated result appears so click Expand and you will see:


They say that this is fixed in kernel 3.16 and can be installed like this in Ubuntu 14.04 at least:
sudo apt-get install linux-generic-lts-utopic

This seems to be another issue with the power management of the soundchip, the guide on xps13-9333.appspot.com suggests to disable power management for Intel HDA on older kernels and to run a certain python script:

mkdir -p /usr/local/bin
wget -O /usr/local/bin/white_noise_fix.py http://xps13-9333.appspot.com/root/usr/local/bin/white_noise_fix.py
chmod 744 /usr/local/bin/white_noise_fix.py

After that, disable the power saving mode of the audio card to prevent pop noises, electrical noises and, more importantly, the white noise, which otherwise will come back:
mkdir -p /etc/pm/config.d
echo INTEL_AUDIO_POWERSAVE=false > /etc/pm/config.d/snd_hda_intel


This is a known issue, specific to the Server ISOs (specifically the Subiquity based 'live-server' installer ISOs.
From my other answer on a different question that has a related answer and cause:

However, on the latest 18.04.1 Subiquity-based Live Server Installer ISOs, there is a known bug where the ISOs for 18.04(.1) install but don't enable Universe or Multiverse repositories.
For those cases, you have to go back and enable Universe and Multiverse and Restricted; keep in mind that this is a bug in the installer and not typical as it's supposed to enable Universe and Multiverse.
(This has been fixed for future ISOs including the 18.04.2 (hopefully) and 18.10 ISOs that are going to be spun when 18.10 is actually released. (However, the 18.04.1 Server ISOs - but not the Alternate istnaller ISO - are known to be affected by this bug))

Because of this bug, only the Main repos get installed and configured.  This is why you only see "three" repositories.


sudo apt-get purge pidgin-ppa

Unable to remove Pidgin software completely

Hope it helps you.


How to install broadcom driver for Dell Inspiron 1440 in ubuntu 12.04

In ubuntu unit dashboard search for "driver". You will find a additional drivers application.

And click on "Broadcom STA wireless" item. (Sometimes it may Broadcom something else.)

Then click "Activate" button just below "Close" button. To activate driver you need internet.


Sign in with Google temporarily disabled for this app

I've been observing the KDE bug regarding this: https://bugs.kde.org/show_bug.cgi?id=404990. To summarize discussions in the bug's comments:

The problem is global.
The bug is affecting newly created Gmail accounts in KMail as well as existing accounts.
The workaround is possible. It should work if you:

turn on "less secure apps" in your Google account settings
set authentication method to PLAIN in KMail
use application password to login to gmail servers.

People in the linked bug writes that it works. However, I've noticed that you have to have 2FA disabled on your Google account. Otherwise Google won't let you to enable "less secure apps". I haven't tried the workaround because I don't want to lose security 2FA gives you.
KDE community is working on the problem. The request has been sent to Google for recognizing KMail as a secure app.

For the explanation of why this is happening see this Daniel Vratil's blog post: https://www.dvratil.cz/2019/08/kontact-google-integration-issue/


You need to install both the driver and the corresponding nvidia-settings application, which is packaged seperately.

The following will install the latest Nvidia driver with the corresponding nvidia-settings application.

sudo apt-get install nvidia-current-updates nvidia-settings-updates

BTW: You don't always have to run the application as root, only when you want to write the xorg.conf.


Google Chrome no longer opens after 14.04 update

Run at your Terminal.

Download & add the key:

wget -q -O – https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

Add Chrome repository to your sources.list:

sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'

Update sources:

sudo apt-get update

Install with --reinstall --fix-broken --show-progress:

sudo apt-get install --reinstall -f --show-progress google-chrome-stable

For simple install just omit these three options.


The hard drive is read only because it's got some errors on it. These have been detected during a scan and now your drive is read only. You need to run fsck against your main root partition while the partition isn't mounted or read only. It's read only so you should just have to run fsck.

If it's possible to run the LiveCD, you can use the gui tools to fix the issue, you can do all this using the System > Administration > Disk Utility once you're booted into the LiveCD desktop:

Once you've run the checks, make sure your disk isn't full (delete some stuff if you have to) and then reboot.


Displayport 1.2 MST/daisy chain - Dual Monitor setup - Intel graphics

Good news everybody!

You don't have to manually build bleeding edge software any more. I have a Dell E7240 with Intel HD running dual monitors via dockstation right now.

You have to do either:

Upgrade Ubuntu to a more recent release. 14.10/15.04+ appears to be supporting MST for Intel graphics out of the box.
If you want to keep running the latest LTS 14.04 (Trusty), install a newer Linux kernel (3.17+) or the backports from Utopic (14.10) through the Hardware Enablement channel provided for LTS release some time after newer stable releases have happened. Several other ways exist too. For manual Xorg updates PPAs like the xorg-edgers PPA will probably work too.


CUPS: Restrict printer access to trusted users on network

Are you concerned with hackers on your network like at a university or from the internet?

If your network is secure, WPA2 for wifi and not way to plug into your router for wired, you are totally safe. Just share it.

from an unseure network, (you have more to worry about then 12 pages of H printing but...)

sudo nano /etc/cups/cupsd.conf

look for

# Restrict access to the server...
<Location />
    Order allow,deny
    Allow localhost
    Allow 192.168.0.X
 </Location>

X is the ip you want to have permission.


Where are the different app icon sizes submitted through the app developer site used?

At first glance:

128: App details view in the Software Center, Alt-tab Switcher

64 : Dash, and resized to 48 for the Launcher and the Software Center tiled view

32 : Software Center list view

16 : Some places on the desktop (Nautilus list view?) and probably in the software updater for 12.10 (https://twitter.com/dylanmccall/status/205418733206904833/photo/1/large)


how can I transfer downloaded movies to a usb?

Three things you need to make sure that they exist, to be able to watch movies from your USB drive on your TV:

The USB drive needs to be in the correct format. eg Fat32 or ExFAT, check your TV’s manual for the supported format.
If the disc is in FAT32 format, then files can't be larger than 4GB each.
The movies need to be in a format recognized by your TV. eg. MPEG2 and MPEG4 are more than likely to be recognized, but for any other format, again, check your TV's manual.


Cannot get Nvidia drivers working on Lenovo Y510P

Your laptop has an Optimus NVIDIA card.  I suspect that installing Bumblebee is the ticket.

1) Add the repository to get new nvidia drivers:

apt-add-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update

2) install the latest drivers:

sudo apt-get install nvidia-331 nvidia-settings-331

Install Bumblebee (as explained here)

1) Add the Bumblebee PPA:

sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get update

2) Install Bumblebee and its dependencies:

sudo apt-get install bumblebee bumblebee-nvidia virtualgl linux-headers-generic

Configure bumblebee to use your new driver:

1) Open the config file:

sudo gedit /etc/bumblebee/bumblebee.conf

2) Change the Driver, KernelDriver, Librarypath, and XorgModulePath like so:

Driver=nvidia

KernelDriver=nvidia-331

LibraryPath=/usr/lib/nvidia-331:/usr/lib32/nvidia-331

XorgModulePath=/usr/lib/nvidia-331-updates/xorg,/usr/lib/xorg/modules

Restart.

EDIT2: Something to do if you can't use optirun (Bumblebee's method to invoke the Nvidia card)

Edit the bumblebee nvidia configuration:

sudo gedit /etc/bumblebee/xorg.conf.nvidia

Delete the "#" in front of "BusID ... "

EDIT: If it still doesn't work

You might need to change the parameters passed to the kernel. To test if this is the solution:

When you get to grub, select Linux (but don't hit enter.)
hit"e" on the keyboard
add "acpi_osi=Linux" to the end of the line
that begins with "linux /boot/ ..."
Press F10 to boot.

If this works, you can make the change permanent by editing /etc/default/grub

type "sudo gedit /etc/default/grub"
edit the line with "GRUB_CMDLINE_LINUX_DEFAULT" so that it reads

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux"
Save and quid gedit
run "sudo update-grub"


Why gwibber-service keeps poping up even if I deleted Gwibber?

Running whereis gwibber-service shows

gwibber-service: /usr/bin/gwibber-service /usr/bin/X11/gwibber-service

gwibber-service isn't in the gwibber package. Instead, it is in the gwibber-service package.

For some reason, uninstalling the gwibber package doesn't uninstall the gwibber-service package also. You'll have to uninstall that separately, which you can do using this command:

sudo apt-get autoremove gwibber-service

If you want to also remove configuration files, run

sudo apt-get purge gwibber-service


How do I list package contents using apt-file?

You can also use dpkg -L packagename.

It is similar to apt-file, but it is only searching and listing installed packages.

Also you have to know that commands with apt means, for example: apt-get means installing packages from the INTERNET. Maybe some of your packages are not installed from the internet...


Ubuntu 32bit version installed using wubi, on drive e, same hard drive, error "no root file system defined"

Why would you want to use 32bit version when the 64bit world?

That said, Do the 32bit version finish ok? If not, you may have been effected by a bug in the 32bit installer, which is corrected by uninstall a package. It Is shown by that the ending presentation of Ubuntu during installation isn't shown and the installation is ended prematurly.
The 64bit installer doesn't have this error.

More information about that problem here: https://askubuntu.com/questions/139362/ubuntu-12-04-lts-installer-crashes-due-to-system-log-file-error


How to execute a script with a desktop launcher

Make sure that /home/techy/folder/file.sh has execution permission by all users.


That error is complaining that VLC doesn't have a codec for decoding PNGs... And why should it? PNGs are images. It's a bit like asking VLC to open a .doc file.

VLC doesn't have code for decoding PNGs because that's not what it's for. PNGs aren't supported.

If you want them to be, ask at VideoLan.org but I doubt they really want to invest time implementing something they think other applications should handle.


When installing Kubuntu on a laptop with pre-installed windows 10, is there anything i need to preserve?

if you think you might want to reinstall windows, keep the EFI and both recovery partitions. Delete the C: partition and install ubuntu there. you may then need to change boot priority in system settings.

If you don't want windows, you can erase the whole drive, ubuntu will recreate the efi partition.


Synaptic and sudo apt-get update broken Ubuntu 14.10?

It looks like when you tried to install Riak something happened and the server that hosts the source/binaries had an internal error but the installation created the /etc/apt/sources.list.d/basho_riak.list file anyway, even though it had no real link.

To fix the error just remove the file:

sudo rm /etc/apt/sources.list.d/basho_riak.list

Unfortunately this will mean you cannot install Riak in this way. What instructions did you follow? It may be a temporary error and might work later, but I rather doubt it.


ssh-agent is not used when ssh is launched from panel launcher (via `gnome-terminal --command`)

I assume you followed the linked article and modified your ~/.bashrc. However ~/.bashrc might never be sourced when you're running a command from a panel launcher.

An easy way to debug is adding date > /tmp/bashrc_sourced to then end of your ~/.bashrc and check if the current time is printed to the file when you invoke the panel launcher.

Related note: You might want to look at keychain, which is specifically designed to manage ssh-agent for you.


How do I add a system preferences shortcut to desktop?

You can create a .desktop file or simple bash script that runs gnome-control-center. Either that or you can drag and drop that launcher from Slingshot.


How can I get in contact with an Ubuntu developer to help with a problem?

You may get support through Ubuntu's official support but I am absolutely convinced that if you ask properly and be patient, you will get answers to your problems.


internet share in 2nd ethernet port of ubuntu server 16.04

I have figured out how to do that. after many try I found the solution. I got this solution from this link
https://help.ubuntu.com/community/Router

First thing first, don't forget to backup your interfaces file before edit it

sudo cp /etc/network/interfaces /etc/network/interfaces.bak

for eno2 I have append bellow lines to above interfaces file

auto eno2
iface eno2 inet static
address 192.168.0.1
network 192.168.0.0
netmask 255.255.255.0
broadcast 192.168.0.255

Than I created a script file called nat.sh and put bellow code:

echo -e "\n\nLoading simple rc.firewall-iptables version $FWVER..\n"
DEPMOD=/sbin/depmod
MODPROBE=/sbin/modprobe

EXTIF="eno1"
INTIF="eno2"

echo "   External Interface:  $EXTIF"
echo "   Internal Interface:  $INTIF"

#======================================================================
#== No editing beyond this line is required for initial MASQ testing ==
echo -en "   loading modules: "
echo "  - Verifying that all kernel modules are ok"
$DEPMOD -a
echo "----------------------------------------------------------------------"
echo -en "ip_tables, "
$MODPROBE ip_tables
echo -en "nf_conntrack, "
$MODPROBE nf_conntrack
echo -en "nf_conntrack_ftp, "
$MODPROBE nf_conntrack_ftp
echo -en "nf_conntrack_irc, "
$MODPROBE nf_conntrack_irc
echo -en "iptable_nat, "
$MODPROBE iptable_nat
echo -en "nf_nat_ftp, "
$MODPROBE nf_nat_ftp
echo "----------------------------------------------------------------------"
echo -e "   Done loading modules.\n"
echo "   Enabling forwarding.."
echo "1" > /proc/sys/net/ipv4/ip_forward
echo "   Enabling DynamicAddr.."
echo "1" > /proc/sys/net/ipv4/ip_dynaddr
echo "   Clearing any existing rules and setting default policy.."

iptables-restore <<-EOF
*nat
-A POSTROUTING -o "$EXTIF" -j MASQUERADE
COMMIT
*filter
:INPUT ACCEPT [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
-A FORWARD -i "$EXTIF" -o "$INTIF" -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
-A FORWARD -i "$INTIF" -o "$EXTIF" -j ACCEPT
-A FORWARD -j LOG
COMMIT
EOF

echo -e "\nrc.firewall-iptables v$FWVER done.\n"

than I make it executable by doing

chmod a+x nat.sh

than run it as root

sudo sh nat.sh

make our new script bootable so we don't have to run the script every time we restart.

sudo cp nat.sh /etc/init.d/
sudo ln -s /etc/init.d/nat.sh /etc/rc2.d/S95masquradescript

Than I plugged my ethernet cable which is connected to router to eno2 and configured my router for static ip as bellow for DHCP:

IP Address: 192.168.0.2
Netmask: 255.255.255.0 (/24)
Gateway: 192.168.0.1
DNS Server: 103.56.4.6
            8.8.8.8

and it worked for me.


Macbuntu is for 10.10 and 10.04, doesn't work in 12.04.

This is because 10.XX uses Gnome 2, from 11.10 onwards Gnome 3 is used which is incompatible with Gnome 2 theme.

There are Gnome 3 Mac Themes so you can still get the OSX look and feel, but Macbuntu itself won't work unless they update it.


How can I get Update Manager to Check & Notify for DAILY updates

Using gconf-editor check that the Auto-Launch checkbox as shown in this image is ticked.

(As found by Nick) - check also that the option (highlighted) "regular_auto_launch_interval" is set to zero.


How to make a bootable Ubuntu USB on MAC running 10.7.5?

You can use the dd command from the Terminal:

dd if=path_to_your_image.iso of=/dev/sdX

Replace /dev/sdX by your USB stick's. You can find the /dev/sdX device path matching your USB with this command: diskutil list

dd needs a few seconds or minutes to write your ISO (depending on its size), just wait until your command prompt comes back and you'll have a bootable USB.


Why does ubuntu freeze sometimes when I shut my laptop screen

It's the noveau graphics driver, switch to the nvidia drivers and everything will be fine. I have a y50 myself and have been facing this issue for a while. To easily switch to the nvidia drivers, press the win key, type "drivers", enter, make sure you're on the additional drivers tab, then check nvidia binary driver and apply the changes. Then boom, resume/suspend works. You can now close your laptop without worrying about freezing.


Unable to locate package linux-kernel-devel

That specific package isn't packaged in Ubuntu 10.04 and up. If you're trying to compile a custom kernel, the correct way to get the prerequisites in Ubuntu 10.04 and later is to run these commands:

sudo apt-get install fakeroot build-essential crash kexec-tools makedumpfile kernel-wedge
sudo apt-get build-dep linux
sudo apt-get install git-core libncurses5 libncurses5-dev libelf-dev asciidoc binutils-dev

Hardy is a completely different version of Ubuntu, and can't be installed to another version. If you need Ubuntu 8.04 (Hardy Heron), you would need to find a copy of it online, download it, then write it to a CD or DVD.

That said, 8.04 is long out of service, and it's recommend to use a newer version of Ubuntu.


After tarball restore my PC (tar xvfpz backup.tgz -C /), my sound card and network are not working. How to detect?

I found out, that this answer didnt solve my problem. Let me describe it carefully:

** Problem: Need to TARBALL BACKUP a old Laptop with old Hardware, and restore the entire OS onto a new laptop with LVM Enabled **

Here are my steps, but they DO NOT WORK if your laptop backup has a different kernel then the one that came on the Ubuntu CD (In other words I can only boot into the kernel in the tarball, to mount the lvm, but the other kernels will not work)

To backup: (MAKE SURE YOUR VERSION OF LINUX IS ONE LESS THAN THE LATEST IN THE DIST UGPRADE :(...)

BOOT INTO RECORVERY (HOLD SHIFT FOR GRUB OPTIONS on bootup)
boot into recovery (use the grub recovery option, or single mode)
unmount all harddrives other than sda1 which has your root OS

2.
cd /
sudo tar cvpzf backup.tgz --exclude=/proc --exclude=/dev --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /

To restore:
0. Install a fresh Ubuntu (even the server or alternate cd with lvm WILL WORK WITH THIS). Do a regular install, settings dont matter because we will wipe it all away.

BOOT INTO RECORVERY (HOLD SHIFT FOR GRUB OPTIONS on bootup)

2.
backup your /boot carefully just in case!!! I do: cd /boot; mkdir ORIG.BOOT; mv * ORIG.boot;
cd /
sudo tar xvfpz backup.tgz -C /

3.
THEN REVERT BACK TO YOUR ORINGAL BOOT (remember to MV not just tar ok???? and make sure the vmlinuz and initrd of the both are merged. and if u want its ok to... merge the grub.cfg too

After it boots  if you dont have sound or network run:
sudo add-apt-repository ppa:ubuntu-audio-dev
sudo apt-get update
sudo apt-get --reinstall dist-upgrade

    I tried this but it will only work with my old kernel in /boot, none of the new kernels (even after dist-upgrade will boot into the lvm properly)

Here is my grub.cfg, why doesnt it work?

#

DO NOT EDIT THIS FILE

#

It is automatically generated by grub-mkconfig using templates

from /etc/grub.d and settings from /etc/default/grub

#

BEGIN /etc/grub.d/00_header

if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 015c0470-4ba2-41aa-a140-181b1cc872c2
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod ext2
  set root='(hd0,msdos1)'
  search --no-floppy --fs-uuid --set=root 015c0470-4ba2-41aa-a140-181b1cc872c2
  set locale_dir=($root)/boot/grub/locale
  set lang=ja_JP
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi

END /etc/grub.d/00_header

BEGIN /etc/grub.d/05_debian_theme

set menu_color_normal=white/black
set menu_color_highlight=black/light-gray

END /etc/grub.d/05_debian_theme

BEGIN /etc/grub.d/10_linux

function gfxmode {
    set gfxpayload="$1"
    if [ "$1" = "keep" ]; then
        set vt_handoff=vt.handoff=7
    else
        set vt_handoff=
    fi
}
if [ ${recordfail} != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 3.2.0-24-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root 015c0470-4ba2-41aa-a140-181b1cc872c2
    linux   /boot/vmlinuz-3.2.0-24-generic-pae root=UUID=015c0470-4ba2-41aa-a140-181b1cc872c2 ro   quiet splash $vt_handoff
    initrd  /boot/initrd.img-3.2.0-24-generic-pae
}
menuentry 'Ubuntu, with Linux 3.2.0-24-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root 015c0470-4ba2-41aa-a140-181b1cc872c2
    echo    'Loading Linux 3.2.0-24-generic-pae ...'
    linux   /boot/vmlinuz-3.2.0-24-generic-pae root=UUID=015c0470-4ba2-41aa-a140-181b1cc872c2 ro recovery nomodeset
    echo    'Loading initial ramdisk ...'
    initrd  /boot/initrd.img-3.2.0-24-generic-pae
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, with Linux 3.2.0-23-generic-pae --THIS IS THE ONLY KERNEL VERSION THAT WORKS' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root 015c0470-4ba2-41aa-a140-181b1cc872c2
    linux   /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=015c0470-4ba2-41aa-a140-181b1cc872c2 ro   quiet splash $vt_handoff
    initrd  /boot/initrd.img-3.2.0-23-generic-pae
}
menuentry 'Ubuntu, with Linux 3.2.0-23-generic-pae (recovery mode) --THIS IS THE ONLY KERNEL VERSION THAT WORKS' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root 015c0470-4ba2-41aa-a140-181b1cc872c2
    echo    'Loading Linux 3.2.0-23-generic-pae ...'
    linux   /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=015c0470-4ba2-41aa-a140-181b1cc872c2 ro recovery nomodeset
    echo    'Loading initial ramdisk ...'
    initrd  /boot/initrd.img-3.2.0-23-generic-pae
}
}

END /etc/grub.d/10_linux

BEGIN /etc/grub.d/20_linux_xen

END /etc/grub.d/20_linux_xen

BEGIN /etc/grub.d/20_memtest86+

menuentry "Memory test (memtest86+)" {
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root 015c0470-4ba2-41aa-a140-181b1cc872c2
    linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root 015c0470-4ba2-41aa-a140-181b1cc872c2
    linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}

END /etc/grub.d/20_memtest86+

BEGIN /etc/grub.d/30_os-prober

if [ "x${timeout}" != "x-1" ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi

END /etc/grub.d/30_os-prober

BEGIN /etc/grub.d/40_custom

This file provides an easy way to add custom menu entries.  Simply type the

menu entries you want to add after this comment.  Be careful not to change

the 'exec tail' line above.

END /etc/grub.d/40_custom

BEGIN /etc/grub.d/41_custom

if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi

END /etc/grub.d/41_custom


I sort of ignored this for a while ... and then realized that I had the following in ~/.bashrc

export JAVA_HOME=$(/usr/bin/java)

I removed this as unnecessary, and YAY! no more java messages. It is still in my path as executable, so no need to additionally export it. For anyone out there that may come across this, don't forget to run the following after making any changes to that file:

. ~/.bashrc


SOLVED: I had to change default-character-set=utf8 to character-set-server=utf8

See http://ronaldbradford.com/blog/tag/mysql-5-5/


Remap shortcut to a single key cannot be used

This is actually quite easy using the xbindkeys  and the xdotool  packages. xdotool lets you emulate key presses, and xbindkeys lets you add custom shortcuts.

All the following steps are run in a terminal.

First we will kill the process

killall xbindkeys

Now we put our custom shortcuts in the ~/.xbindkeysrc file

gedit ~/.xbindkeysrc

and we put in the following lines

"xdotool keyup Next && xdotool key ctrl+alt+Down"
   Next

"xdotool keyup Prior && xdotool key ctrl+alt+Up"
   Prior

save and close, and start xbindkeys again by running

xbindkeys

It should now work like you wanted, enjoy!

Explanation:
Now what does it actually do? Say, you press Page Up, your computer recognizes this as the Prior key (you can check this using xev | grep key and pressing keys). Now before we simulate other keypresses, we should emulate a key release first, that's what the xdotool keyup Prior is for. If it is released successfully then we send the Ctrl+Alt+Up combination and this is what xdotool key ctrl+alt+Up is for.


Is there a way to enable tearfree with amdgpu pro?

Create a file named /usr/share/X11/xorg.conf.d/99-tearfree.conf and containing
Code:

Section "Device"
Identifier "Card0"
Driver "amdgpu"
BusID "PCI:1:0:0"
Option "DRI3" "1"
Option "TearFree" "on"
EndSection

You have the same option in the open source driver too: Use the command man amdgpu to see them all. In Xfce you use the desktop compositor to prevent window tearing.

Hope it helps


Slow FX/Unity perfomance in a Intel(r)915G/915GV/910GL Graphics, can be improved?

I have the exact same problem. Did you manage to fix it eventually?

12.10 worked perfectly, but 13.04 uses different driver (Gallium 0.4). Also to avoid black screen, I need to boot with "nomodeset" or "i915.modeset=0", and I read that Mesa 2.1 and up has problem with that. It needs KMS.

EDIT:
Solved it. Turns out it's trivial issue. Yes, the nomodeset thing messes with graphics driver causing 3D acceleration not to work. The only reason I was using nomodeset was to fix the black screen. Turns out completely unnecessarily. I boot normally, get 'black screen' ...and fix that by hitting Fn+F5 (aka. brightness up button). :)
Now 13.04 is running fast with 3D acceleration.


How do I create a custom config file in xboxdrv?

The directory where the example files are located is:

/usr/share/doc/xboxdrv/examples/mouse.xboxdrv

I used the original mouse file as an example.  Then I created a .xboxdrv file in a different directory and can open it with --config
Simple once I figured it out!


Extending the root with another partition (website's server, on production)

Lost space was found by checking fdisk -l. The SSD was on RAID-0.

About moving the website content to the SSD, the solution turned out to be the symbolic link. So here is how I changed place for the website content without downtime and without moving or editing partitions:

Copy website's content to a folder in the big partition
mkdir /home/SiteName/
cp -vrp /var/www/html/* /home/SiteName
Move website's folder to a new folder (just in case you need to set back the old folder)
mv /var/www/html /var/www/html2
Create a symbolic link from to the new folder to replace the old folder
ln -sv /home/SiteName/ /var/www/html
Check if symbolic link has been correctly created
ls -l /var/www/html
Delete old files
rm /var/www/html2 -r

There has been a Wordpress plugin that stopped working after this (Classic Editor) but it got fixed after rebooting the server.

Thanks to members who gave me clues.


How to install a "fix released" package for a bug

udisks v1.0.4-5ubuntu2 is only available for Ubuntu 12.04

However the only change un udev seems to be the new rule for the card reader. You can it it manually as described in the bug report:

echo 'DRIVERS=="rts_bpp", ENV{ID_DRIVE_FLASH_SD}="1"' | sudo tee -a /lib/udev/rules.d/81-udisks-realtek.rules

Of course this is only useful if you have the driver installed:

wget http://planet76.com/drivers/realtek/rts-bpp-dkms_1.1_all.deb
sudo apt-get install dkms
sudo dpkg -i rts-bpp-dkms_1.1_all.deb

I don't know if this driver works with Ubuntu 11.04.


Adding description to files for easy remembering

Emblems in Nautilus
Right click a file/folder and go to its properties. You can add remove emblems and even change the icon itself. That should help you differentiate between files and give you a way to tag files.

A better alternative, which I found via one thing well is tmsu :
tmsu

tmsu is an application that allows you to organise your files by associating them with tags. It provides a tool for managing these tags and a virtual file- system to allow tag based access to your files.

Tagging
tmsu tag summer.mp3 music big-jazz mp3 #tmsu [files] [tag]
tmsu tag --tags "music mp3" *.mp3 #filenames at last
tmsu merge umsic music #merge two tags

Listing
tmsu tags #lists tags
tmsu files mp3 -classical -rock #remove some tags

tmsu also creates a virtual file system, which uses symlinks to files. Directories inside this mount will refer to the tags themselves.
Installation
Download the latest version from bitbucket and extract it somewhere. Copy the bin/tmsu file to a folder that is in your path (such as /bin/ or ~/bin).


On Ubuntu Artful 17, as a priviledged user, how can I get an email (possible nightly) with information about - what GET requests were sent to port

About your question:

You can check all your received requests to port 80 in your web server logs.

In Apache, its logs can be found in the following addresses depending on the GNU Linux distribution and version.

/var/log/apache/access.log
/var/log/apache2/access.log
/var/log/httpd/access.log

About checking your SSH logs, please refer to the following links:

How do I keep track of failed SSH log-in attempts?
Where does Ubuntu 14.04 log SSH access attempts? [duplicate]

You can check the ALL commands executed by another user by opening the .bash_history file, located in /home/<username>/.bash_history, also keep in mind that the user can delete this log file.

Executing tail /var/log/auth.log | grep <username> should give you a user's sudo history.

If the user spawned a shell with sudo -s, sudo su, sudo sh, etc, then the commands executed may appear in the history file of the root user, located in /root/.bash_history.

If you want a tool built for this purpose, you can check for sysdig. It is packaged in artful and other Ubuntu releases.

  Sydig is an open-source, cross-platform, powerful and flexible system
  monitoring, analysis and troubleshooting tool for Linux. It can be
  used for system exploration and debugging.

You can execute sysdig -c spy_users to display every command that users launch interactively as well as every directory users visit.

Also you can use spy_port to show the data exchanged using the given IP port number.

Hope this helps.


32 bit backup on 64 bit operating system

If you're talking about your files and documents, yes there is no problem

(There could be a problem in restoring a program which depends on a 32 bits library which is not in the 64 bits version, but otherwise I don't see any issue)


Try this:

We will have to edit grub configuration. Open a terminal and paste this:

sudo gedit /etc/default/grub

Hit Enter. It will open grub preferences in Gedit.
Locate the line # GRUB_GFXMODE=800x600 (resolution may be different).

  You have to change the resolution to actual resolution of your screen,
  for example mine is 1240x1024. Next step is to uncomment this line
  (remove the # and and the empty space if is, so the letter G of the
  word GRUB will be the first letter in this line). After u r done, save
  the file and close.

3 . Now paste this line in terminal:

sudo gedit /etc/grub.d/00_header .

Hit Enter. It will open a text file with a lot of stuff. Use the search option at the top of the window to locate this line:

set gfxmode=${GRUB_GFXMODE}

After you successfully find it, you will have to add this line: set gfxpayload=keep just under the . Make it look like this:

set gfxmode=${GRUB_GFXMODE}
set gfxpayload=keep

Now, save the file and close.

4 . In terminal paste:

sudo update-grub

Hit Enter, it will generate new grub.cfg file so the changes you made will be saved.

Reboot and enjoy your new boot screen resolution.

In case you don't know what is your screen resolution

Go to System settings - Displays


It seems that Ubuntu is using brcmsmac driver, by default and the sta driver you are using is blacklisted. Follow this procedure to do the opposite:

1-sudo apt-get install bcmwl-kernel-source ( in case you want to use wl0 driver which is recommended over sta driver)

or you can install it from synaptic manager also, make sure broadcom-sta-common, broadcom-sta-source, firmware-b43* are NOT INSTALLED.

2-Even if you install the wl0 driver it won't load automatically as it is blacklisted by default. So make sure "/etc/modprobe.d/blacklist-bcm43.conf" file looks like this:

# Warning: This file is autogenerated by bcmwl. All changes to this file will be lost.

blacklist b43

blacklist b43legacy

blacklist ssb

#blacklist bcm43xx

#blacklist brcm80211

blacklist brcmsmac

blacklist bcma

3-If you wish you can copy above contents in your blacklist-bcm43.conf file.

4-Hope this works, best of luck! and make sure you restart your pc.


You seem to be missing the INFILE keyword - the syntax should be something like

LOAD DATA LOCAL INFILE './table1.csv' REPLACE INTO TABLE table1
FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';

Also, LOAD DATA LOCAL is likely disabled by default - although you should be able to enable it explicitly on the mysql client command line using the --local-infile option i.e.

$ mysql -u root -p test --local-infile
Enter password:

mysql> SELECT * FROM table1;
+----+-----------+--------+
| Id | name      | value  |
+----+-----------+--------+
|  1 | "Alice"   | 12.345 |
|  2 | "Bob"     | 34.560 |
|  3 | "Carol"   | 89.100 |
+----+-----------+--------+
3 rows in set (0.00 sec)

mysql> LOAD DATA LOCAL INFILE './table1.csv' REPLACE INTO TABLE table1
    -> FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';
Query OK, 3 rows affected (0.04 sec)
Records: 3  Deleted: 0  Skipped: 0  Warnings: 0

mysql> SELECT * FROM table1;
+----+-----------+--------+
| Id | name      | value  |
+----+-----------+--------+
|  1 | "Alice"   | 12.345 |
|  2 | "Bob"     | 34.560 |
|  3 | "Charlie" | 33.330 |
|  4 | "Drew"    | 42.000 |
|  5 | "Edward"  |  0.100 |
+----+-----------+--------+
5 rows in set (0.00 sec)


Shared library seems installed but I get an error anyway

Your program is looking for the 32-bit version of libstdc++6. You need to install libstdc++6:i386:

sudo apt install libstdc++6:i386


D missing from terminal keybinds - have to add it on every login

You have probably set d as a keyboard shortcut for something. The likeliest culprit will be a shortcut set up in Preferences => Shortcuts of gnome-terminal. Make sure you haven't set D to something there.

If you are using xbindkeys, have a look at ~/.xbindkyesrc and remove the offending entry. Alternatively, check your desktop envoronment's keyboard shortcut settings and see if you've set anything up there (but I doubt that would cause the issue you describe).

Another possibility is that you have a bind command in your ~/.profile or ~/.bashrc (or any other shell setup file) files that disables the d. To test for that, try

grep --color -H bind ~/.bashrc ~/.profile ~/.bash_profile ~/bash.login \
                     ~/.bash_aliases /etc/bash.bashrc /etc/profile \
                     /etc/profile.d/* /etc/environment 2> /dev/null

If there is such a command, that should show it.

Finally, as a temporary workaround, just add this line to your ~/.profile (and not to ~/.bashrc):

bind d:self-insert


How much RAM does a Ubuntu 16.04 machine need to handle a 4TB ZFS volume?

I believe the rule of thumb is that 1GB of free memory (or more) is recommended. The more memory you have improves performance as it helps improve cache performance.  The amount of disk storage does not determine how much memory you need.  If you enable de-duplication then you need generally far more memory, I've heard that 5x more memory is required for de-dup.


How do I get Sane to change its 'Printerdefinition' in 'Copy' mode?

I went up to help on the Menu line;

read the COPY section of the help menu; so you need to go to Preferences;

then COPY;

then you need to set up the printer; I had never done that;

eg our printer is MG3100USB so I entered that in the new printer option;
set it up to copy; it all seems to work on our system


At the moment, there's no good way to exclude certain files in certain directories.
That said, you can ignore certain file types across the board by specifying regexes in: /etc/xdg/ubuntuone/syncdaemon.conf

See the ignore.default part of it.


How can I extract a page range / a part of a PDF?

pdftk is a useful multi-platform tool for the job (pdftk homepage).

pdftk full-pdf.pdf cat 12-15 output outfile_p12-15.pdf

you pass the filename of the main pdf, then you tell it to only include certain pages (12-15 in this example) and output it to a new file.


Can't add the exec option to my data partition in Ubuntu 14.04

umount-ing is as simple as:

umount /media/storage

(If that doesn't work, then run the same thing with sudo: sudo umount /media/storage)

Following the instructions, after the umount you could try to mount again:

sudo mount -o rw,exec,nosuid,nodev,allow_other,blksize=4096 /dev/sda3 /media/storage

But... I think your life will be easier to copy the files you want to compile to a local disk and compile and run there.


Install Ubuntu can't see my second hard drive

You may want to UNPLUG your Windows HDD and only leave your blank HDD plugged in then start the Ubuntu Live CD, I have seen Ubuntu not detect two HDD's before. That should solve any confusion. Then use your BIOS to choose between HDD's to boot.


A maintainer of NetworkManager explained the problem using these words:

  There are certain modems for which the
  firmware simply doesn't respond to
  serial setup packets sent on certain
  interfaces, which cause the kernel to
  wait for a while before timing out.

Just in case you are experiencing a similar issue I sincerely suggest you to report it on NM mailing list, they won't miss to help. I got a patch and now the device is recognized in less than 60 seconds.

And bonus, the fix will be submitted to the mainstream kernel for everyone's benefit.

Reference: the full thread.


How to stop follow command on journalctl log file without ctrl+c and save the output to a file

From man journactl:

  -f, --follow

  Show only the most recent journal entries, and continuously print new
             entries as they are appended to the journal.

So just remove the -f from the command.


There are lots of guides specifically for Linux and SSDs. Search for: SSD tuning linux (or similar). They don't necessarily have to be for Ubuntu. I think I got a number of steps from the Arch wiki.

The main thing is to set AHCI mode in the bios, and after installation edit /etc/fstab to add "noatime,nodiratime,discard" options for the SSD partitions.

In my system I also included /tmp on the HDD, just because who knows what (or how often) stuff will be written there.


How can I exclude all the svn metadata while synchronizing with unison?

In your preferences file:

ignore Name .svn

On the command line: unison -ignore 'Name .svn'.

It's a little weird to synchronize svn checkouts though. Usually people keep separate checkouts on separate machine and synchronize via the repository.


reprepro - Is there any chance to enter the passphrase via bash-script?

I needed the same thing and was looking for solution. Apart from running gpg-agent, which will ask for the password only once (e.g. during boot) and cache it for next usage, I have found nothing.

Problem is how to interact with interactive scripts, which are the ones, who ask for user input from stdin. Expect (apt-get install expect) solves exactly that.

This is the script I wrote and saved in /usr/local/bin/reprepro_expect:

#!/usr/bin/expect -f
set timeout 2
set passphrase "mysupersecretpassword"

spawn reprepro -b [lindex $argv 0] [lindex $argv 1] [lindex $argv 2] [lindex $argv 3]
expect {
        "*passphrase:*" {
                send -- "$passphrase\r"
        }
}
expect {
        "*passphrase:*" {
                send -- "$passphrase\r"
        }
}
interact

You can run it like this:

reprepro_expect [path_to_repository] [command] [distribution] [package_name]

For example:

Add new package:

reprepro_expect /var/www/myrepo includedeb wheezy mypackage_0.1-1_all.deb

Delete package

reprepro_expect /var/www/myrepo remove wheezy mypackage

Security:
Since password to your private key is stored in the script, I recommend to chown it to user, under which it will be used and chmod it to 500. Why isn't passphrase passed as another argument? Because it would be stored in ~/.bash_history and it would show in ps axu during runtime.


Is there a Mac OSX version of UbuntuOne planned for the near future?

A Canonical employee responded to that question on the Ubuntu One blog with

  A Mac client is on our radar and something we hope to be able to deliver next year.

in November of 2011. Of course the Ubuntu One client is open source, so anyone interested in helping to make this go faster should contact the Ubuntu One team.


You need to configure it and from the commands seems you didn't.

After installing it you need to : mysql_secure_installation and configure it.


Installed Ubuntu 16.04 Server and only get blinking cursor on reboot

This appears to either be a problem with the automatic installation of GRUB not working correctly, and installing GRUB in a partition or drive where it shouldn't be, or GRUB is corrupted.

To remedy the problem, I booted once more from my USB stick, and selected the option to repair a broken installation. After navigating through the usual keyboard and date setup, eventually I was asked something to the effect of "rescue device to use as root file system" and i selected the bottom most entry, that effectively said "don't" (sorry about this, I'm going from memory here.)

This finally took me to a screen where I could access GRUB options, and I chose to repair GRUB. It asked where it should be installed, and I selected /dev/sda. Rebooted, and everything booted again just fine. So either at initial installation time GRUB was damaged, or it was installed in the wrong location. Hopefully this helps the developers somewhat as well.

This link, though not followed by me for this remedial work, may prove useful to whomever may need it:
https://www.tecmint.com/rescue-repair-and-reinstall-grub-boot-loader-in-ubuntu/


I finally found the solution.

It's weird but it was a simple grub update.

"wl" was the driver that  worked for me after installing the bcmwl-kernel-source. the problem is that the installation modifies /boot/initrd.img-4.15.0-38-generic so that the driver that would be detected after reboot would stay wl, however my OS was booting from /boot/initrd.img-4.15.0-24-generic where it was detecting "bcma-pci" instead of "wl". to solve that problem I run a simple grub update so that my OS will be booting from the new initrd.img-4.15.0-38-generic.


Will my Ubuntu still work when I move my encrypted SSD to a replacement laptop?

Yes, it will.
If your SSD is hardware encrypted, the new laptop you're moving it will need to support SED, which, in your case, is no problem, since you will be putting it into another laptop of the same make / model.
If you only have home directory encryption (Set up with "Encrypt my home folder" during installation), or another form of software-only encryption, you can move your SSD around as you wish, and it will work in any computer.


Command Line Install Doesn't Work in 16.04

It appears that the 16.04 installer has a new command-line way to enter installer boot parameters. It's a single line near the bottom of the screen. You can edit this line by pressing F6 when you're on the screen with the installer options, starting with "Install Ubuntu Server." Using this line allows you to enter a long list of boot parameters. It scrolls horizontally.

So if you're using Packer, the example template.json files you'll find on the Internet for Serv 14.04 won't work. Here's the "builders" section that I used, which works:

   "builders": [{
    "type": "virtualbox-iso",
    "boot_command": [
      "<enter><f6><esc>",
      "<bs><bs><bs><bs><bs>",
      "<bs><bs><bs><bs><bs>",
      "<bs><bs><bs><bs><bs>",
      "<bs><bs><bs><bs><bs>",
      "<bs><bs><bs><bs><bs>",
      "<bs><bs><bs><bs><bs>",
      "<bs><bs><bs><bs><bs>",
      "<bs><bs><bs><bs><bs>",
      "<bs><bs><bs><bs><bs>",
      "<bs><bs><bs><bs><bs>",
      "<bs><bs><bs><bs><bs>",
      "<bs><bs><bs><bs><bs>",
      "<bs><bs><bs><bs><bs>",
      "<bs><bs><bs><bs><bs>",
      "<bs><bs><bs><bs><bs>",
      "<bs><bs><bs><bs><bs>",
      "<bs><bs><bs>",
      "auto preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
      "debian-installer=en_CA locale=en_CA kbd-chooser/method=us ",
      "hostname=rails-5-jade ",
      "fb=false debconf/frontend=noninteractive ",
      "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ",
      "keyboard-configuration/variant=USA console-setup/ask_detect=false ",
      "vga=788 initrd=/install/initrd.gz quiet --- ",
      "<enter>"
    ],
    "boot_wait": "4s",
    "guest_os_type": "Ubuntu_64",
    "http_directory": "http",
    "iso_checksum": "23e97cd5d4145d4105fbf29878534049",
    "iso_checksum_type": "md5",
    "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04-server-amd64.iso",
    "ssh_username": "vagrant",
    "ssh_password": "vagrant",
    "ssh_wait_timeout": "10000s",
    "disk_size": "8000",
    "shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now",
    "vboxmanage": [
      [
        "modifyvm",
        "{{.Name}}",
        "--memory",
        "512"
      ],
      [
        "modifyvm",
        "{{.Name}}",
        "--cpus",
        "1"
      ]
    ]
   }],

You can also look at one of my projects in Github: https://github.com/lcreid/rails-5-jade.


Ubuntu: Looking for simple way to run an application from the terminal

TL;DR

For deb-packaged Google Chrome you can simply use google-chrome (or google-chrome-stable) command in the terminal.

Details

On my system I have stable version of Google Chrome 80 installed.
Its package name is google-chrome-stable, its binary files may be found by using

$ dpkg --listfiles google-chrome-stable | grep bin/
/usr/bin/google-chrome-stable

but really this file is a symlink to the location which you have mentioned (/opt/google/chrome/google-chrome):

$ ls -al /usr/bin/google-chrome-stable
lrwxrwxrwx 1 root root 32 Feb 13 07:04 /usr/bin/google-chrome-stable -> /opt/google/chrome/google-chrome

The /usr/bin is usually added to the PATH variable by default. So it is not really needed to add /opt/google/chrome/google-chrome to the PATH by hand.

For more complicated applications and their desktop- and executable files you can use methods from my other answer.


Simplest:

cut -d: -f1  /etc/passwd | sort

To also view the user(s) information from the terminal type:

grep /home /etc/passwd | sort

The /home tells grep to drop any lines that do not contain the text /home thereby filtering out many lines that don't have information about users from the results of the command. In Ubuntu the user directories are located in the /home directory by default. This command will show several attributes for each user. The user attributes are:

username:password:UID:GID:info:home directory:shell


Hiding window decorations when maximized on Gnome3

(the questions is a bit old, but might be useful for someone)

Webupd8, has some really nice tutorials on customization regarding gnome shell.

This is for removing the window decoration when maximized:
http://www.webupd8.org/2011/05/how-to-remove-maximized-windows.html

And this explains how to add Unity-like buttons (maximize, minimize, close) to the top-bar.
http://www.webupd8.org/2011/12/get-unity-like-window-buttons-on-top.html

They worked for me, and I have noticed no bugs or crashes.


How do I download Flash player to see youtube videos?

You can download it in Ubuntu Software Center (built in app).

To automaticly open links from eg. http://apps.ubuntu.com you have to specify path to software center executable in your browser - click on open with and select /usr/bin/software-center