Data downloaded during an Ubuntu installation

Assuming you want to know how much data is downloaded and also assuming you are installing Ubuntu while connected to the Internet (Not offline) then the amount will vary depending on the following:

What language you are using for Ubuntu. If you are using English then only the data for English will be downloaded (apart from any other updates needed). If you are using French, Spanish, Chinese or any other language, the size of the data will increase or decrease depending on the size of the language packs needed.
How long since the official release are you installing Ubuntu. If you are installing Ubuntu the same day that specific version was released, the amount of updates will be minimal. If however, you are installing Ubuntu 6 months after it was released, you will get 6 months worth of updates. This can vary a lot. From 200 MB worth of updates to 700 MB. I once got 1.1 GB of updates when I tried installing a LTS a 14 months after it was released.
Which version of Ubuntu you are installing. Since 12.04, versions of Ubuntu have slowly but surely lowered the amount of data needed for upgrades. The size of many packages have lowered. So it is not the same to update 11.10 than to update 13.04.
Which Ubuntu distro you are using. Ubuntu alone has an amount of packages that will need to update after a certain amount of time. If you have KDE, it would need a bit more. Same goes for other official distros based on Ubuntu. They would have to download, not only the core components found on the Ubuntu repositories, but also the packages needed for the Desktop system (KDE packages for Kubuntu, LXDE packages for Lubuntu...)

So in general, depending on the time of release, the delta between installation time and release time, the Ubuntu version and the Ubuntu distro you will have to download data sizes that can change from 1 KB to 1 GB (Am exaggerating with the 1 GB but the point being that it varies a lot).


Korean symbols written ontop of each oher in Chromium

I also have the same problem, but it depends on the website. Facebook is the worst.

To help the problem, I went to setting > language, and installed the Korean language. Ubuntu still uses English for everything as a default, I just now have Korean language packs and fonts. Most websites work better with Korean fonts.


Ubuntu Studio 15.10 installer cannot recognize already installed and working Ubuntu 15.10

Depending on what you need, you have a few options:

You don't need to install Ubuntu Studio just to get a low-latency or real-time kernel: you can do that from your existing Ubuntu installation...

Before you begin: read the official documentation on real-time kernels but if you only need to record audio, no need for real-time kernel: a low-latency kernel is good enough:

sudo apt-get install linux-lowlatency

If you need all the bells and whistles of Ubuntu Studio: use the brute force method and install Ubuntu Studio over your existing install.

Don't blame me: you asked for a brute force method. ;-)
If you need both Ubuntu's, there is absolutely no reason to do this, but if that's what you want:

Boot the Ubuntu Studio first, delete all partitions except your EFI partition and create the following partitions: swap according to this formula /: 100GB, and /home: 800GB.

Then install Ubuntu, creating an additional / of 100GB and use the existing swap and /home from Ubuntu Studio as your Ubuntu "Normal" swap and home.

Note: you will need to update both Ubuntu's regularly and install all applications on both systems.


Keyboard freezes / stuck if a key pressed repeatedly

Use the folling command in terminal to set the keyboard repeat rate and delay time to whatever works for you.

kbdrate [ -r rate ] [ -d delay ]

For example, use the following command if you want to set the repeat rate at 20 characters per second and 500 millisecond delay time.

sudo kbdrate -r 20 -d 500

Test out few other numbers for "-r" and "-d" to find values that work for you.

To make the values stick at every login:

gksudo gedit /etc/rc.local

And at the end of that file add:

kbdrate -r 20 -d 500

Save the file and restart your machine.

Reference

Ubuntu Manuals: keyboard repeat rate and delay time


First, list all input sources with xinput --list:

⎡ Virtual core pointer                       id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Sony Vaio Jogdial                         id=8    [slave  pointer  (2)]
⎜   ↳ Advanced Silicon S.A CoolTouch(TM) System id=11   [slave  pointer  (2)]
⎜   ↳ HID-compliant Mouse HID-compliant Mouse   id=13   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Sony Vaio Keys                            id=7    [slave  keyboard (3)]
    ↳ Video Bus                                 id=9    [slave  keyboard (3)]
    ↳ Power Button                              id=10   [slave  keyboard (3)]
    ↳ IR camera                                 id=12   [slave  keyboard (3)]
    ↳ Cherry USB keyboard                       id=14   [slave  keyboard (3)]
    ↳ Cherry USB keyboard                       id=15   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=16   [slave  keyboard (3)]

Take the device that interests you (in this case, I am using "Advanced Silicon S.A CoolTouch(TM) System"), and note its ID.

Now, you need to find out the display that you want to map the input device to. The most straight-forward way is to use xrandr:

Screen 0: minimum 8 x 8, current 3200 x 1080, maximum 16384 x 16384
HDMI-0 connected 1280x1024+1920+0 (normal left inverted right x axis y axis) 338mm x 270mm
   1280x1024     60.02*+
   1280x960      60.00
   1280x720      60.00    59.94
   1152x864      75.00    70.00
   1024x768      60.00
   800x600       60.32
   720x480       59.94
   640x480       59.94    59.93
LVDS-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 531mm x 299mm
   1920x1080     60.00*+  59.94

In this case, I want to map my touch device to the output LVDS-0.

Combine the ID from the first step (11 here) with the screen name from the second step (LVDS-0 here) and run this command:

xinput --map-to-output INPUT-ID SCREEN

In my example, this command would be:

xinput --map-to-output 11 LVDS-0

Your touch device should not be properly mapped to the input device and should not require any additional configuration.

These settings will not persist between reboots. Please see this question on how to make xinput commands persistent.


My computer freezes when nvidia drivers activated

The 295.40 Nvidia driver which was released with 12.04 won't work properly. To fix this install the following driver through terminal.

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current=295.33-0ubuntu1~precise~xup1

Once you have installed it don't go straight to your Update Manager otherwise it will want to install the 295.40 driver which you don't want. Go instead to the Synaptic Package Manage and lock the 295.33 driver. This will stop the Update Manager from wanting to update it. You can now use the Update Manager as usual.

There is another driver 295.49 which has not been released yet by Ubuntu. Keep an eye out for it and update to it when it is released into the mainstream updates.


As you probably already know, in Linux packages may specify "dependencies", that is other packages that must be installed in order for this package to actually work. These dependencies are resolved recursively, that is dependencies of your package dependencies are installed as well. This way meta-packages may exist that will install entire set of software. Common examples are libreoffice (for office suite) or kde-full for entire KDE desktop.

