Can I install the gnu grub menu from windows?

Windows never recognises linux installations; it just overwrites the boot on the disk.
You need to go back to the linux install disk, restart using that to boot, and then re-write the grub system;
start a terminal, & do this:

sudo -s
mount /dev/sda /mnt
cd /mnt/
mount --bind /proc proc
mount --bind /sys sys
mount --bind /dev dev
mount --bind /usr usr
chroot .
update-grub
grub-install
reboot

It is possible to shorten this but may then not always work; what you are doing is mounting your main drive (I've assumed one drive on the PC) and lying to the system, in effect, to make the grub programs run on your drive not the boot disk, then re-install the bootloader; grub will recognise Windows, and Linux, fix things, and then you reboot (removing the CD or USB you booted from) - et voila.
This has been covered a number of times before, you're not alone!


iostat without interval and counts parameter shows the overall statistics since boot time so that the average values are leveled down by quiet times.

Use iostat <options> 10 5 to get 5 measurements of 10 seconds each to show your current activity.


Is it possible to have a different background for each workspace?

Ubuntu 10.04

You can get the Wallpaper plugin for Compiz by installing compiz-fusion-plugins-extra (sudo apt-get install compiz-fusion-plugins-extra). It will show up under the Utility category in CompizConfig Settings Manager.

Before you can use it, you'll have to configure Nautilus to not draw the desktop. Run gconf-editor and uncheck the setting /apps/nautilus/preferences/show_desktop. This will make all of your desktop icons disappear, and there is no solution to this drawback at this time.

To configure the Wallpaper plugin, add images to the list of backgrounds. They will be assigned to workspaces in the order they are listed, and you don't have to have the exact right number:

The result:


You have to edit your grub first.

sudo gedit /etc/default/grub

Search for the line GRUB_DEFAULT=0 and modify it to GRUB_DEFAULT=saved

Update your grub using the following command.

sudo update-grub

Now create a script file,

sudo gedit switch-to-windows.sh

Then add these lines.

#!/bin/bash
WINDOWS_ENTRY=`grep menuentry /boot/grub/grub.cfg  | grep --line-number Windows`
MENU_NUMBER=$(( `echo $WINDOWS_ENTRY | sed -e "s/:.*//"` - 1 ))
sudo grub-reboot $MENU_NUMBER
sudo reboot

Make the script executable.

sudo chmod +x switch-to-windows.sh

And now you can run this script from terminal to reboot into windows.

./switch-to-windows.sh

Or you can execute the following command in your terminal

sudo grub-reboot X

Where X is the menuentry position of the OS you want to restart in from the GRUB menu.(starting with 0 as the first entry)

For Example:

If this is your grub menu and if you want to boot into windows you should give the value of X as 5.
sudo grub-reboot 5

You can also create a launcher for the above command,so that double clicking the launcher will reboot into windows.


NVIDIA GeForce 7300 GT legacy driver on 20.04

My slowenian is a little rusty, but google told me, that it means:
There is no file or directory with this name

So my educated guess is, that you did not install the linux headers, or at least not the right ones. I've had that problem several times in debian: my Kernel and the headers were not the same (I still didn't figure out why).
So check your kernel version with uname -a and compare them with your linux headers. They must be the same.


The .tar.gz file (not .zip) downloaded from their website (you did try downloading Linux version, didn't you?) contains a file called starter which is a shell script.

I have a strong suspicion this file can be used to start Spark 2.6.3


Installing on an existent Windows partition

Do this:

Boot to Windows Vista and look for the size of I: (take a photo if need be).
Now, boot with Ubuntu DVD and compare the size of partitions with the size of I:. Now, the size that matches the partition from before is your I: drive.

Even if the size matches with more than one partition, don't worry and check for the partition that has most free space as because you have just recently formatted I:.

Also, you can easily dual-boot with Windows 7, no need to do anything special.


Your firmware has been loaded succesfully. You can see it here

[    3.027457] iwlwifi 0000:01:00.0: loaded firmware version 25.30.13.0 op_mode iwlmvm

It is not shown in modinfo for some reason but it does not affect anything. Probably the modinfo binary should be updated.

I am using Ubuntu 16.04 and it shows up to 13. Yours is older and shows up to 12.

See my output:

pilot6@X200MA:~$ modinfo iwlwifi | grep firmware
firmware:       iwlwifi-100-5.ucode
firmware:       iwlwifi-1000-5.ucode
firmware:       iwlwifi-135-6.ucode
firmware:       iwlwifi-105-6.ucode
firmware:       iwlwifi-2030-6.ucode
firmware:       iwlwifi-2000-6.ucode
firmware:       iwlwifi-5150-2.ucode
firmware:       iwlwifi-5000-5.ucode
firmware:       iwlwifi-6000g2b-6.ucode
firmware:       iwlwifi-6000g2a-5.ucode
firmware:       iwlwifi-6050-5.ucode
firmware:       iwlwifi-6000-4.ucode
firmware:       iwlwifi-7265D-13.ucode
firmware:       iwlwifi-7265-13.ucode
firmware:       iwlwifi-3160-13.ucode
firmware:       iwlwifi-7260-13.ucode
firmware:       iwlwifi-8000-13.ucode

[   11.883068] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7260-17.ucode failed with error -2
[   11.949453] iwlwifi 0000:02:00.0: loaded firmware version 16.242414.0 op_mode iwlmvm
[   12.173196] iwlwifi 0000:02:00.0: Detected Intel(R) Dual Band Wireless AC 7260, REV=0x144


Netbooting bare metal nodes, pass VLAN tag to the installer

What I did was:

Configure the system manually

Configure the NIC manually

Run the following command to figure out what options preseed/debian-installer used for netcfg. Many options are not documented.

Append netcfg/... options to my Kernel command-line, as this example shows:
 LABEL linux
     KERNEL boot/ubuntu-mirror-linux
     APPEND initrd=boot/ubuntu-mirror-initrd.gz interface=auto url=http://mirrors.example.org/somefile.cfg ramdisk_size=10800 root=/dev/rd/0 rw auto ... ksdevice=bootif priority=medium netcfg/use_vlan=true netcfg/vlan_id=999
     IPAPPEND 2


download boot-repair-disk and run it . for details go through this:-

https://help.ubuntu.com/community/Boot-Repair

this will restore your grub file !!


using the following command , get info about your drives

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

Then mount the drives using following command

sudo ntfsfix /dev/sda1

Here sda1 i used as example , replace sda1 with corresponding sda number ,command 1 gives the sda number of your drive

and remember windows drives are of ntfs partition


had the same problem with anno2070.
read the comments below this ticket:
http://bugs.winehq.org/show_bug.cgi?id=33673

for me the installation of crypt32.dll with winetricks did the trick :)

but read till end first, cause this will break your updates through uplay.


Google Chrome opens in a new window in a new launcher icon

rm $HOME/.local/share/applications/google-chrome-*.desktop

From then on, Unity launcher won't create a second icon when you open Chrome.

I suspect that file is created when Chrome navigates directly to a site upon launch. The google-chrome-*.desktop file gives Unity a different Name value for Google Chrome than that defined when the application was added to the launcher, so Unity launcher doesn't know it's the same application.


How to move the sound notification on 17.10?

You can install the Move OSD Windows extension, to change the location of the volume/brightness OSD popups.


It seems I need to remove unity-webapps-common to remove the shopping lens, including amazon.

To remove unity-webapps-common, open the Software center and type "Amazon" and remove the application with the Amazon logo as the application icon or open a terminal using Ctrl+Alt+t and type:

sudo apt-get remove unity-webapps-common


Unable to chainload OS X Clover bootloader from GRUB

You MUST pay attention to your boot mode: BIOS/CSM/legacy or EFI/UEFI.

The last I checked, Chimera was strictly a BIOS-mode boot loader. Because GRUB can't change from EFI-mode to BIOS-mode (or vice-versa), this implies that your GRUB is (or at least was) also installed in BIOS mode. If you've switched GRUB from BIOS-mode to EFI-mode, that's a critical detail.

Clover, OTOH, is more complex. Its core is as an EFI-mode boot manager that launches OS X's EFI-mode boot loader; however, Clover includes a complete EFI implementation that runs like a BIOS-mode boot loader -- essentially, an EFI that runs as software on a BIOS-mode computer, rather than as firmware. Thus, Clover can run on either BIOS-mode computers or on EFI-based computers. If you've made no changes to GRUB, you will be able to launch Clover from GRUB only if you've also installed Clover's BIOS-mode EFI "emulator" software; and then you'll need to launch Clover much as you had been launching Chameleon. Your first couple of Clover examples (the ones that referenced bootx64.efi) would work on an EFI-based computer running an EFI-mode version of GRUB, but will not work if you're using a BIOS-mode computer. Your final example (with the chainloader +1 line) is for a BIOS-mode boot, and so might work if you've installed Clover's BIOS-mode components.

Stepping back a bit, you may want to examine your other OS components, as well as your computer's capabilities. If your computer was introduced in mid-2011 or later, it's probably EFI-based; but if it's older, it's probably a BIOS-only machine. Ubuntu is easy to switch between boot modes, providing you know how to install suitable boot loaders for each mode. Windows is a little trickier, since it ties its partition table type to its boot mode -- Windows boots in BIOS mode only from MBR disks and in EFI mode only from GPT disks. (I've heard of some exceptions to this rule, but they're pretty exotic.) Thus, switching the Windows boot mode requires changing the partition table and installing a new boot loader.

