Make mouse left-handed and touchpad right-handed

I understand your frustration, but this problem can be solved very simple with the help of xinput tool.

First plug in your USB mouse, then run the following command:

xinput list

to see the id of your mouse. The output of above command it can be similar to:

xinput | cat
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=14   [slave  pointer  (2)]
⎜   ↳ USB Mouse                                 id=11   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ...

In the above example the USB mouse has id=11. We will use this id in the following command which will swap buttons to be left handed only for the USB mouse (and not for tauchpad):

xinput set-button-map 11 3 2 1

In general:

xinput set-button-map id 3 2 1

To revert the change, use:

xinput set-button-map id 1 2 3

To make the change permanently, add the following command at Startup Applications (search in Dash for Startup Applications):

sh -c "xinput set-button-map id 3 2 1"

Update:

Since the id might change after reboot but the name of the USBmouse not, you could also grep for the name of the mouse and apply it. To skip the details reg. picking out the name the final solution looks like:

for id in `/usr/bin/xinput list | /bin/grep 'USB Mouse' | /bin/grep -o [0-9][0-9]`; do xinput set-button-map $id 3 2 1; done;

pack it into the above mentioned Startup Applications you'll get finally:

sh -c "for id in `/usr/bin/xinput list | /bin/grep 'USB Mouse' | /bin/grep -o [0-9][0-9]`; do xinput set-button-map $id 3 2 1; done;"


How can I fix intermittent iSight camera functionality on a Macbook Pro 5,2?

Have you installed the ppa's yet? They got a pacakage for the iSight, that should work :)

https://launchpad.net/~mactel-support/+archive/ppa


ttyrec
ttyrec allows you to record your terminal sessions easily. However, they are recorded in a special format (not video), but the resulting files are smaller, and as such easily transferable.
I use playterm.org as a hosting for my ttyrec files. It allows you to view your terminal recordings over a browser (as if it were a video).
Steps
Recording
sudo apt-get install ttyrec
ttyrec
#Type your commands
git init #Example command
exit

A ttyrec session is similar to a screen session, except that it is recorded. After your recording is complete, a file with .tty extension will be present in your directory. You can upload that file to playterm, or pass people a download link.
Playing
To play the file, they'd need to use the ttyplay command. Just use ttyplay file.tty and it should play your terminal.
Editing
Since you are comfortable with adding audio later, I'd recommend copying the ttyrec file to a normal ubuntu desktop, and playing the recording (using ttyplay) while recording it using a screencasting session. You can record your voiceovers at the same time.
References:

ttyrec Home Page
ttyrec man page


error to deploy of openstack-autopilot on a single virtual machine via KVM

If that screenshot is any indication of the Distro you're running (Utopic) there is a known bug with apparmor that causes the single installer to fail

https://github.com/Ubuntu-Solutions-Engineering/openstack-installer/issues/470

The relevant launchpad bug:

https://bugs.launchpad.net/apparmor/+bug/1408833

You'll want to upgrade your kernel from that proposed pocket and report to our github bug if that fixes the installer issue.


How to make hibernation work on Shuttle SX58H7 (Intel X58 Express)?

Solution:

Add GRUB_CMDLINE_LINUX="acpi_sleep=nonvs" in /etc/default/grub
Run sudo update-grub

Note: The above works in Ubuntu 10.10. However, it breaks hibernation in Ubuntu 11.04. In Ubuntu 11.04, make sure acpi_sleep=nonvs is not in the config and run sudo update-grub.


Unable to install Broadcom BCM43142 on ubuntu with kernels above 5.8.*

In terminal do wget http://mirrors.kernel.org/ubuntu/pool/restricted/b/bcmwl/bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu7_amd64.deb
sudo dpkg -i bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu7_amd64.deb
Reboot
This version should support 5.10
Do sudo apt remove bcmwl-kernel-source then
wget http://mirrors.kernel.org/ubuntu/pool/multiverse/b/broadcom-sta/broadcom-sta-dkms_6.30.223.271-15_all.deb
sudo dpkg -i broadcom-sta-dkms_6.30.223.271-15_all.deb
Reboot


Ubuntu Core timedatectl setting incorrect time, config missing servers, cannot be modified and reverts to UCT after a few minutes

I am marking this as answered, seeing as the main issue - the incorrect time from NTP - can be solved by editing with vi.

I am leaving this up here for anyone else experiencing the same issue, since I could not find a reference to the issue anywhere else when I did a search. Also, as I believe there are some minor defects in the tools used, resulting in the problem occurring, and this serves as a note of that.


I can't click on some things and other problems

First, try to fix Software Center:

Press Alt+F2 to bring up the Run box
Type bash and press Enter.
Run this command: sudo aptitude reinstall software-center

Although you could run the command right from the Run box, starting bash first lets you see status and error messages from the command.


Installing KDE

To install KDE (which it sounds like you may have already done), you install one of the following packages:

kde-plasma-desktop

This will only install a minimal core of KDE apps and utilities.  Good if you want to use KDE but don't need all the applications and utilities that come with it.
kde-full

This will install a more full range of KDE applications and utilities.

If you have other desktop environments installed this will cause you to double-up on a fair few apps (ie, have both the Gnome and KDE equivalent installed).  This is not necessarily a bad thing as it gives choice and lets you (if you want) use anything a native KDE user would use.
kubuntu-desktop

This installs the full Kubuntu desktop which includes the full KDE suite, plus all of Ubuntu's "Kubuntu" look and feel, including the splash screens and greeters.  It also installs additional applications that Kubuntu normally installs, like Kontact and Konversation.

This is not usually recommended if you also have other desktop environments installed, because it changes the splash screen and greeter to Kubuntu.

Selecting KDE when logging in

