Running the following should work to reinstall Sublime Text 2, and install Sublime Text 3:

sudo rm -rf /opt/sublime_text_2 /usr/bin/sublime-text
# this will remove the old install directory and execution script
sudo add-apt-repository ppa:webupd8team/sublime-text-2
# add the ST2 repository
sudo add-apt-repository ppa:webupd8team/sublime-text-3
# same for ST3
sudo apt-get update
sudo apt-get install sublime-text sublime-text-installer
# install ST2 and ST3, respectively

You should now be able to run sublime-text from the command line to start ST2, and subl to start ST3. As always, please keep in mind the following:

  Sublime Text may be downloaded and evaluated for free, however a license must be purchased for continued use.


OK do the following command from your terminal with CTRL+ALT+T

or from CLI with CTRL+ALT+F1

sudo restart lightdm

If issue not solved then reinstall your lightdm with

sudo apt-get install --reinstall lightdm


CPU, memory utilization in Ubuntu 20.04 top pane?

On Ubuntu 20.04 I was unable to get my CPU and Memory usage to appear on the top bar with the gnome system monitor. However, I found a different program that allows me to do just that:
sudo apt install indicator-multiload
After logging out and then logging back in you should see a little graph on the top bar showing CPU usage. To get the program to show memory usage (and other resources), click the graph and go to "Preferences". There you can just tick the checkboxes next to the resources you wish to show on your top bar.
Here is a link to a tutorial with some screenshots and more details: Ubuntu show CPU and Memory usages in Top Bar
Hope this solves your problem.
Edit: I figured out how to use gnome-shell-extension-system-monitor for this. You need to install Gnome Tweaks (sudo apt install gnome-tweaks). Then after running sudo apt install gnome-shell-extension-system-monitor as above, open the Tweaks app and under the "Extensions" tab turn on System Monitor. You can then click on the graphs on the top bar to edit Preferences for the program.


Xubuntu 12.04 Lenovo T500 hardware mute button will not unmute

Solved with a reboot after
 amixer -D pulse set Master 1+ unmute
Problem has not recurred after many days of use.


Injecting packages installed from source into apt/synaptic

if you install checkinstall from the repo's

sudo apt-get install checkinstall

then when you install from source instead of doing

sudo make install

if you run instead

sudo checkinstall

it will create a package and have a record of it in synaptic/apt and as long as the version numbers are correct it should satisfy the dependencies


Make sure you have "Recommended updates (precise-updates)" activated as software source:

then run

 sudo apt-get update
 sudo apt-get upgrade


xfce4-weather-plugin for Xubuntu 18.04 / 20.04 stopped working

Update 2021-03-19:  Just received an update today on the bug that they pushed the xfce4-weather-plugin version 0.10.2 to the focal-updates repository that does not have this issue.  Feel free to reinstall from the Ubuntu Repos.

Update 2021-03-04:  The plugin version from the 20.04 repository stopped working recently due to shutting off the 1.9 API:  https://api.met.no/blog/2021-02-04-extremeswwc on March 1st.
This affected version 0.10.1 that is in the Ubuntu Repository.  The git build below now installs version 0.11.0 which fixes this issue.

The reason for this is that the API from https://apt.met.no has changed the version number that the plugin is calling.
Old code calling:
https://api.met.no/weatherapi/locationforecastlts/1.3
The page gives this error message:
404 Not Found

Validation error

The specified version number is end-of-lifed for this product

API expecting:  https://api.met.no/weatherapi/locationforecast/2.0
I have filed a bug report for this to get new API added to the code here:
https://bugs.launchpad.net/ubuntu/+source/xfce4-weather-plugin/+bug/1895246
There is a bug filed at the Xfce GitLab:
https://gitlab.xfce.org/panel-plugins/xfce4-weather-plugin/-/issues/27

Apparently there has been a fix pushed upstream it is available in git repo xfce4-weather-plugin except there is an issue that the xdt-autogen version required to build this is 4.14.0.  The version in Xubuntu 18.04 is version 4.12.0 as the highest.  The version in the git is looking for isn't available in the xfce4-dev-tools package for 18.04.  However, I was actually able to get a git version to build with version 4.12.0 with some quick modifications to their autogen.sh script.  I have the instructions below.

Git repo install:
I found the version that comes with 18.04 actually has a problem with showing when it is evening outside as I was seeing the icon showing a moon when it was only 4 pm.  I updated to the version, I believe is version 0.10.1, in the git repo and that corrected it.
Remove Weather plugin from panel and after remove existing plugin
sudo apt remove xfce4-weather-plugin

Now add prereqs:
sudo apt-get build-dep xfce4-weather-plugin
sudo apt install build-essential git

or
sudo apt install intltool libdbus-glib-1-dev libsoup2.4-dev libxfce4ui-1-dev libxfce4util-dev libxfconf-0-dev xfce4-dev-tools xfce4-panel-dev git build-essential

If running 20.04 also install the following:
sudo apt install libxfce4ui-2-dev libxfce4panel-2.0-dev

NOTE: All of these -dev applications are only used for the build from source.  Once the install process is complete, you can remove all these -dev applications safely as they are no longer needed.
Now get the git version, build and install
git clone https://gitlab.xfce.org/panel-plugins/xfce4-weather-plugin.git
cd xfce4-weather-plugin/

If you are running 20.04 or newer the next line is not needed:
sed -i 's/4.14.0/4.12.0/' autogen.sh

Continue with the build:
./autogen.sh --prefix=/usr
make
sudo make install

Re-add the weather plugin to the panel and it should now work now.  =)
Quick screenshots of it:


Remapping mouse buttons to keyboard keys

There are basically two approaches to this problem:

Bind an action to the mouse button and fake a key press

or

Map the mouse button's scancode to a different keycode

The latter only works if the input driver reports a scancode for the specific button. All mice I own report scancodes for all buttons except the scroll wheel.

I personally prefer remapping the scancode, so I'll only explain that method.

Remapping mouse button's scancode to different keycode

This is more or less the same procedure as I described here.