Between all these issues, there's a lot of complexity in your triple-boot setup, and you've omitted the most important details -- namely, the partition table types and boot modes of most of your OSes (although I've inferred some of that information). This makes it difficult to offer specific advice. One point, though: Clover configuration and setup is well beyond the scope of this site. If you want to use GRUB as your primary boot manager, though, you must pay attention to your boot mode and install follow-on boot loaders in the same mode (BIOS/CSM/legacy vs. EFi/UEFI) that GRUB uses.

EDIT:

Given your new information, there are several possible ways to proceed. One is, as you suggest, to convert both Windows and Ubuntu to boot in EFI mode. Another is a hybrid setup. One way to do this would be as follows:

Download a USB flash drive or CD-R version of my rEFInd boot manager and create a boot medium from it.
Boot to rEFInd. It should show an option for Ubuntu, and possibly some others. (If there's an OS X option, ignore it; it won't work. If there's a Clover option, it might work.)
Boot Ubuntu.
Install the PPA or Debian package version of rEFInd.
Edit /boot/efi/EFI/refind/refind.conf: Uncomment the scanfor line and add hdbios to the list of options.
Remove the rEFInd external boot medium and reboot in EFI mode. rEFInd should come up and enable you to boot Ubuntu, and maybe Clover (and from there, OS X). There should also be one or more gray diamond-shaped icons, one of which should boot Windows.
If you see just one gray icon-shaped icon and it doesn't boot Windows, you must edit refind.conf again, and uncomment the uefi_deep_legacy_scan option. Note that you may need to mount your ESP manually, or add an option to /etc/fstab to do so automatically.

You may need some more tweaking at this point, but that's the basic outline of it. In this configuration, rEFInd will enable you to boot Ubuntu (in EFI mode), Clover (in EFI mode), or Windows (in BIOS mode); and Clover should boot OS X (and may show options for Windows and/or Linux, too).

Something similar should be possible with Clover as the primary boot manager; however, with this setup, Clover will show options for OS X (in EFI mode), GRUB (in BIOS mode; or in EFI mode if you install the grub-efi package), and Windows (in BIOS mode). I don't know the exact steps you'd take to set this up. Whether you prefer Clover or rEFInd as your primary boot menu is a matter of personal preference.

Your plan to convert everything to EFI mode is also workable, but will involve more effort and slightly more risk in the short term. Once set up, you could use GRUB, Clover, or rEFInd as your primary boot manager. If you used GRUB or rEFInd as the primary boot manager, you'd still need Clover to boot OS X; and if you used Clover as the primary boot manager, you'd need to use GRUB or rEFInd to boot Ubuntu.

You could use rEFInd on a USB flash drive or CD-R to play with some of these options to see how they'd work, with negligible risk to your configuration, since you'll make no changes to your hard disk.

In sum, you've got a lot of options for how to proceed, with no clear winner in terms of ease of use or complexity -- they all should work pretty well, but you'll need two boot managers for at least one OS boot path.


This thread might give you hints http://ubuntuforums.org/showthread.php?t=2145047. Some guys switched to nvidia-experimental or the proprietary video driver and reinstalled apport.


How to get gvfs to automount removable devices when not using Unity or Gnome Shell

Since this question didn't get any answers I went ahead and wrote gvfs-automount.

When running it will listen for "volume-added" events, and if the added volume has "should_automount" set, mounts it. It also generates a desktop notification when a volume is mounted.


Will installing Ubuntu on VirtualBox erase data on the host OS?

There are a couple of things to know and a couple of things to check.

First off, virtualbox is a way to isolate and create a miniature machine inside of a bigger machine. This being said once you have created the disk space for the Virtual Machine, all it sees it that small space you gave it.

In the above picture you see the Virtual Box set up screen, this is the main screen where you set the size of disk for the Operating system. Once this has been set and you go through the other settings you are good.

At this point you will start the Virtual Machine, the way Virtual Box works is that that machine only sees that disk, it thinks that it is on a computer all by itself with whatever sized hard drive you set. So you can go ahead and set it to fill that size, but I still check during set up that the disk size is what I allocated during the Machine Setup in the picture above.

From here you should be good to go to set it up and run it.


Run the upgrade from Ubuntu 18.04 to Ubuntu 20.04 in the terminal with do-release-upgrade -d and copy the error message into a text file. The error message will probably say which log file to look in to display the complete error message. An uncorrected error can block your upgrade forever, but if you correct the error the upgrade will proceed normally. Note: Please simulate all corrections before running them to avoid crippling your operating system.
When I tried this on my Ubuntu 18.04 the results were that three Python 2.x packages could not be upgraded, and that was blocking the upgrade from
Ubuntu 18.04 to Ubuntu 20.04. I simulated uninstalling each of these packages one by one. Uninstalling two of the three packages would also have uninstalled about 1GB of other packages that had these packages as a dependency. Uninstalling the third package with apt remove --simulate <package> simulated only uninstalling itself and removed no other packages. After uninstalling this package the upgrade to Ubuntu 20.04 proceeded to the end without errors.

Thanks. I think all went the right way. I found the problem that this repository is not available: http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease, so I changed it to http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease.


Ubuntu 18.04 freezes when starting up MATLAB

Unfortunately still not solved. Trying some things out with the MATLAB helpdesk seems to indicate this is a system issue related to Ryzen.
There seems to be known issues with Linux on various Ryzens:

Unable to install Ubuntu 18.04 on AMD Ryzen 2500U with Radeon Vega 8 Gfx
http://kulminaator.blogspot.com/2018/06/linux-on-amd-ryzen-2500u-powered-laptop.html
https://bugzilla.kernel.org/show_bug.cgi?id=196683
https://community.amd.com/thread/225795

Other than that, there are many discussions on this soft lockup problem, none with a clear solution. Causes include graphics card, graphics driver, kernel, BIOS settings, power supply, etc.:

https://unix.stackexchange.com/questions/70377/bug-soft-lockup-cpu-stuck-for-x-seconds
NMI watchdog: BUG: soft lockup - CPU#2 stuck for 23s! [plymouthd:305]
NMI watchdog: BUG: soft lockup - CPU#2 stuck for 23s! [nvidia-smi:566]
Random freezes on Ubuntu 18.04 with error: "watchdog: BUG: soft lockup - CPU#11 stuck for 22s" followed by "NMI watchdog hard LOCKUP"
Watchdog: BUG: soft lockup - CPU#4 stuck for 22s!


Is there a way to make it work from php?

Not really.

  How copy ssh key to authorized_keys using php shell_exec?

We do things like this in 2 steps:

Have PHP store the key into a file on the server.
Have a cron script pick up the file with then key and do the update.

The cron script runs as root so is capable of doing the update.


Missing nemo right-click "extract/compress files"

Very simply, all you should need to do is install the nemo-fileroller package:

sudo apt-get install nemo-fileroller

To apply the changes quit the file-manager with

nemo -q

to then (re-)start it like you normally would.


There's no need to inconveniently switch to a different machine. Ubuntu Core is so lightweight that you can easily run it as a guest OS in VirtualBox by converting it into a VDI for VirtualBox. Create a new VM, select the VDI as the hard drive image, and boot.


NVIDIA config missing "driver line" in default device section, not booting to gui

I found out that the problem is my laptop having a NVIDIA Optimus card, making it impossible to use it and be able to get Unity..

Though I also found this thread that says that this guy solved it and now has an automatic process called prime-ng bumblebee. But I haven't tried it out yet.

Update: by now there are two (competing) projects: ironhide (from the original author of bumblebee) and Bumblebee-Project (spin-off/continuation of the original bumblebee).


How do I get a non-standard non-repo version of python under package management?

I asked this in chat some time ago, and got a probably simple enough to compile 3.4 yourself... which is true.

I, however, thought it should be documented on-site that a good ppa to use for this purpose is the deadsnakes repo.  Reasoning is that if pip uses travis-ci... and travis-ci uses deadsnakes... I should get on the train or get out of the way.

I'm confident 3.4 will be there ahead of mainline adoption, if I need a testing environment.  So, it's not there yet, but it will be -- is probably the best answer I could have gotten.


Running Virtual box and Ubuntu 17.04 on a Razer Blade Stealth - time outs

I had the same problem with all vagrant boxes and found the solution to be:

removing the second line in the /etc/hosts file
just uncomment or remove the line containing:

 127.0.1.1 [computer-name]

Installing net-tools:
It seems like ubuntu 17.04 is not installing the package net-tools anymore.

So installing them via

 sudo apt-get install net-tools

and it should work again.


In scp you can use the -o option to pass ssh options, used to log in for the file transfer.

So, if you want to make scp log in as admin, use User=admin

so your scp command would become something like

scp -o User=admin -P port -i public_key $@


How to increase size of root partition when not in order with home?

You are pretty near to the correct way, but you are missing important steps, also there is no need to resize partitions twice.

Backup any important data which may exist in your /home-partition.
Boot into live environment start gparted and turn swap-off.
Reduce the size of the /home-partition sda6 from the left by about 15GB.
Move the swap-partition sda5 to the right.
Reduce the size of the extended partition sda4 from the left.
Increase the size of the /-partition sda3 to the right.

The extended partition sda4 is a container for logical partitions (in your case this are the swap-partition and the home-partition). Your /-partition is a primary partition and can't use any space inside the extended partition, that's why you have to reduce the size of the extended partition too as described in step 5.

If you use a laptop, make sure your power supply is connected, you don't want to run out of battery while performing these steps!

And no, you don't need to mount any partitions while performing these steps, you can not edit a mounted partition, a mounted partition would be automatically locked.


How to open terminal from terminal and run a program(script)?

You can create a custom profile in GNOME Terminal that does not close the window and use that profile to launch the terminal window.
In Preferences, define a new profile (let's call it noclose) and in the "Command" tab, choose the option to keep the window open after the command finishes. Then, use the option --window-with-profile=noclose in the gnome-terminal command before --.
Alternatively, just put one more std::cin at the end of your program that reads some completely unused variable.


First determine the TTY used in the console you want to write to:

#tty
 /dev/pts/3

Then use that device and write to it using IO redirection:

#echo -n "text" > /dev/pts/3

The -n is to make echo not produce a new line.
You can send one character at a time to make it look like typing.

You can also do this inside terminal multiplexers like tmux or screen. Generally those are used for this application since they manage a tty and can detach from it.


Downloading Pyclip python module on Ubuntu

Run these commands:

sudo apt get update
sudo apt-get install python-clips


How can I use dpkg-query to list only installed version of a package?

Print the status as well, then process the output:

$ dpkg-query -f '${Package} ${Status}\n' -W "linux-image*"
linux-image unknown ok not-installed
linux-image-4.8.0-36-generic install ok installed
linux-image-4.8.0-51-generic install ok installed
linux-image-extra-4.8.0-36-generic install ok installed
linux-image-extra-4.8.0-51-generic install ok installed
linux-image-generic-hwe-16.04 install ok installed
$ dpkg-query -f '${Package} ${Status}\n' -W "linux-image*" | awk '$NF == "installed"{print $1}'
linux-image-4.8.0-36-generic
linux-image-4.8.0-51-generic
linux-image-extra-4.8.0-36-generic
linux-image-extra-4.8.0-51-generic
linux-image-generic-hwe-16.04


Got these notification, when I do the command "sudo nautilus"

You are playing with fire, running your graphical file manager as root user. Don't. You can break your system. If you use the file manager like it is supposed to be used, i.e., as normal user, then you will not have such warnings, you will have no need to fix them, and you will enjoy a stable system for your daily work.
The supported way to perform file manipulations as root is to open the file manager with the "admin:///" URL, as in
nautilus admin:///

You need to provide your login password. The first time during the session, the password is asked twice in a row.


Are there any builds of Ubuntu (or flavors of) 18.04 for PowerPC Macs?

Lubuntu 16.04 LTS is EOL (https://wiki.ubuntu.com/XenialXerus/ReleaseNotes/Lubuntu http://lubuntu.me/xenial-released), as being a flavor it came with only 3 years of support.

All 32-bit ppc support ended in April-2019 (3 years of support only is provided for flavors like MATE & Lubuntu which had PPC support) and Ubuntu 14.04 LTS which also had PPC support with its 5 years of standard support ended at the same time

18.04 is only available for ppc64el or the 64-bit PPC which will not run on powerpc mac boxes.


Wireless Very weak and slow on Ubuntu Macbook pro 8.3?

The propriary drive is known to have issues on macs with power saving features. Try turing them off.

sudo iwconfig eth1 power off

The interface might be different.  Also try the open source driver a lot has changed in Ubuntu 12.


Ubuntu software cannot install some programs

For example, VSCode has the snap package name code.
But when using apt or apt-get some programs may be for older Ubuntu versions,
but still show up because they are in the repositories.


The key you are entering in the preferences page is the key that will be added by juju to each of the units it creates.  Therefore, you do not need to explicitly log into each unit and add the the key, as juju has done for you.

The documentation is correct, even if it does not read well.  I agree it should be updated to be more explicit.


How do I set all program data and downloads to a separate drive?

Yes, it is possible, and supported.

The general way people split their installation is to put / (the root) on the smaller partition and /home (where most of the data is stored) on a larger partition. However, you can also put just /boot on the SSD and the rest of your OS on the HDD.

However*2, you can install Ubuntu completely on the HDD without worrying about split drives and double bootloaders and all that, which is what I recommend you do. When you install Ubuntu, it will install GRUB to the EFI partition on your primary hard drive, which should be the SSD. GRUB will be able to boot into both Ubuntu and the Windows bootloader, even if they are on separate drives. All you need to do is install Ubuntu, and it should configure everything for you.

I recommend choosing the Something Else... option in setup when prompted and manually telling Ubuntu to install to the partition you want there. While in this setup, also make sure that the EFI partition is going to mount as /boot/efi.

If you need any more details, comment, and I'll help out.


Ubuntu 18.04 resets screen resolution on disconnecting external monitor

This sounds like you need a script which calls xrandr with the display mode that you prefer. You can then map that script to a hot key.

The script

I had a very similar issue and after long research I found this answer by MestreLion. In it they reference a home-made script which can be found on github. It is replicated below for archive reason.

You can just copy paste that script in a file called "switch-monitor" with the executable permission activated.

Assuming the file is located in /home/<username> you can run the script by typing:

/home/<username>/switch-monitor --list

This will give you a list of the connected monitors and create a config file /home/.config/switch-monitor.conf.

#!/bin/bash
#
# monitor-switch - switch outputs using xrand
#
#    Copyright (C) 2012 Rodrigo Silva (MestreLion) <linux@rodrigosilva.com>
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program. See <http://www.gnu.org/licenses/gpl.html>

declare -A monitor_opts
declare -a monitors

myname="${0##*/}"
verbose=0

# Read settings from config file
config=${XDG_CONFIG_HOME:-"$HOME"/.config}/"$myname".conf
if [[ -f "$config" ]]; then
    source "$config"
fi

print_monitors() {
    while read -r output conn hex; do
        echo "# $output $conn   $(xxd -r -p <<<"$hex")"
    done < <(xrandr --prop | awk '
    !/^[ \t]/ {
        if (output && hex) print output, conn, hex
        output=$1
        hex=""
    }
    /ConnectorType:/ {conn=$2}
    /[:.]/ && h {
        sub(/.*000000fc00/, "", hex)
        hex = substr(hex, 0, 26) "0a"
        sub(/0a.*/, "", hex)
        h=0
    }
    h {sub(/[ \t]+/, ""); hex = hex $0}
    /EDID.*:/ {h=1}')
}

# if there's no pre-defined monitors list, read from xrandr
# and save them to config file
if [[ -z "$monitors" ]]; then
    while read -r output ; do
        monitors+=("$output")
    done < <(xrandr | awk '$2 ~/^c/{print $1}' | sort)
    cat > "$config" <<-EOF
        # $myname config file

        # List of monitors, from left to right. Edit to your actual layout
        monitors=(${monitors[@]})

        # Extra xrandr options for each monitor.
        # Useful when EDID data does not reflect actual preferred mode
        # Options for non-existing outputs (such as the examples below) are ignored
        # Examples:
        monitor_opts[DFPx]="--mode 1920x1080 --rate 60"
        monitor_opts[DFPy]="--mode 1280x720"

        # As a reference, these were the connected monitors when this config file was created
        # use it as a guide when editing the above monitors list and extra options
        $(print_monitors)

        # For an updated list, run $myname --list
    EOF
fi

message() { printf "%s\n" "$1" >&2 ; }
fatal()   { [[ "$1" ]] && message "$myname: error: $1" ; exit ${2:-1} ; }
argerr()  { printf "%s: %s\n" "$myname" "${1:-error}" >&2 ; usage 1 ; }
invalid() { argerr "invalid argument: $1" ; }
missing() { argerr "missing ${2:+$2 }operand${1:+ from $1}." ; }

usage() {
    cat <<-USAGE
    Usage: $myname [options]
    USAGE
    if [[ "$1" ]] ; then
        cat >&2 <<- USAGE
        Try '$myname --help' for more information.
        USAGE
        exit 1
    fi
    cat <<-USAGE

    Switch monitors using xrandr.

    Options:
      -h|--help          - show this page.
      -v|--verbose       - print in terminal the full xrandr command executed.

      -l|--list          - list connector and monitor names of connected outputs

      -a|--all           - enable all monitors.
      -s|--select OUTPUT - enable monitor OUTPUT, disable all others.
      -l|--left          - enable leftmost monitor.  Alias for --select ${monitors[0]}
      -r|--right         - enable rightmost monitor. Alias for --select ${monitors[${#monitors[@]}-1]}

    Copyright (C) 2012 Rodrigo Silva (MestreLion) <linux@rodrigosilva.com>
    License: GPLv3 or later. See <http://www.gnu.org/licenses/gpl.html>
    USAGE
    exit 0
}

# Option handling
for arg in "$@"; do [[ "$arg" == "-h" || "$arg" == "--help" ]] && usage ; done
while (( $# )); do
    case "$1" in
    -v|--verbose) verbose=1 ;;
    -q|--no-notify) notify=0 ;;
    -l|--list) list=1 ;;
    -a|--all) all=1 ;;
    -s|--select) shift ; monitor="$1" ;;
    -l|--left ) monitor="${monitors[0]}" ;;
    -r|--right) monitor="${monitors[${#monitors[@]}-1]}" ;;
    *) invalid "$1" ;;
    esac
    shift
done

if ((list)); then
    echo "Connected monitors:"
    print_monitors
    exit
fi

if [[ -z "$monitor" && -z "$all" ]]; then
    usage
fi

# Loop outputs (monitors)
for output in "${monitors[@]}"; do
    if ((all)) || [[ "$output" = "$monitor" ]]; then
        xrandropts+=(--output "$output" --auto ${monitor_opts["$output"]})
        if ((all)); then
            if [[ "$output" = "${monitors[0]}" ]]; then
                xrandropts+=(--pos 0x0 --primary)
            else
                xrandropts+=(--right-of "$previous")
            fi
            previous="$output"
        else
            xrandropts+=(--primary)
        fi
    else
        xrandropts+=(--output "$output" --off)
    fi
done

((verbose)) && message "$myname: executing xrandr ${xrandropts[*]}"
xrandr "${xrandropts[@]}"

The config file

Open the config file created above /home/.config/switch-monitor.conf.

# List of monitors, from left to right. Edit to your actual layout
monitors=(<list of monitors>)

# Extra xrandr options for each monitor.
# Useful when EDID data does not reflect actual preferred mode
# Options for non-existing outputs (such as the examples below) are ignored
# Examples:
monitor_opts[DFPx]="--mode 1920x1080 --rate 60"
monitor_opts[DFPy]="--mode 1280x720"

In it you can change the physical layout of your displays to reflect your set-up and you can define the modes that you want.
So in your case you should change it like so:

# List of monitors, from left to right. Edit to your actual layout
monitors=(DP-4.1 DP-4.2 DP-3)

# Extra xrandr options for each monitor.
# Useful when EDID data does not reflect actual preferred mode
# Options for non-existing outputs (such as the examples below) are ignored
# Examples:
monitor_opts[DP-4.1]="--primary --mode 1920x1080 --rate 60"
monitor_opts[DP-4.2]="--mode 1280x720 --rate 60"
monitor_opts[DP-3]="--mode 1920x1080 --rate 60"

The hotkey

Simply follow this procedure to add a shortcut.
In the command box you should register:

/home/<username>/switch-monitor --all

This will join all your monitors with the given options which were registered in the config file.

Hope this helps :)


Activate a specific Terminator profile from the command-line?

Read man terminator. You will find the:

-p, --profile=PROFILE
          Use a different profile as the default

option, along with many other options.

In general, when one has a question about a command, say terminator for the following example, one tries:

man terminator
man -k terminator
info terminator
locate terminator
type -p terminator
type -a terminator
dpkg -S $( type -p terminator )
dpkg -L $( dpkg -S $( type -p terminator ) | cut -d: -f1 )

and then the serious investigation begins, ....


Can't remove Desktop icons - using Ubuntu 20.04

If you don't have a folder named Desktop in /home/username make one by, right-clicking in /home/username > New folder and naming it "Desktop" or by typing mkdir ~/Desktop in terminal.
Open the .config folder in your desktop.
Double click on user-dirs.dirs files.
Change the XDG_DESKTOP_DIR="$HOME/" line to XDG_DESKTOP_DIR="$HOME/Desktop"
Press F2 and type the command r to refresh gnome.


How to make an output limited to 'n' characters in shell scripting and also in command line

Here is how I would do it:

printf "Enter a file name: "
read input
if [ -f "$input" ] ; then
    printf "line words chars: %s\n" "$(wc -lwm < "$input")"
fi


How to report a crash when there isn't a .crash file

This can be frustrating as I've had to file a few bugs by hand using the advanced debugging procedures here:

https://wiki.ubuntu.com/Unity/FilingBugs

I was having a particularly bad crasher so I had to open the web page on my laptop (or you can print it out or something), then get it to crash, then follow the procedures and then file a bug and attach the log.


I see my problem now. It was an IP conflict me trying to create same 192.168.1.1 gateway. I changed wlan0 static ip to 192.168.2.1. I feel silly. How can I bridge the internet from eth0(which is now on br-lan) to wlan0 any idea?


how to delete all .svn hiden files from my project to do an update in svn repository

You can remove all dot files in a folder using find and rm.

find . -name ".*" -type f | xargs rm -v

It searches for all dot files in the given folder, passed the results to rm which deletes it. It doesn't delete directories. When no files are found to delete, rm will return rm: missing operand.


Which NVIDIA-related bug is affecting me since proposed solutions did not work?

Hello your card is still blacklisted and do only run unity 2d.

to solve youre problem do the same as for ubuntu 11.10 and 11.04, remove the blacklisting and everything works fine.

So, to workaround the detection at startup, you can:

sudo gedit /etc/environment
add: UNITY_FORCE_START=1
Save the file
reboot


Error Installing Wifi Driver on Yoga 13 (when "make)

This error usually indicates you have not installed required kernel headers. With a temporary wired ethernet connection, please do:

sudo apt-get install linux-headers-generic

Then try the 'make' step again.


Ubuntu 20.04 brightness adjust not working

The xrandr solution didn't worked for me. I have installed brighness-controller and worked well.
sudo add-apt-repository ppa:apandada1/brightness-controller
sudo apt update
sudo apt install brightness-controller


There is a few ways to "get in" is sudo if not working:

Use pkexec instead of sudo.

Login using grub recovery console.

Boot with Ubuntu LiveUSB and fix your files.


Can I use my iPad as installation media?

The drive emulated by the Ipad does not support booting another device, sorry. Do you still have the installation media? If so, you can boot from it without altering your PC's installation until you can find out what's amiss. If not, you will need to download and prepare a LiveUSB which can be done on MacOS, Windows or Linux, whatever kind of machine you can find.


/dev/sda1 is your actual hard drive and that's why it seems to have all of the space. The space you need should be dynamically allocated to /usr and available to hadoop when you install it.


Getting Ubuntu working properly on MSI GE62 6QF

OK, I managed to get 15.10 to work flawlessly on the same Skylake Ge62 (i6700HQ + GTX970m).

It took two clean installs and a ton of hard resets... and in the end I'm not exactly sure which step made it work, but here's what I did:

disable FastBoot (both in UEFI and Windows 10), SecureBoot and SpeedStep (the latter two shouldn't matter but it won't hurt to disable them anyway)
install with nomodeset boot option
reboot and got an instant hangup
reboot again with nomodeset
update everything to get the latest stable kernel (by now 4.2.19, stock 4.2.12 works as well)
install latest Intel graphics stack (https://01.org/linuxgraphics/downloads)
install NVidia properietary driver. Beware - after this nomodeset may not work again so be prepared for a clean install if something goes wrong.
reboot. It will either hang up instantly or it will boot normally. It hung up in my case.

The thing now is to get it to boot once so the drivers can be configured by X server

-do NOT add i915.preliminary_hw_support as it's not needed anymore

-from now on delete quiet and splash from boot options every time you add something there to see what errors you get.

-firstly try intel_idle.max_cstate=1 as a boot option

-if that hangs up try acpi=noirq or acpi=hd or acpi=off

The last one gave me a first proper boot. After a restart it didn't boot again giving bumblebee errors.

this time boot with intel_idle.max_cstate=1

If it works add this line to grub permanently. This way you will get a stable system using i915. For now I didn't try to force it to use nvidia.

Hope it helps.

regards


Clone the HDD using CloneZilla http://clonezilla.org/show-live-doc-content.php?topic=clonezilla-live/doc/03_Disk_to_disk_clone,   then run gparted to resize the disk.

To resize a partition:

1.- Select a partition.

2.- Choose: Partition → Resize/Move

3.- Adjust the size of the disk.

4.- Click Resize/Move.


Let's have a look at your bundle. First of all, we need to ensure that we're both looking at the same file; from searching your config on Google I think I'm looking at:

https://jujucharms.com/openstack-base/bundle/38/
https://api.jujucharms.com/charmstore/v4/bundle/openstack-base-38/archive/bundle.yaml

(Please edit your question with the exact files you are deploying, it would help remove ambiguity)

At the end of every page of the charm store there is a list of each config option for every charm, so let's look at Keystone:

You can safely ignore the annotations segment, all that is is X/Y coordinates of where to put the icon in the Juju GUI.

charm: cs:trusty/keystone-31 : This breaks down to "Revision 31 of the trusty (14.04) charm that is in the charm store."
num_units: This means you'll get 1 unit of Keystone. That means either one container or machine (which we'll see is defined later).

Ok, now the good bits, the options, these first two are pretty straightforward:

  admin-password: (string) Admin password. To be used for testing
  only. Randomly generated by default.

  ha-mcastport: (int) Default multicast port number that will be used
  to communicate between HA Cluster nodes.

This entry is ugly due to formatting, so I'll replicate it here:

  openstack-origin: (string) Repository from which to install. May be >one of the following:

  distro (default),

  ppa:somecustom/ppa, a deb url sources entry, or a supported Cloud
  Archive release pocket.

  Supported Cloud Archive sources include:
  cloud:-
  cloud:-/updates
  cloud:-/staging
  cloud:-/proposed

  For series=Precise we support cloud archives for openstack-release: *
  icehouse For series=Trusty we support cloud archives for
  openstack-release: * juno * kilo * ...

  NOTE: updating this setting to a source that is known to provide a
  later version of OpenStack will trigger a software upgrade. NOTE: when
  openstack-origin-git is specified, openstack specific packages will be
  installed from source rather than from the openstack-origin
  repository. distro

I get the feeling you want to keep that as a default for now.

Here's where I think you're asking for clarification (please edit your question if this is not the case):

to:
- lxc:3

Ok, so what does that mean? Well let's look at the top of the bundle:

machines:
  '0':
    constraints: arch=amd64
    series: trusty
  '1':
    constraints: arch=amd64
    series: trusty
  '2':
    constraints: arch=amd64
    series: trusty
  '3':
    constraints: arch=amd64
    series: trusty

In this section we are declaring the machines on the cloud, that means we are asking for 0-3 machines, for a total of 4. Each part of that bundle has a to: section. That means we are telling Juju exactly where you want a unit to go.

In this case to: lxc:3 means, put keystone in an LXC container on machine number 3.

As another example, look at where we put Ceph:

 to:
    - '1'
    - '2'
    - '3'

There's no lxc: there, that means, no container, just put ceph on machines 1,2, and 3. And let's look at `ceph-radosgw:

 to:
    - lxc:0

That means put ceph-radosgw on machine 0, in a container.

So why do we do this? Well, some services don't need to be everywhere, it depends on the use case, if you want a denser cloud then this bundle is probably what you want. If you're testing out openstack then getting an operational prototype on four machines is desirable. If you want to go with larger capacity, then you can feel free to edit the bundle, remove all the to: statements you see, and Juju will just ask MAAS for one machine per service; this will take up more machines though.


Ubuntu is slowly moving towards snaps. So, sometimes it becomes a little bit difficult to guess whether a package installed from Ubuntu Software is a deb package or a snap package. Also, it is to be noted that some packages are available via snap as well as apt, thus Software Center can have two entries for identical apps. It's better to look at the bottom of app in Software Center to identify whether it is a snap package or a package installed via apt. For example, here GitKraken, it is only available via Snap, since apt search gitkraken returned no results and looking at the bottom of app page:

Also, dpkg is a tool for managing deb packages and apt is a front end for dpkg. That's why you can't find GitKraken in dpkg --list.

To list currently installed snap:

snap list

To uninstall snap:

sudo snap remove snap_name

If you want to install a deb package of GitKraken, you can download it from here and install it using:

sudo dpkg -i gitkraken-amd64.deb

If you want to know more about snaps:

Why is Ubuntu moving to Snappy packages?
Why are there some packages in the Software application but not in apt?
If a package is available as both a deb and a snap, which method is preferrable?
Why are there 2 packages for some applications (e.g. Chromium) in Ubuntu Software?


How can I store variable changed by user?

You need to save it in database or in a simple textfile(if it is small project) . I hope you already learned filemanagement in python


18.04 -- how do I keep the lock screen background when logging in?

Copy the image you want to use into the /usr/share/gnome-shell/theme/
folder. For example: /usr/share/gnome-shell/theme/my_image_name.png

Then:

sudo gedit /usr/share/gnome-shell/theme/ubuntu.css

OR in some cases:

sudo gedit /usr/share/gnome-shell/theme/gnome-shell.css

Search for the following section:

#lockDialogGroup {
  background: #2e3436 url(resource:///org/gnome/shell/theme/noise-texture.png);
  background-repeat: no-repeat;

Change

background: #2e3436 url(resource:///org/gnome/shell/theme/noise-texture.png);

to

background: #2e3436 url(my_image_name.png);

(without path in case you copy your image to /usr/share/gnome-shell/theme/ like /usr/share/gnome-shell/theme/my_image_name.png).

Alternatively, you can also simply set just a color (without wallpaper or texture) with:

background: #2e3436;

Set background-repeat to repeat or no-repeat. In case your image is a texture, set it to repeat. In case wallpaper: no-repeat

Reboot.


`software-center` couldn't start in ubuntu 14.04 LTS

Similar issue has been reported in Ubuntu launchpad and fixed. As per the statement it is due to one of the python imports. Please check the link below for further details

https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/438366


I've read Gnome is going the route of Java Script (GJS) for much of it's desktop and reducing amount of C++ and Python. So I found this question particularly interesting today.

Here is an example Java Script and I will be trying it myself. In this example you will learn to create a D-Bus client to connect to a service, you will learn to call methods, connect to signals and get properties from the service. The example uses the D-Bus service that manage the Keyboard Backlight:

const Gio = imports.gi.Gio;
const GLib = imports.gi.GLib;

// This the D-Bus interface as XML
const KbdBacklightInterface = '<node>\
<interface name="org.freedesktop.UPower.KbdBacklight"> \
    <method name="SetBrightness"> \
        <arg name="value" type="i" direction="in"/> \
    </method> \
    <method name="GetBrightness"> \
        <arg name="value" type="i" direction="out"/> \
    </method> \
    <method name="GetMaxBrightness"> \
        <arg name="value" type="i" direction="out"/> \
    </method> \
    <signal name="BrightnessChanged"> \
        <arg type="i"/> \
    </signal> \
</interface> \
</node>';

// Declare the proxy class based on the interface
const KbdBacklightProxy = Gio.DBusProxy.makeProxyWrapper(KbdBacklightInterface);

// Get the /org/freedesktop/UPower/KbdBacklight instance from the bus
let kbdProxy = new KbdBacklightProxy(
    Gio.DBus.system,
    "org.freedesktop.UPower",
    "/org/freedesktop/UPower/KbdBacklight"
);

// You can use proxy.<method>Sync syntax to
// call the D-Bus method in a Sync way
print("The max brightness of your keyboard is " + kbdProxy.GetMaxBrightnessSync());

// Or you can use the syntax proxy.<method>Remote
// to call the method in an Async way
kbdProxy.GetBrightnessRemote(function(currentBrightness) {
    print("The current keyboard brightness is " + currentBrightness);
});

// Connecting to a D-Bus signal
kbdProxy.connectSignal("BrightnessChanged", function(proxy) {
    let newBrightness = proxy.GetBrightnessSync();
    print("The keyboard brightness has been changed, new brightness is " + newBrightness);
});

// Also you can get properties value using this syntax
// let property = proxy.PropertyName;

// Or you can set a property value
// proxy.PropertyName = "new value";

let loop = new GLib.MainLoop(null, false);
loop.run();

If not already done, install gjs:

sudo apt update && sudo apt install gjs

Create a directory for your Java Scripts:

mkdir ~/javascript

Use gedit to create sample script above and save it:

gedit ~/javascript/dbusclient.js

Now run it:

cd ~/javascript
gjs dbusclient.js

WIP Errors reported (I'll fix and come back to this Q&A with results):

(gjs:10134): Gjs-WARNING **: JS ERROR: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface 'org.freedesktop.UPower.KbdBacklight' on object at path /org/freedesktop/UPower/KbdBacklight
_proxyInvoker@resource:///org/gnome/gjs/modules/overrides/Gio.js:98
_makeProxyMethod/<@resource:///org/gnome/gjs/modules/overrides/Gio.js:124
@dbusclient.js:36

JS_EvaluateScript() failed

No Keyboard lights

Although the laptop has keyboard lights and the wireless keyboard has 3 light settings, Gnome's UPOWER can't see them as these shell commands:

$ dbus-send --print-reply \
            --system \
            --dest=org.freedesktop.UPower \
            /org/freedesktop/UPower \
            org.freedesktop.UPower.EnumerateDevices

Return this:

method return time=1564075040.686545 sender=:1.49 -> destination=:1.145 serial=4392 reply_serial=2
   array [
      object path "/org/freedesktop/UPower/devices/line_power_ACAD"
      object path "/org/freedesktop/UPower/devices/battery_BAT1"
      object path "/org/freedesktop/UPower/devices/ups_hiddev2"
      object path "/org/freedesktop/UPower/devices/mouse_0003o046Do101Ax0017"
      object path "/org/freedesktop/UPower/devices/keyboard_0003o046Do2010x0018"
   ]

This could be a handy script to modify for monitoring Laptop Battery charge percentage though.

(To be continued...)


Unable to connect to Internet on a VM (NAT & Host only networks enabled)

I resolved the problem this way:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet static
      address 10.0.0.4
      netmask 255.255.255.0

and I run sudo ifconfig eth1 up


USB-C to HDMI adapter that works with Ubuntu?

I just got a CHOETECH USB-C to HDMI adapter.  Plugged it into a Lenovo X270 laptop running Ubuntu 18.04 and it just worked.  Zero configuration required.


if you typed the command as above do this

ls -l /usr/share

you may have 2 backgrounds, one being a directory and the other being the jpg having been renamed to backgrounds without a file extension.


To get the dependencies try
sudo apt-get install python python-dev libatlas3-base-dev gcc gfortran g++
Also, you should check that numpy is up to date:

>> import numpy
>> numpy.version.version
'1.6.1'

(for example). I think you want numpy > 1.5.0 for the latest scipy distribution.
Then you can try the sudo apt-get install python-scipy command suggested in the other answers.


Control Mouse with Classic controller joystick in wminput/cwiid

If you're trying to play a modern game, chances are that it supports Xbox360 controllers. There's a way to emulate such a controller using a Classic Controller and a piece of software called xboxdrv (wiicd is pretty much abandoned right now).

Here's the details.

The gist of it is this: After connecting the wiimote to your pc,
run

sudo xboxdrv --dpad-as-button --evdev /dev/input/event$1 --evdev-absmap ABS_HAT1X=x1,ABS_HAT1Y=y1,ABS_HAT2X=x2,ABS_HAT2Y=y2,ABS_HAT3Y=LT,ABS_HAT3X=RT --evdev-keymap=BTN_A=A,BTN_B=B,BTN_X=X,BTN_Y=Y,KEY_PREVIOUS=Back,KEY_NEXT=Start,BTN_MODE=Guide,KEY_DOWN=DOWN,KEY_UP=UP,KEY_LEFT=LEFT,KEY_RIGHT=RIGHT,BTN_TL2=LB,BTN_TR2=RB --mimic-xpad

and play your game :)

PS Big thanks to GitHub user benbaptist, who saved me a lot of time and frustration with finding a solution to that one!


Is it SAFE to add a 18.04 repo in 20.04?

Technically it can be added but I would not recommend it. In case you are installing some application and its dependencies going to break existing other application in systems. it can break dependency tree and will end up in mess. Here scenario depends on application to application and its dependencies.
I would suggest installing any other applications (which are not available through Ubuntu version's official repos or any other third party repo),  via deb packages or compiling source code.


The pages that ubuntu-sdk adds to Qt-Creator can't be zoomed

It seems that zooming can't be done. Odd but true since I really don't know why they put copies of websites on your computer just to display in an micro font so you cant read a thing.

But thing don't always make sense. So I declare this question answered.


What does it mean for /proc/kpagecount to be zero

proc/kpagecount is a virtual file, when you read it, you get the result of executing function kpagecound_read().

static ssize_t kpagecount_read(struct file *file, char __user *buf,
                 size_t count, loff_t *ppos)
{
// ....
    u64 pcount;

    pfn = src / KPMSIZE;
    count = min_t(size_t, count, (max_pfn * KPMSIZE) - src);
    if (src & KPMMASK || count & KPMMASK)
        return -EINVAL;

    while (count > 0) {
        if (pfn_valid(pfn))
            ppage = pfn_to_page(pfn);
        else
            ppage = NULL;
        if (!ppage || PageSlab(ppage) || page_has_type(ppage))
            pcount = 0;
        else
            pcount = page_mapcount(ppage);

        if (put_user(pcount, out)) {
            ret = -EFAULT;
            break;
        }

        pfn++;
        out++;
        count -= KPMSIZE;

        cond_resched();
    }
// ...
}

and page_has_type() is.

static inline int page_has_type(struct page *page)
{
    return (int)page->page_type < PAGE_MAPCOUNT_RESERVE;
}

If the entry for a page is zero in kpagecount and is allocated, it means:

It is used in slabs.
page->page_type < PAGE_MAPCOUNT_RESERVE  see patch :return 0 for special pages that are never mapped. This patch is quite new. Consider when this question is asked, I don't think it's the case.
page_mapcount(page) returns zero. some page are allocated but not mapped.
I'am not sure why. Anyway, you can write kernel module/code that allocate page without create a mapping.


Workaround

Concept:
1. get the current desktop background Image.
2. Blur the Image with imagemagick tool.
3. Set the loginscreen background as the blurred Image with  similar script

Requirments:
1. package imagemagick
2. package libglib2.0-dev

Teseted Condition:
Fresh Install of Ubuntu 20.04

Once you have both the above packages..

Download the script from  here

change the username in the script.. like in the below [ Change admin with your username ]

bg=$(sudo -Hu admin dbus-launch gsettings get org.gnome.desktop.background picture-uri)

Change the Desktop Wallpaper and run the script.. Once you are sure that script is working fine..

make the script to run at logout or reboot or at shutdown as per your preference.
I have configured to run at logout and you can see changes in the below images,  after logout.

Note that conversion of the Image to blur takes few seconds. This caused me a delay of 6 to 8 seconds from the normal logout.

You can tweak what ever blur you need inside the script.

convert $img -channel RGBA -blur 0x26 blur.png

You may find better tools/ways (from the exisiting tool convert) to convert the image to blur and change the script as you wish.

Result:


Installed 13.10 over 14.04 by mistake. Cannot boot into anything!

Some observations on your Boot Repair output:

You have no BIOS-mode boot loader in the MBR of /dev/sda, but you do have EFI-mode boot loaders for both Windows and Ubuntu in the EFI System Partition (ESP) on that disk. This indicates EFI-mode installations of both Windows and Ubuntu.
Your /dev/sdb has a BIOS-mode copy of GRUB in its MBR and uses the older MBR partition table. This indicates that Ubuntu was installed to it in BIOS mode at some point. Note that mixing EFI-mode and BIOS-mode OS installations is usually pretty awkward. It's also unclear whether the EFI-mode or BIOS-mode Ubuntu install was more recent.
It's not clear if you've got a working Ubuntu installation on /dev/sdb1. There are some critical files on that partition, but Boot Repair has not identified some others. Maybe that's a Boot Repair slip-up, or maybe they're absent.
Your GUID Partition Table's (GPT's) protective MBR on /dev/sda has an end sector of 4,294,967,295. This is as large as is theoretically possible, and is roughly four times as big as your disk can handle. The Boot Repair output comments on this, on line 108: /dev/sda1 ends after the last sector of /dev/sda. I would expect that most tools would be OK with this, but it's entirely possible that something (GRUB, perhaps) is not.

I recommend you deal with the final point first. You should be able to do this from your Ubuntu emergency disc by using gdisk:

Open a Terminal window.
Launch gdisk on the disk by typing sudo gdisk /dev/sda.
Type p to view your partitions and verify that they're sensible. If not, your disk device filenames might have changed or gdisk might have a problem with your malformed protective MBR, so you should quit.
Type x to enter the experts' menu.
Type n to create a new protective MBR.
Type p to view your partitions again to ensure you haven't typed an incorrect command and wiped them out accidentally.
Type w to save your changes. Respond affirmatively when gdisk asks for confirmation.

At this point, you might be able to boot normally, but I make no promises of that. If you continue to have problems, I have two suggestions:

Try running Boot Repair again. It might do better once the protective MBR has been repaired.
Download the USB flash drive or CD-R version of my rEFInd boot manager and prepare a medium with it. Boot to it. It should enable you to boot Windows, and if the Ubuntu install on /dev/sdb1 is complete, rEFInd should enable you to boot it, too. (Note that rEFInd might show multiple Linux/Ubuntu options. One should launch GRUB, and the others, if present, should launch Linux kernels. The kernels are more likely to work than the GRUB entry.) If this gets Ubuntu booting, you can either install rEFInd using its Debian package or PPA or you can try installing GRUB manually.

If neither Boot Repair nor rEFInd lets you boot, I recommend you try re-installing at this point. If you have no data on /dev/sdb, I recommend you delete its partitions, convert it from MBR to GPT, and install in EFI mode. See my Web page on EFI-mode Linux installations for details on how to do this. As I noted earlier, mixing EFI-mode and BIOS-mode installs is tricky at best, and given that your EFI-mode Windows installation is working, that makes it easiest to redo the Ubuntu installation in EFI mode rather than convert Windows to a BIOS-mode boot. If you have important user data on /dev/sdb, I still recommend you do as I've just described, but back up your data first.


Connecting AriaNet (or ReberQuick) to your Ubuntu box

Connect your device to your computer.

Go to the Network applet, right click on it and select (Edit Connections).

Click on the Mobile Broadband tab.

Click on forward.

Select Iraq, and click forward.

Select (I can't find my provider, and I wish to enter it manually), then write the name of your provider (either Arianet or Reber Quick), then click forward.

Now, click on Apply and you are almost done :)

Enter your username and password, then click on Apply.

Now your connection is ready, and you can simply select it by clicking on your Network applet.

(Source)
Don't forget to checklist connect automatically


Netflix is now supported natively in Chrome 37 and above, however afaik the Chromium package in the Ubuntu package manager does not support it.  Head over to the Chrome Download Page for the latest .deb installer package.


After 15.04 update: Aliased/choppy icons

Ever thought of installing another desktop then reinstalling the ubuntu-desktop? I don't know if this will work, but it might be worth a try.  For example, you can execute the following commands to install the Lubuntu desktop environment:

sudo apt-get install lubuntu-desktop
sudo apt-get --reinstall install ubuntu-desktop

If you don't want to use the Lubuntu desktop, then you can choose a different desktop environment (such as "Ubuntu") at the login screen. That idea might just work.


Rebuild RST Fake RAID 5 on Ubuntu Windows dual boot

I tried to boot into recovery mode, and it dropped me to the initramfs shell, after telling me that fsck had found errors on my last partition.

Because I suspected that the RAID format used by the Intel RST tool in Windows was different from the RAID format used by mdadm in Linux, I was afraid to repair the filesystem with fsck. But after I had verified that the raid had been detected correctly, I finally ran fsck on the last partition. This solved the problem.


editing apache vhosts and ubuntu hosts file?

File: /etc/hosts

127.0.0.1 site1.local
127.0.0.1 site2.local
127.0.0.1 site3.local

File: /etc/apache2/apache2.conf

[...]
NameVirtualHost *:80
[...]

Files: /etc/apache2/sites-available/site{i}.local.conf (instead of {i} insert number: 1 or 2 or 3)

<VirtualHost *:80>
    ServerName site{i}.local
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/site{i}
    [...]
</VirtualHost>

In directory /etc/apache2/sites-enabled/ create symbolic links:

@site{i}.local.conf

Restart apache and have fun :)


Finally, I got remastersys CLI working in 14.04 LTS, Actually I copied files of Remastersys 12.04 version which were in

/etc/remastersys and /etc/remastersys.conf to same directory of 14.04 INstallation

and /usr/bin/remastersys , /usr/bin/remastersys-skelcopy to respective directory.

Installed dependcies, as suggested by FORK of remastersys, Black Lab Imager, but for some reason, black lab imager didn't worked for me. It generated final ISO images but when i tested it in virtual machine. There was kernel panic not syncing.

Method suggested for Remastersys fork, applied on Remastersys and it worked flawlessly for me.

Be sure to Install package discover, there is no package discover1 in repo.

More information can be get from Black Lab Image creator

http://system-imaging.blogspot.in/


New to Ubuntu - wants me to erase disk to install. Not what I want to do

You need to install into the Virtual Box:

Click "New" in manager

Click "Expert Mode"

Give it a sensible name, and some memory (I suggest 1024 as a minimum, and no more than half what your computer has):

If the name contains "Ubuntu" it will change the Type and Version to eb Linux and Ubuntu.

Click Create, then chose the storage you want it to have (I suggest 10GB as a minimum). Ensure VDI and Dynamically Allocated are selected:

Select it and then click Settings. In the sidebar, click "Storage" then "Empty", with the CD () icon:

Click the CD with a dropdown () next to "IDE Secondary Master" then "Chose Virtual Optical Disk Drive", and browse to the downloaded .iso file. Click Open, then OK in the Settings window:

Click "Start" then follow the installation guide:

You want to install Ubuntu, so follow the steps. You do want to Erase Disk and install Ubuntu this time, so click Continue at this screen:

Wait for it to install.

When you have installed Ubuntu, it will ask you to Remove Disk and press Enter. To do this, click Devices (in the top bar), then Optical Drives, then "Remove disk from virtual drive". Click in the window and press Enter.

You will then be able to boot ubuntu in Virtualbox!


Not every wireless card and driver combination support monitor mode, particularly, most Broadcoms. If the command reports, "Operation not supported," I'm afraid that's what it means: it can't do it.

You can double-check from the terminal:

iw list

Here is a sample from my machine:

Supported interface modes:
         * IBSS
         * managed
         * AP
         * AP/VLAN
         * monitor
         * P2P-client
         * P2P-GO
         * P2P-device

If your result doesn't include monitor, then it simply isn't possible.

You could, of course, get a different wireless card.


Unable to use included library -> pokerstove in ubuntu 14.04

Add the path for the include files:

$ g++ -o programma ggg.cpp -I/home/<your_username>/pokerstove/src/lib
$ ./programma
Hello World!

-I<path_to_pokersove_headers> - To specify a directory to search for header files

E.G.:

    $ find -name combinations.h
    ./pokerstove/src/lib/pokerstove/util/combinations.h

therefore use a relative path: ./pokerstove/src/lib/
 or an absolute path: /home/<your_username>/pokerstove/src/lib/


Simple Scanner fails to find wifi MG3222 all in one scanner, Printer works

Canon has their own scanning software ScanGear - I know that there is a version available for the MG2920, but you may have to wait until they produce a version for the MG3222.

You could also examine the source code, or the driver for the MG2920, and see if they will work for your printer.  The page with links to the source code and drivers is here


SDK: Is bottom edge supported for html5 apps?

At the moment there is no such functionality provided by the Ubuntu HTML5 sdk. See https://developer.ubuntu.com/api/apps/html5/current/UbuntuUI/ for a complete list of provided components.

Although there's nothing to stop you rolling your own bottom edge navigation in an HTML5 app :-) You could even possibly propose such a feature to the HTML5 sdk if you have success implementing it.


How can I disable the Super button so that it won't bring up the Search window?

I finally found something that worked:

dconf write /org/compiz/profiles/unity/plugins/unityshell/show-launcher '""'


Error found when loading /etc/profile [mariadb,mysql]

I had that same problem on three computers, but interestingly it was when I updated them.

In Software sources, I put the one from MariaDB:
http://mariadb.mirror.liquidtelecom.com/repo/10.4/ubuntu

The solution I can offer you is the following:
Console:

sudo chmod -R 644 /usr/lib/mysql/plugin/auth_pam_tool_dir/

Stays with user mysql.root.
I believe that if MariaDB repositories are not used and those of Ubuntu are used, the error will not occur.


I also had that problem and just commenting out the hidden flags:

...
#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=false
...

was enough. That way I did not have to run the boot-repair scripts which are pretty heavy and do many other things that I wasn't sure I would want applied to my system.

Important note: don't forget to run:

sudo update-grub

or your changes won't be recorded in grub and thus they will be useless.


No hardware acceleration with hd4850 card

Your card is supported by the latest Catalyst release 12.1 as well as the open source driver. You may want to install the ATI driver and check it's performance.

There is a good installation guide on the ATI Wiki page for 11.10 that should give you all the information you need to install the drivers and fix any issues.


You can turn the webcam off writing the following command on the terminal:

sudo modprobe -r uvcvideo

Type your password when asked and press Enter.


Ubuntu lucid (10.04) did have libdb4.8++, and by adding an entry for it to your /etc/apt/sources.list you can install it:

(echo deb http://de.archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse; echo deb http://de.archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse; echo deb http://security.ubuntu.com/ubuntu lucid-security main restricted universe multiverse) | sudo sh -c 'cat >>/etc/apt/sources.list'
sudo apt-get update
sudo apt-get install libdb4.8++


"[Firmware Bug]: ioapic 2 has no mapping iomm" after kernel update

Add irqpoll and intremap=off into GRUB_CMDLINE_LINUX_DEFAULT setting into /etc/default/grub file. For example run sudoedit /etc/default/grub and change the line in question so that after your edit it might say (depending on what parameters were already there):
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash irqpoll intremap=off"

Then run sudo update-grub.
More details here and here.


yes,
update-rc.d rpcbind disable or update-rc.d rpcbind remove
both doesn't help in that case.
Probably because there are no such scripts in any of rc?.d directories.
But what really helps is:

sudo mv /etc/init/rpcbind.conf ~
sudo mv /etc/init/rpcbind-boot.conf ~

So you get rid of its configs used for boot (move to any safe place).
Then

reboot

service --status-all

Now it will show you

[ - ]  rpcbind

Even so it doesn't look nice - it works anyway, you should ask ubuntu guys why is it so strange.


Cannot boot Ubuntu 12.04 on Lenovo V570 fresh install

Ubuntu 12.04 officially supported UEFI, so don't need to configure anything manually. But unfortunately, when I manually partitioned and install Ubuntu (with Windows 7 on Lenovo V570) it only started Windows7. Then I created a separate partition and select "Install Ubuntu alongside windows" rather than manually partitioned. Now at startup grub boot menu appears to select Windows or Ubuntu.


You can dual boot your laptop with Windows 8.1 and Ubuntu. As I do in my desktop. I think you don't need to format your Windows from SSD device. Just free up 8GB space from your 500GB HDD using "Windows Disk Manager" from "Control Panel". Insert Ubuntu boot media such as a Live CD/DVD or a bootable pen drive, run "wubi", click on "Full Demo" and restart. When Ubuntu is booted up choose "Install Ubuntu" and then "Install Ubuntu alongside Windows 8" and complete setup. Now you have Windows 8.1 and Ubuntu on your laptop. Choose what you want from bootloader menu. Enjoy Linux!

P.S. Removing Windows from SSD can harm your Computer such as preventing a OS from booting. But I'm not sure that it could prevent Ubuntu from booting even after a fresh/clean install.


How to list only root packages, without their dependencies?

Here is my quick-and-dirty script discussed in the comments to the original post, following the ideas of @Videonauth (as I understood them). The list of the remaining packages is written to the file top_packages.

(It takes some time to run).

#!/bin/bash

echo > dependencies
echo > top_packages
dpkg -l | egrep '^..  ' | cut -f3 -d' ' | cut -f1 -d':' > packages

for i in `cat packages`
do
    echo collecting dependencies of package $i
    apt show $i 2> /dev/null | grep Depends >> dependencies
done

for i in `apt-mark showmanual`
do
    grep -q $i dependencies || echo $i | tee -a top_packages
done


You will probably need to compile from source.
Uninstall the current version
Then compile and install from source
Steps as follows:

Remove Erlang Completely

sudo apt-get purge erlang*

Update missings if required

sudo apt-get --fix-missing -y install build-essential m4 libncurses5-dev libssh-dev unixodbc-dev libgmp3-dev libwxgtk2.8-dev libglu1-mesa-dev fop xsltproc default-jdk`

Download requird OTP version:

wget http://www.erlang.org/download/otp_src_R16B01.tar.gz
tar -xvzf otp_src_R16B01.tar.gz
sudo chmod -R 777 otp_src_R16B01
cd otp_src_R16B01
sudo ./configure
sudo make
sudo make install

And you will be ready :)
cheers


If you have a "public IP", this suggests you have a different IP in your local network. That usually means you have something like a broadband modem/router, which is often NATed just to make things more interesting. In that case, it's the router that owns the public IP and you cannot change it in either Ubuntu, Windows or any other OS.

You should contact your internet service provider to get answers to this question.


How do I check if my OpenPGP key is in the Ubuntu keyserver?

Command line way:

Run:
  gpg --keyserver hkp://keyserver.ubuntu.com --search-key 'your@mail.com'

Graphical way:

Run seahorse (Passwords and Encryption Keys), hit the Find Remote Keys... button, enter your key ID in the search field, and finally only select the Ubuntu keyserver:


The problem is that you are installing the package with dpkg, which doesn't install dependencies. You have to use apt-get (aptitude could do too) like this:

sudo apt-get install libglib2.0-dev

This way all dependencies needed will be automatically installed.


Deference between xymon-client and xymon-client~

The ~ sign at the end of your file is simply signalling that it is a backup of the file that has the same name without the ~.

Editors like gedit frequently make a backup copy of the files they edit before saving.  It prevents a total loss of data in case of a failed save.

You can delete the file, but it will appear again next time you save with whatever editor is leaving it.  With most editors, you can tell it in preferences not to create backups when saving.


Subtitle authoring tool for Ubuntu which supports video playback

I don't know how I missed. Gnome-subtitles also have the option to author subtitles based on a playing video.

All you have to do is open a video through Gnome-subtitles

In the Video menu, choose open

Here is the process in action


is there something like brace expansion when using perl rename?

The closest equivalent in perl would likely be the range operator ..
So for example, you could construct a regular expression and use it as follows:
$ rename -n 'our $re; BEGIN{$re = join "|", ("048".."053")} s/^$re//' *.txt
rename(048banana.txt, banana.txt)
rename(049pear.txt, pear.txt)
rename(050watermelon.txt, watermelon.txt)
rename(051tomato.txt, tomato.txt)
rename(053potato.txt, potato.txt)

The quotes around "048" and "053" are necessary to prevent the leading zeros from forcing interpretation as octal sequences.
Alternatively (and probably simpler), use the shell's brace expansion to limit the target of the replacement to those specific files, and then replace any 3 leading digits:
$ rename -n 's/^\d{3}//' {048..053}*.txt
rename(048banana.txt, banana.txt)
rename(049pear.txt, pear.txt)
rename(050watermelon.txt, watermelon.txt)
rename(051tomato.txt, tomato.txt)
rename(052*.txt, *.txt)
rename(053potato.txt, potato.txt)

The g modifier is not required in either case, since there is only one replacement per filename.
Note that shell brace expansion will attempt to rename 052*.txt since you apparently don't have a matching filename with a 052 prefix - you could prevent that by setting shopt -s nullglob before running the command.


The basic problem seems to be: The use of ~ which refer to the home of the current user.

More details about the problem:

When you execute the command manually, the value of ~ is /home/myuser (myuser home)
When you execute the command using cron, the value of ~ is /root (root home)

Since the file isn't in /root/nightly_backup.sh cron can't execute it.

Solution:

Replace:

0 4 * * * bash ~/nightly_backup.sh

With:

0 4 * * * /home/myuser/nightly_backup.sh

  Note, you should make sure that the shell-script is execute-able, by running the following command (once):

chmod +x /home/myuser/nightly_backup.sh

Note: Regarding your other question

  What does "no MTA installed, discarding output" mean?

It was answered here

In short:
This happens because your cron jobs are producing output and then the cron daemon tries to email that output to you, while you don't have mail service installed in your system.

You can solve it by one of the following methods (more info in here)

Ignore the message
Install mail server
Redirect the cron job output into /dev/null
Redirect the cron job output into logger and you'll see it in syslog logs


If you have not solved the issue yet!
Most probably it has to do with SMB/CIFS version. See if your smbclient is configured with higher version of SMB/CIFS. I believe CH3HNAS does not support SMB/CIFS connections higher than 1.0


How to resize/hide arrows on the Desktop icons?

While the referenced post by Ali I. Demirel suggests removing/renaming icons or creating .desktop files. I expect them to work.

Here is an alternative option, resizing the icons or make them fully transparent (extreme ratio 1%/10000%~5%/2000%).
sudo apt install imagemagick-6.q16
sudo find /usr/share/icons/Yaru/ -name "emblem-symbolic-link.png" \
-exec cp -v {} {}.bak \; \
-exec convert {} -resize 50% \
-background transparent -gravity SouthEast -extent 200% {} \;

sudo:/usr/share/icons/Yaru/ is a system directory

find ... -name "emblem-symbolic-link.png": Search for icons

find ... -exec cp {} {}.bak \;: Make a backup copy

find ... -exec convert {} -resize 50% -background transparent -gravity SouthEast -extent 200% {} \;
Resize it down to 50% (half), Set default background color, Set default position, Extant image back to original size which is 200% (double).

Logout/Login again to apply (Or Alt+F2-r to restart Gnome-Shell if you are Not using Wayland)

To restore them back to original:
sudo find /usr/share/icons/Yaru/ -name "emblem-symbolic-link.png.bak" -exec sh -c 'cp -v {} $(dirname {})/$(basename -s.bak {})' \;
## worst case, reinstall icons
sudo apt --reinstall install yaru-theme-icon

Logout/Login again to apply (Or Alt+F2-r to restart Gnome-Shell if you are Not using Wayland)

Results for 50%/200% ratio in below screenshot:


How to add recovery option directly into the main menu instead of going to "Advanced options for ubuntu"?

Every problem has two solutions: the solution for everyone, and the solution for you right now.
The solution for everyone (including you) to report a bug so that the developers can figure out why this is happening and fix it.  This takes time, but it will also save time for you in the future, when you stop having to apply local workarounds.
The solution for you right now is to figure out which kernel command-line argument used in the recovery mode boot entry makes the boot successfull -- probably nomodeset -- and then edit /etc/default/grub to add it to GRUB_CMDLINE_LINUX_DEFAULT.  Then run sudo update-grub.  Then the regular default boot menu entry should be able to boot your system, and you won't need to change which menu item is the default, and you won't need to manually select 'resume' on every boot.
(And to answer your literal question, edit /etc/default/grub, add GRUB_DISABLE_SUBMENU=y, and run sudo update-grub to get a flat boot menu without submenus.  I don't think there's a way to have a submenu for all older kernel versions, but put have the latest kernel recovery mode option in the top-level menu, not without painful rewriting of grub.cfg generating shell scripts.)


Import a certificate in Evolution mail client

This answer was inspired by this one How do I make a digital certificate available to LibreOffice Writer for digital signatures?

To import a certificate in Evolution (tested on Debian 9):

Once you have a certificate, install it on your computer by double-clicking on it.
Open Evolution.
Open Edit -> Preferences.
In the left panel, click Certificates.
Import your certificate by clicking import and selecting your certificate.
In the top of the current menu, click Authorities.
Find the CA that provided your certificate. You can find that.
information in the certificate itself by double-clicking on it.
Click edit and check the options you desire. If you trust that CA, you can check all three.

I you are still interested in making a free certificate, and for others like myself trying to figure all that certificate thing, the website www.cacert.org allows you to do so.

However, this CA (Certification Authority) is not yet recognized by browsers by default, therefore if you need your certificate for to encrypt a website, the client will have to validate it zirself*.

Have a good day.

*Third-person gender less pronoun as suggested on https://en.wikipedia.org/wiki/Third-person_pronoun#Summary.


During recent reboots hdparm.conf seems to work again. Maybe an update fixed this, I haven't changed anything on my system.


It's a known bug in the nvidia drivers. Unfortunately, since you're using proprietary drivers, there is no way of getting this bug fixed except by maybe complaining on nvnews.net (where some nvidia reps hang out).

So the solution is to use the workaround listed in the bug report, or to switch to the free drivers.

And next time you're buying graphics hardware, remember nvidia's buggy drivers.. :-P


Mount unit with - in path active in systemctl status, but available for Requires in unit

Change

Requires=tmp-dir\\x2d0.mount

to

Requires=tmp-dir\x2d0.mount

in your .service file.


How can I make squid-deb-proxy work with proxy authentication?

I am a little confused by your question. Is your squid-deb-proxy server behind a proxy which needs authentication? Or do you want you squid-deb-proxy clients to authenticate against the squid-deb-proxy server?

In the former case, I put cache_peer proxy.acme.corp parent 8080 0 no-query default login=username:password in /etc/squid-deb-proxy/squid-deb-proxy.conf.


Ubuntu 12.10 Broadcom Wireless Won't Work

I believe I have the same adapter in my Compaq laptop.  I've had a lot of trouble with upgrades over the years.  This article was very helpful when I upgraded to 12.10: https://help.ubuntu.com/community/WifiDocs/Driver/bcm43xx

It seems all I needed to do was specify to use the b43 driver, so if you want to test whether this is the issue for you, open up a terminal window, and type:

modprobe b43

If this works you may want to follow the article's directions on adding the driver permanently.

Good Luck!


default gateway setting for "universal" wifi adapter

The Gateway should be the IP of the Router, that giving the connection to the Internet.  Setting it to 0.0.0.0, won't get you anywhere.  One way of finding out your gateway, is using a system that already connected to the internet, and just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

route

This the output:

To add the default gateway, you can use the GUI utility that you have in your question, or from terminal. (in your case)

sudo ip route add default via 192.168.0.1


How can I change system wide mouse sensitivity for all users?

Perhaps if you edit your /etc/X11/xorg.conf file.

See the manual page: man xorg.conf


Skype pop up video hack (forcibly resize window)

Either

wmctrl -r "Skype for Linux Beta" -b remove,maximized_vert,maximized_horz
xdotool search "Skype for Linux Beta" windowraise windowmove 50 50 windowsize 200 200

or

wmctrl -r "Skype for Linux Beta" -b remove,maximized_vert,maximized_horz
wmctrl -r "Skype for Linux Beta" -b add,above
wmctrl -r "Skype for Linux Beta" -e 0,50,50,200,200

do the trick.

Apparently the resizing – using either wmctrl or xdotool – doesn't work unless the window properties maximized_vert and maximized_horz are removed first. I generally prefer xdotool because of its well-written man xdotool, the many many options and the clear syntax, but it seems like only wmctrl is able to cope with those properties. Using xdotool however you can save one command call.


How to pinpoint source of Firefox window behavior

Your problem sounds very much like the one I reported on bugzilla gnome here

I believe it is a bug in GTK. If you are able to, try to reproduce the steps on that page using Gedit. If you get the same results, then we can report this and hopefully get it resolved sooner.


How to add a guest account without a password?

Method 1
user@ubuntu:~$ sudo adduser guest
user@ubuntu:~$ sudo passwd -d guest

This will add a user called "guest", then delete her password. You can log in from both the standard getty login prompt and graphical login managers like GDM. This works for me on Ubuntu 10.10.
However, apparently this doesn't work for some people using Ubuntu. Thus:
Method 2

Make a user.

Open /etc/shadow: gksudo gedit /etc/shadow

Find the line that starts with the user you just made. Notice the line has multiple fields separated by colons.

Change the second field to: U6aMy0wojraho. In my case:
 guest:$6$m4CpcgBw$i9XLGaUNToClOJ1X5Grug/COUjlkhoPv1:15048:0:99999:7:::
becomes:
 guest:U6aMy0wojraho:15048:0:99999:7:::

Save the file, log out, and try your new password-less account.

The origin of this method is from the Ubuntu livecd. The default user (ubuntu) requires no login password. If you look at /etc/shadow on the livecd, U6aMy0wojraho is the encrypted form of the magic password used. I explain this to emphasize this is not a general linux solution, but something specifically Ubuntu.


Wifi connection: I get an IP but can't reach any sites

I suggest that you reconfigure resolvconf:

sudo dpkg-reconfigure resolvconf

Say yes to "prepare /etc/resolve.conf for dynamic updates?" and reboot.

Is there any improvement?


Would my files still be safe if something went wrong with my computer?

Yes, your files would be safe in both of those circumstances.

But as you rightly allude to, Ubuntu One isn't a backup tool. If you accidentally delete a file, that file will also be deleted on the cloud.


Visually impaired friend wants to try Ubuntu

There is software already installed in Ubuntu dealing with accessibility under Universal Access in Settings. Check out Visual Impairments in https://help.ubuntu.com/stable/ubuntu-help/a11y.html


You need to change one of the boot parameters: nomodeset.  Boot off the LiveUSB again and when you see the small human logo at the bottom:

Press and hold the spacebar.  This will start the different configuration screen.  Select your language and you will see a menu in the middle of the screen, and a set of Function key options down the bottom.  Select the F6 option, then select nomodeset and press enter (and asterisk appears next to selection options)

Next press esc to close the window and select the "try Ubuntu" option from the menu.  It looks like you might need to install some device driver modules after you've installed ubuntu, or make the nomodeset option permanent in the worst case.  Ask another question here when you know what sort of graphics card you have.  You can find out what the graphics system once you have the "try Ubuntu" option up and running.  Open a terminal window with CtrlAltt and type

lshw -C display

and paste the output into your next question.


Gmail Webapps and 13.10 - Unity and Message Me Menu Integration

This bug was already pointed out in https://bugs.launchpad.net/ubuntu/+source/unity-webapps-gmail/+bug/1245027/comments/11

In order to solve it, you have to install the package available here:
https://launchpad.net/~justinmcp/+archive/webapps-ppa. More precisely:

to add ppa:justinmcp/webapps-ppa to your system's Software Sources, open a terminal and enter:

sudo add-apt-repository ppa:justinmcp/webapps-ppa

to pull down the latest list of software from each archive it knows about, including the PPA ppa:justinmcp/webapps-ppa you just added:

sudo apt-get update

It works fine for me (Ubuntu 13.10 Saucy, 64-bit).

See also these questions: GMail not visible in Unity panel, ubuntu 13.10 webapps


I tried to some things.
I found command sudo dpkg-reconfigure grub-pc
More here


Video capture with EasyCap shows double height in VLC

This may not be a definite or really helpful answer, but I can’t comment due to a lack of reputation on this site.

The behaviour you get is probably a bug in the current version of the VLC player. I get exactly the same with two different webcams built into laptops from two different vendors. Only the upper half of the video is displayed stretched like you described.

You should be able to view an undistorted video if you use mpv or ffplay to display your video source.

mpv /dev/video1
# Or
ffplay /dev/video1

If this works, you can use ffmpeg to capture your tapes. This is a very basic command that captures only the video and stores it as a lossless H264 stream. Adjust the parameters to your needs. (Beware: If you use the settings below, the video gets huge!)

ffmpeg -i /dev/video1 -c:v libx264 -crf 0 out.mkv


How to check which OpenSSL version is use by Apache on Ubuntu 12.04

$ apt-cache policy openssl
openssl: Installed: xxx

"Installed: xxx" shows the currently installed version of openssl. Heartbleed is fixed in the following package versions (or later):

Ubuntu 13.10:
    libssl1.0.0 1.0.1e-3ubuntu1.2

Ubuntu 12.10:
    libssl1.0.0 1.0.1c-3ubuntu2.7

Ubuntu 12.04 LTS:
    libssl1.0.0 1.0.1-4ubuntu5.12

If your installed package version is lower than these, then your system is vulnerable to Heartbleed.


If you go with clean installation like I did then you need to install Mono. I went with Ubuntu server 14 image on Windows Azure. If you have clean machine then you can install Mono by compiling it from sources but you can also install Mono using package manager. It’s important to have Mono 3.4.1 or later.

Accessing Ubuntu using Remote Desktop

As my Ubuntu runs on Windows Azure cloud and I will show this Linux also from my Surface RT I need some way to access Ubuntu using Remote Desktop. Here is the nice guide how to make Remote Desktop work with Ubuntu:

How to install xrdp in Ubuntu 14.04.(Griffon’s IT Library)
NB! You don’t need actually Remote Desktop if you don’t want to run browser in you Linux machine and you have also no other reasons to use desktop. If you prefer to have only shell access then it’s okay. To see web applications running on Linux you need later to open some ports maybe or use tunnel to Linux.

Install K Runtime

Run the following command in terminal:

curl https://raw.githubusercontent.com/aspnet/Home/master/kvminstall.sh | sh && source ~/.kre/kvm/kvm.sh

This will install K Version Manager (KVM), K Runtime (KRE) and K Package Manager (KPM) you need to run ASP.NET vNext applications on you machine.

Install latest KRE

Now let’s install latest KRE. Run the following command in terminal:

kvm upgrade

This command calls KVM and asks it to download and install latest KRE.

Fix NuGet.config

It’s possible that NuGet has no idea about ASP.NET vNext package source. You can find NuGet.config from:

/home//.config/NuGet

If it has only empty and closed configuration tag in it then modify contents to be like this:

    https://www.myget.org/F/aspnetmaster/ />

NB! We added ASP.NET vNext package source where published packages are held. If you want to play with raw stuff then use aspnetvnext instead of aspnetmaster.

Get your application from Git

Now you need to get source of some ASP.NET vNext application to your machine. Probably you are using Git. To download ASP.NET vNext sample applications you need to run the following command:

git clone https://github.com/aspnet/Home.git

Restore packages

In terminal move to root folder of your ASP.NET vNext application and restore packages it is using to run:

kpm restore

Now KPM restores all packages needed to run your application. This information is read from project.json files in your applications root folders.

Run your application

Now it’s time to run your application and see if it works:

k kestrel

This command calls KRE and tells it to use Kestrel as web server. As far as I know it’s currently the only server you can use on Linux out-of-box.

Fix Kestrel errors

If you get weird Kestrel errors then there is problem in Kestrel native assembly. To get rid of this problem read blog bost First Impression of .NET vNext by Carolyn Van Slyck. In the middle of page you can find section titled as Kestrel and there is also short guide how to replace the problematic file. To save you from building and fixing native lib Carolyn also provides compiled binary you can use.

After fixing run k kestrel again and now it should run without problems.


Can I install a theme meant for Linux Mint[cinnamon] on Ubuntu?

I think themes are generally very specific to the window manager it's made for, you might be able to take the theme "apart" and make a new theme for ubuntu/unity using the same images & colors?

Or it's probably easier to try installing cinnamon on ubuntu? Search for install cinnamon ubuntu 14.04 and there are a lot of pages saying how to do it.


Took me some time but I find out what was it. At least I think it is as I'll explain, if maybe someone is in similar scenario.

AFAIK, Dust themes does not work well with Ubuntu global menu panel, if selected theme uses dark menus. When I first installed Dust theme I included gnome panel resource from Ambiance in Dust's gtkrc file as last line:

include "../../Ambiance/gtk-2.0/apps/gnome-panel.rc"

and added one more line inside gnome-panel.rc:

text[NORMAL]    = shade (0.9, @selected_fg_color)

at line 12, as a workaround.

That was some time ago so I totally forgot about it.

Now when Update Manger updated light-theme packages, gnome-panel.rc got overwritten.

That was the issue


awk programming - Changing a field value conditionally

To do that, you need to use conditional statement inside action block {}.

The syntax is if ( expr ) statement

So to match the condition where the 4th column is ms and then reassign the value for the 3rd column when the condition is matched:

if ($4 == "ms") $3=$3+1

and then print the whole line using print $0

So the full command looks like this:

awk '{ if ($4 == "ms") $3=$3+1; print $0 }'


Do not know how your got grub legacy installed to MBR, but you only have UEFI boot and data in MBR will never be used.

Many vendors now modify UEFI to only boot Windows by description. So ubuntu entry does not work. But UEFI also boots hard drive entry as /EFI/Boot/bootx64.efi. So we copy grub into /EFI/Boot and rename it ot bootx64.efi and system will boot from hard drive entry.

From live installer mount the efi partition on hard drive
Mount efi partition. check which partition is FAT32 with boot flag. Often   sda1 or sda2 but varies.

sudo mount /dev/sda1 /mnt

mkdir only if not already existing, your have this but others may not:

sudo mkdir /mnt/EFI/Boot
sudo cp /mnt/EFI/ubuntu/* /mnt/EFI/Boot

If new folder created, the bootx64.efi will not exist, skip this command

sudo mv /mnt/EFI/Boot/bootx64.efi /mnt/EFI/Boot/bootx64.efi.backup

make grub be hard drive boot entry in UEFI. If not existing, may have to update UEFI also with efibootmgr.

sudo mv /mnt/EFI/Boot/grubx64.efi /mnt/EFI/Boot/bootx64.efi

Other work arounds:

Dual boot Win 8 / Ubuntu loads only Win

windows 8.1 changes boot order

How do I get my HP laptop to boot into grub from my new efi file?


The Google webapp does not integrate gmail

The reason they are different, is because they are different things. The first image is the upstream GNOME Online Accounts settings view, which doesn't allow applications or plug-ins to add support for other services. The second one is the modified one in Ubuntu which does allow such abilities.

However, neither of these has anything to do with the Webapps support in Unity, really. If you want to enable Unity Webapps support for GMail, then you should go to https://gmail.com/ and select to integrate into Ubuntu, when the in-browser pop-up asking you to, comes up. This will add the icon to the launcher, and should show message counts in the message indicator, and such.


Missing Sound After Cleanup and Moving of Home Directory

It sounds (no pun intended) like some hidden files in home not being transfered to your new home. Check if you have any .pulse files in your home folder. The other option is about permissions easiest way to check is by running this command in terminal.

pulseaudio --start

And check the output if it looks somthing like this

E: core-util.c: Home directory /home/alpha not ours.
W: lock-autospawn.c: Cannot access autospawn lock.
E: main.c: Failed to acquire autospawn lock

then it is probably a permisions issue which wouldn't surprise me. if this is the case then check out this post by drs305 on the Ubuntu forums.

Solving .dmrc and $HOME Permission Errors


Vim plugin, You Complete Me. Why does :YcmRestartServer hang?

i fixed the issue by going in to ~/.vim/bundle/YouCompleteMe/ and running python install.py


List all environment variables, and show if they are exported or not

Use the declare builtin:

$ help declare
declare: declare [-aAfFgilnrtux] [-p] [name[=value] ...]
    Set variable values and attributes.

    Declare variables and give them attributes.  If no NAMEs are given,
    display the attributes and values of all variables.

    Options:
      -f    restrict action or display to function names and definitions
      -F    restrict display to function names only (plus line number and
        source file when debugging)
      -g    create global variables when used in a shell function; otherwise
        ignored
      -p    display the attributes and value of each NAME

    Options which set attributes:
      -a    to make NAMEs indexed arrays (if supported)
      -A    to make NAMEs associative arrays (if supported)
      -i    to make NAMEs have the `integer' attribute
      -l    to convert NAMEs to lower case on assignment
      -n    make NAME a reference to the variable named by its value
      -r    to make NAMEs readonly
      -t    to make NAMEs have the `trace' attribute
      -u    to convert NAMEs to upper case on assignment
      -x    to make NAMEs export

Accordingly:

$ declare -p
declare -- BASH="/usr/bin/bash"
declare -r BASHOPTS="checkwinsize:cmdhist:complete_fullquote:expand_aliases:extglob:extquote:force_fignore:histappend:interactive_comments:nullglob:progcomp:promptvars:sourcepath"
declare -ir BASHPID
declare -A BASH_ALIASES='()'
declare -a BASH_ARGC='()'
declare -a BASH_ARGV='()'
declare -A BASH_CMDS='()'
declare -- BASH_COMMAND
declare -r BASH_COMPLETION_COMPAT_DIR="/etc/bash_completion.d"
declare -a BASH_LINENO='()'
declare -a BASH_SOURCE='()'
declare -- BASH_SUBSHELL
declare -ar BASH_VERSINFO='([0]="4" [1]="3" [2]="42" [3]="1" [4]="release" [5]="x86_64-unknown-linux-gnu")'
declare -- BASH_VERSION="4.3.42(1)-release"
declare -x CDPATH=":/home/muru"
declare -x COLORTERM="gnome-terminal"
declare -- COLUMNS="237"
declare -- COMP_WORDBREAKS
declare -x CONFLOCAL="laptop"
declare -x DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"
declare -x DESKTOP_AUTOSTART_ID="10abca3e1337cb662146002998494759100000008000003"
declare -x DESKTOP_SESSION="gnome"
declare -a DIRSTACK='()'
declare -x DISPLAY=":0"
declare -x EDITOR="vim"
…

To see just exported environment variables, use declare -px:

$ declare -px
declare -x CDPATH=":/home/muru"
declare -x COLORTERM="gnome-terminal"
declare -x CONFLOCAL="laptop"
declare -x DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"
declare -x DESKTOP_AUTOSTART_ID="10abca3e1337cb662146002998494759100000008000003"
declare -x DESKTOP_SESSION="gnome"
declare -x DISPLAY=":0"
declare -x EDITOR="vim"
declare -x GDMSESSION="gnome"
…

Or use external commands, like env, printenv, or:

awk 'BEGIN{for (i in ENVIRON) {print i}}'
perl -e 'print "$_\n" for keys(%ENV)'
python -c 'import os; [print(k) for k in os.environ.keys()]'


Light display manager not functioning after updates

I read on Snapcraft's Forum that this snap is in devmode (more information about what devmode is here) because of technical difficulties of the creator of the snap.
--jailmode makes the snap be installed in strict mode, so use --devmode (devmode flag) instead of --jailmode, as the error you should get when not setting what mode to install the snap in (running sudo snap install leagueoflegends --edge):
error: The publisher of snap "leagueoflegends" has indicated that they do not consider this
       revision to be of production quality and that it is only meant for development or testing at
       this point. As a consequence this snap will not refresh automatically and may perform
       arbitrary system changes outside of the security sandbox snaps are generally confined to,
       which may put your system at risk.

       If you understand and want to proceed repeat the command including --devmode; if instead you
       want to install the snap forcing it into strict confinement repeat the command including
       --jailmode.