Before you enter your password upon log-in, you need to open up the drop-down that says "Ubuntu" (which will make you use Gnome/Compiz/Unity, Ubuntu's default) and change it to KDE.


dpkg: error processing package libc-bin (--configure)

Here the reason seemed to be a corrupted /var/cache/ldconfig/aux-cache.

The solution was to do (as root):

rm /var/cache/ldconfig/aux-cache

And afterwards execute

/sbin/ldconfig


You can install same driver a supported way.

First remove what you tried to install by

sudo apt-get purge fglrx*

Then install this driver from Ubuntu repositories

sudo apt-get install fglrx-updates

This will install 15.200 fglrx.


Well, this is a strange problem: see lines 1004-1008 in your syslog. They say:

NVRM: Your system is not currently configured to drive a VGA console
NVRM: on the primary VGA device. The NVIDIA Linux graphics driver
NVRM: requires the use of a text-mode VGA console. Use of other console
NVRM: drivers including, but not limited to, vesafb, may result in
NVRM: corruption and stability problems, and is not supported.

Google reveals this thing you can try:

Open up your /boot/grub/grub.cfg file as root with gksu gedit /boot/grub/grub.cfg. Fin the line for your current Linux version that begins with linux   /boot/vmlinuz-<kernel version>. To the end of that line, add the options video=vesa:off vga=normal. (Source)
Logically, if it's a VGA issue, you could use a DVI or HDMI cable instead of a VGA cable to connect your monitor.
Turn off UEFI or "Secure boot" in your BIOS.


Change default display of the Ubuntu screen

If you can install Kubuntu (or kde) it's enough to put  some widget. There's exists a big number of them, to keep a picture, to see internet connection speed, weather...


virtualbox guest system broken after installing virtualbox-guest-x11

The problem was here again, that I tried to install the guest settings from an older kernel system (Xubuntu 16.04 as host) in a newer kernel system (xubuntu 17.10(


Capturing only a section of a command output

Using grep

ifconfig | grep -oP '(?<=inet addr:)[\d.]+'

This uses grep's Perl-style regular expressions to select the IP address that follows the string inet.

So, to save that in a variable, just put both commands inside the $():

output=$(ifconfig | grep -oP '(?<=inet addr:)[\d.]+')

The above will save the IP addresses for all active interfaces on your system.  If you just want to save the output for one interface, say eth0, then use:

output=$(ifconfig eth0 | grep -oP '(?<=inet addr:)[\d.]+')

Using awk

ifconfig eth0 | awk -F'[ :]+' '/inet /{print $3}'

/inet / selects lines that contain inet.  On those lines, the third field is printed where a field separator is an y combination of spaces or colons.

Using sed

ifconfig eth0 | sed -En 's/.*inet addr:([[:digit:].]+).*/\1/p'

Alternate ifconfig

There is another version of ifconfig which produces output like inet 1.2.3.4 instead of inet addr:1.2.3.4.  For that version, try:

ifconfig | grep -oP '(?<=inet )[\d.]+'

Or:

ifconfig eth0 | awk '/inet /{print $2}'

Or, use this sed command which works with either version of ifconfig:

ifconfig eth0 | sed -En 's/.*inet (addr:)?([[:digit:].]+).*/\2/p'


When I use the cog and go to shutdown all I lose is the menu

The command that should be run when it's clicked seems to be:
qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout 0 2 2

See if that works on its own? If not, something's likely wrong with your dbus.


Try sudo  modprobe psmouse i was able to get my touchpad working following this guide.

It look a lot like the one you followed except for that last command. My touchpad also stopped working before i issued that last command.

I hope it helps :-)

p.s. I have the same computer as you do an Insiron 17 R SE


Problem with accent marks in a search in libreoffice calc

U+03AC is a composed character, containing both the alpha and the accent.  So, there is no way to search for the vowel separated from the accent.

To search for either accented or unaccented, use a regular expression:

=SEARCH("διδ[αά]σκω", "εγω διδάσκω")

Another option would be to replace U+03AC with its decomposed sequence throughout your entire dictionary:

U+03B1 U+0301 = ά

Then both of these work:

=SEARCH("διδα\u0301?σκω", "εγω διδάσκω")
=SEARCH("διδα\u0301?σκω", "εγω διδασκω")

EDIT:

Set the formulas of Search.F3:Search.F5 to the following:

=SUBSTITUTE(E3, "α", "[αά]")
=SUBSTITUTE(F3, "ι", "[ιί]")
=SUBSTITUTE(F4, "ω", "[ωώ]")

This produces:

διδ[αά]σκω
δ[ιί]δ[αά]σκω
δ[ιί]δ[αά]σκ[ωώ]

Then for the main lookup formula:

=IFERROR(SEARCH($Search.$F$5, $C$2:$C$1000, 1),"")


You need to install it on the disk selected as primary boot disk in Bios: in your situation, on disk 0. This has no problem (people with only 1 disk has no other option).

If you prefer not modifying your current disk 0, you can install the bootloader on disk 1 and select disk 1 to boot from BIOS. You can after that (if the installer didn't do it already) update grub to find your windows installation and boot it from there too using the grub menu.

EDIT: How to reinstall grub2 from Live CD (or USB)
obs: I think better re-installing grub as you already installed it many times I suppose and this way we are sure it is installed in the right place.

boot with the live USB
check the name of your main ubuntu system partition with sudo fdisk -l (will be /dev/sdb1 or 2 probably in your case)
mount it: sudo mount /dev/sdXY /mnt (obs: sdXY is what you found on previous step)
Reinstall grub2 with: sudo grub-install --root-directory=/mnt /dev/sdX (obs: do not include partition number in /dev/sdX, not sdXY, it is better not to install on a partition) - This should be /dev/sdb for disk1 and /dev/sda for disk 0 and it has to be the disk used by BIOS as primary boot.
unmount the partition: sudo umount /mnt
reboot (select in BIOS the disk you used to install grub as primary boot disk)

If you don't see grub menu at boot, try pressing and holding SHIFT key during boot and the menu should be displayed.

If you don't have windows option in menu, after booting in Ubuntu use sudo update-grub and reboot.

More complete documentation on grub and Ubuntu can be found at: Ubuntu Documentation - Grub2 install


Difference between --rbind and --bind in mounting

You've rightly observed that, with both --bind and --rbind, you see directories under the bind mount.

The difference is that, with --rbind but not with --bind, you see the contents of other bind mounts under the bind mount.

As applied to your example, suppose for simplicity that /home/xyz/def and /home/xyz/mno are empty directories. Suppose further that you then use them as bind mounts, i.e., you use them as mount points in mount --bind or mount --rbind. This causes them to appear nonempty. Then, suppose you run:

mount --bind /home/xyz /home/abc

Then, /home/abc/def and /home/abc/mno both exist, but they appear empty, because you used mount --bind, which is nonrecursive.

In contrast, suppose you instead made /home/abc a bind mount by running this command:

mount --rbind /home/xyz /home/abc

Then, /home/abc/def and /home/abc/mno both exist and they appear nonempty--they have the contents of the /home/xyz/def and /home/xyz/mno bind mounts--because you used mount --rbind, which is recursive.

Here's a fully worked-out example:

ek@Gnar:~$ mkdir original
ek@Gnar:~$ touch original/a-regular-file
ek@Gnar:~$ mkdir original/a-directory
ek@Gnar:~$ mkdir parent-of-mountpoint
ek@Gnar:~$ mkdir parent-of-mountpoint/mountpoint
ek@Gnar:~$ sudo mount --bind ~/original ~/parent-of-mountpoint/mountpoint
ek@Gnar:~$ mkdir nonrecursive-other-mountpoint recursive-other-mountpoint
ek@Gnar:~$ sudo mount --bind ~/parent-of-mountpoint ~/nonrecursive-other-mountpoint
ek@Gnar:~$ sudo mount --rbind ~/parent-of-mountpoint ~/recursive-other-mountpoint

ek@Gnar:~$ tree -F original/
original/
├── a-directory/
└── a-regular-file

1 directory, 1 file
ek@Gnar:~$ tree -F parent-of-mountpoint/
parent-of-mountpoint/
└── mountpoint/
    ├── a-directory/
    └── a-regular-file

2 directories, 1 file
ek@Gnar:~$ tree -F nonrecursive-other-mountpoint/
nonrecursive-other-mountpoint/
└── mountpoint/

1 directory, 0 files
ek@Gnar:~$ tree -F recursive-other-mountpoint/
recursive-other-mountpoint/
└── mountpoint/
    ├── a-directory/
    └── a-regular-file

2 directories, 1 file

ek@Gnar:~$ mount | grep ~
/dev/sda2 on /home/ek/parent-of-mountpoint/mountpoint type ext4 (rw,relatime)
/dev/sda2 on /home/ek/nonrecursive-other-mountpoint type ext4 (rw,relatime)
/dev/sda2 on /home/ek/recursive-other-mountpoint type ext4 (rw,relatime)
/dev/sda2 on /home/ek/recursive-other-mountpoint/mountpoint type ext4 (rw,relatime)


Cloned sdbx partition to sdax. Now Ubuntu boots from sdax instead of sdbx

If you cloned partion A into partition B

Boot into a live Ubuntu session on the computer
Using Gparted set a new UUID on partition B
Update grub on partition A

 sudo su
 mount /dev/sd__ /mnt
 mount --bind /dev /mnt/dev
 mount --bind /proc /mnt/proc
 mount --bind /sys /mnt/sys
 mount --bind /usr /mnt/usr
 chroot /mnt
 update-grub (may get an error about not finding a grub drive on the usb)
 grub-install /dev/sd_
 CTRL-D on keyboard.
 umount /mnt/dev
 umount /mnt/proc
 umount /mnt/sys
 umount /mnt/usr
 umount /mnt

Update grub on partition B

 blkid (copy sd__'s UUID)
 mount /dev/sd__ /mnt
 leafpad /mnt/etc/fstab, fix UUID
 mount --bind /dev /mnt/dev
 mount --bind /proc /mnt/proc
 mount --bind /sys /mnt/sys
 mount --bind /usr /mnt/usr
 chroot /mnt
 update-grub (may get an error about not finding a grub drive on the usb)
 grub-install /dev/sd_
 CTRL-D on keyboard.
 umount /mnt/dev
 umount /mnt/proc
 umount /mnt/sys
 umount /mnt/usr
 umount /mnt

reboot, should...

Boot into the Partition B system (may be listed as Debian, PartA should be an option below)
     check partion in use: lsblk, sd__ is /

 sudo update-grub
 sudo grub-install /dev/sd_
 reboot

Boot into the Partition A system

check partion in use: lsblk, sd__ is /
 if this works you are done


prebuilt ffmpeg packages with QSV support for ubuntu

After some research, got the answer, hopefully useful for sbd else:
Most packages are already available in recent Ubuntus, the only missing one is a properly compiled ffmpeg.
Simple instructions provided by Intel on github:
https://github.com/Intel-Media-SDK/MediaSDK/wiki/Build-and-use-ffmpeg-with-MediaSDK
Note that to enable all codecs, default hardware-accelerated codec packages have to be replaced with non-free versions, as explained here:
https://github.com/Intel-Media-SDK/MediaSDK/wiki/Intel-media-stack-on-Ubuntu


Package dependencies cannot be resolved help

You probably need to enable Community-maintained free and open-source software (universe) in Software Sources, either via Ubuntu Software Center or Synaptic depending on which version of Ubuntu you're using.


Newer Python versions already include pip. Choose the proper version from Download Python (for me, python-2.7.10.msi) and install it on wine by:

$ wine msiexec /i python-2.7.10.msi/L*v log.txt

To install Python packages on wine, for instance,

$ wine python.exe Scripts/pip.exe install pyinstaller

Successfully installed pyinstaller-3.1.1 pypiwin32-219

Refer to this post Build a Windows executable from Python scripts on Linux for the detailed description.


Sounds like your desktop software got slightly messed up.  As a quick fix, this should work

sudo apt-get install ubuntu-desktop


Trouble installing libflann1.7-dev on ubuntu

The fact I see a mention of maverick in there suggests to me that you have another repository in there. This usually happens when you have a crusty old PPA gumming things up with its own versions.

To double-check this I ran:

$ apt-cache depends libflann-dev
libflann-dev
  Depends: libflann1.7
  Conflicts: libflann-dev:i386

No mention of a crusty maverick version :)

If you run apt-cache policy libflann-dev you will be able to see what versions are available to you, including which repos they're coming from. Spot the dodgy one and nuke it. In my case, here's what I see:

$ apt-cache policy libflann-dev
libflann-dev:
  Installed: (none)
  Candidate: 1.7.1-4
  Version table:
     1.7.1-4 0
        500 http://archive.ubuntu.com/ubuntu/ quantal/universe amd64 Packages


Will my windows partition be affected if I re-install Ubuntu?

Windows 7 is not affected by any changes you make on a Linux filesystem. In fact, Windows doesn't even know they exist.


You manually download the kernel you wish to use from http://kernel.ubuntu.com/~kernel-ppa/mainline

You normally need just the kernel image, linux-image-3.7.0-030700-generic_3.7.0-030700.201212102335_amd64.deb for example.

You then install it with

dpkg -i linux-image-3.7.0-030700-generic_3.7.0-030700.201212102335_amd64.deb

and remove it with

sudo apt-get remove linux-image-3.7.0-030700-generic_3.7.0-030700.201212102335_amd64.deb

Please note, these kernels are intended for testing / development and come with no support

  The mainline kernels builds are produced for debugging purposes and therefore come with no support. Use them at your own risk.

https://wiki.ubuntu.com/Kernel/MainlineBuilds#Kernel.2BAC8-FAQ.2BAC8-DebuggingMainlineBuildsSupport.Does_the_kernel_team_support_the_mainline_kernel_builds.3F


No internetwhen installing Kubuntu 14.04.5

Some years ago I considered changing to Kubuntu, as there are very good KDE software tools, which would leave my Ubuntu with tons of redundant dependencies. But always had those problems with the network manager, which would never go away. So I finally came back to Ubuntu. Some time later I tried out Kubuntu with Virtual Box, just for fun, and everything was fine. So I would recommend, if possible, choose an newer version.


Error When Creating a View or Controller in Monodevelop

This has been resolved. Apparently, Monodevelop 4.0 is not stabe and 3.1 should be used for mvc development


How do I make Panel always transparent like the Dock in GNOME 3?

You may use a GNOME shell extension called Dynamic Panel Transparency to achieve this.

Install the extension from the link above.
Reload the page. A settings icon should appear.
Click on the settings icon. A window should pop up.
Go to the "Background" tab and "Enable custom opacity".
Set low values for both "Maximized Opacity" and "Unmaximized Opacity".

Note: You may have to restart the shell/session to see the change. In an Xorg session press alt+f2, then type r and press enter. In a default Wayland session log out and log in again.

Tested in an Xorg session, but not in a Wayland session.


Is this not easier?

d = $(date +%Y%m%d%H%M%S)
mysqldump -uroot myDb>$HOME/myDb.$d.sql
tar czf - $HOME/myDb.$d.sql
scp $HOME/myDb.$d.sql root@ip:$HOME/backup/

The mistake in your command: the last part is seen as part of the dd command. Not as part of the ssh command.

===

regarding comments:

  the thing is that when the scp is performed it doesn"t know the exact name of the file because of the date/hour/second suffix.

That variable "d" does not change its contents over time:

rinzwind@schijfwereld:~$ d=$(date +%Y%m%d%H%M%S)
rinzwind@schijfwereld:~$ echo "$d"
20190427115534
rinzwind@schijfwereld:~$ echo "$d"
20190427115534
rinzwind@schijfwereld:~$ echo "$d"
20190427115534
rinzwind@schijfwereld:~$ echo "$d"
20190427115534
rinzwind@schijfwereld:~$ echo "$d"
20190427115534


I have the solution for your problem.

When you start recordmydesktop from the terminal you have perfect recordings.

Open the terminal copy and past this command:

recordmydesktop --delay 10 --fps 20 --channels 1 --device hw:1 -o filenameofvideo

delay of 10 seconds
frames per second 20
channels 1  (microphone)
--device hw:1 that is my external microphone you might have to change it --device hw:0
-o is overwrite existing file
filenameofvideo is the desired filename

Happy recording!

Check the results on my YouTube Channel


booting into chrome OS after Ubuntu is default

sudo cgpt add -i 6 -P 0 -S 1 /dev/mmcblk0

Then reboot.

(Source)


VirtualBox host-only networking fails on Ubuntu 11.10 host

It's a known bug of VirtualBox 4.1.12 (from the VBox apt repository).

I've removed VBox and then manually installed the previous version 4.1.10 and now everything works again.


issues with device drivers,and ppa packages

I quite like downloading software using:

sudo apt-get install apache2

I tend to stick with the repositories that come as standard unless I have a specific need. So can't help with that question.

There is an xinput command that you can use for tweaking input devices.

xinput list

Then use one of the names to show the properties for what you are interested in:

xinput list-props "Device Name"

Then you can set the properties to values you specify:

xinput set-prop "Device Name" "Property Name" parameter1 parameter2

I've also got problems with a touchpad. But I'm trying to reduce the area that is sensitive.

I can't help if it is a driver issue.

Becareful with xinput I've been trial and erroring settings to solve an issue I have. It would be wise to take a copy of the settings as they are before changing incase you make things worse.

I managed to disable my touchpad but was fortunate enough to have a copy of the original settings.


Is there a way to automatically assign new users a disk quota limit as they are created on edubuntu?

Actually, you can have this set.  Edit /etc/adduser.conf and add 'QUOTAUSER={user}' where {user} is set to either a user that you want to clone quota settings from, or a generic account with quota defined.  See 'man adduser.conf' for more info.


How do I restore a lost grub boot option on Ubuntu 12.04

Ok, I'm a bit more relaxed now since I believe I know why this happened. First, the follwing guide solved the actual problem of re-enabling Windows7

Manually adding an entry for Windows 7 to an Ubuntu GRUB2 menu

Then the reason for the boot menu to loose Window7 was that when /etc/grub.d/30_os-prober ran the first time, that was when I installed Ubuntu 12.04 direct after installing Windows7 but before checkpoint disk encryption was enabled, it correctly detected Windows7.

But now with checkpoint disk encryption active, grub fails to detect Windows7 and the boot option will not be added. As was the case when one of the packages executed update-grub after changing the grub splash.

As for which of the window managers that, as a side effect when being installed, ran update-grub2 and blew my current boot menu was xcfe4. Since it depends on desktop-base, which replaces/sets the grub splash with spacefun-grub.png and runs update-grub2.

So installing xcfe4 using apt-get install xcfe4 runs update-grub2 at one point!!!

This side effect has also made it into launchpad


Locate the drivers on your phone or via another device and upload it via USB cable or USB flash drive.

Solved

Also, search on here before asking. This has been asked many times and I have found many solutions on here.


Ubuntu using/enabling only 1 of 4 cores?

I checked the kernel boot parameters and (don't know why but) nolapic was set. After removing this parameter and rebooting everything was fine.

In detail: I edited /etc/default/grub and removed nolapic in the line GRUB_CMDLINE_LINUX="..." and then updated grub sudo update-grub and rebooted.


This is how I solved the problem:

First I got networking back up with:

sudo ip address add 192.168.1.4/24 dev enp3s0
sudo ip link set enp3s0 up
sudo ip route add default via 192.168.1.254

With networking now working I was able to reinstall the settings application as follows:

sudo apt-get install gnome-control-center

Everything went back to normal. I rebooted and networking was still working. My settings application was findable and launchable and the dropdown menu at the top right now included network settings once again.

It remains a mystery what caused all this though.


Usage of inb, inl, inw to access kernel space from user space

These functions (or macros) are defined in <asm/io.h>. You need to tell gcc to -Optimise the code for them to be inlined (I think).

For their usage, type

man inw

Makelinux.net also has a guide on how to use them.

I can't give you an example since it depends on the hardware you're using, but this should get you started.

If anyone is interested in it, there's also a Python module, portio, to provide the same functionality.


Connect mongodb across 2 ubuntu 14 servers

I figured out that the problem was within the firewall settings of the server holding the mongodb.

Using ufw I added a rule for the network to allow incoming connection from server 1.

10.10.xx.xx1 = the app server

10.10.xx.xx2 = the db server

With the said, Just do sudo ufw allow 10.10.xx.xx1 on the db server.


According to the information you provided, the answer is: Buy a bluetooth stick and attach it to your computer -- the software is already installed ;)


How can i format my hard drive to get rid of windows?

I just did this exact thing literally yesterday.

Make sure everything that you need off of the computer is backed up, you really are going to wipe it clean!(well sort of.. )

Reboot your computer off of the flash drive just as you are used to, and go ahead and click install Ubuntu. Eventually you will come to a screen with options such as:

Install alongside existing operating system(s)
Erase Disk and Install Ubuntu * This is the one you want *
Other Options(advanced)

Click the option that says erase disk and install Ubuntu, and follow the steps.
This will format your hard drive, and then install Ubuntu on the clean drive.

Hope this helps, Good luck!


SSL for Apache2 Ubuntu Wordpress PLEASE HELP i need direction

It's probably way too late, but I experienced the exact same issue when trying to install my self signed SSL certificate on my virtual host tonight.

I followed the instructions provided by digitalocean and it worked very well. But I would get a 404 every time I was trying to navigate to the about-us page, or any other page.

I fixed the issue by adding the following block in my default-ssl file  (basically I added the block to the code displayed in "Step Three" in the above article) and then of course sudo service apache2 restart.

You should be careful with Order allow,deny as this could raise security concerns. I have allow from all to suit my needs, but you might want something different.

    <Directory /var/www/YOURDIRECTORYNAME/>
            SSLOptions +StdEnvVars
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
    </Directory>


Is there a backup software for external hard drive working on both Ubuntu and Windows?

For both Ubuntu (Linux) and Windows you will be hard pressed to find anything which matches the simplicity and capability of Rsync for Linux and cwRsync for Windows.

Rsync, or Remote Sync, is a free command-line tool that lets you
transfer files and directories to local and remote destinations. Rsync
is used for mirroring, performing backups, or migrating data to other
servers.
cwRsync is an implementation of rsync for Windows. rsync uses a file
transfer technology specified by the rsync algorithm, transferring
only changed chunks of files over the network. cwRsync can be used for
remote file backup and synchronization from/to Windows systems.


python3: can't open file 'notebook': errno 2 no such file or directory

TL;DR Check that the environment variables PYSPARK_DRIVER_PYTHON and PYSPARK_PYTHON are not set in spark-env.sh.

I ran into a similar issue after setting up Spark using a book before taking a Pyspark Udemy course.

After scouring StackOverflow and troubleshooting, it turned out that I had defined the environment variables PYSPARK_DRIVER_PYTHON and PYSPARK_PYTHON in both my ~/.bashrc and spark-env.sh, as shown below.

~/.bashrc

export PYSPARK_PYTHON=~/anaconda3/bin/python
export PYSPARK_DRIVER_PYTHON=jupyter
export PYSPARK_DRIVER_PYTHON_OPTS=notebook

spark-env.sh

PYSPARK_PYTHON=python3
PYSPARK_DRIVER_PYTHON=python3

The solution for me was to remove the lines in the spark-env.sh. I was then able to start jupyter notebook by running the pyspark command and utilize pyspark within the notebook. It is expected that the jupyter notebook command should open jupyter notebooks in a browser.

Hope this helps!


How do I force a maximum of one instance of Nautilus?

No, I don't think Nautilus has that. With Unity in 11.10, I've actually stopped using tabs in Nautilus since it's more comfortable to switch between windows using alt+(the key above tab).


Why is there proprietary software in Ubuntu Software Center?

However the Software Center is full of proprietary software. How come? I thought Ubuntu is all about Open Source

Definition of "universe":

  Universe – Community-Maintained, Open-Source Software
  The vast majority of the software in the Ubuntu Software Center comes from the Universe repository. These packages are either automatically imported from the latest version of Debian or uploaded and maintained by the Ubuntu community.

  Canonical does not provide official support or updates for these packages.

I would consider the tag "proprietary" a bug for chromium. It is FLOSS so should be tagged as such.

  How to filter those out?

I consider it a bug. If you do not want proprietary software do not include "restricted" (= proprietary drivers), or "multiverse" (= proprietary software).
Do you have more examples of the tag proprietary in universe? Since I would believe it should not be in there.
On how to filter out what is currently installed and is proprietary you can use:

sudo apt install vrms

and you get a list of what is installed in your system

$ vrms
            Non-free packages installed on schijfwereld

amd64-microcode                     Processor microcode firmware for AMD CPUs
fonts-ubuntu                        sans-serif font set from Ubuntu
i965-va-driver                      VAAPI driver for Intel G45 & HD Graphics family
intel-microcode                     Processor microcode firmware for Intel CPUs

            Contrib packages installed on schijfwereld

iucode-tool                         Intel processor microcode tool

  4 non-free packages, 0.2% of 1852 installed packages.
  1 contrib packages, 0.1% of 1852 installed packages.
$ which chromium
/snap/bin/chromium

Except for a font the others are microcode/hardware related so I good with that myself ;)
I have chromium installed and it is not listed. Another bit of proof to believe is its a bug.

Bug report on debian (from June 2nd) that might be related: third_party/swiftshader/third_party/llvm-subzero/lib/Support/ConvertUTF.cpp in chromium seems to be proprietary. In the link there is mentioning of a fix.

There is a command called lintian to check DEB packages. It does not complain when I scan chromium 37.


Stuck in an update, how to get to where I was?

That window should be the output of diff, probably piped into less or a similar viewer and can be exited by pressing q.


Please, try to follow instructions a bit carefully.
Look and see, please:


How would you define a function or script within your path that takes arguments to name the file?

you would do a timestamp like this (then your file name would always be unique):

alias record="ffmpeg -f alsa -ac 2 -i default -f x11grab -r 15 -s $(xwininfo -root | grep 'geometry' | awk '{print $2;}') -s 1440x900 -i :0.0 -acodec pcm_s16le -vcodec libx264 -preset ultrafast -threads 0 /home/brian/test$(/bin/date +%Y%m%d%H%M%S).avi"

That would be YearMonthDayHourMinuteSecond


You should be able to create it as a relative link using the  form

ln -s g++-5 /usr/bin/g++

From man ln:

  Symbolic links  can  hold
         arbitrary  text;  if  later resolved, a relative link is interpreted in
         relation to its parent directory.


I can't install ocaml plugin in my eclipse

Here's how it worked for me

Install both eclipse and eclipse-pde.  These are the packages I have installed:

sudo apt-get install eclipse eclipse-jdt eclipse-pde eclipse-platform eclipse-platform-data eclipse-rcp

Add the site: http://eclipsefp.sourceforge.net/ocaml/site.xml as a software source

Help->Install New Software
Select OCaml

You get this:

I suspect you're missing something that's in these:
eclipse-jdt eclipse-pde eclipse-platform eclipse-platform-data eclipse-rcp


Temporarily disable distracting software

Create a user which has access only to productive apps, screened through GNOME-Nanny, and switch to that user when working. GNOME-Nanny is free and has worked in that role for years.


How to get back unity and compiz after uninstalling, no launcher or dash on startup

I had simmilar problems not long ago, this fixed the problem for me:

sudo apt-get update
sudo apt-get install --reinstall ubuntu-desktop
sudo apt-get install --reinstall unity

This will force the reinstall without keeping the configuration files, that seem to be the cause of your problem.


virt-manager launcher action to directly start and open a specific VM

Use the virt-manager to find the "Libvirt URI" (select the VM, Edit -> Connection Details), then the name of the VM (select the VM, Edit -> Virtual Machine Details -  if you have the machine open, you will have to make sure it is not maximized, then View -> Details, and go back to the Console when you're done.)

Then use (don't type the leading $)

$ virt-manager --connect <<URI>> --show-domain-console <<NAME>>

Where URI and name are where you got them from above. For example, mine looks like:

$ virt-manager --connect qemu:///system --show-domain-console win7

Run that from the command line. If that works, you should be able to put it in a simple script

$ cat > ~/bin/run-vm
#!/bin/bash
virt-manager --connect qemu:///system --show-domain-console win7
^D

(Where ^D is control + D).

$ chmod u+x ~/bin/run-vm

And, then you should be able to add this command to your menu - see for example Answer on Unix and Linux Stackoverflow site.

You can also add the command directly to the menu with the parameters, but often it is easier for debugging problems to get the command running in the command line as a script.


Applications/Software required after installing 12.10

in a terminal windows type sudo apt-get install ubuntu-restricted-extras to get all of the MP3 decoders, Flash, Java and the generally necessary apps. You data card might require a restricted driver. Try going to SOFTWARE SOURCES while your card is connected to see it recommends anything.


How do I get a folder size in nautilus to include hidden files (dotfiles)?

Nuatilus - File- preferences - check show hidden files


Adding undetected resolutions

Due to buggy hardware or drivers, your monitor's correct resolutions may not always be detected. For example, the EDID data block queried from your monitor may be incorrect.

If the mode already exists, but just isn't associated for the particular output, you can add it like this:

$ xrandr --addmode S-video 800x600

If the mode doesn't yet exist, you'll need to create it first by specifying a modeline:

$ xrandr --newmode <Mode``Line>

You may create a modeline using the gtf or cvt utility. For example, if you want to add a mode with resolution 800x600 at 60 Hz, you can enter the following command: (The output is shown following.)

$ cvt 800 600 60
# 800x600 59.86 Hz (CVT 0.48M3) hsync: 37.35 kHz; pclk: 38.25 MHz
Modeline "800x600_60.00"   38.25  800 832 912 1024  600 603 607 624 -hsync +vsync

Then copy the information after the word "Modeline" into the xrandr command:

$ xrandr --newmode "800x600_60.00"   38.25  800 832 912 1024  600 603 607 624 -hsync +vsync

After the mode is entered, it needs to be added to the output using the --addmode command as explained above.

From: X/Config/Resolution


How to set cpufreq governor to performance?

My suspicion is that P4 hardware does not support the type of CPU scaling that you are trying to set.  In essence, your P4 cpu is already running full speed.

You can use the command cpufreq-info to get information about what your hardware is capable of.  It will tell you the valid settings you can use.  On a P4 system, I get this:

cpufrequtils 007: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 0.00 ms.
analyzing CPU 1:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 0.00 ms.

On a newer Core2Duo system I get this:

cpufrequtils 007: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.0 us.
  hardware limits: 1000 MHz - 2.17 GHz
  available frequency steps: 2.17 GHz, 2.00 GHz, 1.83 GHz, 1.67 GHz, 1.50 GHz, 1.33 GHz, 1000 MHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance
  current policy: frequency should be within 1000 MHz and 2.17 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1000 MHz.
  cpufreq stats: 2.17 GHz:4.03%, 2.00 GHz:0.01%, 1.83 GHz:0.01%, 1.67 GHz:0.01%, 1.50 GHz:0.01%, 1.33 GHz:5.14%, 1000 MHz:90.80%  (28070386)
analyzing CPU 1:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 1
  CPUs which need to have their frequency coordinated by software: 1
  maximum transition latency: 10.0 us.
  hardware limits: 1000 MHz - 2.17 GHz
  available frequency steps: 2.17 GHz, 2.00 GHz, 1.83 GHz, 1.67 GHz, 1.50 GHz, 1.33 GHz, 1000 MHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance
  current policy: frequency should be within 1000 MHz and 2.17 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1000 MHz.
  cpufreq stats: 2.17 GHz:2.88%, 2.00 GHz:0.00%, 1.83 GHz:0.00%, 1.67 GHz:0.01%, 1.50 GHz:0.01%, 1.33 GHz:1.87%, 1000 MHz:95.23%  (3085131)


System freezes when apt-get tries to unpack a particular package

You should remove the package first, you can do this via terminal by typing : sudo apt-get remove masalla-icon-theme or by using synaptic,  then run this command :  sudo apt-get install -f ,
bytheway, this problem happened when you install external package in your system ,


Restart your computer and login.
Check if Enable NetWorking and Enable Wifi is checked (two options is in that menu).


There is a Huion Driver (kind of a beta version, but I gather it is slated to be included in the kernel, if it has not already), in the Digimend project, at

https://github.com/DIGImend/huion-driver

Works like a charm, with my H610.


Can't uninstall manually installed python 2.7.5

In your case you were very lucky to have used checkinstall! Instead of installing it bluntly by overwriting/moving files it created a package which got installed. This makes the package management aware of the installation and how to undo it. So, this means you can tell APT that you now want to install the other version:

Run

sudo apt-get install python=2.7.4-0ubuntu1

to revert to the regular Ubuntu packaged version. Python 2.7.5 will probably only be available in Saucy, not in the current stable releases.

This is not the same as removing and reinstalling, as in this case it gets downgraded taking care a single version of Ubuntu is installed at all times.


7zip - Open a compressed file without creating a permanent file

the file-roller package provides a gui that can open 7zip files for you and extract them anywhere you choose, i'm guessing thats what you are using.

To extract a file you see in the listing right click and choose extract, you can then choose where to put it.

if you extract the files to /tmp they will be automatically deleted on reboot.

File-roller won't open the files for you but if you manually extract there is a show files button that will open a Nautilus window with them visible.

Another approach is to right click the archive and 'extract here' then you can click the files in Nautilus


Steam, launching Team Fortress 2: libGL.so.1: wrong ELF class: ELFCLASS64

I found the solution here:

  Or, instead of editing the file ld.so.conf directly, create a file
  called local.conf in the subdirectory /etc/ld.so.conf.d containing
  just the line /usr/local/lib. That is,

  Contents of /etc/ld.so.conf.d/local.conf:

  /usr/lib32

  Then run the sudo ldconfig command.


How to open an android device on Ubuntu 19.04?

The cable might make a difference but don't quote me on it. I have a Samsung J5 and I too find it slow when connecting so I think it's more to do with the phone than any issue with your operating system.  Mine is just as slow when I'm connected to a Windows PC or laptop.

One thing that can be quicker is if you have the files you want to view or edit on a micro SD card. Just unmount it from the phone, slot it into a suitable adapter and plug it straight into your laptop.


How to add software icon to Indicators panel?

Long story short, it's not always possible, because it depends on the programming language in which indicator is written, so your best approach would be to file a bug report to the developers of that application.

Here's what I mean in more detail. If the indicator is written in one of the scripting languages, such as python,perl, or ruby, then you can edit that file. Of course , you'd have to know what to edit. I write mostly in python, and in that case, the icon name is typically set in the class declaration, for example from one of mine:

class UdisksIndicator(object):

    def __init__(self):
        self.app = appindicator.Indicator.new(
            'udisks-indicator', "drive-harddisk-symbolic.svg",

Here you see that "drive-harddisk-symbolic.svg" is the icon name.
So you could easily edit that.

If the indicator is written in one of the compiled languages, such as C , Vala, or Java , then you can't change it - the indicator is a fixed binary, so you'd have to have source code, and know how to recompile that source code.

It also depends largely on the type of icon the indicator uses. It may be a custom icon that came with package. In that case, you could look into /var/lib/dpkg/info/package_name.list file ( which is created for every package you install with apt or dpkg ), figure out which one of the files on the list is the icon that is supposed to be displayed for that indicator, and perhaps replace that specific file with your own. That of course only masks the symptops and doesn't treat the issue. If you were to reinstall and run into the same problem again, you don't want to keep doing icon replacement over and over. Worse yet, if the icon uses one of the standard icons that are supposed to be on the system. For instance, there's whole bunch of standard icons in /usr/share/icons/gnome , and I personally use those a lot.If such icons fail, then there's some large issue going on.  That's another argument for filing bug report.

And as I've mentioned before, you'd have to know where to change the setting, if you were to edit file on your own. Chances also are that you're not the only one having such issue. It's in your and other people's benefit to submit a bug report and let developers fix it.


JAVAC and JPS are not present in /usr/lib/jvm/java-8-openjdk-amd64/bin folder

How did you install java 8?

Perhaps you installed only JRE?

sudo apt-get install openjdk-8-jre

This will install java run time environment, typically in:

/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

When you should have done:

sudo apt-get install openjdk-8-jdk

Which shall install compiler in (usually):

/usr/lib/jvm/java-8-openjdk-amd64/bin/javac

If you can't get openjdk to work you can try Oracles java via www.webupd8.org

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

That results in:

java -version
  java version "1.8.0_131"
  Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
  Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)<br>

which javac
  /usr/bin/javac

Which links to:

  /usr/lib/jvm/java-8-oracle/bin/javac


I received an answer from https://www.raspberrypi.org/forums/viewtopic.php?f=36&t=215140&p=1324060#p1324060

Changing metric of eth0 to give less priority over usb0 and wlan0 worked for me.


My swapfiles are 9.2GB in total in the file system while the actual reported is only 4.6gb. Why is that?

It sounds like you may already have fixed the problem yourself, but just in case... here's how to create a 4G /swapfile... if you want larger /swapfile, change the 4096 (multiples of 1024)...
Note: Incorrect use of the dd command can cause data loss. Suggest copy/paste.
In the terminal...
sudo swapoff -a           # turn off swap
sudo rm -i /swapfile      # remove old /swapfile

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

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

Confirm this /swapfile line at the end of /etc/fstab... and confirm no other “swap” lines...
To edit, use sudo -H gedit /etc/fstab or sudo pico /etc/fstab
/swapfile  none  swap  sw  0  0

reboot                    # reboot and verify operation


Where is `vino-preferences` gone in Xubuntu 13.10? (sharing desktop in Xubuntu 13.10)

For anyone still confused by this,  Vino used to have the handy configuration tool called 'vino-preferences' until about 2014, but that was removed when gnome-control-center became able to control it instead.

[ Discussion on that decision, here:
    https://forums.bunsenlabs.org/viewtopic.php?id=1411  ]

There are many distributions which can usefully use vino-server (which is an excellent VNC server), such as Lubuntu which I use - being based on LXDE, that doesn't use gnome-control-center and there's little reason to install such a big block of code just for one solitary function.

Instead, to access the vino-server configuration just install dconf-editor to control it:

sudo apt-get install dconf-editor

OR if you haven't installed vino yet, do both together:

sudo apt-get install vino dconf-editor

CONFIGURATION:

a.  Open dconf-editor,  then:

b.  VNC settings can be accessed under org -> gnome -> desktop  -> remote-access

Hope this helps someone.

SECURING VNC ACCESS over SSH

Let me just add here that for those wanting to pipe VNC through an SSH tunnel for secure remote access,  you can use a command from the client end, in this form, to open the tunnel:

sudo ssh -g -L 0.0.0.0:5900:127.0.0.1:5900 your_username ip_of_your_remotemachine

This means "SSH, please open a tunnel to ip_of_your_remotemachine and make a TCP connection from it,  out to  127.0.0.1:5900 (ie it's own port 5900 where vino-server is listening) -would you, and tunnel all traffic back to me / I'll mirror it out of :5900 locally - thanks".

SSH then does this;

You then open your VNC client (try the excellent Remmina) to your local address:port   127.0.0.1:5900  (which is mirroring the listening port at your remote server now) and VNC opens giving you remote desktop.

Read separately on turning off passwords for your SSH server and use keys only, for highest security.

Good luck all


Ubuntu 16.04 Dual monitor doesn't work after booting

I have exactly the same problem. I have two monitors, one on DVI, one on VGA. Everything worked fine with Kubuntu 15.10.

Now, with 16.04, you can see that during the boot up, the VGA monitor stays black, but Ubuntu thinks it activated it. Also for me, the only workaround is to deactivate the second screen in the system settings and to re-activate it. Then, in 99% of the cases it works.

I have a AMD/ATI onboard graphic card, and it seems this is the source of our problem, see here:
http://www.omgubuntu.co.uk/2016/03/ubuntu-drops-amd-catalyst-fglrx-driver-16-04

(German)http://www.golem.de/news/xenial-xerus-ubuntu-16-04-verzichtet-auf-proprietaeren-amd-treiber-1603-119679.html

So we can only hope that the open source drivers will improve soon..... :-/


How to remove Ubuntu 14.04.03 Grub password protection?

You should first find where the password has been set. A grep in /etc/grub.d may help.

Then just comment the line starting with set superusers and the line with the password and run update-grub.

That should do it (if still relevant).


Installing drivers whilst 'trying' Lubuntu

You actually can install drivers, although somewhat limited.

Everything you do in the live environment is only stored in the RAM; it gets lost at shutdown. So you can install drivers, but they will be lost as soon as your computer shuts down.

Some drivers aren't automatically loaded after installation. After a reboot, however, they are then loaded automatically, if needed. If you happen to use such a driver module, you can load it manually using the command sudo modprobe <modulename>.

However, some drivers need to be included into the initramfs image, because they need to be loaded before a user logs in. An example for this are storage drivers (HDD, CD) or Graphics drivers. These you can't install in a live system; they require a reboot to work properly. But as the RAM is cleared, you'll lose those drivers.

If you want to keep drivers even after a reboot, you should create a bootable USB stick with persistent memory. My software recommendation for this is UNetBootin. After giving the ISO path, you can set up the size of the persistency; I always choose about 4GiB, but it depends on what you want to do with the live system and how much space there is on the USB stick.

Another way of using drivers in a live system is to customize the ISO. If you do so, you can even install boot-time drivers by chroot'ing into the extracted ISO.


Is there a command line or some other way to bring up nm-applet UI?

You could try "nm-connection-editor". Maybe this package have to be installed (I did not know anymore if I have installed this package later).


Use:

systemctl disable <service>

If you are not using systemd (Ubuntu 14.10 and earlier) use:

update-rc.d -f <service> remove

The following command will give you a list of all services on your machine:

service --status-all

You should be able to find the names of the services you want to disable in there.

For more details, see enabling-and-disabling-services and for the very long answer see this post (as already mentioned by @muru).

For more details, see this post on Digital Ocean and the man page for systemctl.


Does MATE desktop environment use graphics acceleration?

at the moment Unity, Cinnamon, GNOME 3, KDE/Plasma and LXQt are using graphic acceleration and MATE, Xfce and LXDE does not (by default).
beside them there are much desktop-environments/window-manager which are mostly less resource hungry than the named one, but most of them won't be comfortable (for beginners).
so i named only DEs which are easily to get on ubuntu, and if you are thinking about other DEs, i would think about other distributions (specialized for low resources).

the other way round: at desktop environments without graphic acceleration you can upgrade shiny desktop effects (with use of graphic acceleration) by changing the window-manager (to Compiz, Composite, Compton):
for example on MATE it is pretty easy... go to the Control Center and choose Desktop Settings, Windows and use the dropdown menu under Window Manager.

"accidentally" i came across an old article, which maybe interesting for your goal: https://www.phoronix.com/scan.php?page=article&item=linux_desktop_vitals&num=2
(keep in mind MATE is the successor of GNOME 2)


Uninstall everything (previous Ubuntu wubi).
Disconnect your internet modem.
Now install Ubuntu using wubi (32-bit or 64-bit; it does not matter).
After installing wubi reboot your machine.
Select Ubuntu at start-up.
Let Ubuntu install in your PC (You don't need to do anything).


You can try Google Hangouts.

It doesn't need installation. It runs through browser. You just sign in with your google account and add others via their google accounts. You can make large conference video calls and there are lots of utilities you can use including screen sharing.


How do I install Python 3.8 in Lubuntu 18.04?

This post is community wiki so as to not claim the credit of @Kulfy's comment. This procedure worked on Ubuntu 18.04.

  DON'T EVER CHANGE DEFAULT PYTHON!!! It may cause your system to break and some applications won't even run. It's far far far better to invoke python3.8 using python3.8 command

When installing python3.8, do the following

$ sudo apt-get install python3.8 python3.8-dev python3.8-distutils python3.8-venv

For most people this will be acceptable as they will be using a virtual environment for development. Construct a virtual environment and activate it as you usually would. This will leave you in a terminal where python resolves to python3.8:

$ python3.8 -m venv dev3.8/
$ source dev3.8/bin/activate
(dev3.8) $ which python
...dev3.8/bin/python
(dev3.8) $ python --version
Python 3.8.0

Neglecting to install python3.8-venv will result in an unhelpful error, that suggests you should install python-venv which resolves to python3.6-venv:

$ python3.8 -m venv dev3.8/
The virtual environment was not created successfully because ensurepip is not
available.  On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.

    apt-get install python3-venv

You may need to use sudo with that command.  After installing the python3-venv
package, recreate your virtual environment.

Failing command: ... (trimmed for formatting)


Installation problems on my hp pavilion g7 1303

After "no wubildr error" wait for a minute it will boot up.
To fix that just copy wubildr files directly to c:/.

If this doesn't work try this: go to c:/ubuntu/winboot (from Ubuntu File System /host/ubuntu/winboot) and copy all of its content.

Next step is to past all of the content to System Reserved. You can easly access it from Ubuntu, but from Windows you can use this Open Hidden System Drive: http://www.coderforlife.com/projects/win7boot/extras/#OpenHiddenSystemDrive
(Tried it myself, works)

Then just paste copied content from winboot and restart your PC.

The "no wubildr" error should be gone.


Erase root password before reselling computer

If you are selling the laptop it is a much better idea to wipe the hard disk completely, so that nobody can see your private information.

Boot from an Ubuntu live CD or USB.
Launch Disk and delete all partitions on the laptop's hard drive.
To go Format and where it says erase, select "Overwrite existing data with zeroes (slow).
Wait up to a few hours.

There are even more secure ways to erase the hard drive but overwriting with zeroes is the minimum that you should do.


Need to reinstall printer (HP Lasejet 1018) plugin everytime

Did you add your username to the lp group on Ubuntu after installation?

sudo usermod -a -G lp $USER

This will add your username to the lp group.

As a reference: compiling and installing hplip with a classical way


Ubuntu 18.04 certificate validation failure

Turns out the solution was to run sudo dpkg-reconfigure ca-certificates. Not sure why this was needed, but fixed things for me.

EDIT

Since it's somewhat related, there was another fix necessary for Java found here.


Aside from alt+drag to move the window up and resize it manually as a workaround, I do not believe this to be possible as it's the Windows application declaring its starting size.  You will see similar behavior running the application on Windows if you have a small enough screen.


There is a bug report for your "13d3:3408 IMC Networks" Bluetooth controller.

And the fix for it will be release in 14.10 Utopic soon (3.16 kernel), it looks like that patch won't be backported to 14.04 Trusty (3.13 kernel) thus there are 3 possible solutions:

There is a 3.16 test kernel provided by Pilot6 (hanipouspilot) from comment #20 on that report:
https://www.dropbox.com/sh/07642x3lziqgmz9/AACGWNO5_lNnX7x7tYMoH9gka?dl=0
Please download the .deb files to a certain directory and run the following command within the same directory:
sudo dpkg -i *.deb
After that, poweroff (not reboot) your laptop, and boot it up again.
Wait for the fix to be released in Utopic (and subscribe to the bug so you will be notified), then install the latest 3.16 kernel with the following command in your terminal: sudo apt-get install linux-image-generic-lts-utopic
Wait for 14.04.2, which will use the 3.16 kernel by default.

Good luck.


Simply run

sudo apt-get -f install

without anything additionally things. # is only the opener for a comment

To install packages, use

sudo apt-get install package_name

Replace package_name with the name of the package to install.

In your case

sudo apt-get install -f

and if that not works

sudo apt-get install libcanberra-gtk-module:i386
sudo apt-get install libgtk2.0-0:i386

An alternative to install the deb file is

software-center icaclient_13.1.0.285639_amd64.deb

From man apt-get

   -f, --fix-broken
        Fix; attempt to correct a system with broken dependencies in
        place. This option, when used with install/remove, can omit any
        packages to permit APT to deduce a likely solution. If packages
        are specified, these have to completely correct the problem. The
        option is sometimes necessary when running APT for the first
        time; APT itself does not allow broken package dependencies to
        exist on a system. It is possible that a system's dependency
        structure can be so corrupt as to require manual intervention
        (which usually means using dpkg --remove to eliminate some of the
        offending packages). Use of this option together with -m may
        produce an error in some situations. Configuration Item:
        APT::Get::Fix-Broken.


Enable DPM by adding a boot parameter. This should greatly help power consumption, especially when idle. To do so, edit /etc/default/grub and add the 'radeon.dpm=1' to the GRUB_CMDLINE_LINUX_DEFAULT line, so it would look something like:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.dpm=1"

After you save/quit the text editor, update grub:

sudo update-grub


An ArchLinux page says:

Basic configuration
A very simplistic configuration which will deny all by default, allow
any protocol from inside a 192.168.0.1-192.168.0.255 LAN, and allow
incoming Deluge and rate limited SSH traffic from anywhere:
ufw default deny
ufw allow from 192.168.0.0/24
ufw allow Deluge
ufw limit SSH

So I picked out
# ufw allow from 192.168.0.0/24

which I think should allow connections between computers within my LAN only. I'll now have to work out how to do this on the Windows computer.


Using file command:

#!/bin/bash
for i in * # for every file in folder
do
  # if file reports "ASCII text"
  if file "$i" | grep --quiet 'ASCII text$'
  then
      # print filename
      echo "$i"
  fi
done

One liner:

$ for i in *; do if file "$i" | grep -q 'ASCII text$' ; then echo "$i"; fi; done


Ubuntu 18.04. Can't install python3-pip package. Synaptic can't find a file

Your package database is out of date - that old package was withdrawn and superseded by a newer version.

Run apt update to update your package database.

Then apt will try to download the correct package version and the install will work.


After clean install of 14.04 there are no Nvidia drivers available

Try using the command:

ubuntu-drivers devices | grep recommended

This should give you the driver set needed and then just use the apt-get install command to install that driver set.


How to uninstall VMs installed with ubuntu-vm-builder

Look in /media/Data/KVM (or the specified location if a location other than default was specified), find the VM you wish to delete and do rm VMfilename


How to supernet Class C IP address with isc-dhcp server?

Yes, the dynamic IP address pool size can be a subset of the overall sub-net declaration. Often that is how one sub-net can be used for both dynamic and static IP addresses.


I couldn't reproduce your error, but the script is incorrect at all. The incorrect part is the assignment of the values of versions, platforms, locales - currently these are variables, not arrays. Here is an illustration:

$ versions='57.0 58.0.1'
$ printf '%s\n' "${versions[@]}"
57.0 58.0.1

One of the ways to build array in Bash, as @dessert said, is by using  round brackets. Most commonly to:

define an empty array: array=(),
define an array and assign values: array=('element 0' 'element 1'),
add elements to predefined array: array+=('element 2' 'element 3'),
replace the value of a certain element (the first one in this case): array[0]='new value',
in this case the quote marks are absolutely mandatory because of the white spaces in the values.

Here is the result of the above illustration when an array is used:

$ unset versions
$ versions=('57.0' '58.0.1')
$ printf '%s\n' "${versions[@]}"
57.0
58.0.1

According to that your script should look like that:

#!/bin/bash

versions=('57.0' '58.0.1')
platforms=('win64' 'win32')
locales=('en-US' 'es-ES')

for i in "${versions[@]}"
do
    for p in "${platforms[@]}"
    do
        for l in "${locales[@]}"
        do
             echo "$i : $p : $l"
        done
    done
done

Another minor mistake is your wget expression. It is better or simpler to quote the entire url. Use braces to separate the variables from the rest of the string:

wget -c -A.mar "http://.../releases/${i}/update/${p}/${l}/"


How do I boot an ISO file from my drive using grub2 on UEFI machines?

There is a bug in grub 2.04 so ensure you have a prior or later version.
Well, the basics for adding an ISO file to grub are the same for an UEFI as for a BIOS machine: edit /etc/grub.d/40_custom and add a menuentry item (GParted is used in this example) to the bottom of the file:
menuentry "GParted Live ISO" {
}

Now we're going to add a variable containing the directory where we stored the ISO (so far, so good: no differences with BIOS machines):
menuentry "GParted Live ISO" {
  set GPartedISOFile="/opt/Live-ISOs/gparted-live-0.31.0-1-amd64.iso"
}

I'm using /opt to store these as I don't like creating directories in the root of my machine and according to the Linux File System Hierarchy that's where optional software should reside anyway.
Before we add the loopback variable, we need to find out on which hard disk the file is stored, so we do a: df --output=source /opt/Live-ISOs/gparted-live-0.31.0-1-amd64.iso | tail -1 and the output on my machine is: /dev/sdb2.
However grub uses (hdX,Y) notation and this is where the difference between UEFI and BIOS machines comes in! So now reboot your machine, go into the grub menu and press C: This will bring you to the grub command prompt with different commands than you're used to but the only one that you need is: ls.
On my machine the output is:
(hd0) (hd1) (hd1,gpt3) (hd1,gpt2) (hd1,gpt1) (hd2) ... (hd3) ...

Huh?  4 drives? I only have 3! And it's not (hd1,4) line on a BIOS but (hd1,gpt3) in UEFI and (hd0) has no partitions at all!
Well, apparently when part of the NVRAM is used as storage and shows up as (hd0) you need to start numbering your drives at 1!  Whereas all the information you find on booting ISO files says you have to start numbering from 0 (on BIOS machines this is always true, this is not necessarily the case on some UEFI machines ! )
So the value for loopback becomes (hd2,gpt2)$GPartedISOFile as the ISO file on my machine was /dev/sdb2 (second drive hd2, second partition gpt2):
menuentry "GParted Live ISO" {
  set GPartedISOFile="/opt/Live-ISOs/gparted-live-0.31.0-1-amd64.iso"
  loopback loop (hd2,gpt2)$GPartedISOFile
}

Another difference is that the linux and initrd on BIOS machines are called linuxefi and initrdefi on UEFI machines, which gives us our final result:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry "GParted Live ISO" {
  set GPartedISOFile="/opt/Live-ISOs/gparted-live-0.31.0-1-amd64.iso"
  loopback loop (hd2,gpt2)$GPartedISOFile
  linuxefi (loop)/live/vmlinuz boot=live components config findiso=$GPartedISOFile ip=frommedia toram=filesystem.squashfs union=overlay username=user
  initrdefi (loop)/live/initrd.img
}

So now save that file, and update grub with:
update-grub

After all of the above, reboot, go into the grub menu, choose GParted Live ISO and you can now easily boot your ISO without having to hunt for a USB stick ever again!
:-)
CloneZilla Live example (for this question )
menuentry "CloneZilla ISO" {
  set ISOFile="/opt/Live-ISOs/clonezilla-live-20170905-zesty-amd64.iso"
  loopback loop (hd2,gpt2)$ISOFile
  linuxefi (loop)/live/vmlinuz boot=live components config findiso=$ISOFile ip=frommedia toram=filesystem.squashfs union=overlay
  initrdefi (loop)/live/initrd.img
}


How to setup Lenovo IdeaPad Z500 Notebook Nvidia Optimus drivers?

i have same laptop with ubuntu 12.04. I simply installed bumblebee and primusrun with software center. after this install lenovo hack(needed for us laptop): https://github.com/Bumblebee-Project/bbswitch/tree/hack-lenovo#lenovo-ideapad-y470y570-and-toshiba-satellite-p870
This work fine for me,hope this halp!


What determines what is present in gsettings?

It seems you are right, Some "default" Gsettings  are packaged along with all the official flavors derived from Ubuntu. In this case, it is packaged with a Unity lib.

Example from my Lubuntu 14.04, no Unity desktop installed:

Check for their schema file

$ grep -r com.canonical.Unity.Lenses /usr/share/glib-2.0/schemas/
Binary file /usr/share/glib-2.0/schemas/gschemas.compiled matches
/usr/share/glib-2.0/schemas/com.canonical.Unity.Lenses.gschema.xml:  <schema path="/com/canonical/unity/lenses/" id="com.canonical.Unity.Lenses" gettext-domain="libunity">

/usr/share/glib-2.0/schemas/com.canonical.Unity.Lenses.gschema.xml is there.
Check which package installed it:

$ dpkg -S /usr/share/glib-2.0/schemas/com.canonical.Unity.Lenses.gschema.xml
libunity9:amd64: /usr/share/glib-2.0/schemas/com.canonical.Unity.Lenses.gschema.xml

So it was libunity9
May be, at least one application of these was installed:

$ apt-cache rdepends libunity9
libunity9
Reverse Depends:
  thunderbird-gnome-support
  nautilus
  empathy
  libunity9:i386
  libunity9:i386
  libunity-protocol-private0:i386
  libunity-dev:i386
  xchat-indicator
  wallch
  unity-scope-onlinemusic
  unity-scope-mediascanner
  unity-china-video-scope
  unity-china-music-scope
  psensor
  liferea
  libunity-tools
  claws-mail-multi-notifier
  xchat-gnome-indicator
  unity-webapps-service
  unity-webapps-qml
  unity-scope-video-remote
  unity-scope-musicstores
  unity-scope-home
  unity-lens-video
  unity-lens-music
  unity-lens-friends
  unity-lens-files
  unity-lens-applications
  thunderbird-gnome-support
  telepathy-indicator
  shotwell
  nautilus
  libunity-protocol-private0
  libunity-dev
  libunity-dev
  libbrasero-media3-1
  gir1.2-unity-5.0
  evolution-indicator
  empathy
  deja-dup

For better understanding Gsettings related files, see Shouldn't dconf-editor and gsettings access the same database?

BTW, Some keys may not have a related schema, like the case of some Compiz settings (in Unity or Gnome session, Lubuntu session uses ini file). Even to way to accesses those keys: Dconf Path should be specified within gsettings command, see example How to use gsettings when there is no schema listed


Cannot ssh into Ubuntu Server by hostname

Unless you configure hostnames in a central location, there's no way for your laptop to know the hostname you configured on the Ubuntu server.

So if when you installed the ubuntu server you named it "bonkers", it's understandable that on the laptop ssh bonkers will not do anything, as the laptop has no idea about that hostname.

Possible solutions:

On your laptop (you didn't say which OS it is running?) add a line in the /etc/hosts file for your Ubuntu server's IP address, something like this (use the actual IP from your Ubuntu server):

10.15.30.41   ubuntu-server

Then you can do ssh ubuntu-server and it should work. Note that the location of the hosts file depends on which OS your laptop has; I'm not sure where it is on Windows, for example.
Install the avahi-daemon package on your Ubuntu server. This utilizes the mDNS protocol to "advertise" its hostname on your local network. Once it's installed and running, you should be able to ssh ubuntu-server.local (notice the .local domain) and access the server. Again, if your laptop is running Windows, I can't say if it supports mDNS; I know Ubuntu (and any other Linux with avahi-daemon installed) and Mac OS X support it out of the box.


The version 2.20.0 is a local package on your system, because it has no source repository currently associated with it. That means, either you have installed it as a .deb file manually, or you had an other source temporarily added in the past. My guess is, that you had the ppa:ubuntu-x-swat/intel-graphics-updates added to the software sources sometime earlier, did an upgrade, and later you have removed it or changed it to ubuntu-x-swat/x-updates. Based on the exact version string of the xserver-xorg-video-intel package, this seems obvious:

PPA name:       ubuntu-x-swat/x-updates
Latest version: 2:2.19.0-0ubuntu1~xup1

PPA name:       ubuntu-x-swat/intel-graphics-updates
Latest version: 2:2.20.0-0ubuntu0~precise1

Here you can find a more recent version of this driver (2.21.6):

ppa:glasen/intel-driver

If you want to downgrade a package, you have to specify the exact version number to install:

sudo apt-get install xserver-xorg-video-intel=2:2.19.0-0ubuntu1~xup1


Boot into ubuntu like you do then open terminal (ctrl+Alt+T) and type the command

sudo update-grub

reboot.


How many times in the first column of a file it appears to have any letter/number?

You can use grep:

grep -c '^[[:alnum:]]' input-file

^ is start of the line, [[:alnum:]] matches alphabets or numbers (short for alphanumeric), and -c makes grep print the count.


This seems to be a bug in the board (hdmi level shifter), it got fixed for the drm driver provided with the 4.18 kernel, and got backported to 4.14 and 4.17. Installing Ubuntu 18.10 should fix this issue.


16.04 switches HDMI to Speakers after screen dims

OK, so after a couple of hours of digging through the Internet and learning shell scripting, I've mashed-up the script below, which brutally switches sound output device to what I want.

//edit: I've also added test, if HDMI cable is connected

#!/bin/bash

while sleep 5s ; do
    SCR_SAVER_STATE=$(gnome-screensaver-command --query | grep -o "\w*active\w*")

    if [ "$SCR_SAVER_STATE" = "active" ]
    then
        # switch to speakers, if screensaver is active
        pacmd set-card-profile 0 "output:analog-stereo+input:analog-stereo"
    else
        # check, if HDMI output is available (cable connected)
        # if YES switch to HDMI, or to Speakers otherwise
        HDMI_AVAILABLE=$(pacmd list-cards | grep "hdmi-output-0" | cut -d ' ' -f 12- | rev | cut -c 2- | rev)

        if [ "$HDMI_AVAILABLE" = "yes" ]
        then
            pacmd set-card-profile 0 "output:hdmi-stereo+input:analog-stereo"
        else
            pacmd set-card-profile 0 "output:analog-stereo+input:analog-stereo"
        fi
    fi
done

I've saved the script in my home directory and added it to Startup Applications.

I guess it's very inelegant solution to the problem, but at least it works.
The script is customized for my hardware, so if you have the same problem, then you'll have to find out what are your sound output profiles. You can find all profiles running following command:

pacmd list-cards

You can also find your active profile by running this:

pacmd list-cards | grep "active profile" | cut -d ' ' -f 3-


Completely black blank screen after boot

There is a possibility of having some problem in the boot partition in which you have installed Ubuntu.

Go with this instruction to check if there is any problem there or not:

Make a bootable USB and boot your system with it. Find your main partition in which you have installed Ubuntu. You may use sudo blkid to get a list of all your partition. I assume that partition is /dev/sda1.

Make sure that partition is not mounted. Then, in terminal, use this cammand: sudo fsck -a /dev/sda1

If it finished with no error, you can restart your system. It the problem be related to what I said, it should be solved now. Your issue must be solved.


cronjob says "/bin/sh: 1: root: not found"

Cronjobs created via crontab -e are run as the user who
issues that command and thus owns that cronjob. You cannot
supply a user in the line

0 4 * * * root /sbin/reboot

to have that job run as root. If that was the case, one
could run arbitrary commands as another user. Nobody would
want that.

When you want to run a cronjob as user root you must issue

sudo crontab -e

to edit root's crontab – not yours. Drop the user specification,
i.e. add the following line:

0 4 * * * /sbin/reboot

But there is also the possibility to define cronjobs in
files below /etc/cron.d. In that case the syntax is a bit different
and the first column after the time specification must contain the
user as whom the job is to be run. But that syntax is only applicable
to files below /etc/cron.d.


Kernel driver not installed (rc=-1908) -- Again

Worked for me with below commands for Ubuntu 14.04

Download the virtual box https://www.virtualbox.org/wiki/Linux_Downloads

Remove dkms, since I installed several times this helped.

sudo apt-get remove --purge virtualbox-dkms
sudo dpkg -i Downloads/virtualbox-5.0_5.0.8-103449-Ubuntu-trusty_amd64.deb
sudo /etc/init.d/vboxdrv setup


UBUNTU 19.10, black screen instead of login screen

Even after being able to get to the normal-user desktop (by sheer luck) and unchecking Automatic Access this issue wasn't resolved at all.

After rebooting I wasn't able to reach normal-user desktop again with the same steps I described (who knows what sheer luck logged me in with Ctrl + Alt + F1 / F2 / Canc)

So I tried to login in Recovery Mode, got to the # prompt to login (as answered in this other Black Screen issue) and ran startx.

It worked! BUT after rebooting I got the same black screen and I couldn't login from # prompt because it told me something like "failed to boot"

Then I was able to login only when from Recovery I chose

dpkg       Repair damaged packages

and then reboot.

It tok more time than usual, but it booted up, and to be sure I even launched Software Updates and everything is smooth now


sudo ln -s /usr/lib /usr/lib64 ln: failed to create symbolic link '/usr/lib64/lib': File exists

sudo ln -s /usr/lib /usr/lib64 tries to create a symbolic link lib inside of /usr/lib64 but there already is a lib directory inside /usr/lib64 so it can't create the symbolic link.

You should probably try to create the symbolic link of specific libraries that you want from /usr/lib inside /usr/lib64.

For example:
If you want libm.so to be found inside /usr/lib64do

ln -s /usr/lib/libm.so /usr/lib64/lib


What's the meaning of "action flag" of a package?

With aptitude you first mark what you want to have done, and then you proceed to do it. For example you might press the find a package you want to install and then press the "+" key. Assuming the package isn't currently installed the first two flags then will be pi, meaning the package is either purged or never installed, and is to be installed.

To actually install it, you press the g key and aptitude will proceed to install it.

If you change your mind before you do that you can "Cancel pending actions" in the Actions menu and anything you had marked for installation or update will be unmarked. There are menus and reminders about what keys do what on the top of the aptitude program's display.

The synaptics program has a similar approach but has a real gui and may be easier to use.

The other approach is to use the ubuntu software center to install software and the update-manager to keep it up to date. They do things more immediately.


Open a terminal by pressing CTRL+ALT+T and type the following:

sudo rm /var/lib/apt/lists/* -vf
sudo apt-get clean
sudo apt-get update && sudo apt-get upgrade

If you still get the same error then:

gksudo nautilus

Navigate to folder /var/cache/apt/archives and locate the file 'linux-firmware_1.79.9_all.deb'. Delete it.
Then repeat the above commands.

SOURCE: http://ubuntuforums.org/showthread.php?t=2191981


How to install OpenVPN with 2-facor authentication

After creating a fully functional VPN server I continued the configuration using this manual :

https://www.howtoforge.com/securing-openvpn-with-a-one-time-password-otp-on-ubuntu

One important thing that is not mentioned in the manual:
to every user that is going to use this VPN a user account with a specific folder must be created.
The Google-Authenticator store the credentials on the user home folder.


What exactly is --no-daemon function in Gnome-power-manager

The description of the --no-daemon option from man gnome-power-manager is:

  --no-daemon

    Do not detach gnome-power-manager into the background so that error messages will be displayed on console.

From this it looks like the option is merely preventing gnome-power-manager from forking output into a background process (e.g. it will write to the console rather than a log file or similar), so running with this option shouldn't be a problem.


Mouse click not working in Ubuntu, Xfce and Xubuntu

A distribution upgrade was what was needed:

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

I don't know how but my previous kernel must have been corrupted.


Binding Mouse Button to Another Mouse Button with xbindkeys - XEV bugs out

xbindkeys

I think that you need a third line for each of your shortcuts.  Maybe it's not a must, but I'm looking at the examples I have set up:

"pactl set-sink-volume @DEFAULT_SINK@ +5%"
    m:0x4 + c:112
    Control + Prior

"pactl set-sink-volume @DEFAULT_SINK@ -10%"
    m:0x4 + c:117
    Control + Next

# xautomation package
# Print Date
'"xte "keyup Super_L" "keyup Insert" "str `date +%Y.%m.%d`" "usleep 10" "keydown Super_L""'
    m:0x40 + c:118
    Mod4 + Insert

So, each of my entries has a third line, which defines the shortcut.  Also, we have to release the pressed keys ourselves, and typically before the command we run.  This is further complicated with Shift, as I've found releasing Shift causes problems.

xmodmap (user specific)

Typically, xbindkeys is used for complicated bindings, or to run scripts/commands.  You could give modmap a try, which might be closer to the core of what you're trying to accomplish.  Using xev, or evtest, you can determine the Key Code that is used by the mouse, and then tell X to interpret it as another Key Code.

~/.Xmodmap

keycode 97 = Control_R NoSymbol Control_R

~/.xinitrc

[[ -f ~/.Xmodmap ]] && xmodmap ~/.Xmodmap

This tells X how to handle Key Code 97 (random, non-mouse) when pressed normally, or with modifiers (Shift, Alt, etc).  You'd have the mappings in ~/.Xmodmap and load it via $ modmap ~/.Xmodmap, typically alongside X, so in ~/.xinitrc.  evtest is 'better' than xev in that it will help you to find the device you want to test, vs make you fumble around the system finding it in the /dev lists.

udev (system-wide)

Another solution is to use udev/evdev, and to have the system perform this translation, regardless of if/when you start X, and with each connection of the device.  This is a bit more complicated, but once you get used to some settings, you can work to migrate them here.

Custom rules are places in /etc/udev/hwdb.d/  This is the hardware database [configuration] directory.  These are loaded in order, so files are normally prefixed with two digits, but this only matters when later rules overwrite earlier rules.  This is a list of devices, by USB bus, device and vendor IDs.  This method is ideal because you can remap keys for a specific keyboard, and not all keyboards.

/etc/udev/hwdb.d/99-myMouse.hwdb

evdev:input:bIDvIDpID1*
  KEYBOARD_KEY_210=menu

evdev:input:bIDvIDpID2*
  KEYBOARD_KEY_210=menu

This example finds two input devices, on the same USB bus, and from the same Vendor, but with different IDs.  Both map Key Code 210 to the Menu button.  You can learn to remap the keys on your mouse this way as well.

The system will have hwdb files in another directory, /usr/lib/udev/hwdb.d.  These files should not be edited, but you can use them as examples to help along the way.

After making changes, the database needs to be updated:

sudo systemd-hwdb update


Upgrade Desktop form 14.04 LTS "No new release found"

Command do-release-upgrade -c -d at this moment will get 16.04 LTS


Trying to install TP Link AC 600 Archer T2UH

This issue was opened on kerenl 4.13.0 in mt7610u git

ulli-kroll wrote:

FORTIFY_SOURCE is introduced in v4.13 from the kernel self protecting team.
Need some time to fix this, they are maybe more errors like in this driver on mt7612u

And later reported that this issue was fixed, and suggested using the up-to-date version of the git:

  Please check current git and close this isssue ..

I'd suggest checking mt7610u git repo - https://github.com/ulli-kroll/mt7610u


How can I best retest a bug in a newer or development release?

For testing Maverick, testdrive is easiest. It'll automatically download the latest Maverick daily and run it in a Virtual Machine.

sudo apt-get install testdrive virtualbox-ose
testdrive


Don't mess with any of your files.

The issue is on skypes end currently, if it's urgent you can try to connect via the website version of skype at http://web.skype.com


There's no utility that will do this in a satisfactory way that I'm aware of. However, you can use xsetwacom on the command-line to solve your problem, cfr. "Configuring Wacom Tablet buttons and options". It's easier than it looks at first hand.


Maybe UFW (firewall) is what you need.

Try:

sudo ufw enable

The default config will deny all incoming connections and allow all outgoing connections.

If you love GUI, you can use the GUI version: Gufw.


I would like to access my localhost files with an ftp programme

You are connecting using SSH, not FTP. This has nothing to do with your Apache or ftp server. You must ensure that the ssh server on your computer works and allows you to log in. See for example this link: http://www.unixtutorial.org/2009/05/ubuntu-ssh-how-to-enable-secure-shell-in-ubuntu/


Does ubuntu-make keep installed software up-to-date?

You will have to run umake again for them to update, it will download the latest copy and re-install overtop of the existing installation.


The best way that I have found is clonezilla, it will make a complete backup which is actually an image and restore it to your new drive.
Here is a link clonezilla


I think this is not possible. You would have to reinstall the whole system, because you need to "change" all packages in your system from 32-bit binaries to 64-bit binaries.

Why do you need a 64-bit system? If you have 4 GB RAM (or more), you can just install PAE kernel (package linux-generic-pae). PAE supports up to 64 GB of RAM.


nfs client reconnect after interface change

First to solve problem with no possibility to remount partition.

Try with

umount -f -l /mnt/myfolder

that will fix the problem.

-f – Force unmount (in case of an unreachable NFS system).

-l – Lazy unmount. Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy anymore.

After successfully umount you will be able to mount again.

Now we can make some script to do auto remount based on network interface statu. You can use /etc/network/if-up.d/ if you wont action when specific interface go up.

Make script called script with execute permissions 755

sudo nano /etc/network/if-up.d/script

# Check for specific interface if desired
[ "$IFACE" != "wlan0" ] || exit 0
# Do something
sudo umount -f -l /mnt/myfolder
# then call your code to mounting `nfs`
sudo mount ...

This script will be executed when interface wlan0 go up. Script will umount and after that mount your nfs
Also you can create script for eth0 interface

sudo nano /etc/network/if-up.d/script2

# Check for specific interface if desired
[ "$IFACE" != "eth0" ] || exit 0
# Do something
sudo umount -f -l /mnt/myfolder
# then call your code to mounting `nfs`
sudo mount ...


I can't get nvidia driver to work on ubuntu 18.04.3

NVM I found a solution: just disable secure boot.


You don't really need to defrag Btrfs filesystems manually.

Yes, Btrfs is COW (copy-on-write), which would imply it fragments files much more than Ext, but this is addressed in several aspects of the design, including the ability to easily defrag the filesystem while it is online. This excerpt provides more detail (emphasis mine):

  Automatic defragmentation

  COW (copy-on-write) filesystems have many advantages, but they also have some disadvantages, for example fragmentation. Btrfs lays out the data sequentially when files are written to the disk for first time, but a COW design implies that any subsequent modification to the file must not be written on top of the old data, but be placed in a free block, which will cause fragmentation (RPM databases are a common case of this problem). Additionally, it suffers the fragmentation problems common to all filesystems.

  Btrfs already offers alternatives to fight this problem: First, it supports online defragmentation using the command btrfs filesystem defragment. Second, it has a mount option, -o nodatacow, that disables COW for data. Now btrfs adds a third option, the -o autodefrag mount option. This mechanism detects small random writes into files and queues them up for an automatic defrag process, so the filesystem will defragment itself while it's used. It isn't suited to virtualization or big database workloads yet, but works well for smaller files such as rpm, SQLite or bdb databases.

So, as long as you don't plan to run IO-intensive software like a database under significant load, you should be all good, as long as you mount your filesystems with the autodefrag option.

To check the fragmentation of files, you can use the filefrag utility:

$ find /path -type f -exec filefrag {} + >frag.list
# Now you can use your favourite tools to sort the data

On Systemd systems, /var/log/journal/ will probably be the most fragmented. You can also look at ~/.mozilla and other browsers databases.

To defragment, use:

$ sudo btrfs fi defrag -r /path


The trick is to convert the PDF to images and back. For example, by using ImageMagick.
Install ImageMagick unless you have it:

sudo apt-get install imagemagick

Convert the document to images and back:

convert 2_gdp_issues_ita.pdf pg.png
convert pg*.png doc.pdf

This will give you a fast PDF document with each page as an image. You will also have several pg*.png files, one per page.

To get the 2x2 slides per page use montage. I added the geometry option to avoid fuzzy slide images:

montage  -geometry 660x -tile 2x2 pg*.png doc2x2.pdf

You can use convert to make a grayscale document:

convert -type Grayscale doc.pdf doc_gray.pdf


By in use I am assuming the drive from which OS is booted. Just like you cannot change the tyre on a running car, you cannot do any partitioning on the drive from which your Linux is booted.
You must stop the car.
You may use live boot (the one you made during installing Ubuntu will work fine), or boot into another OS (in case of a dual boot).
You cannot really make any changes to the drive on which you Linux is booted from. However this can be done on Windows 10, but that is something not relevant here. Just mentioned it for knowledge.


Wireless is connecting but Internet is not working

When you try to load a page in your web browser does it say something like "Server Not Found"? If so, try this command in the terminal:

sudo dhclient

It will ask for your password. Enter that then press enter.

Then reopen your web browser and try again. If that doesn't work sorry, that's all I know of.


You'll need to turn of secure boot in bios

You will now have an option to go into your UEFI boot settings.

Within the UEFI settings look for the option to turn off secure boot. You don't have to switch to legacy mode and you shouldn't switch to legacy mode as this will not help your cause.

Save and exit the UEFI settings
and reboot you'll get the option to boot into lInux from live CD


Ubuntu 16.04 LTS freezes when printing to HP OfficeJet 8710

I would suggest that you install hplip-gui and then uninstall printer and reinstall using the hplip-gui (it's called 'hp toolbox' in the menu.)


It's got something to do with the kernel and systemd. Penguins in linux mint and arch clan are also facing this problem. Just upgrade your kernel to version 4.5 to get rid of it. here is a step by step guide
for the same.


How to securely erase hard drive with ubuntu live cd?

The best way to wipe a SSD is to issue an ATA SECURE_ERASE command rather than using low-level utilities such as dd, because it's faster and more reliable, due to a number of reasons.

Run lsblk and determine to which block device the drive is currently mapped (if you have only that drive attached it will likely be mapped to /dev/sda)
Run sudo hdparm -I /dev/sda and determine whether the drive is currently frozen or not:

Security:
    Master password revision code = 65534
        supported
    not enabled
    not locked
        **frozen**
    not expired: security count
        supported: enhanced erase
    2min for SECURITY ERASE UNIT. 8min for ENHANCED SECURITY ERASE UNIT.

If it is, suspend the system and resume:

Security:
    Master password revision code = 65534
        supported
    not enabled
    not locked
    not frozen
    not expired: security count
        supported: enhanced erase
    2min for SECURITY ERASE UNIT. 8min for ENHANCED SECURITY ERASE UNIT.

Run sudo hdparm --user-master u --security-set-pass password /dev/sda to set a security password (this is mandatory in order to securely erase the drive)
Run sudo hdparm --user-master u --security-erase password /dev/sda to securely erase the drive

As pointed out by Takkat, mind that this won't catch reallocated bad sectors.

To catch those as well, if you have any and if supported by the drive, you can issue an enhanced ATA SECURE_ERASE command, that writes manufacturer-predefined patterns multiple times and catches reallocated bad sectors as well:

Run sudo hdparm --user-master u --security-erase-enhanced password /dev/sda to securely erase the drive


Ok..

The problem came from the autologin. It was (visibly) too fast. I disabled it and wait for the first wifi connection and this problem disappears.

I hope this will help someone else.


I can upload the image and create the instance from the CLI but not from the GUI. The instance command is as follows:
microstack.openstack server create --image Ubuntu18(your image name) --flavor m1.medium(your choice) --network test(it is already set in microstack) --key-name  instance_name


Lubuntu 13.10 missing Try without installation option

Usually there is a "try without installing" option, though it seems that this would have been a problem with the live image you created, not your computer.

As far as trying a live USB, which is usually more convenient, it's likely that your old computer doesn't support booting from USB because the BIOS is old. I once had this problem and solved it by updating the BIOS to the most recent version.

Here's an image of what the unetbootin disk options should look like (is this the menu you're referring to?):


Ubuntu 12.10 is draining my battery really fast

Do the following things and your battery life will be better

 sudo apt-get install indicator-cpufreq

Place the following script /etc/pm/power.d/ and give execution rights

 sudo gedit /etc/pm/power.d/power

Copy & Paste

 #!/bin/sh

if on_ac_power; then

 ##### Start AC powered settings #####

 # Disable laptop mode
echo 0 > /proc/sys/vm/laptop_mode

 #NMI watchdog should be turned on
for foo in /proc/sys/kernel/nmi_watchdog;
do echo 1 > $foo;
done

 # Set SATA channel: max performance
for foo in /sys/class/scsi_host/host*/link_power_management_policy;
do echo max_performance > $foo;
done

 # CPU Governor: conservative NOT Performance
 # Laptop get start heating up on Performance
 # You can change the freq with indicator-cpufreq
for foo in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor;
do echo conservative > $foo;
done

 # Disable USB autosuspend
for foo in /sys/bus/usb/devices/*/power/level;
do echo on > $foo;
done

 # Disable PCI autosuspend
for foo in /sys/bus/pci/devices/*/power/control;
do echo on > $foo;
done

 # Disable power saving for intel sound
echo 0 > /sys/module/snd_hda_intel/parameters/power_save

 # Disable power saving for Wireless card
iw dev wlan0 set power_save off

 # Disabling auto suspending USB
for i in /sys/bus/usb/devices/*/power/autosuspend;
do echo 2 > $i;
done

 ##### End AC powered settings #####

 else

 ##### Start battery powered settings #####

 # Enable Laptop-Mode disk writing
echo 5 > /proc/sys/vm/laptop_mode

 #NMI watchdog should be turned on
for foo in /proc/sys/kernel/nmi_watchdog;
do echo 0 > $foo;
done

 # Set SATA channel to power saving
for foo in /sys/class/scsi_host/host*/link_power_management_policy;
do echo min_power > $foo;
done

 # Select conservative CPU Governor
for foo in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor;
do echo conservative > $foo;
done

 # Activate USB autosuspend
 for foo in /sys/bus/usb/devices/*/power/level;
 do echo auto > $foo;
 done

 # Activate PCI autosuspend
for foo in /sys/bus/pci/devices/*/power/control;
do echo auto > $foo;
done

 # Power Saving for INTEL sound
echo 1 > /sys/module/snd_hda_intel/parameters/power_save

 # Power saving ON for Wireless
iw dev wlan0 set power_save on

 # Auto Suspending USB devices
for i in /sys/bus/usb/devices/*/power/autosuspend;
do echo 1 > $i;
done

 ##### End battery powered settings #####

fi

Make it executable

 sudo chmod +x /etc/pm/power.d/power

Please have a look on the following links

Specific short battery life problem with Sony VAIO laptop

How do I make Powertop changes permanent?

https://wiki.ubuntu.com/Kernel/PowerManagement/PowerSavingTweaks


How do I write a script that runs on startup?

Script should look like:

#!/bin/sh

# Prevent unset variable problems
set -u

# Change CPU setting
cpufreq-set -c 0 -g performance
cpufreq-set -c 1 -g performance
cpufreq-set -c 2 -g performance
cpufreq-set -c 3 -g performance
modprobe msr
wrmsr 0x1FC 17422

Save the script somewhere: /Path/to/script.sh

Open the root crontab using:

# crontab -u root -e

In it, add these lines:

# Set CPU frequency on reboot
@reboot /Path/to/script.sh

Save and exit.

Hope that helps!


How to recreate the user account at each startup?

Guest session in Ubuntu 16.04 LTS

Install Ubuntu 16.04 LTS from the first point release, 16.04.1. It will stay with the xenial kernel series, now at 4.4.0-112, and will be supported until April 2021. You find the iso file and md5sum at the following link,

old-releases.ubuntu.com/releases/xenial

There is a working guest session in this version. It is true that it is not as safe as a confined session, but I think it can be good enough for this purpose.

The guest session is temporary. A new guest session is created every time someone logs in to it.

Live Ubuntu

A simple alternative is a live Ubuntu system (typically booted from a DVD disk or USB pendrive). It can be installed into an internal drive, if that would be best, for example with mkusb.

A live system (live-only, not persistent live) will be reset to the original state after reboot or shutdown.


Cannot locate software (gnuplot) in drive or synaptic but showing in terminal

You can use the command which to see where a command is, e.g. which octave may return /usr/bin/octave--- there isn't unified directory that's equivalent to Program Files, but depending on the kind of program and how it was installed, you may want /bin, /usr/bin, or /usr/local/bin, among others.