When apt (Debian package manager) installs some package, it marks all dependencies as automatically installed. This way it can distinguish between packages explicitly requested by user and packages that were pulled in merely as dependencies (about which user most likely don't care at all).

apt-get autoremove looks up for packages that are marked as automatically installed, but which are no longer needed by any manually installed packages. These are often older versions of libraries (when version of library is in package name to allow different versions to coexist, e.g. libavcodec54 and libavcodec56) or packages removed from repository, but sometimes some useful application gets pulled in as dependency and then is removed. This happens especially when you first tell apt to install recommended or suggested packages, but then configure it to not pull in these packages as dependencies.

To remove package from list of packages considered for removal, mark that package as installed manually. You can do it using apt-mark:

apt-mark manual <package_name>

or aptitude (following commands are equivalent, use only one):

aptitude unmarkauto <package_name>
aptitude install <package_name>
aptitude install <package_name>&m

Finally, to get some context when these particular packages were installed, you can try searching their names in /var/log/apt/history.log files. These logs are rotated (compressed and put in separate file) monthly; to get the full archive, you can run (order will not be preserved):

cat /var/log/apt/history.log > /tmp/full-archive
zcat history.log* >> /tmp/full-archive


I am no expert on wine, but I read this on Facebook earlier, let me know if it helps :

  Marvin Mallari posted to Ubuntu 15 hours ago - For people having sound
  problems with Wine (like sound is garbled, static, non existant) in
  Ubuntu 12.04 (w/ Unity and Pulse/ALSA) i found a solution. Go to
  Synaptic Package Manager, install "ia32-libs-multiarch", it will ask
  to modify or install other packages, install all packages and restart
  (not log out then log in) Wine should now play audio perfectly and
  stable. note: i did this on a 32bit comp, for 64bit, there is probably
  a different package or maybe the package will work because it says
  "multiarch" i will try on my 64bit machine later. PS i don't have an
  account on any Wine or Ubuntu fourms so if someone can please share
  this somewhere that needs it that would be much appreciated!

  Marvin Mallari - Ia32 probably isn't the solution but when I read the
  addition packages synaptic modifies and installs, a couple of them are
  for pulse so it is probably those packages that fixed it but in any
  case ia32 installed whatever it needed to work. It also seems like
  pulse cpu usage has dropped. Thanks for the info!


Yes, signed with the same key as the other Ubuntu releases.

E.g.

Download both the checksum files and the detached signature:

http://cdimage.ubuntu.com/kubuntu/releases/14.04.2/release/SHA256SUMS
http://cdimage.ubuntu.com/kubuntu/releases/14.04.2/release/SHA256SUMS.gpg

Then verify it against the preinstalled APT keyring which should have this key:

⟫ gpg --no-default-keyring --keyring /etc/apt/trusted.gpg --verify SHA256SUMS.gpg SHA256SUMS

gpg: Signature made Thu 19 Feb 2015 23:32:54 CET using DSA key ID FBB75451
gpg: Good signature from "Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>"

Don't forget to actually verify the hashes.

⟫ sha256sum -c SHA256SUMS
[No such file or directory errors for files you didn't download]
...
kubuntu-14.04.2-desktop-amd64.iso: OK


Can't boot Windows 10 after installing, Ubuntu 20.04 pre-installed on different drive

It seems the install actually did work, and the conversion from MBR to GPT as well.
I found this guide Use Grub Customizer to Change Boot Order & Make Windows Default for GRUB customizer and that showed the Windows Boot Loader. I moved Windows Boot Loader up to just below Ubuntu. After rebooting the GRUB menu showed and I was able to boot into Windows. Multiple reboots later I have yet to experience any issues.
Thanks for the replies, All my data drives can be accessed from within Ubuntu and all the data seems to be fine.


Firefox doesn't open links from external sources (e.g. click on link in skype)

It also can be fixed just by typing "/usr/bin/firefox" instead of "firefox" in Preferred Applications


How to install missing firmware for an Creative Labs Audigy2 soundcard?

You'll need to download and copy the firmware, compile it and copy the firmware into the correct folder location for the kernel to load when your PC boots.

The error message you have in your question Loading Firmware file emu/emu1010b.fw is very useful.

Install the build-essential package:

sudo apt-get install build-essential

Acquire an alsa-firmware tarball (> 1.0.14) from the ALSA project's FTP server, for example:

wget ftp://ftp.alsa-project.org/pub/firmware/alsa-firmware-1.0.24.1.tar.bz2

Extract the tarball and create the firmware:

tar xvf alsa-firmware-1.0.24.1.tar.bz2
cd alsa-firmware-1.0.24.1
./configure
cd emu && make

Install the firmware on your system:

sudo su
mkdir -p /lib/firmware/emu
cp *fw /lib/firmware/emu

Reload the snd-emu10k1 module:

modprobe -r snd-emu10k1-synth snd-emu10k1 ; modprobe snd-emu10k1

source


Why does my xprop- command fail on login, if I run it from ~/.profile?

The issue
As I already mentioned in comments, the issue is timing. (commands to-) Configuring desktops is typically something that will break if the desktop isn't ready for it, and your command simply misses target. This often happens when running commands on configuring monitors, keyboards and mouse for example.
To solve
To solve the issue, you need to add a little break before the command is run. I don't run Lubuntu, but according to this post, you should be able to add a command to startup (login actually) here: Start Menu → Preferences → Default applications for LXSession → AutoStart. The command to add a little break is then:
/bin/bash -c "sleep 5 && xprop -root -f _NET_DESKTOP_LAYOUT 32cccc -set _NET_DESKTOP_LAYOUT 0,3,2,0"

Alternatively, (tested by you :) ), you can add it to ~/.profile, and add a & to make sure it will run in the background and not hold the login process.


Error with program.csh (bin/csh: bad interpreter: No such file or directory)

The C-Shell (csh) package is probably not installed.

sudo apt-get install csh


How is it possible to swap linux disk contents with Win7 contents?

As windows cannot read ext4 file system you need to have a utility called as ext2explore in windows to copy contents from linux to windows. From windows to linux is straightforward as linux knows how to read ntfs file system.

link for ext2explore:
http://sourceforge.net/projects/ext2read/files/Ext2Read%20ver%202.0/ext2explore%202.0%20beta/


Second monitor doesn't work on an Intel GM965

I often use a second monitor with my laptop, which has an Intel GM965 video card.  Usually it works fine, sometimes it fails in one of the two ways:

Both screens freeze and nothing happens, I can't interact with the system.  Forcefully killing the GUI session with Alt+SysRq+K helps.
One of the screens is fully or partially obscured by a black rectangle; I can see the mouse cursor, but I cannot see my desktop or any windows.  Restarting Compiz or Unity fixes this; I usually do Alt+F2 unity Enter.

VGA hotplug detection works for me in 11.04 (it didn't in 10.10 or earlier versions), so it's enough for me to plug in a monitor and wait about a second for it to be autoconfigured.  If this doesn't happen for you, or if Ubuntu's chosen autoconfiguration (cloned display versus extended desktop) is not to your liking, you can run gnome-display-properties ("Monitors" in the GNOME Control Center) and specify what configuration you'd like to have.

I don't have a HDMI connection on my laptop, so I cannot say from personal experience if there are any bugs affecting HDMI.


Why do I sometimes get corrupted text on Firefox when it loads a webpage?

Seems Microsoft fonts were not installed ,

sudo apt-get install ttf-mscorefonts-installer

Then try again


Cannot select window color theme after upgrade from 18.04 to 20.04

I saw the problem too, after upgrade from 18.04 to 20.04.

Installing the Yaru theme packages can fix it.

sudo apt install yaru-theme-gtk yaru-theme-sound yaru-theme-gnome-shell yaru-theme-icon yaru-theme-unity


how to streamline ubuntu installation ? (started from ubuntu mini)

The technology on the live CD is squashfs. If you extract the root.squashfs from the Ubuntu live CD, and decompress it , its is a few GB.

See

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

and man squashfs

If Ubuntu is too large for you, try Debian. Part of the reason Ubuntu is user friendly is that some packages have more then the bare minimal dependencies. Debian will have less dependencies, so you may be able to get a (slightly) smaller OS.

If that is still too large, then you have to look at alternate OS, anything from tinycore to gentoo to slax.


Driver Wireless Network card - Acer Aspire 3000

I was having the same problem (same laptop, but Xubuntu 14.04.2) and this article solved my problem:

https://askubuntu.com/a/60395/382462


Unable to get Android Emulator to start / how to get permissions set right to Kvm

sudo apt install qemu-kvm
sudo adduser <user> kvm
emulator -avd nexus5 -use-system-libs


Wifi with rt2800usb dead after 20.04 LTS upgrade

In order to reduce or eliminate any possible interference, I suggest that you blacklist the driver for the evidently malfunctioning internal device. From the terminal:
sudo -i
modprobe -r iwl3945
echo “blacklist iwl3945”  >>  /etc/modprobe.d/blacklist.conf
exit

Remove the USB wireless device.
Next, restore netplan to its default state:
# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

Restart NM:
sudo service NetworkManager restart

Reinsert the USB wireless device. Is there any improvement?


Ubuntu 18.04 Terminal F10 function key conflict with htop

Edit -> Preferences -> General:
Uncheck "Enable the accelerator key (F10 by default)"

If this is the only conflict you could also use Ctrl + c or just q to quit htop.


Reduce the physical dimensions of a pdf using the command line

The question turned out to be answered here. cpdf is a tool which can achieve the correct scaling via the command line, according to pdfinfo.


I wonder if adding yourself to the 'video' group (I think) would help?

sudo adduser $USERNAME video

Can someone confirm the group name? Thx


Stolen from http://ubuntuforums.org/showthread.php?t=947124. I've followed these directions from this very post a while back. It took me a bit to find it again.

sudo apt-get update to update you list of available upgrades.

sudo apt-get autoclean to remove any partially installed packages.

sudo apt-get clean to cleal the apt cache.

sudo apt-get autoremove to remove any unneeded dependencies.

sudo dpkg --remove -force --force-remove-reinstreq broken-pakage will remove any broken package that you find in error messages.


Example for Java 8:

sudo apt-get install openjdk-8-source

apt-get puts it under the relevant JDK location as src.zip: /usr/lib/jvm/java-8-openjdk-amd64/src.zip

Intellij IDEA recognized it automatically and started showing me the source code.


Ubuntu 11.04 appearing like ubuntu 10.10 suddenly

If you mean in a desktop appearance way, such as no Unity, then your computer has dropped into a fallback mode where graphics are less intensive. To change back (presuming your computer can support Unity, it will if it has had it before) then you will need to log out and at the bottom; choose the desktop environment that you prefer and log in with your usual credentials.

Hope this helps.


How can I install a printer driver from a (local) ppd file?

Adding a network printer via

http://localhost:631

leads to a window where one can select a (local) .ppd file to install printer.


Successfully installing Steam on Ubuntu 16.04 64Bit

Ok so I don't like the way this turned out (I don't understand how to replicate the results).

However here is in general what I've done, I tried re-installing NVIDIA drivers (while running X) obviously that failed, at this point I already has 32 bit libraries installed. On next restart I got blank screen (no way to boot). I unplugged Video card and connected on-board graphics, boot went through but it gave me prompt instead of X, I installed NVIDIA drivers and said yes to 32bit libraries. Reconnected my Video card, on next boot Steam started no issues.


Can't SSH into Ubuntu Server VM on Mac host

My suggestion would be to ensure that the firewall was turned off on the VM before proceeding with the network adapter changes.  Some O/S versions default with the firewall turned on which may block incoming SSH connection attempts.  After turning off iptables or ufw depending on your O/S version or whichever service you are using.  IF this doesn't resolve the issue, then try each network adapter setting within VirtualBox.

sudo ufw disable

or

sudo service iptables stop


How can I change the default editor of the sudoedit command to be vim?

Run sudo update-alternatives --config editor and choose for vim. After this, sudoedit /etc/hosts should open /etc/hosts using vim.

Alternatively you can use sudo vim /etc/hosts.


Is encrypting the home directory on an encrypted LVM installation overkill?

It's overkill for most systems. By "encrypted LVM" you likely mean "LUKS" (Linux Unified Key Setup).

Encrypting the home directory protects you from:

other users on the same system accessing your files
data theft when the machine gets stolen / lost

But not from:

Modification of system settings or files (including binaries) outside the users home directory. In this way, the administrator (or anyone with physical access and a LiveCD) can install a program that copies / modifies the files / settings in your home directory.

Encrypting your system using LUKS (full disk-encryption in the case of the alternative installer):

data theft when the machine gets stolen / lost
data integrity: anyone who does not know your LUKS passphrase cannot modify your system settings or files, although you're still not protected against an Evil Maid Attack.

So, if you are the only user of the system, encrypting your home directory does not add significant protection and will only worsen the performance. Neither should you do that if you're sharing your machine with people you can trust and your computer does not contains top-secret information. A final case: if you are sharing the machine and there are multiple operating systems installed on the machine and you're the only one who knows the passphrase, there is still no need to encrypt your home directory.


How can I know how much free ram i have left on Lubuntu?

Run the following command in a terminal to show your available amount of RAM:

free -h

The output should look something like this:

             total       used       free     shared    buffers     cached
Mem:          4.8G       4.5G       266M       209M       888K       3.0G
-/+ buffers/cache:       1.5G       3.3G
Swap:         6.3G        40M       6.2G

As you can see in this example, there is 266M free RAM including cached RAM. There is 3.3G available, not including the cache.


Need help with C++ application on Ubuntu GNOME 17.04

As it turns out, the patch at https://reviews.freebsd.org/D10815 suggested by @ravery (thank you) turned out to be a patch for freebsd... however it did get me thinking that there might be a patch elsewhere that would work in Ubuntu.

I ended up emailing back and forth with tobias.kortkamp@gmail.com, and Tobias provided me a link at https://aur.archlinux.org/cgit/aur.git/plain/sigc.patch?h=easystroke-git&id=3d16f0584c8cf0ade6c181cb56c12d7abe2e17b7 that will allow the Git code to compile (with lots of warnings) after applying the patch with patch -p1 -i /path/to/sigc.patch.

Fix build with libsigc++ 2.4+ (group was removed).
diff -Naur a/actions.cc b/actions.cc
--- a/actions.cc    2015-11-04 19:56:49.351107678 +0100
+++ b/actions.cc    2015-11-04 19:57:07.161246969 +0100
@@ -51,10 +51,8 @@
    context->set_icon(pb, pb->get_width(), pb->get_height());
 }

-bool negate(bool b) { return !b; }
-
 TreeViewMulti::TreeViewMulti() : Gtk::TreeView(), pending(false) {
-   get_selection()->set_select_function(sigc::group(&negate, sigc::ref(pending)));
+    get_selection()->set_select_function(sigc::mem_fun(*this, &TreeViewMulti::negate_pending));
 }

 enum Type { COMMAND, KEY, TEXT, SCROLL, IGNORE, BUTTON, MISC };
diff -Naur a/actions.h b/actions.h
--- a/actions.h 2015-11-04 19:56:49.351107678 +0100
+++ b/actions.h 2015-11-04 19:57:07.161246969 +0100
@@ -30,6 +30,11 @@
    virtual void on_drag_begin(const Glib::RefPtr<Gdk::DragContext> &context);
 public:
    TreeViewMulti();