Run sudo evtest (you may have to install evtest first) and select your mouse. Press the buttons you want to remap (if you don't see any output, press Ctrl+C and repeat the process until you found your mouse). The output should contain lines like the following:

Event: time 1558613958.149431, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90004
Event: time 1558613958.149431, type 1 (EV_KEY), code 275 (BTN_SIDE), value 1
Event: time 1558613958.149431, -------------- SYN_REPORT ------------

The first line tells us the scancode (in my case 90004), the second line reports the currently mapped keycode (in my case BTN_SIDE). Write down the scancodes of all mouse buttons you want to remap.

Now run the following command, where eventX is the one you chose when using evtest:

grep "" /sys/class/input/eventX/device/id/*

This tells you bustype, vendor, product and version of your mouse. In my case, the output is:

/sys/class/input/event7/device/id/bustype:0003
/sys/class/input/event7/device/id/product:4102
/sys/class/input/event7/device/id/vendor:062a
/sys/class/input/event7/device/id/version:0110

Now create the following file:

/etc/udev/hwdb.d/99-mouse-remap.hwdb

evdev:input:b[bustype]v[vendor]p[product]e[version]*
 ID_INPUT_KEY=1
 KEYBOARD_KEY_[scancode]=4
 KEYBOARD_KEY_[scancode]=5
 KEYBOARD_KEY_[scancode]=6

...where

[bustype], [vendor], [product] and [version] are the ones obtained in the previous step with letters converted to uppercase
[scancode] are the ones from the first step with letters converted to lowercase
the evdev:... line has no preceding space
the KEYBOARD_KEY... lines have exactly one preceding space

The file would look like this for my mouse:

evdev:input:b0003v062Ap4102e0110*
 ID_INPUT_KEY=1
 KEYBOARD_KEY_90003=4
 KEYBOARD_KEY_90004=5
 KEYBOARD_KEY_90005=6

Now run sudo systemd-hwdb update and reboot.


rm: cannot remove '0': Operation not permitted

It's possible that the directory is still in use, and therefore cannot be deleted.

What happens if you use the fuser command to see any PIDs running in the directory? Example:

MyTestServer: cd /home/postgres/logs
MyTestServer: fuser .
/home/postgres/logs: 40470c


How to redirect only part of output produced by a commmand?

You can pipe the program's standard output through another program as a filter - for example to write every 10th line starting with the first
python3 test.py | sed -n '1~10p' > output.txt

or
python3 test.py | awk '!((NR-1)%10)' > output.txt

If you really need to use bash only, then you could replace sed/awk by a shell loop using a counter and a conditional arithmetic expression to select the desired lines - but I would not recommend it. See for example Why is using a shell loop to process text considered bad practice? .


Switch to a different workspace while using a VM

One way of achieving this is by changing the shortcut that VMware Workstation uses to escape from the VM (Ctrl+Alt by default). In VMware Workstation go to Edit → Preferences → Hot keys and pick a different combination. This will allow you to use Ctrl+Alt+arrow key to switch workspaces.


Postman installation error on Ubuntu 18.04 : api.snapcraft.io: no such host

Could be a DNS Issue.
To fix it, you can explicitly set DNS addresses. Here after an example with OpenDNS (on Elementary OS 5.1, but should be practically the same thing on other distributions or flavours)

Go to System Settings > Network & Wireless > Network

On your current connection, push the "Advanced Settings" then select the IPV4 settings tab

Enter new IP addresses of DNS server, in this case : 208.67.222.222, 208.67.220.2 and save.

It worked for me.


Difference in two types of command that uses grep

The first part of your two commands (cat FILENAME) is always the same and just prints the specified file's content to the STDOUT stream. I will not explain it any further.
The point of our interest is the grep part.
Syntax of grep:
grep [OPTIONS] PATTERN [FILE...]

You can pass grep some options to tweak its behaviour (e.g set the used RegEx flavour or control the output formatting), but those are not used in your case.
The next single argument must be the pattern to match, where a regular expression ("RegEx") or a fixed string (if grep is called with the -F option) is required. In your example, this is the install or "\ install\ " part. I will explain it in the next paragraph.
After that, you specify the source of the data to match. This can either be a file name, or nothing. In the second case, grep will read from the STDIN stream (standard input: normally what you type with the keyboard), where you pipe (|) the output from the previous command.
How to correctly pass the "PATTERN" argument?
The pattern parameter must be a single argument. That means, you can't just pass several words or anything containing spaces or shell special characters here, because spaces are treated as argument separators in Bash and probably every other shell as well, and shell special characters such as ; will break the command.
But you have two options to include spaces into the pattern to match anyway:

Put the entire string to match in single ('...') or double ("...") quotes. This way, the shell parses the entire quotes-enclosed string as one argument and passes it on to grep.

Escape every space in the pattern with a backslash (\). That means, you write a backslash before every space which you don't want to be seen as argument separator by the shell. But note that if you want to have an actual backslash in the pattern, you must escape it as well, by writing another backslash before it.

If we now analyse the difference of your two grep command examples, we see the difference in what they match:
cat /var/log/dpkg.log | grep "\ install\ "

This matches the pattern install. (Note the leading and trailing space!)
Here we see both methods: double quotes around the entire pattern and backslash-escaping the spaces inside it. It's superfluous to be honest, one would have been enough. Although it doesn't hurt in this case, you should not do this and decide on one method. Usually I would recommend to use quotation marks, as it's easier to read.
cat /var/log/dpkg.log | grep install

This matches the pattern install. (No surrounding spaces.)
Here the pattern only consists of the word install, nothing else. No spaces.
Difference between your commands:
As I said, the first of your examples only matches the word install when it is surrounded by spaces. It would not match if e.g. there's a full stop or any other character directly before or after it instead. It would also not match the word directly at the beginning or end of a line.
The second example does not care about any spaces before or after the word install. It also matches at line beginnings and endings as well as if it is surrounded by any punctuation. It even matches if there is a word containing this letter sequence anywhere, e.g. "uninstall", "reinstall" or "installation" too!
Example with correct/useful backslash escaping:
As in the example you provided the backslashes are superfluous, here the same example without quotes, but with backslash escaping only instead:
cat /var/log/dpkg.log | grep \ install\

Or if you want to match the string "I like Ubuntu" in a file /home/you/path with spaces/textfile without using quotes, you would do that like this:
grep I\ like\ Ubuntu /home/you/path\ with\ spaces/textfile

You see that you must escape spaces in path- or filenames as well - or quote them. The line above is equal to the line below:
grep "I like Ubuntu" "/home/you/path with spaces/textfile"


Can I use the same certificate on another server?

You can install a certificate on multiple servers, under two conditions.  The first being that the sites are using the same hostname, the second being you've purchased a wildcard certificate which entitles you to use any subdomain *.example.com.

HAProxy is an example of a load balancer that would work.  You'll need to consider how you intend on handling the SSL traffic.  If you don't plan on using a caching server between your load balancer and web servers you can choose to pass the ssl traffic, or terminate it at your load balancer.  If you plan on caching, you will need to terminate ssl at your load balancer.  The benefit of this is your sites actually listen non-ssl behind your balancer and your balancer will actually handle the ssl certs.  So you only need to install the ssl on your balancer.


Yes, you can use OpenVPN directly. This way you can use more settings as well.

First you need the openvpn package:

sudo apt-get install openvpn

Then you can connect like this:

sudo openvpn --config /path/to/config.ovpn

The sudo is important because OpenVPN won't be able to connect otherwise (I think because it has to change the routes).


Start Menu right-click "Properties" option missing from Program entries in Lubuntu 14.04?

I can confirm this bug, Properties shows up but nothing happens, fresh install of Lubuntu 14.04. Very disappointed in this release, a multitude of bugs especially for stable.


Can't read CDs, can't create USB... how do I install Ubuntu?

If you can use an alternative CD , it can be loaded by the installer.

This link will walk you through.

Or choose PXE installation mode , that's harder to configure , and requires a second computer.

UPDATE

Some details about alternative CD , first , download the kernel and ramdisk from (this is for Precise):

http://archive.ubuntu.com/ubuntu/dists/precise/main/installer-i386/current/images/hd-media/

Which is vmlinuz and initrd.gz (Replace i386 with amd64) if you're heading for x64 system

And use grub to load them (for windows use grub4dos)

kernel (hdX,X)/path/to/vmlinuz
initrd (hdX,X)/path/to/initrd.gz

When it boots , it will scan for your alternative CD from all partitions , if it was found , the installation will continue.


Thunderbird/Firefox with shared profiles (Lubuntu+WinXP)

If the windows partition is mounted properly and you get this message, you had the thunderbird in Windows opened and the message is correct to avoid conflicts in the profile. Try booting windows and close it properly before you reboot. the file "lock" is created when you launch thunderbird and deleted when closed properly. So you may try to delete this file.


Weird, that Ubuntuforums link wants a login but I can view random other threads without logging in.

Anyway I'm guessing you're referring to mem=xM in your bootloader. This is perfectly safe to try on your current install. For 6GB you want mem=6144M (6*1024).

Just try tacking it onto the end of the line with the other options, which will include such things as quiet splash ro root=UUID=$stuff.

For safety, I would not recommend you edit any config files to do this the first time. While booting, hold Shift to get into GRUB and then press e to edit the highlighted grub entry. You can move around with the cursor keys to find the line you want to edit; add mem=6144M onto the end and boot (see directions at the bottom of the screen).

If it works, add it to /etc/default/grub in the line GRUB_CMDLINE_LINUX_DEFAULT, and run sudo update-grub.


Looking to install Ubuntu on SSD and reaplace Win10 from SSD

If you system only uses an SSD there are not a lot of tips.

It might be wise to create an extra partition (besides /) and use a /data/ (I use /discworld/ myself) partition for your personal files and put the directories in /home/$USER/ on that partition (see ~/.config/user-dirs.dirs).
That makes backup up easy: you either make a full backup (system, settings, personal files) or just a personal backup.

Makes it easier to re-install too. My personal files are on an extra HDD in my notebook and I only need to mount it during a re-install (and copy /discworld/user-dirs.dirs to ~/.config/user-dirs.dirs).

Check for compatibility with Linux and make sure trim is supported for your SSD. Samsung should be OK though so that one is covered.

Just do it :)


How can I set a second network interface in ubuntu 16.04?

Finally I could solve it using the GUI of network-manager. Here are the steps that I followed:

In the network-manager icon at the top-right of the screen click in Open Edit Connections... and then Add and select Ethernet
In the ethernet tab select your network device (enps025 in my case)
Go to IPv4 Settings tab, select manual as method, click in add and fill in the address, netmask and gateway of your internet network. Also fill in DNS servers field if necessary. Save the settings.
Open Edit Connections... again and then Add and select VLAN.
In the VLAN tab fill in the parent interface field with your network device (enps025(XX.XX.XX.XX) in my case). Also fill in your VLAN id.
Then go to IPv4 Settings tab, method = manual, fill in all the field of the network that you are going to use (address,netmask,gateway,dns..).
Finally specify the routes that you want to use through the VLAN network to get access to your servers by clicking in routes in the IPv4 Settings tab. Do not forget to click the option Use this connection only for resources on its network. Save and that's it!!

You can check the network interfaces doing ifconfig. In my case I can see enps025 as the interface for getting internet access and enps025.32 as the vlan interface (32 in the vlan id in my case). If you want to check your routes you can do it by doing netstat -nr

Also it is possible to check/edit the network setting from the command line by editing the files located in /etc/NetworkManager/system-connections/


If you want to use avconv

Find video device

 ls /dev/video*

suppose video0

2- Find audio device

 arecord -l

suppose output like this

 card 1: U0x46d0x8ad [USB Device 0x46d:0x8ad],........

Then the audio device would be:

plughw:U0x46d0x8ad,0

Capture video and audio:

avconv -f video4linux2 -r 25 -i /dev/video0 -f alsa -i plughw:U0x46d0x8ad,0 -ar
22050 -ab 64k -strict experimental -acodec aac -vcodec mpeg4 -y webcam.mp4

If you want to try some GUI apps:

1.Camorama Webcam Viewer

To install it:

sudo apt-get install camorama

2.GTK+ base UVC Viewer

Install GUVC Viewer

sudo apt-get install guvcview


Typing just vboxmanage will give the help page output to stdout - if this on a TTY etc, you won't be able to scroll it. To make it work like man, you can pipe the output to less:

vboxmanage | less

Then you can 'scroll' it with arrow keys/page keys/home or end/mouse wheel/whatever. You can pipe it to more as well, but less is 'nicer' 'easier' to use.


How do I replace LVM root volume with SSD disk on Ubuntu 13.10

For situation described in question I used script. You need copy data to SSD and change /etc/fstab there.

#!/bin/bash
# Stop script on single error
set -e
# Script must be run from root user
if [[ $EUID -ne 0 ]]; then
   echo "This script must be run as root"
   exit 1
fi
# Temporary mount point for guest root
MountDir="/media/root"
# Create mount point if not exist
if [ ! -d "$MountDir" ]; then
    mkdir -p "$MountDir"
fi
# Set ownership
chown root:root "$MountDir"
# Mount guest root (change for your system)
mount /dev/sdb1 "$MountDir"
# Mount other paritions (change for your system)
mount /dev/sda1 "${MountDir}/boot"
mount /dev/mapper/vg1-var "${MountDir}/var"
mount /dev/mapper/vg1-opt "${MountDir}/opt"
mount /dev/mapper/vg1-tmp "${MountDir}/tmp"
mount /dev/mapper/vg1-home "${MountDir}/home"
# Mount some system in-memory directories for correct operation of guest system
mount -B /proc "${MountDir}/proc"
mount -B /dev "${MountDir}/dev"
mount -B /sys "${MountDir}/sys"
# Enter to guest root and run commands to update OS boot configuration
chroot "$MountDir" /bin/bash -c "update-initramfs -u; update-grub"
# Unmount partitions (change for your system)
umount "${MountDir}/boot"
umount "${MountDir}/var"
umount "${MountDir}/opt"
umount "${MountDir}/tmp"
umount "${MountDir}/home"
# Unmount in-memory directories
umount "${MountDir}/proc"
umount "${MountDir}/dev"
umount "${MountDir}/sys"
# Unmount guest root
umount "$MountDir"

Thats basically written from other answers:

https://askubuntu.com/a/118928/27255 - copying

https://askubuntu.com/a/3409/27255 - but udpate-grub is not enough, You need to run update-initramfs -u first…


"hardware drivers" don't detect my GPU (NVIDIA 520M 1GB)

It looks like you've downloaded a mainline kernel from http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.2-precise/. Just installing the linux-image-3.2.0-030200-generic image is suitable for many cases, but if you need to install out of kernel modules like VirtualBox or graphics drivers, you'll also need to install the kernel headers package. On the linked page, these are the linux-headers-3.2.0-030200-generic...amd64.deb and linux-headers-3.2.0-030200...all.deb files.

Unless you need to test a kernel, I suggest you not to use these kernels for daily live because the modules cannot be unloaded once loaded.

Furthermore, installing a newer kernel won't make your NVIDIA Optimus card get detected, see Is a NVIDIA GeForce with Optimus Technology supported by Ubuntu?


Install this driver for RTL8723AE. Connect to the internet by wire and run:

sudo add-apt-repository ppa:hanipouspilot/rtlwifi
sudo apt update
sudo apt install rtlwifi-new-dkms

If UEFI is used in your laptop, you will also need to disable Secure Boot in BIOS to enable this driver.


Error running .exe compiled with i586-mingw32msvc-g++ and SFML

At last, I just figured out the best solution was to install MinGW on Wine and run the g++.exe from Wine. It works like a charm really and never gives a single problem once the setup is finished.


How can I change the directory of a document with gdrive?

There is the gdrive update command available, but I am not able to use it:

[root@computer][~]# gdriveupdate -p <DIRECTORY ID> myfile.docx
Uploading myfile.docx
Failed to upload file: googleapi: Error 403: The parents field is not directly writable in update requests. Use the addParents and removeParents parameters instead., fieldNotWritable

So I was forced to create bash functions that would

Download the file
Delete the online file that is in the wrong directory
Upload the file at the right location

I had to make the distinction between

Google document files that require commands export and import
Non Google document files where the commands download and upload can be used

Importing documents and exporting them again with .docx extension is better than .odt extension (e.g equation are in image with .odt whereas they are editable after exporting the document with .docx extension).

I have created a folder $HOME/.gdrive/files to store the downloaded file.

The two functions are

gdrive-change-dir-doc <FILE ID> <DESTINATION FOLDER ID>

gdrive-change-dir-doc () {
cd /root/.gdrive/files
rm -i *
gdrive export --mime application/vnd.openxmlformats-officedocument.wordprocessingml.document $1
gdrive delete $1
gdrive import -p $2 *
}

gdrive-change-dir-non-doc <FILE ID> <DESTINATION FOLDER ID>

gdrive-change-dir-non-doc () {
cd /root/.gdrive/files
rm -i *
gdrive download $1
gdrive upload -p $2 *
gdrive delete $1
}

You can now create powerful command such as putting all unsorted docs in one online folder:

[root@computer][~]# drive list --absolute | grep -v "/" | grep doc| awk '{ print $1 }'|while read i
do
       gdrive-change-dir-doc $i <DESTINATION FOLDER>
Done


s2both (provided by uswsusp) is one way to do it. pm-suspend-hybrid is another. I'm not aware of any outstanding issues for either program that isn't model- or configuration- specific.

That being said, I have this issue with pm-suspend-hybrid. The accepted answer there doesn't work for me. s2both resumes correctly, but shuts down my laptop instead of putting it to sleep correctly per this confirmed bug. I think my issues with these methods are related to my hardware.


First check your Ubuntu Version.

cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.4 LTS"

Restarting apache services will solved your problem.

sudo service apache2 restart

If you are getting Ubuntu 14.04 LTS

cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=Trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04 LTS"

Then your apache root directory will be /var/www/html/

 sudo vim /var/www/html/info.php

<?phpphpinfo();?>

write your php script.

Restart apache2 service.

sudo service apache2 restart

Try it.


How can I obtain the default configuration files of apache2?

The straightforward way:

Go to packages.ubuntu.com
Search for package name
Open the package page, e.g, apache2
Click on architecture, and download
Create temporary folder: mkdir apache_temp
Run dpkg -x apache2_2.4.6-2ubuntu2_i386.deb apache_temp
Default configuration files are located under apache_temp/etc/apache2.


Desktop performance issues on laptop - how to find the reason?

As result I turned on and off various features in BIOS and disabling

  Intel SpeedStep

did the trick. I also found out that "damaged AC adapter" POST message was disabled, thats why I didn't see any information regarding the broken AC adapter and reduced CPU clock speed because of it.

However, this problem can also be fixed by setting a property in /proc in Linux, more information about it in this question: Ubuntu is very slow when Intel SpeedStep is enabled (CPU is not used in full speed)


GRUB menu stopped showing in serial console

I have seen the same problem in Ubuntu 18.04, but I cannot tell how it works in other releases since I haven't tried. After following many post on internet. My grub setup is
GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0"
GRUB_TEMRINAL="serial console"
No need to set GRUB_SERIAL_COMMAND. The trick is to use virt-manager to view the grub menu in text if you have -nographic or  section in xml is removed.


What is the default domain on Ubuntu VPS?

TL;DR: There is no domain name ever provided with a VPS by default, in most VPS providers' setups, as it's likely your provider (and a lot of other VPS providers) are not Domain Name Registrars and do not provide the option for you to purchase a domain name to go with your server.

Slightly more informational:

There is no real need to assign a 'domain' to a VPS.  Therefore, VPSes don't typically come with a domain name.  I believe you are misunderstanding how VPSes work from providers.

In some cases, VPS providers also provide you with the option to register a domain name for use with the VPS.  However, most VPS providers are not web domain registrars in their own right, and therefore they do not provide you a domain.

You have to purchase a domain separately through a registrar, and point the domain name's DNS A record to the IP address of your VPS.  From there, you can then set up a web server to listen and serve content for that domain.  Note that this is a separate service from a separate company, and you need to set up the domain and DNS in order for it to work.

IF you have no domain but want your sent-locally emails to have something at the end like localmonitor@hostname.com, you can try and set your FQDN with sudo hostname hostname.com or something, but this is still not the answer to 'What is the default domain', as there is no default domain.


Find first match in every folder branch respectively

A shell function (untested):

search () (
  if [ -f "$1"/CMakeList.txt ]
  then
    # if you get a file, print and stop recursing
    echo "${1%/}/CMakeList.txt"
    return
  fi
  for d in "$1"/*/
  do
    # nothing found in this directory, recurse to subdirectories
    search "${d%/}"
  done
)
search .


Accidently deleted /dev/video0 and can't access the web cam via cheese

/dev files are not-ordinary files, such as a .txt file, but they are interface to devices, like nodes, and most important they do not reside really on your (our) disk.

/dev files represent devices attached/on your computer, resident files are created run-rime.

The simplest solution to restore that file is to reboot your computer.
(when you power-off a computer, /dev is empty)

As an alternative, un-plug and plug the implicated device should have the same effect.


Forticlient VPN SSL DNS works fine with a Mac, but not with Ubuntu

Solved it with DNSmasq.

Add a DNS to my connection (for example 127.0.1.1) using Ubuntu's GUI.

Add the line localhost 127.0.1.1 to my hosts file.

Add listen-address 127.0.1.1 to dnsmasq.conf .

Restart DNSmasq.

There you go.


Ubuntu 20.04 LTS get stuck at logo screen

Yesterday's software update in Ubuntu 20.04 updated nvidia-driver-450 to nvidia-driver-460. Yesterday's software update also updated all of the Nvidia 450 series packages from 450 to 460. The following commands will install the recommended proprietary Nvidia graphics driver in Ubuntu 20.04.

Remove all the nvidia packages.
sudo apt update
sudo apt remove '^nvidia'
sudo apt autoremove

If you have added an Nvidia PPA to /etc/apt/sources.list remove that PPA by prefacing its line in sources.list with a # to comment it out. Run sudo apt update to refresh the list of available software.

Reboot with sudo reboot

Run the following commands to install the recommended proprietary Nvidia graphics driver.
sudo ubuntu-drivers autoinstall
sudo reboot

If automatically installing the recommended proprietary Nvidia graphics drivers doesn't work, try reverting them back to an earlier version like nvidia-driver-450 or nvidia-driver-435.
If the above 4 steps don't work, the other possibility is that the boot problem is caused by a kernel update in Ubuntu 20.04 that has generated several questions at Ask Ubuntu in recent days and is answered in this answer.


The only unsolved question is #2:

  How is SFTP still running even after purging, and where is its setting files?

In Ubuntu, the sftp server mechanism is typically done as part of an SSH server.

If you are running openssh-server to have SSH access, then that is handling the SFTP protocol connections.


I have similar issues - see Display resolution problem with Sony TV and Intel integrated graphics.
I think that there is something strange about this particular TV. I set the correct resolution using cvt and xrandr so the computer was set at the native resolution of the TV and I got a black screen. At 1920x1080 the edges are cut off. I think it is a TV issue, hopefully someone has a workaround


First of all, that is a video on how to destroy your Ubuntu installation, not remove it.

If you want to completely remove Ubuntu and switch to Windows, boot into a liveCD when you get one, read up on how to install Gparted, delete your primary Ubuntu partition(s), boot into a Windows OEM cd and use the command prompt to restore the NT bootloader grub replaced.

As for:

  Error: file not found. Grub rescue>

Grub is something called a bootloader. Bootloaders are used to bootstrap (initialize) Linux so that Ubuntu can run. Since Grub is a rather feature-rich bootloader, it holds most of it's code in your Ubuntu install. Since you destroyed your ubuntu install, grub can't find the rest of itself to load, and falls back to emergency console mode...

Also, since your tiny stage-1 grub install on the MBR most likely does not come with built-in NTFS support, you're out of luck if you want to boot back to windows without some sort of Rescue OS. Sorry :(


Why am I not seeing encryption as an option in file roller?

Archive Manager (file-roller) have these options. Rt. click and Open with Archive Manager.

To extract you can drag and drop.

Can be used to encrypt as well as decrypt.


Ubuntu has locked , showings password is incorrect

Type as slowly and as simply as possible, making sure you do not typo. Also, you may have forgotten your password. If so, retry with other passwords. If your PC can't boot normally, try reinstalling Ubuntu to use other recovery tools.


Why a new file with ~ added in extension is created whenever I create a file

They are backup copies.

To control the creation of those:
Edit -> Preferences -> Editor and look for "File Saving".


I do not work with gradle. But as I understand it is common problem.

Here is a links:

Very helpful topic

CPU utilization problem

Gradle performance

Google

What you can do is change process scheduling. For process that runs IDE or gradle.

nice

  nice is a program found on Unix and Unix-like operating systems such
  as Linux. It directly maps to a kernel call of the same name. nice is
  used to invoke a utility or shell script with a particular priority,
  thus giving the process more or less CPU time than other processes. A
  niceness of −20 is the highest priority and 19 or 20 is the lowest
  priority. The default niceness for processes is inherited from its
  parent process, usually 0.

To change niceness you can use renice command

sudo renice <PID> <niceness>

Read this for more information

For building time you can set niceness for 15-20. After build change it to default value, usually it is 0.

cpulimit

Install cpulimit. sudo apt-get install cpulimit

-p : Process PID.
-e : Process name.
-l : percentage of CPU allowed from 0 to 100.
-P: absolute path name of the executable program file.

To limit CPU usage of the process called firefox to 30%, enter:

# cpulimit -e firefox -l 30

To limit CPU usage of the process to 30% by using its PID, enter:

# cpulimit -p 1313 -l 30

  cpulimit should run at least with the same user running the controlled
  process. But it is much better if you run cpulimit as root, in order
  to have a higher priority and a more precise control.

  If your machine has one processor you can limit the percentage from 0%
  to 100%, which means that if you set for example 50%, your process
  cannot use more than 500 ms of cpu time for each second. But if your
  machine has four processors, percentage may vary from 0% to 400%, so
  setting the limit to 200% means to use no more than half of the
  available power. In any case, the percentage is the same of what you
  see when you run top.

Cpulimit usage

How to limit CPU usage

chrt

You also can change process scheduler or PID.

SCHED_FIFO
Scheduling policy designed for special time-critical applications. It uses the First In-First Out scheduling algorithm.

SCHED_BATCH
Scheduling policy designed for CPU-intensive tasks.

SCHED_IDLE
Scheduling policy intended for very low prioritized tasks.

SCHED_OTHER
Default Linux time-sharing scheduling policy used by the majority of processes.