+    bool negate_pending(const Glib::RefPtr<Gtk::TreeModel>& model,
+                        const Gtk::TreeModel::Path& path,
+                        bool path_currently_selected) {
+        return !pending;
+    }
 };

 class Actions {


How to use bash $variable inside cat  Test.html

You have to add escape as shown below:
cat <<\EOF > Test.html
echo $var
EOF

Check the output by cat Test.html.


Error running Snaps after system update throws 'multiple nvidia drivers detected, this is not supported' error

OK so have solved this it is the same as somebody else reported, but a bit more detail from me. in /usr/lib I have 2 folders with the pattern.

usr/lib/nvidia-[1-9][0-9][0-9]

in my case nvidia-361 and nvidia-352

The nvidia-352 folder just contains a couple of symbolic links
whereas the nvidia-361 folder contains all the driver software.

to check I renamed the nvidia-352 folder

cd /usr/lib
sudo mv nvidia-352 fred

then launched a snap

/snap/bin/libreoffice

This launched as normal

remember if this works to remove the folder completely

cd /usr/lib
sudo rm -fr fred

I hope this helps others.


How to change the login (gdm) font and font-size?

Curious question - if you do the following and logout:

sudo ln -s /usr/share/applications/gnome-appearance-properties.desktop /usr/share/gdm/autostart/LoginWindow/gnome-appearance-properties.desktop

You will see:

As you can see I've italicised the login font.

To prevent the appearance window from appearing, login and then run:

sudo rm /usr/share/gdm/autostart/LoginWindow/gnome-appearance-properties.desktop


How to uninstall and reinstall GNOME 3.10?

Try this, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install ppa-purge
sudo ppa-purge ppa:gnome3-team/gnome3-staging
sudo ppa-purge ppa:gnome3-team/gnome3-next

Then reconfigure either GDM or LightDM, whichever one you like

sudo dpkg-reconfigure gdm

OR

sudo dpkg-reconfigure lightdm

If you don't get 3.8 back, do

sudo add-apt-repository ppa:gnome3-team/gnome3
sudo apt-get update


Using Ubuntu as a main OS on my Netbook Designed for Windows 7

Going with lubuntu. It's quick and easy, and faster than the heavier Ubuntu.


Locked Laptop blue blox enter password, completly locked pc

Seems that HATEthePLOT is right.

If you can boot your PC from external media (say usb) - prepare a Ubuntu image and boot the PC form it.

Select Try Ubuntu and you will boot to Live system.

After that you can access your root partition (the one that is on a HDD in the locked system).

Generate new password hash
perl -e 'print crypt("password","\$6\$saltsalt\$") . "\n"'
The file you should edit is /etc/shadow Using generated hash update password for the needed user

Now you just have to reboot the system back form your internal drive and have new password for needed user.

P.S. I do assume you know how to mount drives and do have general knowledge  of Linux system. If not I can write more dedicated instruction.


archive.canonical.com repo for trusty is broken, how do I report the issue?

Contact Canonical on http://www.canonical.com/services/contact-us

Low quality queue reviewers:  That's it!


Update manager keeps asking for partial upgrade

Try deactivating the unsupported updates in the Software & Updates window.
Go to the tap, where you can see a list of repos. Look carefully on all checked repositories. Deactivate the repos you don't know and they seems weird to you like unofficial graphic driver repos


How can I prevent the input volume from changing?

Skype has an option to allow or forbid automatically changing the input level; it does this to even out changes in user voice volume and avoid clipping or undermodulation (call quality in general is or used to be the biggest thrust at Skype).  The Skype software does this by changing the main mixer settings, rather than by adding a software attenuator -- so if, for instance, you cough while on Skype, the software will back down your input level significantly, and take a minute or so of quiet to bring it back up (longer if you're talking).

It's possible other sound recording software may have similar "auto level" settings that you can watch for or disable, but I know for certain this is present in Skype.


Can I have fglrx's screen brightness settings and xorg's stable Chrome GPU processing at once?

Finally this is what has worked

Open / edit grub file sudo gedit /etc/default/grub.

Find the option GRUB_CMDLINE_LINUX_DEFAULT.

Comment that line (add # at the begginging) as a backup.

Add below the new line containing our settings for brightness management:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pcie_aspm=force acpi_backlight=vendor"

Save the file.

Run at the terminal sudo update-grub which applies new settings for further system start-ups.

Reboot & it's ready to go.

Yaaay! No more eyes melting for me...
Now I can adjust the screen brightness via special notebook fn keys.


How to install the newest GNOME 2 global menu?

gnome 2 global menu is not used on natty, it uses a global menu but it doesn't use that you mention


Looks like you have a corrupt file. Fortunately it can be thrown away and reloaded with  afew simple commands:

sudo rm /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_quantal-security_universe_binary-i386_Packages
sudo apt-get update


You have apt-listchanges installed so APT shows you the changes when upgrading packages using default pager (less).

Press q to quit less to continue.


How to uninstall ubuntu grub after formatting ubuntu partition in windows 8?

Try running

  bootrec.exe /RebuildBcd

with a Windows recovery disk.


/usr/lib/i386-linux-gnu/libmysqlclient.so.18: no version information available

It looks to me like library versions mismatch - you build on newer system (14.04) linking to one version of library and start it on a bit older (12.04), using different version of the library.


Can I develop applications for the Ubuntu Software Center using KDE?

Yes you can
Ubuntu supports variety of programming languages and toolkits. You can use any of them for your app .But qml ang Ubuntu tool kit is officially recommended


How to make port forwarding work from two routers via their own network?

Generally, the networking doesn't work very good with two default gateways defined. Your computer is using only one gateway by default (probably 10.0.0.1 in this case) and will use the second one only when the first one is unreachable.
So port forwarding on RouterB probably is working, that is, packets sent to RouterB:80 probably reach interface 192.168.1.10 on your machine. But the reply packets are sent always to gateway 10.0.0.1 and probably don't get back to destination (this is so called "asymmetric routing" which is generally troublesome).
If you plan to connect to RouterA:80 and RouterB:80 from the same range of IP addresses, I don't see a simple solution to your problem. Maybe it is possible to tweak iptables somehow so that replies to packets received via interface enp6s0 always go out via 192.168.1.1, but I don't know how to do it (if possible at all).
If the IP addresses will be different, you should not define 192.168.1.1 as a default gateway, but instead add to routing table a route to particular network(s) via 192.168.1.1. That takes precedence over the default gateway, so packets to specified network(s) will be sent via 192.168.1.1 and not via 10.0.0.1.


pros and cons for hard drive partition solutions

Consider using the Logical Volume Manager. The Enterprise Volume Management System was (years ago) another alternative, but LVM is now integrated into the kernel and is very easy to use once you learn about it.

You may also want to consider using the JFS filesystem rather than the ones you mention. I've been using it for more than 5 years through several power outages and journal recovery has always recovered my filesystem with zero errors and no lost data. I think JFS is a wonderful filesystem.


When a panel is full, you can't right click anywhere to "Add to Panel".  Perhaps this was by design, but overlooked things like dynamically resizing widgets like the Window List which fills blank space.

So when your panel is full, you have only one option - remove something (that you know how to easily re-add), then right click on the now-empty space and add what you need.

You might also want to consider right-clicking on the panel, choosing "Properties" and ticking the "Show Hide Buttons".  This will give you permanent access to the Panel properties (and "Add to Panel" menu option) regardless of how full it is.


Backlight change with FN keys do not work on Asus

In the terminal:

sudo -H gedit /etc/default/grub

Change

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi="

Save, then

sudo update-grub

Restart computer.

The function keys Fn+{f5f6} should now be active.

This may need to be done again after upgrading the system, as the grub file may be modified during the upgrade procedure.


I installed Telegram but I can't see it in Ubuntu

Simply open dash, then type Telegram. If you encounter any issue like Telegram couldn't open desktop version, instead it launch the web version. Run following command :

/opt/telegram/Telegram

This should make the Telegram Desktop version appear on the Ubuntu Dash.


I'm unable to install PHP5 in Ubuntu 16.04

Ubuntu 16.04 LTS comes with PHP 7.0. To install it, you need to run:

sudo apt-get install php

Or rather pick a specific PHP Web SAPI, most probably you need support for Apache2:

sudo apt-get install libapache2-mod-php php

Or PHP FPM

sudo apt-get install php-fpm php

If you specifically need PHP 5.x, you'll need to use ppa:ondrej/php and install, f.e. PHP 5.6 for Apache2:

sudo apt-get install php5.6 libapache2-mod-php5.6


What tools are available for determining a files type other than the file command?

What you're trying to do used to be called hacking a long time ago.  Now it's a bad word, but back then it was good!  (Trying to take things apart.)

The three most important tools in a computer programmer-hacker's toolbox are:

His brain
A Hex Editor like ghex
a disassembler (ask another question once you're up to this level)

Go to a terminal (If you don't know what that is: give up all hope, you're missing item 1) and type the hex editor command followed by the fully qualified file name (if you don't know by now what command to type: give up all hope as you're missing item 1 as well)  ;-)

This post is your course and your graduation in one!

Welcome to the world of computer programming-hacking!


Why can't I use my unllocated disk space?

You can't increase the space because they are mounted, in use. To increase that space you must boot into a live GParted session from a bootable USB or disk. I hope that helped.


E: Package 'bluez' has no installation candidate

I seems you are a bit confused about package management.

  So I added a PPA and tried to update, but I am getting the following error:

Unable to download updates:
failed to refresh cache: E: The repository 'http://ppa.launchpadd.net/bluetooth/~

You haven't added the complete error output and you don't show us the PPA you used, but I can see that you have mistyped a double "d" at the end of "launchpad". A wrong PPA (maybe one that does not contain a package for your version of Ubuntu) or this mistyping is probably the reason why you are getting an error while updating. As you found out, removing the invalid PPA makes the error disappear.

  I added bluez PPA and installed using snap installl bluez.

Again, you don't say what PPA you added, but you wouldn't need to add one, since bluez is already at the default Eoan repository. Furthermore, you don't even use the PPA you added, because you installed the snap version of bluez. In general, PPAs and snaps have different repositories and are installed with different tools. apt is used to install packages from the Ubuntu repositories and PPAs and snap to install snaps.

To reinstall bluez:

First uninstall the snap package you installed:

snap remove bluez

Then remove the PPA you added:

sudo add-apt-repository --remove <name-of-ppa>

<name-of-ppa> is the name of the PPA you added (something like ppa:bluetooth/bluez or whatever you used).
Make sure that bluez apt package is removed:

sudo apt purge bluez

Install bluez again:

sudo apt install bluez

Restart your computer.


You have a fake raid controller.  Simply disabling the bios support does not get rid of the metadata on the disks that identifies them as members of a raid, so Linux still recognizes it.  When you wanted to stop using the drives in a raid, you should have used the bios raid utility to delete the raid set, instead of just disabling the raid bios.  To erase the old metadata now, (assuming the disks in question are sda and sdb ) run:

sudo dmraid -Er /dev/sda
sudo dmraid -Er /dev/sdb


Why do games in Windows have better FPS than in Ubuntu?

They're not necessarily.

They spec-ed out frame rates on a more minimal linux (Ubuntu without Unity to take weight off the video card) and Left4Dead2 had BETTER frame rates on linux.  It's my understanding TF2 runs on the same engine, so in theory if you were running something like XFCE instead of Unity it would have better frame rates on the same hardware.

Look at the threads here that talk about about getting more performance out of wine games (which should run slower because of an extra abstraction layer).  If you tune your box, you will get better frame rates on Linux native games than Windows native games as a general rule.


A simple way to manage configuration of dot files and packages?

I haven't used cfengine in a very long time, but you could take a quick look at cfengine3.  I would say that the original cfengine is almost certainly too complex for your task, but the latest version claims it is simplified.
Another possibility, again likely more than you need, is puppet.

For etc configuration files, for a start you could take a look at etckeeper.

You'll also need to keep any packages and ppa's in sync -- I know there are some options for this, but I'll leave it to other users to help with that one.

etckeeper , cfengine3 , and puppet are in the repos.

Of course*, you'll probably want to tie in some cloud storage to keep copies sync'd and tidy.   Ubuntu One, Dropbox, Spideroak come to mind as free (for limited storage) solutions.

*(or perhaps not)

By the way, what are you using to manage your dot-files?

Update:
I'd forgotten that stipple and/or OneConf would be the ideal way to do (much of) this.   When they are complete.


In the end I solved the problem using a simple bash script (/usr/local/bin/print_pdf.sh), avoiding the use of pipes inside incrontab file:

#!/bin/bash
cat $1 | acroread -toPostScript | lpr -P <printer name>

Execution permision for all users:

sudo chmod a+x /usr/local/bin/print_pdf.sh

After that, as a normal user:

incrontab -e

/home/launion/PDF IN_CLOSE_WRITE print_pdf.sh $@/$#

save the file

Now, when printing to the virtual PDF printer, Toshiba printer will receive the file in PostScript and it will be printed ok.

I did not try with pdf2ps command but maybe it will work too.


Why is Ubuntu 10.10 64-bit lagging horribly in a VM (VM Player)?

I guess a good start to solve your problem would be to pinpoint exactly what's going wrong. May I suggest that you use tools such as top, free -m and iotop on your host to find out if it is the CPU, the memory or the IO that's causing problems? Once you have a better idea of what your bottleneck is, assuming that there is one, then it'll get easier to find out how to solve it.


The old methods of replacing unity no longer work in 13.04. Please try:

dconf reset -f /org/compiz/
unity --reset-icons &disown

Reboot if it doesn't work right away.


Where to add the Pre-Shared Key for the Server Authentication with Network Manager for L2TP/IPSEC?

Are you comfortable with editing configuration files with a text editor? If so, I believe the answer of where to put the PSK is /etc/ipsec.secrets. You can try something like this:

: PSK "strongSwan"

The file is documented in man ipsec.secrets or you can read about it here:

https://wiki.strongswan.org/projects/strongswan/wiki/IpsecSecrets

Let us know if that doesn't work for you.


sudo find /var -type f -name "m*" ! -user root

should do it. ! negates -user root meaning not user root.


Is updating Ubuntu from Chinese servers safe?

Ouch! Your query is culturally sensitive and has (almost) nothing to do with Linux. Ditto for my answer.

From direct personal and extensive experience in Asia and in particular in China, my recommendation would be:

Do not install new software or even update any software you may have installed in your box when traveling. Switch your automatic updates off during your time on the road in PRC as in a small number of other countries, sophisticated enough to open a back-door or perform zero-day exploits on a plain-vanilla system. That goes for any OS.

This is not daydreaming or gratuitous paranoia, I lived through all of that, installing a couple of Lx company wide systems in China.

I don't care that there might be hunky-dory checksums there to put you at ease. Be smart and don't become complacent, do it the hard way over encrypted VPN only AND check your checksums there as well.

If encrypted VPN is not your cup of baijiu and your box is portable, wait and install whatever you need AFTER you get back home, i.e. outside the Great Wall. Japan is fine, so is India. HongKong, Tibet and Mongolia are between "iffy" and "no-no". But that's a judgment call on my part. I never "worked" in those latter countries.

Is this not completely off-topic ?


How to stop Banshee from converting my music to mp3?

Aah, I found a solution.

Create a file named .is_audio_player and put it in the root of your Music-Player. (the . is important!)

Then open this file (it is eventually hidden, go to the menu and allow to see hidden files) and write the following into the file:

output_formats=audio/ogg,audio/mp3,audio/m4a

This is the the solution. Here you can define, which formats you not want to have converted. For example if you want to have m4b not converted, add ,audio/m4b.


Blur

The Homerun seems /1/ to use the plasma blur setting: KDE System setting > Desktop effects > Appearance - Blur.

Something to check: Is the blur working ?
How much do you have the blur ?

Based to the feedback of the Kubuntu developers: https://lists.ubuntu.com/archives/kubuntu-devel/2013-September/007343.html

Other KDE Launchers: http://www.kubuntuforums.net/showthread.php?59851-KDE-Application-Launchers


Question about epson printers under 16.04 xenial

You are trying to install a wrong driver. i386 is intended for 32-bit systems, you have a 64-bit system.

The problem can be fixed this way:

Remove the wrong driver

sudo apt purge epson-inkjet-printer-escpr:i386

Download the epson-inkjet-printer-escpr_1.7.5-1lsb3.2_amd64.deb file.
Install it using dpkg -i.

All should work.

Regarding amd64 and Intel CPU see Difference between the i386 download and the amd64?

All packages installed in your system are amd64 except some specifically intended for 32-bit processes.


Yes it is possible.

Is about Ubuntu 12.04. Problems with sound after install.
Is about Ubuntu 10.04. Old but has comment about partitioning outside of Ubuntu installer (no idea if this is current).
Proof 3. See remark #12 (he advices to install lUbuntu).


why is piping pgrep output into kill is not working

kill is not reading anything from stdin but expects some command line args and throws an error if it doesn't get them.

Piping only works if the program on the right side of the pipe is actually reading from the pipe. Not all programs do.


Is it okay (or not) to symlink libraries to overcome "cannot open shared object" errors?

The problem with creating these links is that they aren't managed in any meaningful way. If that library is removed, the link becomes broken. If the library is upgraded, it may encounter an error because of the link that it doesn't expect to be there.

Also, you are essentially lying to the system. In the linked example, you are pretending that libudev.so.1 is actually libudev.so.0. They are named differently for a reason (different versions of the library). While this may work just fine for some programs, there is the potential that differences between the versions could cause issues (such as a segfault or other unexpected behavior).

So if you are specifically creating this link just so a program will run, and you know that you will remove it later, you address the first issue but not the second. While this does address the primary issue, it is not ideal.

The ideal solution is of course to install the right version of the library (the accepted answer on your linked example), or to compile the program against the version you have.


How do i share a folder with another Ubuntu 14.04?

The easiest way to transfer files between 2 computers is NitroShare as it doesn't need any infrastructure and is easy to install and blindingly fast.  It also runs on everything: Ubuntu, Windows, ...

To install NitroShare on Ubuntu, use the following steps:

sudo add-apt-repository ppa:george-edison55/nitroshare-dev
sudo apt-get update
sudo apt-get install nitroshare

A small icon now shows up in the menu bar:

(do these steps on both computers)

On one computer, click the nitroshare icon and click "Send Directory" and send Documents, Pictures, ... over one by one.

Warning! Do not send the entire /home directory as that will copy your configuration files as well!

Caution: If you need to truly share files between multiple Ubuntu only computers, NFS is the way to go and when Windows comes into the play, samba is the way to go.


Which Live CD should I use to repair my ext4 partition on a MacBook Pro?

Solved with Parted Magic live CD and running e2fsck -f -y -v /dev/sda3


Building a package that runs tests needing X server (debuild)

Of course, you could tell debuild to retain the X display number by running debuild -us -uc -eDISPLAY. This solution doesn't however apply to most Debian packages, since they won't be built from an X environment (that includes not only official debian buildds, but also autopkgtest, sbuild, pbuilder environments). All in all, a Debian package should build successfully with just its build dependencies installed and nothing else.

The canonical solution to this is
- Build-depend on xvfb
- run your tests wrapped with xvfb-run like this (in rules):

override_dh_auto_test:
  xvfb-run dh_auto_test

For an example, look here at salsa repository of gnome-settings-daemon.


Once ubuntu is installed, can I still update other operating systems?

An update should be possible. The only problem I can think of, is that Windows might overwrite your bootloader. In this case, you would have to manually reinstall Grub with a live disk to obtain your dual-bootable system. This process is explained here. Boot-repair is a very-easy-to-use GUI tool to do this.

As it has not been released yet, no one can guarantee this. It would be best for you to wait a few day after it has been released and read some feedback of fellow Ubuntu users.


connecting to archive.ubuntu.com takes too long

I solved this on 12.10 by editing /etc/gai.conf and uncommenting the line:

#
#    For sites which prefer IPv4 connections change the last line to
#
precedence ::ffff:0:0/96 100

This lets you keep IPv6 enabled, but sets the order of precedence to prefer IPv4 over IPv6.


After installing Linux, preinstalled Windows 8 is not in boot entry

As user Olfred pointed out, from your boot repair:

Drive: sda _____________________________________________________________________

Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1                   1 1,465,149,167 1,465,149,167  ee GPT

GUID Partition Table detected.

Partition    Start Sector    End Sector  # of Sectors System
/dev/sda1           2,048       999,423       997,376 EFI System partition
/dev/sda2         999,424 1,440,442,367 1,439,442,944 Data partition (Linux)
/dev/sda3   1,440,442,368 1,465,147,391    24,705,024 Swap partition (Linux)

You dedicated the majority of your sectors to the Data partition (linux). Total of 1.46 billion sectors, 1.43 bil sectors allocated to linux partition.

:(

Your windows install is gone, along with any data you had in it. Best you can do is reinstall windows. Installing Windows have the nasty tendency to break your grub. First make a live-usb of Ubuntu, install Windows, then head to this page:

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

Just make sure you do a "side-by-side" install this time :)


To achieve what i've mentioned in question just simply follow provided steps and during establishing of ISO USB use "Rufus" software. Everything works perfectly fine.
I have two separate OS'es on two separate discs, where second disc is partially used by windows os.


There is recursive startup. Just tried to install Ubuntu. Get this image over and over again

Use the following steps:

Go into BIOS/UEFI setup utility.
Set a supervisor password.
Go to Security
select select UEFI as trusted
Select HDDO, then EFI, then Ubuntu. Then Shimx.EFI.

Your computer won't tell you but you will have to name the file first. It can be anything. When you type in the name you want, press Enter. Then select yes.

You can now erase the supervisor password you made.

Go to the boot menu and there will be a new title with the name that you gave. * Put it all the way to the top.
Save your changes
Exit the setup utility.
Now, the Grub menu will show up without Windows.
Go to your Ubuntu account
open terminal.
Type:

sudo update-grub

That's it.


Ubuntu 13.04 automatic reconnect to hidden wireless network

The "Connect automatically" option is now moved to General tab and is called "Automatically connect to this network when it is available". Are you sure it's checked?


What is the recommended method for getting & installing updates for an Alpha or Beta release?

Think of apt-get upgrade as a safe upgrade while testing candidate releases. You should use it normally for (mostly) daily upgrade process to keep your packages up to date without* breaking your system. The upgrade option is used only to update the packages already installed on your machine to a newer version.

apt-get dist-upgrade will not only upgrade all of the currently installed packages on your system but also handle the dependency changes for new versions of packages. It intelligently** will remove obsolete packages from your system and install any further necessary. During beta use this option with caution. Normally this function needed for upgrading from one distribution release to another.

* Without breaking is a big statement, remember, this is alphas or betas we are talking about.
** Intelligently is definition but because all is beta extra caution should be taken.

Precautions to take while upgrading a pre-release

Upgrade only using the terminal, at least you will know exactly what is going to happen before pressing Y and letting apt do changes to your system.
When running a apt-get dist-upgrade is needed (new kernel, major change on system packages, etc) make sure that you first run apt-get dist-upgrade -s to simulate and please read all the changes the upgrade will apply. If you see any weird changes (_I remember killing my system after a dist-upgrade asked me to remove some necessary system packages and the Ubuntu Software Center while 12.04 was in alpha 1) abort it and update you packages again in a few days.
Do not use the update manager while updating a pre-release. Make sure that you can read everything that is going to happen to your system before pressing Y.
Don't be too eager to update! Don't do it out of speed, this is a sensible process during a pre-release. Use caution and some patience when testing it.

When should you use a upgrade compared with a dist-upgrade?

Use a dist-upgrade when you know the pre-release just went from alpha to beta or the next scheduled step or in the "Wont update these packages" list during a apt-get upgrade there are new kernels and other major packages, be extra cautious of the list of packages that will be removed. If there is anything there that you are not sure, or that you think it might break your system abort it after the simulation and get your self informed via the forums or on the IRC channels before applying the changes.

If you need further help during the update period or just a quick chat to point you in the right direction during an pre-release system read the informationins this post

There's an issue with an Alpha/Beta Release of Ubuntu, what should I do?

Don't be hasty and be prepared all times, a backup or 2 are never too much to ask when testing.


update-grub command is not removing Windows Boot Manager

Open /etc/default/grub with root and edit it with your editor.

Include the line GRUB_DISABLE_OS_PROBER=true in the file, then save and exit.

Now run sudo update-grub. The issue will be solved.


Added one extra drive, old dual boot stopped working

I would reinstall GRUB onto your HDD.

Boot into liveUSB or liveCD
Select "preview ubuntu" or find a way to get to the desktop w/o installing
Open a terminal
Run lsblk
Using the output of lsblk, get the disk of the HDD (either /dev/sda or /dev/sdb probably).
Run grub-install /dev/sdX where X is the letter seen previously
Restart

If you still cannot boot into ubuntu, follow the first answer on this post.

After this, you can mess with the partitions using GParted. Search askUbuntu for more info on that.


how to download and install Jubler on ubuntu 13.04?

SMPlayer it's already incluced in ubuntu repositories, so you can install it running this command: sudo apt-get install smplayer

or you can install it graphically using the "Ubuntu Software Center" searching for smplayer.

About jubler, you can download it from here: http://www.jubler.org/download.html


Based on your last comment (you may add it to your initial question - just click the edit link below the jdownloader tag), i assume jdownloader isn't configured properly. It obviously tries to access

/home/user/.jdownloader/config/PACKAGEMANAGER.cfg,

but it should try to access

/home/[YourUserName]/.jdownloader/config/PACKAGEMANAGER.cfg

EDIT: If you install jdownloader using ther jdownloader ppa, jdownloader first tries to update itself to the newest version. You get more information about what's going on if you start jdownloader from the command line using jdownloader -v.

I myself didn't get the PPA version to run on my own PC (Ubuntu 10.04), so it seems to be a bug (jdownloader wasn't able to update itself). I recommend installing JDownloader manually, by downloading the LInux installation file from JDownloader's download page.


How to run a command when launching WSL Ubuntu.exe

In the Ubuntu.exe help manual I found:

  run < command line>
     Run the provided command line in the current working directory.
     If no command line is provided, the default shell is launched.

So in the .bat, I used:

start ubuntu.exe run /mnt/c/xxx.sh

It works well.


Window behavior problems after removing Unity

Here's a cool help which can guide you:

How can you remove Unity?

To reset unity,
1. Install dconf-tools
2. Run this command in terminal: dconf reset -f /org/compiz/
3. Run unity --reset-icons
4. Logout/Restart.

Enjoy Ubuntu. :)


Sandisk usb stick wont show up on computer

Look for a program in the Ubuntu Software Center, named Disks and install it. I've had the same problem with a few of my USB sticks, but Disks has always found them.

They may not mount automatically, but you can mount them in, Disks simply by clicking the Play button in the program's interface.


Close Nautilus window automatically after drive is removed

Patch functionality

In nautilus' Preferences, there are no options to fix it, as far as I can see; -nothing to be found in Preferences. With a tiny, extremely -low-on-juice- background script we can patch it however. The additional processor burden is nihil.

The script

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

def get(cmd):
    try:
        return subprocess.check_output(cmd).decode("utf-8").strip()
    except subprocess.CalledProcessError:
        pass

curruser = os.environ["USER"]
nautpid = get(["pgrep", "nautilus"])
connected1 = [l for l in get("lsblk").splitlines() if "media" in l]
wlist1 = [l.strip() for l in get(["wmctrl", "-lp"]).splitlines() if nautpid in l]

t = 0
while True:
    time.sleep(1.5)
    connected2 = [l for l in get("lsblk").splitlines() if "media" in l]
    time.sleep(0.5)
    while True:
        wlist = get(["wmctrl", "-lp"])
        if wlist:
            break
    wlist2 = [l.strip() for l in wlist.splitlines() if nautpid in l]
    removed = [l for l in connected1 if not l in connected2]
    if removed:
        close = [
            w for w in wlist2 if all([
                not w in wlist1,
                any([
                    w.endswith(" "+curruser),
                    w.endswith(" Home")]),
                ])
            ]
        for w in close:
            subprocess.Popen(["wmctrl", "-ic", w.split()[0]])
    connected1 = connected2
    wlist1 = wlist2
    # periodically (re)set nautpid to fix if nautilus crashed somehow
    t += 1
    if t == 20:
        nautpid = get(["pgrep", "nautilus"])
        t = 0

How to use

The script needs wmctrl to be installed

sudo apt-get install wmctrl

Copy the script into an empty file, save it as close_removed.py
Test- run it by the command

python3 /path/to/close_removed.py

connect one or more drives, remove them after they were automatically mounted. Their window should close.
If all works fine, add it to Startup Applications: Dash > Startup Applications > Add. Add the command:

/bin/bash -c "sleep 15 && python3 /path/to/close_removed.py"

Explanation

External drives are mounted in /media/<username>/<drivename>
If a drive is disconnected, the corresponding nautilus window reverts to (at least on my system) /media/<username>. The window is therefore (re)named after the current user.
Unfortunately we cannot simply close all nautilus windows, named after the current user, possible mismatches could occur. It is however safe to assume that the window that was immediately renamed to the current user after the drive was disconnected is the one that represented the removed drive.

That is how the script works, using:

pgrep nautilus

...on startup of the script, to get the pid of nautilus

wmctrl -lp

... to get the windows of nautilus

lsblk

...to keep an eye on possibly disconnected drives

wmctrl -ic <window_id>

...to close the targeted window(s)

Note

The script has a cycle of two seconds, which implies the drive needs to be attached at least two seconds for it to work.


Netplan did not automatically connect to network

It's possible you are affected by https://bugs.launchpad.net/cloud-init/+bug/1892851.  We anticipate this bug being fixed for Ubuntu 20.10 shortly, and for the fix to be backported to Ubuntu 20.04 LTS soon.  We have not committed at this time to backporting this fix to Ubuntu 18.04 LTS; the quickest way for you to get the fix will be to use Ubuntu 20.04 LTS intead of 18.04 LTS.


With new Guake versions (>= 0.8.5), moving the window is pretty easy though. You just have to go to preferences --> General --> Placement and check the Bottom align window instead of top align checkbox.


How do I carry my variables from a Bash script into a Perl one?

Making variables available to child process in shell script can be done either by exporting variables

export foo=bar

Or by calling program with variables prepended

foo=bar ./my_prog.pl

In either case you will need to call ENV on them inside perl script

my $barfoo = $ENV{'foo'};


Have a look at the solaar package: apt install solaar solaar-gnome3. This package is designed for use mainly with Logitech wireless keyboards, but also supports some USB keyboards, sometimes with limited functionality.
If you have any success, please consider contributing here: https://pwr-solaar.github.io/Solaar/devices
If this doesn't work, consider building the latest version with the instructions here: https://pwr-solaar.github.io/Solaar/installation


Are we not supposed to have unallocated hard disk space during Ubuntu installation?

The short answer is: No, the presence or absence of unallocated space has nothing to do with the subsequent boot problems you encountered.

To install Linux, the disk must contain either unallocated space in which the Linux installer can create partitions or partitions that already exist and that the installer can take over for use by Linux. If the disk contains neither of these, the installer will shrink an existing partition to make room for Linux. The details of which of these options is best supported and how they're done depend on the distribution and the options you choose during installation. Although the choices you (or the installation program) make during installation can affect the boot process, a complete failure to boot after installation indicates a bug.

On a working EFI-based computer, the computer's NVRAM holds a list of boot loaders and the order in which they're to be used. Thus, you can set GRUB to boot before Microsoft's boot loader, as an example. In your case, many EFI-based HP computers are known to have a bug that makes them ignore EFI boot variables. Instead, the computer blindly boots the Windows boot loader (EFI/Microsoft/Boot/bootmgfw.efi). This is almost certainly the problem that you encountered.

Ubuntu's Boot Repair tool juggles the boot loaders, moving Microsoft's boot loader to another name and placing a copy of GRUB where the Microsoft boot loader used to reside. It makes several other similar changes. The end result is, as you've observed, an explosion in the number of boot entries on the GRUB menu. If you were using a non-buggy EFI, I'd recommend undoing the Boot Repair changes by re-running it and using the "Restore EFI Backups" options on its advanced menu, as described here. If you do this, though, you'll wind up back with a computer that boots straight to Windows. You might still want to do this and then do a less ham-fisted repair yourself, in any of three ways:

You can boot to Windows and use Windows' own bcdedit command to set GRUB as the default boot loader. Open an Administrator Command Prompt window and type bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi. (This assumes that you've disabled Secure Boot. If it's enabled, substitute shimx64.efi for grubx64.efi in this command.) This option might not work, but if it does, it will result in GRUB starting up by default and showing fewer boot options.
You can boot a Linux emergency disc, mount the ESP somewhere convenient, copy EFI/Microsoft/Boot/bootmgfw.efi to some other name (I recommend moving it down one level), and copying EFI/ubuntu/grubx64.efi to EFI/Microsoft/Boot/bootmgfw.efi. (If you're booting with Secure Boot active, copy shimx64.efi over bootmgfw.efi and also place a copy of grubx64.efi, under that name, in the EFI/Microsoft/Boot directory.) You'll also need to run update-grub to have GRUB regenerate its boot list and create an option to boot Windows.
After undoing the Boot Repair operation from your regular Ubuntu setup but before rebooting, install the Debian package of rEFInd. Once it's installed, type sudo mvrefind.sh /boot/efi/EFI/refind /boot/efi/EFI/Microsoft/Boot. This places rEFInd as the default boot loader in place of Microsoft's boot loader, using a hack that's similar to what Boot Repair does; but it should result in fewer redundant boot entries. There are likely to be at least two ways to boot Linux, though: One via GRUB and one more directly. If both work, you can uninstall GRUB (and perhaps manually delete its /boot/efi/EFI/ubuntu/grubx64.efi file) to remove the GRUB entry. Note that this option requires additional steps if you're booting with Secure Boot active.

Note that you need to do only one of these things, although if you try one and it doesn't work, you can try another one. I recommend backing up the entire ESP before you begin so that if you make a mistake, you can restore the original state of the ESP. A simple file-level copy or creating a tarball should suffice for the backup.


Yep. grep will be your friend here.

Simply do something like this:

cat file.txt | grep wordtomatch


Test whether Ubuntu is vulnerable to (CVE-2016-4484)

See the security website from Canonical on this. All releases have a "needed" so there is no fix yet for them.

So if you match the conditions for this bug you can  affected. For 1 you need to be using Linux Unified Key Setup (LUKS), cryptsetup. So your partition needs to be using encryption. If you do not ... you do not have a problem. (More info at hmarco.org)

The fix is rather easy, just run this commands to add panic parameter to your boot configuration:

sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="/GRUB_CMDLINE_LINUX_DEFAULT="panic=5 /' /etc/default/grub grub-install
sudo grub-install

panic=5 to your options preventing this problem. This is the number of seconds you want to initiate the reboot after the panic. Adding the panic parameter to the kernel entry in the grub configuration will prevent a shell.


Removing Windows 7 from dual boot, what would be the best method out of the following options

Hello and welcome to Ubuntu. Both reinstalling (and choosing 'Erase disk and install Ubuntu') as well as deleting the windows partition with GParted will do the trick. If you dont mind reinstalling I would go for that because it's easier.
I was however triggered by the last part of your comment:  .. then deleting GRUB..
Don't delete GRUB! You will still need to have GRUB to launch Ubuntu, even if you dont have windows anymore. It isn't only for dual booting scenario's. Just thought I would clear that up.

Good luck!


Update: I've done some searching around and I've found the solution. You need to add:-

Option "TopX" "0"
Option "TopY" "0"
Option "BottomX" "21600"
Option "BottomY" "12150"

I chose those values to force set the tablet's resolution to match the aspect ration of the monitor and it works fine. Also you need to use nano or any editor of your choice given that you need permissions to edit the file.


ZFS should be backwards compatible, as long as you don't upgrade the on-disk zpool and zfs versions beyond what the oldest/ lowest version  ZFS system supports.

Also ZFS should be compatible between distributions, but I have no experience dong it.


Disable switch-applications(Alt+Tab) using shell script or python in ubuntu 16.04

Try to change it with dconf (from dconf-cli package):

dconf load / << EOF
[org/compiz]
current-profile='unity'

[org/compiz/profiles/unity/plugins/unityshell]
alt-tab-prev='Disabled'
launcher-switcher-prev='Disabled'
alt-tab-forward='Disabled'
launcher-switcher-forward='Disabled'
alt-tab-forward-all='Disabled'
alt-tab-prev-all='Disabled'

[org/compiz/profiles/unity/plugins/switcher]
prev-all-key='Disabled'
prev-key='Disabled'
next-all-key='Disabled'
next-key='Disabled'

[org/compiz/profiles/unity/plugins/staticswitcher]
prev-all-key='Disabled'
next-all-key='Disabled'

[org/compiz/profiles/unity-lowgfx/plugins/unityshell]
alt-tab-prev='Disabled'
launcher-switcher-prev='Disabled'
alt-tab-forward='Disabled'
launcher-switcher-forward='Disabled'
alt-tab-forward-all='Disabled'
alt-tab-prev-all='Disabled'

[org/compiz/profiles/unity-lowgfx/plugins/switcher]
prev-all-key='Disabled'
prev-key='Disabled'
next-all-key='Disabled'
next-key='Disabled'

[org/compiz/profiles/unity-lowgfx/plugins/staticswitcher]
prev-all-key='Disabled'
next-all-key='Disabled'
EOF

Notes:

this will disable all occurrences of Tab key.
on my VirtualBox 16.04 LTS has two Compiz profiles - unity and unity-lowgfx. If you are sure that you have only unity you can skip unity-lowgfx.

You can revert to default settings with

dconf reset /org/compiz/profiles/unity-lowgfx -f
dconf reset /org/compiz/profiles/unity -f

then logout and login again.


How to remove one line from repository with sed

You can use any* symbol to delimit the search/replace strings which does not conflict with symbols in the strings, as long as you use it consistently, e.g.:

sudo sed 's#deb http://downloads.sourceforge.net/project/xenlism-wildfire/repo deb/##g' /etc/apt/sources.list

This reduces the need to escape a problematic character (which could be done using \ as an escape).

*I am sure there are exceptions, especially if using older versions of sed, but I'm not aware of any limitations off hand.


After upgrade from 14.04 to 14.10, themes and icons are missing

Try this. Once you are booted up to your desktop... press CTRL + ALT + F1.

apt-get install --reinstall ubuntu-desktop
apt-get install unity
apt-get purge nvidia* bumblebee*
apt-get install nvidia-prime

shutdown -r now

If issue persists, Try switching the terminal (CTRL+ALT+F1) and then remove the configuration file ~/.config/dconf/user like this:

(this action will remove your GNOME 3 settings)

sudo service lightdm stop
rm ~/.config/dconf/user
sudo service lightdm start

Hope this helps!


some true font does not work when installed system wide

It turns out the permission of those ttf was wrong. It was 640 which prevent other users to read. We need to change it to 644.


Insert output of shell script into text editor?

Change the original bash script as follows:

#!/bin/bash
# takes unix timestamp and converts to base62
# HT: https://stackoverflow.com/a/14472352/232251

function u2b {
  v=$(date +%s)
  BASE62=($(echo {0..9} {a..z} {A..Z}))
  for i in $(bc <<< "obase=62; $v"); do echo -n ${BASE62[$(( 10#$i ))]}
  done
}
r=$(u2b)
result=$(echo ${r: -4})
echo $result # for testing only, this line can be optionally deleted afterwards
gedit - <<< $result # redirect output into gedit

The second to last line that says echo $result is only used for testing the script. It can optionally be deleted.


I am currently using 19.04 and I got "No new release found for 19.10"

Upgrades from previous versions are only switched on by the release team when they are are happy that there are no massive upgrade bugs hiding anywhere.

In the past, this has varied from enabling them later on the actual release day, all the way to nearly a week after release. There is absolutely no fixed rule.

In the case of this release, when I queried with Adam Conrad (Ubuntu Release Team) on IRC on Friday 18th October, I was told that they were vaguely undecided on whether to 'just do it' that day or 'maybe wait for a weekend of potential bugs to roll in and re-evaluate on Monday'. Obviously the latter won out.

As have been explained you can force the upgrade by appending '-d' when manually running the release upgrade tools. This has the effect of making the release upgrader check against this development release meta file where Eoan is still the development release and upgradable to, instead of the proper stable release meta file where it has not been added yet. If you do so before before the release team decide to pull the trigger, you are basically becoming an at your own risk tester of this process.

Rik Mills.

K/Ubuntu Developer


How can I revert back from an upgrade to the Proposed repository?

Here's a more general way to revert from locally installed packages, proposed and backports packages to the stable+updates channel. While the other answers are correct and work in a similar way, I think this is a more elegant approach.

Make sure you removed the entries of -proposed or -backports in your /etc/apt/sources.list and /etc/apt/sources.list.d/* files.
Add an apt-preferences file, e.g. /etc/apt/preferences.d/99-back-to-stable-updates containing (for precise here - replace with your version):

Package: *
Pin: release a=precise
Pin-Priority: 1001

Package: *
Pin: release a=precise-updates
Pin-Priority: 1001

Package: *
Pin: release a=precise-security
Pin-Priority: 1001

Package: *
Pin: release a=precise-proposed
Pin-Priority: -10

Package: *
Pin: release a=precise-backports
Pin-Priority: -10

This pinning of > 1000 will make apt force a downgrade on packages from that channel and a priority of < 0 on the -proposed and -backports channels will make remove any additional packages too.
Now run

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

Inspect the proposed solution apt will give you, and if you think it's okay, then accept it. If you need to check on why and what version it will be downgraded to, check this with apt-cache policy packagename to see what versions are available and what apt decides is the candidate for installation.
Remove the /etc/apt/preferences.d/99-back-to-stable-updates file again, as it's not needed anymore.

Thanks to mlind on the Ubuntu forums for this inspriation on pinning in his post from more than 5 years ago - yet it helped me out pretty well today.


Big problem with Broadcom 4313 connecting/staying connected to ubuntu 12.10

Didn't try it in 12.10, but sudo iwconfig wlan0 power off worked most of the time in 11.10. This disables the power management and runs wireless at full power all of the time.

edit: try this

open terminal (ctrl-alt-t)
type sudo nano /etc/modprobe.d/blacklist.conf
scroll to the bottom od the file and add blacklist bcma
save and exit (ctrl-x)
reboot.

edit:

got one g6 online. first, sudo apt-get install bcmwl-kernel-source. these are the contents of /etc/modprobe.d/blacklist-bcm43.conf:

blacklist b43
blacklist b43legacy
blacklist ssb
blacklist bcm43xx
blacklist brcm80211
blacklist brcmsmac
blacklist bcma

after reboot try sudo iwconfig ethX/wlanX power off


Serious error on first attempts to dual boot Ubuntu 14.04 with Win7

First

If you need to, download the .iso from here from ubuntu http://www.ubuntu.com/download/desktop and this time just leave the .iso as is and do not compress the file. (You have to right-click on the .iso to burn the Ubuntu installation disk).

If you copy and paste the .iso into the DVD folder and burn it, it will not work.

The following was taken from http://www.ubuntu.com/download/desktop/burn-a-dvd-on-windows

Next . . .

How to burn a DVD using Windows7/8

To install Ubuntu on a computer that currently runs Windows, you need to download the installation file and burn it onto the DVD, which you can then use to install Ubuntu. Once you’ve downloaded the file, closely follow the instructions below to burn your DVD.

When you are done, the burned DVD should contain a few files and should look something like this

If the contents of the burned DVD is the single .iso file like this, you did something wrong.

Next

Insert the DVD in the DVD drive, save any unsaved work you may have on your computer, and power-off the device.

Turn the computer back on and make sure your BIOS settings are set to boot the DVD drive First on the list of boot devices.

On the Toshiba Satellite, F12 is the button you need to press to enter the BIOS settings directly after turning on the computer (Your's may be different). Select save and exit and your computer should boot Ubuntu properly.

Finally

It is usually recommended you use a USB device to install Ubuntu rather than a DVD if your device is capable of selecting a USB drive as a boot device. The BIOS setting for a USB installation is the same as for the DVD; place the USB drive at the top of you list of boot devices to boot first.

You will need to download Universal-USB-Installer-1.9.5.3.exe

More information can be found at the following:

http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/

http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows

http://www.ubuntu.com/download/desktop/burn-a-dvd-on-windows

http://www.ubuntu.com/download/desktop

https://wiki.ubuntu.com/TrustyTahr/ReleaseNotes

If you run into any errors, please post them.


To get the latest vim updates run the following commands:

sudo add-apt-repository ppa:pkg-vim/vim-daily
sudo apt-get update && sudo apt-get upgrade

You should know also that the latest means not always the most stable ones.


How do I use opencl on blender, libreoffice, davinci but unfortunately with AMD graphics?

There's not enough information here to diagnose the problem. We need to see:

Motherboard chipset, PCIe 2.0 or 3.0?
What video card do you have?
How was amdgpu pro deb installed exactly
Logfiles
Any additional X server config in /etc/X11/xorg.conf.d/
what driver is actually assigned to your card?

$ lspci -k -nn -s 01:00.0
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X] [1002:67df] (rev ef)
        Subsystem: Gigabyte Technology Co., Ltd Radeon RX 570 Gaming 4G [1458:22f7]
        Kernel driver in use: amdgpu
        Kernel modules: amdgpu

As a first line of sanity. Blacklist the radeon kernel module and increase logging on the amdgpu module by appending amdgpu.dc_log=1 to your grub cmdline.

You may have to force DRI3 for it to run. You can accomplish that by creating the following file:

/etc/X11/xorg.conf.d/20-amdgpu.conf

Section "Module"
    Load "dri3"
    Load "glamoregl"
EndSection

Section "Device"
  Identifier "AMD"
  Driver "amdgpu"
  Option "Accel" "on"
  Option "AccelMethod" "glamor"
  Option "TearFree" "auto"
  Option "DRI" "3"
EndSection


ubuntu dual boot 14.04 dell inspiron - wifi does not work

You need to upgrade the kernel.

Connect to internet by wire or some other way and run in terminal:

sudo apt-get install linux-generic-lts-wily
wget http://mirrors.kernel.org/ubuntu/pool/main/l/linux-firmware/linux-firmware_1.156_all.deb
sudo dpkg -i linux-firmware_1.156_all.deb
sudo cp /lib/firmware/iwlwifi-7265D-13.ucode  /lib/firmware/iwlwifi-3165-13.ucode

and reboot.


So, it turns out that I had to add myself to the audio group. I had originally seen (in instructions for Ubuntu somewhere) that I should not do this. However, I can't seem to get audio working any other way.

If someone has another suggestion because they think I am doing this wrong, then please let me know. Otherwise, I'm going to mark this as the answer.


Set an backgroud image in ubuntu file manager

This is a duplicate and the answer that you're looking for can be found at How do I theme the Nautilus background image?

Just follow that link and the instructions are all there.


A more comprehensive guide.

Assumptions:

Starting with a naked Ubuntu Server; only SSH installed. Configuration done via SSH from another machine, not locally.

Install Kodi and pre-reqs:

sudo apt-add-repository ppa:team-xbmc/ppa
sudo apt-get update
sudo apt-get install xinit kodi
sudo apt-get install xserver-xorg-video-intel # If you need the Intel video package)

Create a kodi user & set groups:

sudo adduser --disabled-password --disabled-login --gecos "" kodi
sudo usermod -a -G audio kodi
sudo usermod -a -G video kodi
sudo usermod -a -G input kodi
sudo usermod -a -G dialout kodi
sudo usermod -a -G plugdev kodi
sudo usermod -a -G tty kodi

Reconfigure X11 to allow kodi to use it

dpkg-reconfigure x11-common # Change to Anybody

Create / Edit the Kodi Service

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

Should look like this: (via @SauliusZ)

[Unit]
Description=Job that runs Kodi
After=default.target graphical.target getty.target sound.target

[Service]
User=kodi
Restart=always
RestartSec=1s
ExecStart=/usr/bin/xinit /usr/bin/kodi --standalone -- -nocursor

[Install]
WantedBy=default.target

Reload and enable the daemon

sudo systemctl daemon-reload
sudo systemctl enable kodi

Test Kodi

sudo service kodi start # should launch Kodi
sudo service kodi stop # should stop Kodi

Reboot to make sure it runs at boot


Do I need to do maintenance on Ubuntu like you do on Windows?

Actually Fragmentation is there in NTFS where you install Windows, so you need to do defragmentation. while coming to Ubuntu , we  install it in EXT type partitions & they don't need defragmentation because EXT not stores the data in fragmentation.

So no need of defragmentation for Ubuntu.To know more about fragmentation

while coming to cache , its a single word but connected to all areas of Ubuntu.

If you are running out of space , by clearing cache you can save your space.I do use bleachbit to clear cache that will remove apt-get cache , autoremove , autoclean , browsers cache and other in Ubuntu system. Removing old kernels also gives you more free space.

To know more about clearing cache


Font Substitution -- "Roboto, Bold" for "Roboto Bold"

This is really not a definitive answer, but rather an attempt to dig a bit deeper into the issue, which possibly can help the progress with solving it.

I installed the fonts-roboto-unhinted package, and had a look at the Roboto-Bold.ttf file.

cd /usr/share/fonts/truetype/roboto/unhinted/RobotoTTF
fc-query Roboto-Bold.ttf | grep -E 'name:|family:|style:'
    family: "Roboto"(s)
    style: "Bold"(s)
    fullname: "Roboto Bold"(s)
    postscriptname: "Roboto-Bold"(s)

It looks like your designer is using "fullname", while LibreOffice focuses on "family" and "style" to refer to the desired font / font weight. What this shows is that all those keys are available also on Ubuntu.


How to set default scale for bc calculator?

As muru said, the scale of the result is the maximum scale of the expression involved. but if you want to set the scale for division (want to set the truncation level), place a file .bc in your home (ex. /home/yourid/.bc) and edit it to contain (the file name can be anything)

scale=8  (whatever you want)

Then in your .cshrc file put

setenv BC_ENV_ARGS '/home/yourid/.bc'

Thisway, your default scale is set to 8.

bc 1.06.95
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
1/3
.33333333


I have the same problem. The reason:

I have a very old laptop and when my battery and laptop charger broke, I purchased "generic" ones on ebay and not the original from Lenovo. The battery does not create any problems but when the generic charger is connected, I experience the same issues. On Windows it happens what you describe but on Ubuntu 14.04 (dual boot) I can't even move the cursor...

Use an external mouse or unplug the charger and see if the problems goes away.

Maybe you have the same problem.


How to Troubleshoot Graphics Card/Driver problem in Ubuntu

Here's a few useful commands and what they do:

Check hardware acceleration and OpenGL

This is where I usually start. If something gets messed up, like your old card no longer being supported by the current driver, it will usually show here first.

/usr/lib/nux/unity_support_test -p
OpenGL vendor string:   X.Org
OpenGL renderer string: Gallium 0.4 on AMD RV770
OpenGL version string:  3.0 Mesa 10.1.3
Not software rendered:    yes
Not blacklisted:          yes
GLX fbconfig:             yes
GLX texture from pixmap:  yes
GL npot or rect textures: yes
GL vertex program:        yes
GL fragment program:      yes
GL vertex buffer object:  yes
GL framebuffer object:    yes
GL version is 1.4+:       yes
Unity 3D supported:       yes

Check Graphics Card ID and Installed Driver

This is useful when you suspect your old card may no longer be supported, or you're simply not sure which specific variant of a graphics card you have, or you're not sure which driver you are running (open source or proprietary?). Run this command as sudo, you get more complete output.

sudo lshw -c video
  *-display
       description: VGA compatible controller
       product: RV770 [Radeon HD 4850]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:04:00.0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi vga_controller bus_master cap_list rom
       configuration: driver=radeon latency=0
       resources: irq:41 memory:d0000000-dfffffff memory:fdce0000-fdceffff ioport:dc00(size=256) memory:fdcc0000-fdcdffff

Driver support for ATI chips is listed by GPU code, not my graphcis card model number. Here we have the RV770 GPU and running the radeon (open source) driver.

Which Version of the Driver Am I Running? Is It the Latest?

That's 2 questions.
First, which version of the driver are you running. You need to know the name of the Ubuntu package. The output of the previous command told us the driver is called 'radeon', but the package name may be quite different. Use apt to search for an installed package containing the name 'radeon'. Use a wild-card (*) before and after to get everything and anything containing the word radeon.

sudo apt-get update
sudo apt list --installed *radeon*
Listing... Done
libdrm-radeon1/now 2.4.67-1ubuntu0.14.04.1 amd64 [installed,upgradable to: 2.4.67-1ubuntu0.14.04.2]
xserver-xorg-video-radeon/trusty-updates,now 1:7.3.0-1ubuntu3.1 amd64 [installed]

This command found 2 installed packages, looks like the first one has an update available, the 2nd one doesn't say, suggesting it's up-to-date. To make sure, use apt to find the latest version.

apt show xserver-xorg-video-radeon | grep -i version
WARNING: apt does not have a stable CLI interface yet. Use with caution in scripts.
Version: 1:7.3.0-1ubuntu3.1

That's the version we have.


After installing Ubuntu, Windows became unbootable but files are still there

If you can boot Ubuntu open a terminal and type:

sudo update-grub

If you cannot boot into Windows via grub menu hold down shift key after MB Post. That will force display menu. There you can see windows boot option. If it does not work try to edit /etc/default/grub. There must be boot delay and show boot menu options.

sudo gedit /etc/default/grub

If you can see boot menu and windows option but you can not boot try to press e and modify (hd0,msdos1) by changing numbers ieg: (hd3,msdos2)

If nothning improves try to boot into ubuntu and re-install grub via

sudo grub-install /dev/sda
sudo update-grub

change sda to your disk device link it may be sdb or sdc

If nothing changes then try boot recovery of windows install cd or usb
and insert ubuntu install cd reinstall grub over it again with

sudo grub-install /dev/sda
sudo update-grub

If it does not work either there may be something wrong with grub, uninstall it with configurations and reinstall it by

sudo apt-get purge grub
sudo apt-get update
sudo apt-get install grub
sudo grub-install /dev/sda
sudo update-grub

If it fails try to reinstall both operating systems, windows first ubuntu  second, changing disks to gpt instead of mbr (msdos in linux)... Sometimes grub with efi does not work with mbr ... It was a bug dont know current status.


Wifi disconnects abruptly and frequently

Installation of Ralink RT3290

fork this repo
cd into it
compile the driver
install the driver

comand for that (it will ask your user password to apply changes to system):

git clone https://github.com/pkeeper/rt3290sta.git
cd rt3290sta
make
sudo make install
sudo modprobe -r rt2800pci
sudo modprobe rt3290sta

Now you need to make it load on startup. Blacklist the rt2800pci driver in /etc/modprobe.d/blacklist.conf and add rt3290sta to /etc/modules.


Virtualbox - how to route sound from Ubuntu host to Windows guest?

It's certainly not impossible, others report having the microphone working in their windows guest.

Before starting the vm, enable audio in the vm's audio settings.
In the windows guest, install the virtualbox guest additions to get the soundcard driver. Alternatively you can install it directly

If it doesn't work, try the workaround in this question:
"How can I get my microphone to work in a virtualbox windows xp guest"

Good luck !


how to uninstall any other OS without uninstalling Lubuntu

I would think just format the drive or partition Mint is installed on. after that install grub-customizer and remove the Linux mint entries from your grub list. If you want to add the disc space of the mint install to the Lubuntu install you will be able to do so wit gparted, but you should do it from a live cd/usb because you need to unmount the Lubuntu partition


Ubuntu 18.04 with VS Code - top of each row of characters in terminal is cut off

You can add "window.titleBarStyle": "custom", in VS Code Settings


Building SANE from git-source produce backend missmatch on 12.04 even if built locally

Ok, I had the same problem, this is how i fixed it.

With help from http://www.sane-project.org/README.linux

First of all, Disconnect your scanner, and start all over.
I uninstalled Xsane, and everything related through synaptic. I also uninstalled everything what was configured and make install by the sane-backends-git.
You do it like this:

    $ cd [your sane-backends-git folder]
    $ sudo make uninstall

After that I checked wheter or not I had any libsane.so.1 left, (and any other archives related to sane).

    sudo find / -name libsane.so.1

Ok , all clear.

Installing xsane again with synaptic, and some dependencies

xsane 0.998-3ubuntu2
libsane 1.0.22-7ubuntu1
libsane-common 1.0.22-7ubuntu1
xsane-common 0.998-3ubuntu2
sane-utils 1.0.22-7ubuntu1

testing the output of scanimage -V, just for fun

scanimage (sane-backends) 1.0.22; backend version 1.0.22

Next steps, according to the README.linux 1.0.24.git documentation.

first locate the libsane.so.1

sudo find / -name libsane.so.1

And, depending on your system, take note of the folder where libsane.so.1 is located. In my case:

/usr/lib/i386-linux-gnu/libsane.so.1

then, from your sane-backends-git folder

./configure 2>&1 | tee ~/thiscommandwritesalogfiletoyourhomefolder.log

The 2>&1 | tee writes a log-file to where you define it. That can come in handy, not obligated though.
Please check the output of configure that usb is supported. This info
comes with one of the last lines. If not, you need to install libusb-dev
now and rerun configure.

install sane-git to /usr/local/lib/

$ make && sudo make install

Then one of most important parts, the creation of the symbolic links. Note that here you will have to change the foldername of the one where libsane.so.1 is located. (see above how to do that)

$ cd /usr/lib/i386-linux-gnu
$ sudo ln -sf /usr/local/lib/libsane.so.1.0.24 libsane.so.1
$ sudo ln -sf /usr/local/lib/sane/libsane.la libsane.la
$ cd -

copy udev rules file
$ sudo cp tools/udev/libsane.rules /etc/udev/rules.d

reconnect your scanner to the usb bus

join group scanner

sudo adduser [YOU] saned
sudo adduser [YOU] scanner

and logoff and login again

that should do it.
scanimage -V should give the latest libsane backend, and Xsane should work with no problem.

Hope it helped you.

And Note, If you have problems with Xsane shutting down, just delete the in your home folder the hidden file .sane, type Ctrl-H in nautilus, and you will find it.


Install Ubuntu 13.10 on MSI GS 70 Stealth - NVIDIA GTX 760 / Intel HD 4000

Here are a few more options to try to fix the video (?) problem:
Options for Video problems:

nomodeset
acpi=0
acpi_osi=linux
acpi_backlight=vendor
noalpic
i915.i915_enable_rc6=1
video=1280x1024-24@60
video=VGA-1:1280x1024-24@60

To allow Nvidia hybrid machines to boot.

nouveau.blacklist=1

To slow SSDs to allow them to boot:
libata.force=noncq


What happens to Python 2.7 if I upgrade Ubuntu 16.04 to 18.04?

Ubuntu 18.04 comes with Python 2.7.15 and 3.6.5. By default only 3.6.5 is installed but if you upgrade from a system that already has Python2 installed or install a package that requires Python2 you'll get Python 2.7.15, too.

As there are a lot of programs using Python and official support for Python2 is going to end soon there's likely no way way to use a modern desktop Linux distro without having some version of Python3 installed.


If you have verified that installation was made after compilation, then you can update pkgconfig for opencv (/usr/local/lib/pkgconfig/opencv.pc) to include 3rd party. Use below as a guide to update it

# Package Information for pkg-config

prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
libdir3rd=${exec_prefix}/share/OpenCV/3rdparty/lib
includedir_old=${prefix}/include/opencv
includedir_new=${prefix}/include

Name: OpenCV
Description: Open Source Computer Vision Library
Version: 3.1.0
Libs: -L${libdir} -L${libdir3rd} -lopencv_shape -lopencv_stitching -lopencv_objdetect -lopencv_superres -lopencv_videostab -lippicv -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_core -lopencv_ts
Libs.private: -L/usr/lib/x86_64-linux-gnu -lQt5Core -lQt5Gui -lQt5Widgets -lQt5Test -lQt5Concurrent -lQt5OpenGL -lwebp -lpng -lz -ltiff -ljasper -ljpeg -lImath -lIlmImf -lIex -lHalf -lIlmThread -lgstvideo-1.0 -lgstapp-1.0 -lgstbase-1.0 -lgstriff-1.0 -lgstpbutils-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 -ldc1394 -lv4l1 -lv4l2 -lavcodec -lavformat -lavutil -lswscale -lavresample -lgphoto2 -lgphoto2_port -lexif -ldl -lm -lpthread -lrt -lGLU -lGL -ltbb -latomic
Cflags: -I${includedir_old} -I${includedir_new}


How to install a single package from Launchpad

If you are refering to this bug:

https://bugs.launchpad.net/ubuntu/saucy/+source/gtk+3.0/+bug/1199877

You just have to enable proposed updates and update, you can disable them after that.

Software Center>Edit>Sources


Ubuntu on Windows closes/crashes as soon as it opens

I just disabled Legacy Console in properties of Command Prompt.


You can simply run this to do the conversion.

ffmpeg -i neha.avi -acodec libvorbis output.ogg

Dont bother to put any options for bitrate or aspect ratio. It will choose for itself.
You can set the max audio bitrate to 192000 (or whatever value you want, upto 320000 AFAIK) by adding -ab 192000 anywhere in the command. Also, you set the video bitrate at say, 1200kb (or any other value), by including -b 1200kb in the command.

So here is the command in the end, (the order of options dont matter, since you asked. nothing to worry)

ffmpeg -i neha.avi -acodec libvorbis -ab 192000 -b 1200kb output.ogg

Here is a good guide to all that you might want to do.


You could use the man pages to get details about what the commands combined here do. Here's a little about the purpose of those commands here:

"$([ $? = 0 ] && echo terminal || echo error)"

This would echo terminal or error as per to the execution status - successful or fail respectively of the last command; and the result is as the value to the -i switch of notify-send for displaying the icons.

history|tail -n1

..to get the last command executed.

and sed to parse the text to display it with notify-send message.

To understand these try the following:

true; echo "$([ $? = 0 ] && echo terminal || echo error)"

..this would echo terminal.

false; echo "$([ $? = 0 ] && echo terminal || echo error)"

..this would echo error.

notify-send -i terminal 'Please note the icon..' 'the default icon for the terminal has been used. You can specify any other icon of your choice'

And,

echo $?

..is very useful to know the exit value of the last command executed.

echo "$(echo "the output of this command enclosed within \$(...)") is being supplied here in the outer echo command where is used as an argument."

..nested echo as a simple demo for using $() in a command combo.


why can user increase nice of process but decrease requires root?

Yes. When every user in the system has the possibility to decreace the niceness of his process, then every user can cause other processes to starve.

Process priorities in the linux kernel do mean something. If you give a process the nice value of -20 it gets huge chunks of cpu time. That's why only root can decrease those values.

Addition suggested by Eliah Kagan:

  Why users cannot get their own processes back to the niceness level
  they themselves started them with?

The point is, the system doesn't note who did the increase of the niceness. So, there is no mechanism to find out whether you or root did the incease.

Another approach is to say: a normal user shouldn't be able to overwrite the actions of a priviledged user. If root is logged in and he wants to change the niceness of your processes to 20: he can, and you should be prohibited to undo that changes. Untill the kernel doesn't remember who did the niceness changes, you will be prohibited.

Maybe some day the linux kernel developers include that functionality to the kernel code. You can do a feature request. But, be warned, kernel developers don't like new stuff just because it's cool.


Upgrade Ubuntu 14.04 to 16.04 keep failing

I finally restarted the upgrade process, by restoring VPS droplet from a snapshot, and when the 1022 ssh dialog appearing, I typed y and it continued to the next process until finished.

I guess when I typed n before, the I got kicked out from the ssh session and it broke the upgrade process.

a lesson that can be learned here, always take a backup / snapshot of your servers, you'll never when you need them :)

Hopefully this helps anyone who deal with the same issue.


I finally figured it out after a month! This is how it is done

Create a folder in your Documents  named TestEmails

Open the terminal and enter the following command
sudo chmod 777 ~/Documents/TestEmails/

Open the php.ini file that is located in your /opt/lampp/etc directory

Press CTRL+F and then type "mail function"

Under the [mail function] remove comment from sendmail_path

Set sendmail_path to    sendmail_path = "cat > /home/USERNAME/Documents/TestEmails/date '+%Y-%m-%d - %H-%M-%S'.eml" BUT MAKE SURE TO REPLACE USERNAME with your own username

If Apache is running, restart it