SCHED_RR
Similar to SCHED_FIFO, but uses the Round Robin scheduling algorithm.

Most if process in Ubuntu are SCHED_OTHER

Find priority values for scheduling policy

$ chrt -m
SCHED_OTHER min/max priority    : 0/0
SCHED_FIFO min/max priority : 1/99
SCHED_RR min/max priority   : 1/99
SCHED_BATCH min/max priority    : 0/0
SCHED_IDLE min/max priority : 0/0

Set SCHED_IDLE to process

$ chrt -i -p 0 PID

or you can change priority SCHED_OTHER

$ chrt -o -p 1 PID

Howto

Another way

Also you can try to reduce number of Thread for gradle. You can read about it here. As I see it has this options:

./gradlew -PtaskThreads=2

Also you can try reduce memory usage:

GRADLE_OPTS=-Mmx512m

Quote from Very helpful topic

--parallel-threads only applies to project parallelization.

For android tasks that are running in parallel, we always create as many threads as possible. For slower machine (or with low ram) this is not great. We should allow control on that.

Possible though:
./gradlew assemble -PandroidThread=3

Studio would have to allow configuring and sending this (it should also let you configure --parallel-threads if it doesn't already).

Long term gradle will have a thread pool shared across all level of parallelization (multi-projects. inside a project, inside a task) so this will become obsolete but it would be good to do now.


Accessing A Local IP Address Globally Through a Static IP Using a Web Browser

As you noted, 127.0.0.0 is a local address. You should bind to a public address, or to 0.0.0.0 (all ipv4 network interfaces).


No ethernet on a MSI MPG B550 Gaming Carbon WiFi motherboard

Since your motherboard does in fact have an Ethernet port, I think it is a driver issue.
This site may help:
no WiFi and Ethernet connection on msi gaming edge wifi. Where and how do I install the drivers if possible
and so might these:
https://bbs.archlinux.org/viewtopic.php?id=258479
https://forums.linuxmint.com/viewtopic.php?f=150&t=327043
However,on the MSI website there do not seem to be any driver downloads for Linux. The links above may be your best bet, and may provide the best help for your query and issue.
I hope this helps!


Can I lock a folder so NOBODY can delete it?

Following is possible:

If you have directory named dir1 then use chattr as follows:

sudo chattr +i dir1

From man chattr:

  A file with the `i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created  to  this  file.

Now If any user even with sudo/root! try to delete this directory by CLI or GUI, it gives error: Operation not permitted.

It is required to remove i attribute (which can be only done by root) as following command to give back rights to dir1:

sudo chattr -i dir1.

For any other case such as rwx permission and ownership can be applied by chown and chmod commands.
But wite-access by test-user and can't be deleted by even root at same time, seems not possible!


Ubuntu 16.04 won't boot anymore after installing amdgpu driver/software

open up rescue mode from the grub menu. On ubuntu I think it's the one on the bottom. and make it drop you to a root shell and type amdgpu-pro-uninstall

For 99% of workcases the regular amdgpu driver is good enough. the pro one doesn't offer much benefit. + I think the gpu you have uses a driver called radeon that applies to a wider range of amd cards but like not the newnew ones.

As for configuring. x11 and wayland have default configuration tools called xrandr and such. + you can edit the x11.conf if it needs to


Why can't I open the 'Downloads' directory?

If ls -la ~ is not listing it, the folder was deleted. Otherwise, you may have to check user permissions.
If it was deleted, you can either check the Trash and recover it, or simply create a folder in your home directory called "Downloads".


Xubuntu - Libre office - restore Whisker menu entries

The easiest way proved to be copying these menu entries from my other computer running Xubuntu. I simply copied all /usr/share/applications/libreoffice-* files from one machine to another. Even the Open with entry is back now.

I suppose I could have also used the ones I didn't delete in first place (LibreOffice Math) and just substitute some values.


Can't install bitcoind in upgraded system due package conflicts

Try this, and see if it installs. First install pre-requisites needed to run bitcoind.

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

sudo apt-get purge bitcoind
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install bitcoind

and then everything is OK.


Combining several youtube-dl commands into one script

This screams for a function, how 'bout:

#! /bin/bash

yt(){
./youtube-dl "ytuser:"$1 -ciw -o $2"/%(upload_date)s-%(title)s.%(ext)s" --download-archive $2"/downloaded.txt" --add-metadata --write-info-json --write-description --write-thumbnail --write-annotations --embed-subs -f "bestvideo[height<=720]+bestaudio/best[height<=720]" --merge-output-format "mkv"
}

yt "user" "/path/to/directory/"
yt "differentuser" "/path/to/other/directory/"
…

The steps to achieve this are simple, just determine what parts of the command really change, substitute it by variables, write a function and call it as needed.
There may be a better solution, but we'll need some of your precise scripts to find it.


Closing application from corner of the screen is pain

As I explained in the comments to your question, this answer at Stack Exchange tries to make the "headerbar" a little narrower, so the buttons come closer to the top of the screen. I also managed to make the "close" (×) button a square instead of a circle, by adding the following code to the end of file ~/.config/gtk-3.0/gtk.css and restarting GNOME (to do this, press Alt+F2 and type r followed with Enter):
headerbar {
  margin: 0px;
  padding: 0px;
}

headerbar button.titlebutton.close {
  min-height: 48px;
  min-width: 48px;
  margin: 0px;
  padding: 0px;
  border-radius: 0px;
}

This solves the problem for some applications, but not exactly for all, since it seems that some applications use extra wide "headerbar"s. Please, test and make the necessary modifications that fit your current settings.
Also, note that, some already running applications with open windows may not reflect the CSS changes immediately after you restart GNOME. You may have to restart those applications or even log out and log in for the changes to take effect.


chpasswd -e not seting password correctly

The problem is the use of double quotes in the echo statement.  The password had several $ characters in it, which was translated as bash variables.

The correct command uses single quotes:

echo 'user:SOME_PASSWORD_STRING' | sudo chpasswd -e

See here for more on quotes: Differences between doublequotes " ", singlequotes ' ' and backticks ´ ´ on commandline?


how can I install wine 1.4 on ubuntu 13.04?

I recommend PlayOnLinux . It's a user friendly version of Wine. You can install it from Ubuntu software Center.


Having major issues when trying to install Ubuntu, both 12.04 and 13.10

The way I've installed a dualboot system for others, is that I install Windows first, using small partition. I leave the rest unpartitioned and boot Ubuntu from a bootable USB stick, choose "Use free space" and let the installer care about the rest. I don't use Wubi for anything, and I suggest you do the same. :)


How can I motivate the community to use boinc?

Boinc projects are great. The only way to get more people involved is to spread the word. Get involved in forums, find out if there is a Linux Users Group in your area. Talk to anyone and everyone who will listen. I work at a public university and I have gotten the Computer Science department involved. Another thing you may try is going to a public library or community center. Many of them offer free computer classes. Maybe you could be a guest speaker and just spend a few minutes introducing people to boinc or other open source projects. Write letters. Do whatever it is that you are good at to share the positive uses of this technology. :)


Openbox: desktop, autostart, new aplications installation issue

Openbox is not necessarily better or faster then Xubuntu, kubuntu, or lubuntu.

Lubuntu uses openbox and adds a number of tools to do most of what you ask (lxappearance, lxpanel, etc).

Xubuntu and kubuntu do not use that much more in terms of resources and I find heavy apps such as firefox or libreoffice do not start or perform faster in openbox.

gnome (gnome-shell and unity) are the exception as they are more demanding of your video card.

See http://blog.bodhizazen.com/linux/desktop-environments-ram-use/

There is more then a window manager at play when you switch to openbox or fluxbox as most of the DE run services in the background that make things easier, so it is a trade off.

If you stay with openbox, you may wish to look at light weight alternates.

My suggestion for a panel is tint2.

Suggestions for additional apps include nitrogen (to set bg image). Other tools you might wish to use include lxappearacne (to set themes and icons) and obconf .

Light weight apps whenever possible - I find chromium is faster then firefox for example. You might try midori ;)


AWK--Comparing the value of two variables in two different files

The following script should solve your problem:

#!/bin/bash
A="$HOME/a.txt"
B="$HOME/b.txt"

cat $A | while read a; do
    cat $B | while read b; do
        b3=$(echo $b | awk ' { print $3 }')
        c=$(($b3 - $a))
        if (( $c > 10 )); then
            echo $b
        fi
    done
done

Don't forget to make it executable using the following command:

chmod +x script_name


How can I remove the Suspend and Hibernate options from the power menu?

I assume you're using a much earlier distro since this post is apparently from 5 months ago. Anyway, I just did the opposite of what you're doing yesterday on Precise. Run the following command to open the file to edit:

sudo gedit /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla

Scroll to the bottom. Check to see if the following information exists, and if not add them:

[Disable hibernate]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=no

[Disable suspend]
Identity=unix-user:*
Action=org.freedesktop.upower.suspend
ResultActive=no

Doing this makes those options do nothing when you click them; they will disappear from the menu after you restart your computer.


In addition to enzotibs answer, if you wish to avoid adding --no-install-recommends each time, you can also disable automatic installation of recommended package by setting the APT::Install-Recommends setting to 0:

umask 0022;echo 'APT::Install-Recommends "0";' | \
    sudo tee /etc/apt/apt.conf.d/00DisableInstallRecommends

The umask 0022 causes the file to be created with permissions 644, restrictive permissions breaks operations like apt-get -s ... (simulate).


I only have one user in my linux operating system and I've removed him from the sudoers group. Now how to access Root?

Sounds like you've locked yourself out of sudo privileges. You are going to need to boot to Grub recovery mode and access root shell.

Go to Grub menu by pressing shift key upon startup.
Select Ubuntu recovery mode and then root shell prompt
Type in:

mount -o rw,remount /

and in the next line

usermod -aG sudo username

where username is your username.
Exit and restart.
Check the /etc/group file. Your username should now be in the sudo group.

As long as your user is in the sudo group, Sudoers file may be modified to give privileges to access root with sudo su command, providing that you know user's password.


Will Node.js affect my LAMP server installation?

NodeJS shouldn't interfere with LAMP as long as you are running them using a different port number.

For example, Below is a simple NodeJS app that is listening on port 3000 and will serve the page index.html using that port, At the same time Apache can still serve web pages using port 80 and as long as the ports don't clash you shouldn't have any issues with running both services.

var app = require('express')();
var http = require('http').Server(app);
var util = require('util')

var port = 3000;

app.get('/', function(req, res) {
    res.sendFile(__dirname + '/index.html')
});

http.listen(port, function() {
    console.log('listening on *:' + port);
});


Turn off ethernet without turning off WiFi

try sudo ifdown eth0 which disables the interface


Can I run 'apt install' inside LXD containers on Ubuntu Core host?

Yes you can. If you spin up Ubuntu server in an LXD container on a snappy system, you can run apt install inside that lxd container.

You can see LXD containers as virtual machines that use the same kernel as the host. Ubuntu Core has the same kernel as Ubuntu server. This means that there is no difference between running LXD containers on Ubuntu Core and running LXD containers on Ubuntu Server. Note that a webserver running in an LXD container is not accessible from outside the host by default. You will need to forward a port from the host to the container, or connect the container directly to the host network and give it an IP on the host's network.

The classic snap might also be useful to you. The classic snap is an entire Ubuntu Server packaged as a snap. You can install stuff with apt inside the snap. See the following example:

$ sudo snap install --beta --devmode classic
$ sudo classic
(classic)ubuntu@localhost:~$ sudo apt update
...
(classic)ubuntu@localhost:~$ exit

A webserver in the classic snap is accessible from outside by default. However, daemons are not started in the classic snap and all running background binaries will stop when you exit the classic snap.


Having trouble with partition while dual booting Ubuntu 13.10 and Windows 7

100 GB partition created on Windows should not be an ext4 partition,so you can't install Ubuntu on it.

Try to format the 100 GB partition into ext4 filesystem.To do this,

Boot the Ubuntu live disk.Select the try Ubuntu option on startup.
Now open Gparted partition Editor from dash.
Right click on the 100 GB partition and select "Format to" option to format it into ext4 filesystem.
Now run the Ubuntu installer and then choose something else option.This time you can be able to install Ubuntu on that 100 GB partition.

Note:Make sure that the 100 GB partition is unmounted.


I had to execute the following commands to get mine to work consistently without touching it:

sudo apt-get remove --purge alsa-base pulseaudio
sudo apt-get install alsa-base pulseaudio
sudo alsa force-reload

I then rebooted, and for the first time since getting this machine I had sound without needing to play with settings.

I grabbed this off the "First Alternative" on this site (no affiliation, just appreciated that it worked).


Have you tried changing wifi channel on your router? I admit if the OSX system is stable & the Ubuntu one is not, then it's less likely to be a channel interference problem. But I recently had similar symptoms where my wifi started to drop out/recover/drop out/etc. This was after it had been stable for years. Changing the wifi channel fixed the issue for me. Channels 1, 6, 11 are apparently the best to try.


How to interpret errors.ubuntu.com graph data?

What does the "frequency" column measure, in what units?

Number of instances of that problem for the selected period.

A instance is one person experiencing a specific error. These errors have signatures which make them unique. A grouping of all of the instances with the same signature is a "problem".

In simpler terms, the frequency is the number of times this specific problem was encountered and reported.

  What does the "Mean Time Between Failure" vertical axis on the graph mean?

This has since been replaced with "Average number of crashes." This is the total number of reports seen in the day divided by the number of unique users sending those reports.

  What do the "If all updates were installed" vs "Actual" toggle mean? For me, clicking "Actual" just blanks the whole graph.

This is a placeholder. "If all updates were installed" will show the graph only for those users who had completely up to date systems. The gap between this ideal line and the "actual" line tells us the degree to which we need to fix our updates mechanism.

  Where is the code that generates the page?

lp:errors


A file not visible on desktop if one screen is vertically oriented?

What happens

Your assumption that the downloaded files "landed" in the "blind" area is correct: You can get the icons position with the command:

gvfs-info <item>

This outputs the coordinates 64,1382 (x/y), which makes clear the icon is positioned below the left screen (1382 > 1080).

This is most likely the result of a bug.

The script below can be used to move newly created files on the virtual (spanning) desktop from one area (e.g. the invisible section) to another location (in this case: the visible section).

Properties of the script

Although the script seems extended, it is written in such a way that unnecessary actions and routines are avoided. If no new items appear on the desktop, it only checks for new files, causing a processor load of practically none.

What it does

Once per second, the script checks for new items in the desktop folder
If new item(s) are found, it checks the location, moves them into the visible area if necessary

However, the desktop needs to be refreshed after the items are moved, which can only be done if the desktop is the frontmost "folder". The script therefore sets refresh to True. On the first occasion the desktop is in front, the script:

refreshes the desktop.

How to use

The script needs both xdotool and wmctrl to be installed:

sudo apt-get install xdotool
sudo apt-get install wmctrl

xautomation should already be on your system, but in case it is not:

sudo apt-get install xautomation

Then:

Copy the script below into an empty file, save it as blind_area.py
In the head section of the script, set the size of your left screen:

left_scr = [1920, 1080]

Set the localized name for your desktop folder (probably just "Desktop", but in Dutch it would be "Bureaublad" for example)
Set the resolution of the left screen if it is different from what I set
Test-run the script by the command:

python3 /path/to/blind_area.py

I test-ran it by setting the vertical size of my screen to half its actual size, which moved all new(!) icons to the top 50% of my screen.
Note that the move actions will be visible once you clicked the desktop (or have the desktop in front in any way).
If all works fine, add it to your startup applications: Dash > Startup Applications > Add the command:

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

The script

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

#--- set localized name of the Desktop folder below
desktop_name = "Desktop"
#--- set the resolution of the left screen below
left_scr = [1920, 1080]
#---

get = lambda cmd: subprocess.check_output(["/bin/bash", "-c", cmd]).decode("utf-8")
home = os.environ["HOME"]
dr = home+"/"+desktop_name
# used strings
val = " 'metadata::nautilus-icon-position' "
search = "gvfs-info -a"+val
set_val = "gvfs-set-attribute -t string "
refresh_cmd = "xte 'key F5'"
# function to check if desktop is in front
def check_frontmost():
    try:
        frontmost = str(hex(int(get("xdotool getwindowfocus").strip())))
        frontmost = frontmost[:2]+"0"+frontmost[2:]
        w_list = [l.split() for l in get("wmctrl -lG").splitlines()]
    except subprocess.CalledProcessError:
        return False
    else:
        check = len([l for l in w_list if all([str(space[0]) in l, frontmost in l, str(space[1]) in l])]) > 0
        return check
# function to get the resolution
def get_res():
    xr = get("xrandr").split(); pos = xr.index("current")
    return [int(xr[pos+1]), int(xr[pos+3].replace(",", "") )]

dtfiles_1 = []
refresh = False

while True:
    # check current files
    time.sleep(1)
    dtfiles_2 = os.listdir(dr)
    # check for new files, move if necessary
    newfiles = [f for f in dtfiles_2 if all([
        not f in dtfiles_1,
        not f.endswith("~"),
        not f.startswith("."),
        ])]
    if len(newfiles) != 0:
        # check desktop size (only if new files appear)
        space = get_res()
    for f in newfiles:
        fdir = os.path.join(dr, f);  fdir = "'"+fdir+"'" if fdir.count(" ") != 0 else fdir
        try:
            loc = [int(n) for n in eval(get(search+fdir).split()[-1:][0])]
        except:
            pass
        else:
            if all([loc[0] < left_scr[0], loc[1] > left_scr[1]]):
                command = set_val+fdir+" "+val+str(loc[0])+","+str(loc[1]-left_scr[1])
                subprocess.Popen(["/bin/bash", "-c", command])
                refresh = True
    if all([refresh == True, check_frontmost() == True]):
        subprocess.Popen(["/bin/bash", "-c", refresh_cmd])
        refresh = False
    dtfiles_1 = dtfiles_2

Notes

Although I tested it for a long time on my system, the bug does not appear on my system, so the "real" test can only be done by you :)
If the desktop is really crowded with lots if items, the refresh action might arrange icons into a "forbidden" area. I could not test however if that is the case in your situation, for the same reason as above.
The script, as it is, assumes the screens are top-alligned, so the "blind" area is only on the left bottom corner.


What is Ubuntu's software raid controller partition size limitation?

Every filesystem has limits, and ext2/ext3 were limited to 2 TiB, but ext4 has a much higher limit (that you won't reach anytime soon). So, use ext4 and you should be safe...

For NFS shares I think it depends on the NFS daemon/version you use (check the manuals first) and some certainly have a filesize limit. For Samba it shouldn't be a problem, except with older versions of Windows maybe?

ref


You can test if your touchpad works with an ubuntu 14.10 Live-CD. In this case you need the new kernel 3.16 with the new Synaptic drivers.

So I see three possibilities:

you can update your kernel in ubuntu 14.04 from 3.13 to 3.16 on your own (details: google.com)
you can wait till the kernel 3.16 is integrated in ubuntu 14.04 by the ubuntu team (february 2015?)
or you can update to ubuntu 14.10

good luck!


GUI tool for watermarking photos and other images

Why not try aPhoto (http://www.acein.cn/p/aphoto).
It can help your add watermarks easyly.


show all open browser windows in firefox

Instead of open a new window, choose open in a new Tab.  That way you can have those tabs open in the same windows, and you can switch between them by just clicking on the desired Tab.

And yes you can have as may tabs open a you like.


Most likely you have no PATH defined when you run the script from cron so try adding the whole path to the command.
e.g. /usr/sbin/scout etc what ever the right path for the command would be


The value <13> is the priority prefix for priority user.notice
Example for various priority values:
$ logger -p user.error -s -t test text
<11>Aug 24 13:55:08 test: text
$ logger -p user.warn -s -t test text
<12>Aug 24 13:55:02 test: text
$ logger -p user.notice -s -t test text
<13>Aug 24 13:54:55 test: text
$ logger -p user.info -s -t test text
<14>Aug 24 13:54:59 test: text

$ logger -p local0.error -s -t test text
<131>Aug 24 13:58:52 test: text

man logger

-p, --priority
priority Enter the message into the log with the
specified priority. The priority may be specified numerically or as a
facility.level pair.  For example, -p local3.info logs the message as
informational in the local3 facility.  The default is user.notice.
--prio-prefix
Look for a syslog prefix on every line read from standard input.  This prefix is a decimal number within angle brackets
that encodes both the facility and the level.  The number is
constructed by multiplying the facility by 8 and then adding the
level.  For example, local0.info, meaning facility=16 and level=6,
becomes <134>.
If the prefix contains no facility, the facility defaults to what is specified by the -p option.  Similarly, if no prefix is provided,
the line is logged using the priority given with -p.


Byobu available updates broken on Ubuntu 10.04 LTS?

That was actually a bug in Byobu.  I actually just released a fix for that this morning with Byobu 5.16.


Step 1: Install hplip-gui
This app does not show up in Ubuntu Software Center. However, it can be installed from the terminal or synaptic. To install it from the terminal open a terminal by pressing Ctrl+Alt+T and enter:
sudo apt install hplip-gui

Enter your password when prompted. You won't see the cursor move or ******* when you type the password in the terminal. This is normal.
Step 2: Install simple-scan
This is the scanning utility for Ubuntu. You can either install it from the Ubuntu Software Center or from the terminal. At the terminal, enter:
sudo apt install simple-scan

Or Combine the 2 Steps
You can use one command to install both the software:
sudo apt install hplip-gui simple-scan

To Scan a Document
Open the simple-scan program when you want to scan a document. Ubuntu does not support scanning directly from the printer.
Hope this helps


It's version 3.3 from the Universe repository.


Phone welcome screen - round circle infographic - how it works

The dots are days, the current day is displayed differently. Then the color circles around the infographic represent the activity for the selected category


Remaining time for laptop battery in system tray with xfce4-power-manager?

On a 10.04 system which I still have in use, there is the xfce4-battery-plugin which does what you want.

In the web, the most recent release is 1.0.5 from 2012/05/30


General tips/ strategies for troubleshooting driver issues?

Where to look for errors

A good general place to start is /var/log/syslog or dmesg. You can search through these logs for relevant info based on the type of driver or hardware, or based on the time that an issue occurred. The /var/log directory has other logs that may help depending on the issue.

Graphics errors may be listed in ~/.Xsession-errors or /var/log/Xorg.0.log.

If you can find a relevant section based on that searching, then this section will be a good place to start for searching for solutions here or elsewhere.

Types of issues

Totally dead

This may mean that you either must install the drivers manually, or the device is not supported by the drivers. Searching based on the hardware name will help in deciding which this is. If the device is not supported by the driver, you can file a bug (or see if one already exists).

Intermittent problems

Try to determine when the issues happen. Does a specific action trigger the problem? This information will probably be needed to fix the problem. Noting the times when the issue happens will help when looking through log files for clues.

Configuration problems

This will depend on the driver and type of device.

Alternate drivers

Some devices, notably certain graphics cards or network devices, have multiple drivers available. Try the "Restricted Drivers" tool in Ubuntu to see if options are listed there. If nothing shows up, search for your device model to see what the options are.

The Ubuntu help documents provide a good starting point for debugging many driver issues. Also, there's a good chance that someone has been in the same situation, so make sure to look on the forums and here for possible solutions.

Device info

For PCI devices, try lspci.

For USB devices, try lsusb.

Devices may be listed at boot in /var/log/syslog when they are detected. Graphics hardware is listed in /var/log/Xorg.0.log.

Graphics Drivers

The most common drivers are for graphics cards by Intel, Nvidia, and ATI/AMD.

Intel drivers are included in the kernel, so they should automatically be loaded for most Intel cards. Updating your kernel (either through software updates or by upgrading Ubuntu) could fix issues with the Intel drivers.

Nvidia and ATI/AMD cards have two options: an open-source driver and a closed-source proprietary driver.

For supported cards, the open-source driver is used by default. For Nvidia this is the nouveau driver, and for ATI/AMD this is the radeon or ati driver.

Closed-source drivers are also available from the manufacturers. Nvidia provides the nvidia driver, and ATI/AMD provides the fglrx driver.

Closed source drivers generally provide better performance and features than the open source versions, and may be worth a try when resolving issues.

For other types of cards, such as SIS and VIA, the drivers are included by default, and may be updated between versions of Ubuntu or in regular software updates.


How can I get "delta" packages to optimize apt-get upgrade downloads?

You may be looking for debdelta package.

From man debdelta-upgrade:

NAME
       debdelta-upgrade  -  Downloads  all deltas that may be used to 'apt-get
       upgrade', and apply them.

SYNOPSIS
       debdelta-upgrade [OPTION]... [PACKAGE] ...

DESCRIPTION
       This program is designed to download changes (deltas) that may be  used
       to  apt-get upgrade all listed packages, and apply them.  If no package
       is listed in the command line, then it will  apply  to  all  upgradable
       packages. See debdelta(1) for more details on the delta files.

How to use

sudo apt-get update
sudo debdelta-upgrade
sudo apt-get upgrade

Example

$ sudo debdelta-upgrade
Downloaded, time  7.24sec, speed 212kB/sec, xserver-xorg-video-intel_2.99.910+git20140315.8cc1f005-0ubuntu0sarvatt~saucy_i386.deb
Delta-upgrade statistics:
 total resulting debs, size 1539kB time 8sec virtual speed 181kB/sec


How do I backup everything on Ubuntu 20.04?

Because you're a newbie I suggest you to install and use deja-dup. It's a backup graphical interface very easy to use. You can make backup of your home directory and save it on the cloud or in a usb device. You don't need to backup your entire system, just the configuration folders and files in your home directory. If you're on 20.04 you can install deja-dup by sudo apt install deja-dup or by sudo snap install deja-dup


It is in principle possible to install a dual-boot system for Android and Ubuntu on your Nexus 4. However, this is not intended to be used by regular users. Rather, it is meant as a possibility for developers and early testers to develop and test Ubuntu for smartphones without having to renounce to their normal Android system. Quoting from the Ubuntu Wiki,

  Ubuntu Dual Boot Installer is provided as a tech preview for developers who want to run Ubuntu and Android on a single device. It is not intended to be used by regular users, neither at this point nor as its ultimate goal. Those developers installing it should be familiar with the Ubuntu and Android partition layouts and should also feel at home with manually flashing partitions in case something goes wrong.

If you still want to do this, find the full instructions here:
https://wiki.ubuntu.com/Touch/DualBootInstallation

Please note that Ubuntu for smartphones itself - even without such things as dual-boot - is not yet aimed at end users yet. It is still in a stage of development and testing. Quoting from the official Ubuntu for Phone install guide,

  Ubuntu for phones is intended to be used for development and evaluation purposes only. It is an early release that can potentially brick your device. It does not provide all of the features and services of a retail phone and cannot replace your current handset. This is the first release of Ubuntu for phones and it will continue to evolve quickly. Please read the disclaimer as well. This process will delete all data from the device. Restoring Android will not restore this data.

So, if you want to contribute to Ubuntu and help out testing, and know your way around smartphones, Android and Ubuntu, go ahead. However, if you expect a smoothly running system without flaws, I would suggest for you to wait a little.


Ubuntu 18.04 in USB not booting. Secboot : error during falcon reset -110

disable secure boot(delete the platform key)
press e after you boot (in the grub menu) and add nomodesetparameter in the line which starts with linux (just type nomodeset at the end of that line)
install linux, and do the same step 2 while booting up linux from your PC and install proprietary nvidia drivers


I can't boot Windows 7 any more after dual booting it with Ubuntu.

Look at this post. Follow step by step procedure and have Success in getting entry of windows 7 on grub bootloader . Click here


Is It Possible to Install 11.10 on an HP Pavilion g7 Notebook?

Happily the answer is: Yes!
The main obstacle to loading Ubuntu 11.10 on the g7 is the video card. There is not a driver for the Intel video card. More information on the issue can be found here:
http://ubuntuforums.org/showthread.php?p=11695329
NOTE: I was informed on the Ubuntu IRC channel that this issue may not affect Ubuntu 10.04 LTS. So if you'd prefer an install that just works, you might try installing that version.
If you simply run the install CD for 11.10, you may end up with a dark screen that is virtually unreadable. To workaround this, these are the steps I followed:
Part I: Installation

Download Ubuntu 11.10 64-bit version and burn to a CD. If you're familiar with IRC and have a second computer, I'd also recommend logging into the Ubuntu IRC channel in the event unexpected difficulties arise. It helped me.
With the Install CD in the DVD player, restart the machine. Hit F9 to change the boot order and boot from CD
When the CD boots, a purple screen with a keyboard logo at the bottom will appear. Hit any key to get to the install menu
Hit F6, down-arrow to the nomodeset option and hit spacebar. An x will appear next to it indicating you have selected it.
Select Install Ubuntu from the main menu and proceed with install. This took me about 30 minutes and went without incident.

Part II: Reboot
Once the installation is complete, you will be prompted to reboot your system. The nomodeset flag will not be set in your new install. You must interrupt the reboot to edit the bootloader and then, once the restart is complete, update the bootloader config file to avoid the dark screen issue. The changes are pretty simple. Follow these steps:

As soon as the system boots, hold down the SHIFT key to get to the grub (boot) menu.
Select default Ubuntu kernel at top and press E to edit the boot config file
On the line near the bottom that begins "linux /boot" and includes "quiet splash", add at the end nomodeset
Press ctrl-x to proceed

See the link here for screenshots: http://ubuntuforums.org/showthread.php?t=1613132 (I followed those directions but I've tried to clarify a couple points here that were frustratingly ambiguous when I first tried to follow them.)
Part III: Update Grub Config File

Once you're logged in, open a terminal
Make a backup of the grub file you'll be editing: sudo cp -v /etc/default/grub{,.bak}
Edit the grub file: sudo gedit /etc/default/grub
Change the line: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
Save and close file
Apply changes by running command: sudo update-grub

Again screenshots are available at the link in Part II.
Now restart your system. It should restart without issue. If you end up on a very faintly lit dark screen, do a hard reboot and follow the steps in Part II. Then double-check the steps in Part III and follow them again. (I forget to run sudo update-grub the first time.)
Since making these changes, I haven't noticed any screen issues or deterioration in the quality of my display. The only side-effect, as far as I can tell, is that when you choose Displays in the System Settings menu, it will say "Unknown" and all options will be grayed out.
Hopefully a driver will show up soon. More information on that topic can be found here:
[2-link limit exceeded: see askubuntu.com/a/95480/46766]
If you know of a better solution to this issue, please share it. (The one recommended in the link above -- using the ATI driver -- was strongly discouraged on the Ubuntu IRC channel.)


How do i apply a command to each line in the output from pipe and add all those numbers?

I don't see any benefit in calling numfmt from within awk - why not simply pipe your data through it?

$ numfmt --from=iec <temp.txt | awk '{sum+=$0} END{print sum}'
34361851904

or (to mimic data piped from a command) for example

$ cat temp.txt | numfmt --from=iec | awk '{sum+=$0} END{print sum}' | numfmt --to=iec
33G

If you really want to call numfmt line-by-line from within awk, then you can do so in GNU awk (gawk) using getline from a Coprocess

Ex.

$ cat temp.txt | gawk '
    BEGIN{cmd = "numfmt --from=iec"}
    {print $0 |& cmd; close(cmd,"to"); cmd |& getline; sum+=$0; close(cmd,"from")}
    END{print sum}
'
34361851904

See

Two-Way Communications with Another Process


Samsung External HDD drive detected, mounted but not accessible on Ubuntu16.04

I assume that the drive has a NTFS partition on it. Ubuntu can normally read NTFS partitions. A problem arises if the NTFS file system is unclean.

The drive was probably unmounted without properly ejecting it first. Reconnect the drive to the Windows machine, and in an elevated command prompt window, type chkdsk D:/f where D: is the correct drive letter. (Do not use ntfsfix under Ubuntu to do this.) Then eject the disk properly and reconnect it back into the Ubuntu machine, and it should be fine. Cheers, Al


Software center disappeared after installing exelearning

you forgot the sudo in your second expression if this is what you typed in.If the command software-center works you can restore the starter:
Open gedit (Type gedit in the "Dash Home")
Insert the following text:

#!/usr/bin/env xdg-open
[Desktop Entry]
Name=Ubuntu Software Center
GenericName=Software Center
Comment=Lets you choose from thousands of applications available for Ubuntu
Exec=/usr/bin/software-center %u
Icon=softwarecenter
Terminal=false
Type=Application
Categories=PackageManager;GTK;System;Settings;
MimeType=application/x-deb;application/x-debian-package;x-scheme-handler/apt;
StartupNotify=true
X-Ubuntu-Gettext-Domain=software-center
X-Unity-IconBackgroundColor=#ffbf87
Keywords=Sources;PPA;Install;Uninstall;Remove;Purchase;Catalogue;Store;Apps;

Save it as 'Software Center.desktop' in the folder '/home/*YourName*/.local/share/applications'
Drag it into the Starter bar


I have written an application which does just you want. Check it out here. Foobar2000 was the application I was originally inspired by.


After upgrade to 15.10, only connects to some wifi networks

Inadvertently figured it out. After several months. Gah. The problem lay with the name resolution configuration (DNS settings). The settings I had worked with my home wifi but were incompatible with every other wifi network I tried. I only found out because I noticed that a service accessing a personal server of mine was working when my laptop was connected to some other wifi network, and the IP address for that server is set in /etc/hosts so no name resolution was required for it. After some digging around it turns out I needed to change the IP address for the name resolution service used by network-manager, defined in /etc/resolv.conf, from 192.168.1.1 to 127.0.1.1 (and then "sudo service network-manager restart").


How to clear recent history in Xubuntu 12.04

Delete the file $HOME/.local/share/recently-used.xbel


I'm the person who wrote the first test results of Adobe Acrobat XI Pro on Wine App database.

You can't install the program using current, official Wine release. If you want install it with - and only with - Wine, you will need a MSI "hack patch" which bypasses some custom MSI action calls required basically by any modern Adobe installer.

The patch for Wine is provided here

The downside is that, at the moment, the patch is rejected from official Wine mainstream releases. However, you can apply it to Wine source code and compile Wine by yourself. After you've compiled Wine and installed it into your system, you should be able to install Adobe Acrobat XI Pro without issues. The patch works also for other Adobe software, such as

Adobe Audition (CS5.5 & CS6)
Adobe Premiere Pro CS3

(Wine 1.7.36 + patch applied)

I've compared/analyzed the first installation method I described on Wine AppDB ("Copy all files from Windows OS"), and the "MSI hack patch" method. Both of them work: all needed Acrobat files are installed, whichever method you decide to use.

Winetricks requirements for the patch method are as follows:

winetricks msxml3 msxml6 wininet ie8 vcrun6 atmlib

On winecfg, set your Windows version to "Windows 7", before running the Acrobat Installer.

If  you have troubles with printing in Acrobat XI Pro, set riched20 override to "builtin" instead of "native" on winecfg.

I hope this information helps you.


Password in Persistent Live USB - is it possible?

New user with encrypted home in a persistent live drive

Yes it is possible to create a new user with encrypted home in a persistent live drive made with mkusb. I have done it so I know that it works. It is probably easiest if you install gnome-system-tools and use users-admin.

sudo apt install gnome-system-tools

users-admin

or start it via the graphical user interface.

Select Add to create a new user and select encrypt home folder. Otherwise the password is not really meaningful in this kind of system.

Warning: it is very important to backup the system regularly and to remember the password to the encrypted system. Otherwise you might lose your data. There is no back door.

If you keep the default user, the system will auto-login (unless you change that setting). Log out and select the new user ('tester' in the example below) and enter the password.

If you intend to remove the default user, you should make your new user an administrator, and be sure that you can run sudo. (You should not be able to remove the default user without sudo in standard Ubuntu, and if you manage to remove it anyway, your system would be crippled with no user to manage the system.)

sudo deluser ubuntu  # in standard Ubuntu (modify user name in the flavours)

Problems with Firefox and Thunderbird

It was more difficult to create a basic working Lubuntu system with a new user with encrypted home. And after further testing we found that neither Firefox nor Thunderbird works, not for the OP in Xubuntu and not for me in Lubuntu and standard Ubuntu. So I am affected too. I suspect that it is some security feature that stops the Mozilla software from working.

I installed Midori, a light-weight web browser, and it works without problems. It can be used for webmail (I tested with my gmail account). - But if it is necessary for you to use Firefox and Thunderbird, this kind of persistent live system is a dead end street.

Alternative: Installed system in a USB drive

An alternative is to make an installed system with or without encrypted disk or encrypted home if you wish - installed like into an internal drive, but into a USB drive. It is easiest to install it correctly, if you remove the internal drive from the computer, where you create it. There are some tips at the following links,

help.ubuntu.com/community/Installation/UEFI-and-BIOS

Ubuntu on a USB stick - mount options to reduce writes

Quick fix

This is a quick fix, that is not adding security against a qualified attack, but maybe it would be enough to prevent tampering by curious persons, to make your persistent live tweaks in Xubuntu 'noob-proof': move (rename) sudo and remove the gui tools to manage programs, gnome-software, update-manager and maybe software-properties-gtk.

sudo mv /usr/bin/sudo /usr/bin/opns
opns apt remove gnome-software
opns apt remove update-manager
opns apt remove software-properties-gtk

Or better, move sudo to some other name, that is more difficult to guess. The following screenshot illustrates that it works to use the 'moved sudo' command to install a program package,

opns apt install htop


I'm not sure if it's your USB ports or the USB hub which is trying to auto-suspend due to power management.

What's the output of

cat /sys/bus/usb/devices/usb*/power/control

what message do you get now and do you still get the same if you run this after booting the machine?

echo "on" | sudo tee /sys/bus/usb/devices/usb*/power/control

If it is not persistent between machine reboots.

You can also check with powertop if you prefer something slightly more user friendly.

sudo apt-get install powertop

Look on the tunables tab. If it's set to bad then auto-suspend is disabled and this is what you want. Try and let us know?


Audacity playback speed much too fast, on Ubuntu Mate 15.04

I had the same problem on lubuntu/xubuntu 14.04. I couldn't find anything that helps till I found this after long time of searching: http://bbb-solutions.blogspot.de/2014/11/audacity-playback-is-too-fast.html

Edit

pkexec gedit /usr/share/applications/audacity.desktop

and replace

Exec=audacity %F

with

Exec=env PULSE_LATENCY_MSEC=30 audacity %U


Why after write command ls I can't see real folders?

TL;DR:

With ls you see the contents of the current working dir. You are probably inside ~, not in /, that is why you cannot see /home.

The directory home is usually placed below /, the directory root. Running ls /home will show the content from anywhere, because path names starting with / are absolute paths.

When using ls you're searching for directories in your current working directory. Use pwd to reveal it. For a new ssh connection it is usually ~ (a.k.a. /home/$USER/ == the users home directory) .

Use ls / to see home inside the directory root or cd / to change your current working directory to the directory root.


How to search for all the files starting with the name "ABC" in a directory?

To complete existing answers:
ls
The default directory list utility ls can be used in combination with the shell's wildcards . To search for all files with pattern abc:
ls -d abc*   # list all files starting with abc---
ls -d *abc*  # list all files containing --abc--
ls -d *abc   # list all files ending with --abc

Note that the file extension is relevant for the search results too.

tree
In case we need to list files in a directory tree we can also issue tree to search for a given pattern like:
tree -P 'abc*'  # list directory tree of file starting with abc---
tree -l 'def*'  # exclude files starting with def---

In this case, tree itself supports wildcards.


Copy the link from the browser and run

xdg-open slack://...yourlink

in your terminal.


Just do:

find /media/drv -name lost+found -prune -o -type f -exec echo '{}' ';'

In general it is a very very bad idea to redirect stderr to /dev/null. The whole point of stderr is to show unexpected errors. If you are expecting a certain error then construct your command to avoid it.


Video only

10px border between left & right

There are several methods to do this, but using hstack, vstack, and pad is probably the easiest:

ffmpeg -i top_left.mp4 -i bottom_left.mp4 -i top_right.mp4 -i bottom_right.mp4 -filter_complex \
"[0:v][1:v]vstack,pad=iw+10:ih[l]; \
 [2:v][3:v]vstack[r]; \
 [l][r]hstack" \
output.mp4

Inputs must be the same width, height, and "pixel format". If they are not use the scale and/or format filters to prepare the streams for the *stack filters.
Use *stack=shortest=1 if you want the filter output to terminate when the shortest input terminates.

10px border between left & right, 3px border between top & bottom

ffmpeg -i top_left.mp4 -i bottom_left.mp4 -i top_right.mp4 -i bottom_right.mp4 -filter_complex \
"[0:v]pad=iw:ih+3[tl]; \
 [tl][1:v]vstack,pad=iw+10:ih[l]; \
 [2:v]pad=iw:ih+3[tr]; \
 [tr][3:v]vstack[r]; \
 [l][r]hstack" \
output.mp4

With combined audio

The amerge filter will combine all input channels, then -ac 2 will downmix them to stereo:

ffmpeg -i top_left.mp4 -i bottom_left.mp4 -i top_right.mp4 -i bottom_right.mp4 -filter_complex \
"[0:v][1:v]vstack,pad=iw+10:ih[l]; \
 [2:v][3:v]vstack[r]; \
 [l][r]hstack[v]; \
 [0:a][1:a][2:a][3:a]amerge=inputs=4[a]"
-map "[v]" -map "[a]" -ac 2 output.mp4

Using amerge, the combined audio will only be as long as the shortest input. If that is a problem then use amix.


Dovecot returns a hash mismatch after setup

By generating the hash using doveadm pw -s ARGON2ID I noticed the result was slightly different than with the argon2 tool. Storing it in the database revealed a success in logging in afterwards!


What is the best way to launch a process when the Internet connection goes up/down?

The old-school way is to put a script in /etc/network/if-up.d and if-down.d.  I'm not sure if that still works with NetworkManager or not.  There should be scripts in there that you can copy to get started.


Files on hard disk no longer show but disk space is still taken up, how can I make the files accessible again

Are you sure those files are not in Trash folder? What is your filesystem? And, finally, du lies a lot.


E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) while installing a package

You cant have more than 1 app installing at once, this includes updates, any apt commands or any other installers that use dpkg (.deb files too.)

if you dont have something like that open, try typing ps -ef | grep apt to see if anything is running.


Help me with making macOS USB on Ubuntu?

The software to convert a DMG to an IMG is dmg2img and an IMG is basically an ISO:

Install:

sudo apt-get install dmg2img

Converting to IMG:

dmg2img {file}.dmg

you will end up with {file}.img

Rename the file:

cp {file}.img {file}.iso

Burn it to an unmounted USB:

sudo umount /dev/sd{Y}
sudo dd bs=4M if={file}.iso of=/dev/sd{X}

replace {file} to your filename
replace {Y} to the letter of your USB pendrive
df -h will list the pendrive when it is mounted so you can find {Y} there.


Why doesn't this .desktop script launch the program?

Your Exec field should be:

wine "/home/mark/.wine/drive_c/Program Files/Sid Meier's Civilization V/CivilizationV.exe"

Yours fail because the path to the executable contains spaces and sh fails to cd there.


You want the cache_peer directive in a configuration like so:

cache_peer proxy.example.com parent 8080 0 default no-query login=username:password


Sounds like some of the battery cells might be dead, which stands to reason after two years. If you want to confirm it, try with another OS or another distribution to rule out a potential bug - but it doubt that a bug is the case.
Also, you battery is likely a lithium-ion battery, if so avoid completely discharging the battery:
https://www.techrepublic.com/blog/five-apps/five-tips-for-extending-lithium-ion-battery-life/#:~:text=4%3A%20Avoid%20completely%20discharging%20lithium%2Dion%20batteries&text=Only%20battery%20analyzers%20with%20the,that%20condition%20for%20several%20months.
The idea of it being good to completely discharge batteries comes from older generations of batteries (different technology) and even tough it isn't necessary to charge occasionally, it can for some batteries cause problems to do a complete discharge. The general advice I would give, is just charge whenever it's convenient, and when the computer goes into stand by, don't drain it further, you gain nothing by it, and if the battery is bad you risk doing damage.


Ubuntu 12.04.1 Setup doesn't detect Windows 7 partition

OK, here is what did the trick for me: Since GParted didnt find any partitions on my SSD, i ran FixParts FixParts Page and it told me there were leftovers and if i want to delete them, which i did, and then i was able to see the partitions in gparted and the setup. Thanks guys (girls)!


Cannot format USB flash drive after creating Ubuntu installation disk

I suggest that you install and use mkusb, which can restore the USB drive to a standard storage drive (with an MSDOS partition table and a partition with the FAT32 file system). See these links

mkUSB-quick-start-manual.pdf

help.ubuntu.com/community/mkusb

mkusb version 12 alias mkusb-dus:

Often the problem is some data that is 'tricking' the software to think that the pendrive does not work, even when it is good, and it is enough to wipe the first megabyte to get rid of that data. I think this is the case with your drive. You 'look at' the drive with a tool, that does not recognize or understand correctly the structure of the boot system, which was cloned from the iso file.

There are many ways that a USB pendrive can fail. So it is worth trying different things. If mkusb fails, try in another USB port, in another computer and with another operating system. But there is a limit, when you have to accept that the pendrive is probably damaged beyond repair, at least with tools available to normal users like you and me. See this link

Pendrive lifetime

But if there are valuable data in the drive, you should think differently and use special methods to restore/repair the file system or even recover the data without any file system. See this link,

Repair the partition table and file system of a pendrive


Lubuntu with only Ubuntu's workspace/tiling features

Googling around gave me this answers:

Is a feature of Unity or Compiz I doubt you can get same with LXDE/Openbox.
Check this document for default key bindings available and way of changing them.
This guide may help you.

AU Linked Question

Is there a lightweight way to snap windows in Lubuntu?


Juju quickstart failed immediately with: AttributeError: 'NoneType' object has no attribute 'group'

They have a bug in their code. I changed the line:

re.search('SSH_AUTH_SOCK=([^;]+);', output).group(1))

to

re.search('SSH_AUTH_SOCK ([^;]+);', output).group(1))

It's likely due to the fact that my /bin/sh is set to be tcsh and not bash (which is technically valid in linux, see chsh)
Bash and tcsh set environment variables differently. I haven't verified this, but i theorize it is the reason why it is different.

my output of /usr/bin/ssh-agent

setenv SSH_AUTH_SOCK /tmp/ssh-WNjKuNpz4WlF/agent.27649;
setenv SSH_AGENT_PID 27650;
echo Agent pid 27650;


Netgear 511 wireless adapter stopped working after upgrade

I believe this card doesn't have a distributable firmware. Please try to install linux-firmware-nonfree

sudo apt-get install linux-firmware-nonfree

and reboot.

Bug reference


Yes thats correct. The interface name may differ, but the name always points to physical NIC. It can be eth0, eno1 or whatever.


Adivce for dual-booting Windows 10 and Ubuntu 15.10?

I would suggest make a different 20 GB partition for Ubuntu, and with windowsUbuntuinstaller you can easily install Ubuntu on your windows 10 like an application of you windows machine. when you are tired with Ubuntu just uninstall it from control panel just like any software.


Copying this answer from Stack Overflow:

You need to upgrade pip as follows:

curl https://bootstrap.pypa.io/get-pip.py | python

Note: You may need to use sudo python above if not in a virtual environment.

(Note that upgrading pip using pip i.e pip install --upgrade pip will also not upgrade it correctly. Its just a chicken-and-egg issue. pip wont work unless using TLS >=1.2)

As mentioned in this detailed answer, this is due to the recent TLS deprecation for pip. Python.org sites have stopped support for TLS versions 1.0 and 1.1.

From the Python status page:

  Completed - The rolling brownouts are finished, and TLSv1.0 and
  TLSv1.1 have been disabled. Apr 11, 15:37 UTC

For Pycharm (virtualenv) users:

Run virtual environment with shell. (replace "./venv/bin/activate" to your own path)

source ./venv/bin/activate

Run upgrade

curl https://bootstrap.pypa.io/get-pip.py | python

Restart your pycharm, and check your python interpreter in Preference.


How can I make everything just assume I'm running as the superuser?

Normally I'd include instructions in an answer, but this is such a bad idea I'll point you to a couple places to read up on how to do this. You can take it from there. Note that when you break your system you can post here again for help, but people will laugh and shake their heads and make reference to pebkac errors, etc.

First, the Ubuntu help page on Root/sudo. Note the three large, prominent warnings.

Here's an Ubuntu Forums user that did something like this and couldn't fix their system.

Keep backups of your data if you do it, and consider the wisdom of trading security for convenience. Maybe put on an old Dead Kennedys album while you reinstall...


As I noted in comment, in my case it was related to bug 875959, so a network-manager issue.

Try this command before shutting down:

sudo service network-manager stop

Worked for me.


Dropbox 'Waiting to be Linked to a Dropbox Account'

Open the Dropbox preferences, switch to the tab Account and press Unlink This Dropbox. After your client is unlinked, go to the Dropbox website, click on your name in the top right, and choose Settings. Then switch to the tab Security. There is a section called Devices. Press the x on the right for every computer not in use any more. When you link your client again afterwards, make sure to use a name not already listed on the website.

Since you're new to this page: Please press the tick on the left it this solves your problem.


You probably upgraded your system to KDE 5, so you can remove the repository from where you installed KDE 5 and do sudo apt-get dist-upgrade. this should work..


Grub2 menu problems with dualboot w7-ubuntu 11.10

Thanks to everyone!

I finally sorted it, after understanding a few things and doing:

Installing 11.10

Creating a Live-USB

running Live USB

installing and running boot-repair with:

sudo add-apt-repository ppa:yannubuntu/boot-repair

sudo apt-get install boot-repair

 sudo apt-get update

GRUB came out here

selecting Ubuntu Classic/2D in login screen

Here I was able to click on things after

booting Ubuntu from my HDD

Updating

Restarting and selecting normal mode


Bind a keyboard shortcut to gnome-screenshot -a -c to immediately grab an area and copy it to clipboard.


Disable fast startup in Windows 10.

Open Control Panel.
Go to - Power Options.
Select "Choose what the power buttons do".
Select "Change settings that are currently unavailable".
Scroll down to Shutdown settings and uncheck "Turn on fast startup".

Save changes.


Best version of Ubuntu for my old computer?

I would personaly use Lubuntu. It is a very fast and lightweight OS. It also comes with some preinstalled apps so you ussually have everything you need.

Minimum supported requirements of Lubuntu:

266 MHz processor;
128 MB;
3 GB hard drive;
no fancy graphics
(I read someone installed on 128MB RAM and then removed 64MB RAM and it still worked,
not as fluid as previously, but still working)

About Lubuntu:
https://wiki.ubuntu.com/Lubuntu

Lubuntu WebPage:
http://lubuntu.net/

Other option could be Arch Linux and isntalling only the bare minimum and LXFCE desktop environment (this one is use by Lubuntu) - or if LXFCE doesnt meet you requirements you can try i3wm or openbox windows managers. Arch is the harder option.


After creating aliases you should  run source ~/.bashrc in terminal to make the changes.

Also it is mxp ALL=(root) NOPASSWD: ADMCMDS

There is space between (root) and NOPASSWD & between : and ADMCMDS


Ubuntu login loop reappears after every reboot, how to fix it?

I fixed the issue with the first answer here. This simply installed the nvidia 410.73 driver. Don't know why this works and the 390 didn't so I will leave this open in case somebody has a hint how I could get it working with the 390 driver.


Low display resolution under Ubuntu 12.04

Press the Super key (formerly known as Windows key) to launch the Dash home and search for "Displays".
You will be presented with a roughly quarter of the displays' app window.
Navigate to the workspaces switcher in the launcher.
Now you will see the app in its full glory.
Go to the combobox with resolutions. (Somewhere near the center)
Select something higher and find the OK/Apply button (I am not using unity right now)
(Use the workspace swicther again).
Press it and say that you are sure.
That's it.


Ubuntu 20.10 no internet connection/network unclaimed

If I was you, I'd order a simple ($15 or so) dedicated network card to bridge the time until your on-board network adapter is properly supported by the kernel.


How to sed two words in a line and add before and after?

awk is easier, IMO

awk '
    /foo/ && /bar/ {
        print "Add this line before"
        print
        print "Add this line after"
        next
    }
    {print}
' file


Python is soft link to python2.7, how to change link to python 3

Don't do that.

A lot of things will (probably) break if you change the default python interpreter to python3.

The switch is not a simple one --- although by 16.04 I think that all the system scripts will be python3, it will probably not switched even then (thanks @florian-deisch). Other distros, like Arch, did the switch, but I am not sure if this is a good thing, given that there is a PEP explicitly suggesting the contrary...

Simply use

#!/usr/bin/env python3

as the "shebang" line (first line) of the scripts that you want to be run by python3.


To have more realistic voices with Firefox you could use festival, instead of mbrola.
It has quite a few sets of voices available.
You could even use festival with mbrola voices.
The interface between Firefox and speech-dispatcher seems not robust.
Current state of affairs may have evolved a bit, I am not able to test now.
YMMV.
Related:

How can I change the voice used by Firefox Reader View (Narrator) in Ubuntu?
https://bbs.archlinux.org/viewtopic.php?id=237718


how do i run ubuntu after unzipping download on usb drive

What you downloaded is an ISO file, and not a ZIP file.  The reason you see it as a ZIP file, because you have nothing associated with ISO file.  You have to actually create the bootable USB using the ISO file, and jut unzipping it to it.  When you run the Universal USB Installer, you have to browse for the ISO file, and then click on Create, as shown in the image below:

Once the USB gets created, you need to reboot you system, go into the BIOS, and change the boot order to boot from USB.


You could try to see in the Synaptic package manager if some dependencie of the program continues installes(something like "claws-mail-acpi-notifier") and try to unistall it from there.
Also you can delete completely programs from synaptic.