My Wi-Fi and DNS configuration completely messed up after installation of KDE connect

I have not gotten to the bottom of this yet so this is not a complete answer. However, I will use it to keep track of what worked for me in various cases and update it.

Symptoms

I see the following symptoms:

Ping works most of the time, however, some times it returns (DUP!)
Some websites are accessible and some are not. When they are not they timeout
Wireshark on the wlan0 interface show lots of TCP errors:

TCP Spurious Retransmission
TCP Dup ACK

Various other devices in the house do not automagically switch to the repeater (I see this from the received signal strength). Bouncing the wifi fixes the issue on Android
Various concerning errors in my syslog (can you post yours?)

$ sudo tail -f /var/log/syslog -n1000 | grep wl_
Oct 13 11:21:02 urban-asus kernel: [29439.451313] CPU: 2 PID: 493 Comm: wl_event_handle Tainted: P        W  OE   4.4.0-137-generic #163-Ubuntu
Oct 13 11:21:02 urban-asus kernel: [29439.451464]  [<ffffffffc05cd085>] wl_notify_roaming_status+0xc5/0x140 [wl]
Oct 13 11:21:02 urban-asus kernel: [29439.451527]  [<ffffffffc05cc6e3>] wl_event_handler+0x63/0x1d0 [wl]
Oct 13 11:21:02 urban-asus kernel: [29439.451585]  [<ffffffffc05cc680>] ? wl_notify_scan_status+0x320/0x320 [wl]
Oct 13 11:21:03 urban-asus kernel: [29440.554124] ERROR @wl_cfg80211_get_station : Wrong Mac address, mac = c0:3e:0f:80:db:31   profile =ac:84:c6:c2:7c:73
Oct 13 11:21:03 urban-asus kernel: [29440.554537] ERROR @wl_cfg80211_get_station : Wrong Mac address, mac = c0:3e:0f:80:db:31   profile =ac:84:c6:c2:7c:73
Oct 13 11:21:04 urban-asus kernel: [29441.057439] ERROR @wl_cfg80211_get_station : Wrong Mac address, mac = c0:3e:0f:80:db:31   profile =ac:84:c6:c2:7c:73
Oct 13 11:21:04 urban-asus kernel: [29441.057529] ERROR @wl_cfg80211_get_station : Wrong Mac address, mac = c0:3e:0f:80:db:31   profile =ac:84:c6:c2:7c:73
Oct 13 11:21:05 urban-asus kernel: [29442.568268] ERROR @wl_cfg80211_get_station : Wrong Mac address, mac = c0:3e:0f:80:db:31   profile =ac:84:c6:c2:7c:73
Oct 13 11:21:07 urban-asus kernel: [29444.559172] ERROR @wl_cfg80211_get_station : Wrong Mac address, mac = c0:3e:0f:80:db:31   profile =ac:84:c6:c2:7c:73
Oct 13 12:39:58 urban-asus kernel: [34174.929046] ERROR @wl_dev_intvar_get : error (-1)
Oct 13 12:39:58 urban-asus kernel: [34174.929051] ERROR @wl_cfg80211_get_tx_power : error (-1)

Solutions that worked in the past

Firmware upgrade and repeater reset

I have upgraded the repeater firmware which caused it to reset and that solved the issue the first time. I am not sure if the firmware or the reset did the job...

Locking the BSSID

On infrastructure mode with multiple APs on the same SSID (network name) you can configure your adapter to prefer a particular AP. This morning I experienced the same issues as above and thus I created one network connection that forces the BSSID (mac address) of the repeater.

On KDE from the connection editor (right click on the tray-> Configure Network connections) I created a new connection:

I still have the original connection to my network that seems to be working as expected when I am closer to the router. When moving rooms this stops working... switching to the above connection did the job today (I will experiment more and see if switching back shows the same symptoms)

You can verify to which AP you are connected with:

$ iwconfig wlan0
wlan0     IEEE 802.11abg  ESSID:"Urban - Sky"
          Mode:Managed  Frequency:2.472 GHz  Access Point: AC:84:C6:C2:7C:73
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on

Try another wifi card

I have seen incompatibility issues with various routers where my card stops working and the connection needs to be reset. In this case it doesn't seem to be the case since I can still ping the router fine. However, I do have a USB wifi interface and I will experiment and see if it shows the same symptoms. If not, then it might be a card or driver issue (will update this section when I find some time to do the tests)

Let me know if any of the above solves the problem


Minimalistic Ubuntu install without desktop for USB

Have you tried installing one of the minimal Ubuntu iso's?

You can find them here:

MinimalCD

That way you can pick and choose exactly what features you want when installing.  I've successfully installed one of these on a USB that runs on a thin client with just 128Mb RAM (with a blackbox wm)


How can I check all used space on filesystem in linux?

First of all, let's clarify a few things. When you do df -h --total, there are a few things that show virtual filesystems, such as tmpfs and udev. We don't exactly want that, but we want to know all physical filesystems.  As such, we want to filter out only /dev items:

$ df -h | grep '^/dev/'
/dev/sda1       110G   77G   29G  74% /
/dev/sdb6       399G  223G  157G  59% /mnt/HDD

But there's a problem, too: -h  gives us total in human-readable format. We can't really add up items that have letters in them. grep also can't perform calculations. Thus, instead lets use awk instead, with summing the 3rd column:

$ df --block-size=1 | awk '/^\/dev/{total+=$3}END{print total}'
320762605568

Great ! now we only need to find the human readable version of that number. We can always write code in awk to do that, but there already exists numfmt utility. So we can do this:

$ df --block-size=1 | awk '/^\/dev/{total+=$3}END{print total}' | numfmt --to=iec-i --suffix=B --padding=7
 299GiB

And that's how you have the total of all physical devices that are mounted ( which is what df shows by default).


Lowercase 's' doesn't work in Ubuntu terminal

It was a duplicate of I can't type a “b” when I'm in the command line. I had added this line in my /etc/inputrc
"stty ....." . That was making 's' misbehave.


.gnupg/ and gpg.conf owner and permissions to satisty both GnuPG and Enigmail

The problem you have is the ownership and permissions on both folders and files in there.  The home directory ~/.gnupg directory should only be owned by that user, and NOT by any other user; the same applies for the directory's permissions and the file permissions inside it.  (root would still be able to read to, write to, and traverse through it anyways, you don't need root to be group or owner for any reason)

Set the owner for the configuration file to your user and group:

sudo chown $USER:$USER ~/.gnupg

Then make sure it's only readable by your own user - no other users OR groups should be in the permissions schema:

sudo chmod 700 ~/.gnupg

Specifically for that last error about gpg.conf having insecure permissions, also make sure that gpg.conf is in read/write for user, read-only for group, and read-only for 'other':

sudo chmod 644 ~/.gnupg

This should resolve the errors you're seeing.  (You can use sudo for these commands, but DO NOT use sudo when working with your own GPG keyrings or using the gpg command unless you need root's keyring - you'll have incorrect permissions otherwise).


Do you know what your "previous loader" was?

You may want to install GRUB: https://www.gnu.org/software/grub/manual/html_node/Installing-GRUB-using-grub_002dinstall.html

which can load a menu on boot displaying each operating system available

You also may just need to run boot-repair: https://help.ubuntu.com/community/Boot-Repair

this utility can repair grub configurations, and should provide you with the means to access both Ubuntu and Windows.


How can I create an activity indicator in Ubuntu Touch?

To create an activity indicator in Ubuntu Touch, you can use code similar to the following:

ActivityIndicator {
    running: // ... Code to decide when to show the spinner ...
    visible: running
}

This will create an activity indicator and show it and make it spin based on the code assigned to the running property.

Here is what the activity indicator will look like when it's running:


Why can't I modify a file with UltraEdit?

The secret to this is the command gksudo or gksu

  gksu  is a frontend to su and gksudo is a frontend to sudo.  Their
  primary purpose is to run graphical commands that need  root  without  the
  need to run an X terminal emulator and using su directly.

You only need to use gksudo when editing system files:

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

So, for example, gksudo uex will prompt you for your password

If you want to invoke this in a GUI manner simply press Alt+F2 and type your command i.e.

Now - just to make clear - I'm assuming that ultraedit is the linux variant of the editor and you are not attempting to use the windows version of ultraedit running through wine.

My experience is that running anything with root privileges is a definite no-no - as explained in the Wine Wiki.


What's the difference between Xubuntu 16.04.1 and Xubuntu 16.04.1 LTS?

No, they are exactly the same. LTS is just an acronym meaning Long Term Support. Sometimes people bother to type it, sometimes they don't. Any flavor and point release of 16.04 is LTS.

An LTS version will have support for a longer period than the interim releases (for example 16.10, 17.04, and 17.10). The next LTS release will be 18.04 (even numbered year April release)

See the versions page in the Ubuntu help wiki to see what I mean in more detail, or read the lts tag wiki.


How to set a personalized port as default in Apache?

To make the server accept connections on both port 44400, on all interfaces, use:

Listen 44400

To make the server accept connections on port 44400 for one interface,  use

Listen domain.com:44400

Open your apache2.conf file.  To do so, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo gedit /etc/apache2/apache2.conf

Setup Listen as follows:

Listen 44400

Save and close the file. Restart the apache:

sudo /etc/init.d/apache2 restart

Verify that Apache listing:

sudo netstat -tulpn | grep :44400


What user permission is required to listen to port 8080

You need to connect with the correct protocol. Connecting to a HTTPS server on port 8080 by asking for the HTTP address (which is what will happen if you don't prefix your URL with HTTPS:// ) will time out, behaving the same as if the server isn't running at all.


nautilus show desktop file as normal file

As all executables files a .desktop file needs executable permissions too to be recocgized as a "trusted" starter. Only then Nautilus will also display it's icon.

chmod +x gitauto.desktop

Note that you need an Exec=/path/to/binary_or_script line for a valid .desktop file. Also note that once made executable you will no longer have a right-click context entry to edit a .desktop file.


How can I turn off the monitor by command line in Ubuntu 18.04?

Normally, I use the Screen Lock (Super+L) shortcut to lock and blank the screen. Pressing Enter will restore the screen with a Password prompt.

Also, the command sequence

busctl --user set-property org.gnome.Mutter.DisplayConfig /org/gnome/Mutter/DisplayConfig org.gnome.Mutter.DisplayConfig PowerSaveMode i 1; \
read ; \
busctl --user set-property org.gnome.Mutter.DisplayConfig /org/gnome/Mutter/DisplayConfig org.gnome.Mutter.DisplayConfig PowerSaveMode i 0

mentioned in unix.stackexchange seems to work for me (Ubuntu 19.04 wayland). I have put a read statement before the second busctl command, so that pressing Enter will turn the monitor back on.


Click on the Show Applications button and then type settings and go to the power section and click to modify the settings there to look like the image below:

Change the settings for Blank screen, Suspend & Power Buttons to look like image above.


Issues with Bluetooth Connections in 11.10

Well, I found a workaround solution to the issue. I posted a similar question over on the BlueZ developer mail list and got several responses. It seems that there was a regression bug introduced somewhere in Linux Kernel 3.0 that was related to the Bluetooth Secure Simple Pairing (SSP) protocol used by Bluetooth 2.1 + EDR devices. The bug prevents reconnection of a device that was originally paired using SSP mode, that is without entering the pin code during pairing. Here is a link to the bug report: https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/931860.

Its not clear when the bug will be corrected in the Linux Kernel or whether it will get incorporated in the 3.0 and forward releases. If you are experiencing this same issue, there is a workaround that worked for me. The workaround involves disabling Simple Secure Pairing and letting the pairing default back to regular non-SSP mode. You can accomplish this by running the following command:

sudo hciconfig hci0 sspmode 0

You'll have to run this command again after each reboot in order keep it disabled to allow reconnections to happen. I hope this helps someone else as I've spent many frustrated hours trying to find a solution to fixing something that just used to work in prior releases.


How to diagnose CUDA 10.1 installation problem on 20.04, "No CUDA-capable devices detected"

The problem was diagnosed through the command
sudo nvidia-settings

which told me "ERROR: NVIDIA driver is not loaded." I followed up with
sudo apt install nvidia-prime nvidia-driver-430

and then I rebooted the machine. Nothing else needed.


Terminal: Avoid repeating directory multiples times to reach files within

Use [1-2] to indicate the files, this uses bash's range expansion feature :

cp ~/Desktop/dir/dir/dir/dir/file[1-2].txt .

Here the range [1-2] will expand so file[1-2].txt will expand to file1.txt and file2.txt.

Note that if you have multiple files like this with various number of numeric digits among their names :

file1.txt file12.txt file980.txt file0.txt file23.txt

In this case use the extglob feature of bash to enable extended pattern matching:

$ shopt -s extglob

$ cp ~/Desktop/dir/dir/dir/dir/file+([0-9]).txt .

The extglob pattern +([0-9]) will match one or more digits between file and .txt in the file names.

Also note that it does not depend on any prefix or suffix, for example if you have files having names:

1 02 043 908

These can be matched (and copied) too by :

$ cp ~/Desktop/dir/dir/dir/dir/+([0-9]) .

Check man bash to get more idea on this.


How to symlink a device throught udev and always point to the same device?

Found the answer: I added SUBSYSTEM=="tty" at the start:

SUBSYSTEM=="tty", SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c8a", ATTRS{idProduct}=="3001", SYMLINK+="ttyS99", MODE="0660", GROUP="lp"


Where can I find documentation for notify-osd?

Have you checked out the ubuntu wiki yet?

There's a few examples here
https://wiki.ubuntu.com/NotificationDevelopmentGuidelines

More general info about it here
https://wiki.ubuntu.com/NotifyOSD


Occasional latency spike between two servers

There are several external reasons a spike could happen. Since you are talking about 1 Gbps I will guess you are using a STP (Shielded Twisted Pair) Cable, maybe Cat 5e:

Water or water source near cable
Close to power cables (Electric cables or electric wire in the building)
Cable close to what I call noise makers, which are any device that creates electric magnetic fields (Like the cable going around a CRT monitor, Fluorescent lights or a motor for a printer for example)
The RJ45 (8C8P) connector was incorrectly made
The cable was stepped on, twisted beyond the 90 degree angle or near a heat source.
Cable is not STP but instead UTP (Not grounded)
Computer connected to the LAN is not grounded correctly (Hug the computer with love, if you feel a electric spike almost killing you then it is not grounded). This is known as static discharge. It can also happen by touching the cable which would be an insulation problem with the cable.
Connecting Devices (Router, Switch) took a bit more to process a request.

And even with all of that, the trouble could be in the activities done in the network (Apps or processes that are running on the computers) or simple packages that are sent at the same time to the same destination, creating small lag while they get returned.

For what you mention after 100 ping requests I would actually say you have a very good connection. Doing that to google.com or even to a computer exactly 2 meters aways gives me worse results. I just did it with another computer right now and got 8 packets that took 1400 ms. So all in all, do not worry about the spikes unless you start noticing the lag increasing over all packets.


What is the difference between ~/.local/share/fonts vs /usr/local/share/fonts?

In the original answer linked in your question, it was not clear, that .local/share/fonts actually meant ~/.local/share/fonts. I updated the answer.

~ is equal to the users home folder.

If you install something in the users home folder, it won't be available for everyone but just for the user (=> not system-wide). This is quite a general concept.


Can I create folder which root cannot access?

One thing is seeing content and the other not to have a permission to delete it.

You can play a little e.g. with FolderEncryption or VeraCrypt to prevent root to see the content, but then you need to store a password/certificate somewhere.

Same with prevent deleting the folder by root. He must have the permission to do it, otherwise he will not be the root.

And that's it - it would be against the root purpose prevent him to have access to anything on that system. Than he would not be a root.


How to remove the filename from wc -l output?

I'd use:

<file wc -l

Which contarily to cat file | wc -l doesn't need to fork a shell and to run another process (and runs faster):

% time </tmp/ramdisk/file wc -l
8000000
wc -l < /tmp/ramdisk/file  0,07s user 0,06s system 97% cpu 0,132 total
% time cat /tmp/ramdisk/file | wc -l
8000000
cat /tmp/ramdisk/file  0,01s user 0,16s system 80% cpu 0,204 total
wc -l  0,09s user 0,10s system 94% cpu 0,203 total

(/tmp/ramdisk/file was stored in a ramdisk to take I/O and caching out of the equation.)

However for small files indeed the difference is neglectable.

Yet another way would be:

wc -l file | cut -d ' ' -f 1

Which in my tests performs approximately the same as <file wc -l.


You have installed Ubuntu in legacy mode and Windows in UEFI mode, so you now have to "switch" between OSes using the UEFI menu...  You cannot use grub to switch between OSes as that is unavailable in UEFI mode as you didn't install it in UEFI mode!

So, this is absolutely normal behaviour for the installation type you've chosen.


Samsung M2070W scanner no longer working in 17.10

I just got the scanner from Samsung M2070FW running with Ubuntu 18.04. Just follow these steps:

Get UnifiedLinuxDriver-1.00.37.tar.gz from this site and unpack it, open a terminal and do:

cd /UnifiedLinuxDriver-1.00.37/uld
sudo ./install.sh

After successful installation of the Samsung Driver for the printer and the scanner, you can installer the printer first via Cups. For the scanner however, there should be a new directory with a single file in it:

/opt/smfp-common/scanner/lib/libsane-smfp.so.1.0.1

If you use a 64-bit system (which you probably do), use the terminal again to change to the scanner driver directory. Here you put a symbolic link to the file in /opt:

cd /usr/lib/x86_64-linux-gnu/sane
sudo ln -s /opt/smfp-common/scanner/lib/libsane-smfp.so.1.0.1 /usr/lib/x86_64-linux-gnu/sane/libsane-smfp.so.1

But things still didn't work, so I had to install a USB library:

sudo apt install libusb-0.1-4

After that, I made sure that I was in the same network with my printer (via ping) and did scanimage -L:

$ scanimage -L
device `smfp:net;192.168.1.20' is a Samsung M2070 Series on 192.168.1.20 Scanner

If pinging your scanner works but the command finds nothing, you can start to debug things:

cd
export SANE_DEBUG_DLL=255 && scanimage -L &> debug.txt
grep -n2 "libsane-smf" debug.txt

If everything works correctly, you would get the following output:

....
84-[dll] sane_get_devices
85-[dll] load: searching backend `smfp' in `/usr/lib/x86_64-linux-gnu/sane'
86:[dll] load: trying to load `/usr/lib/x86_64-linux-gnu/sane/libsane-smfp.so.1'
87:[dll] load: dlopen()ing `/usr/lib/x86_64-linux-gnu/sane/libsane-smfp.so.1'
88-[dll] init: initializing backend `smfp'
89-[dll] init: backend `smfp' is version 1.0.1
....

If not, you might find a hint as to what file is missing or not found.


You can get full documentation from http://partnerweb.vmware.com/GOSIG/Ubuntu_14_04.html:

Add the vmhgfs Driver

If you are using the interactive file drag-and-drop feature in VMware Workstation and Fusion, install the vmhgfs driver in the virtual machine. This driver is not included inbox in the operating system. Installing the additional vmhgfs driver does not disturb the other inbox VMware drivers or Open VMware Tools. To install this driver:

Install Open VMware Tools.
Install the traditional TAR Format VMware Tools that is bundled with
VMware Workstation or Fusion products.

Add the deployPkg Tools Plug-in

If you are using the virtual machine as a template or if it will be protected by SRM (Site Recovery Manager), then install the deployPkg Tools plug-in. To install this plug-in:

Obtain and import the VMware Packaging Public Keys:

Create a directory on your Ubuntu virtual machine to store the VMware
Packaging Public Keys.
Download all the VMware Public Packaging Public Key files from the
http://packages.vmware.com/tools/keys directory.
Save the files to the directory you created.
For each key that you download, import the key:

$ sudo apt-key add /key_path/key_name

key_path is the directory in which you saved the keys.
key_name is the file name of a key.

Create a file, /etc/apt/sources.list.d/vmware-tools.list, with the
following content:

deb http://packages.vmware.com/packages/ubuntu ubuntu_version main

ubuntu_version is either precise or trusty.

Install the package:

$ apt-get update
$ apt-get install open-vm-tools-deploypkg

All rights go the owner from the above link


Where are the startup scripts for Unity Desktop?

First put your script into /usr/bin and give execute permission.

Now create .desktop file in /home/[user-name]/.config/autostart/ which run your script which runs at startup.

Example:-
Let your filename of script is "example" or "example.sh"

Create .desktop file with gedit with following lines and save as filename.desktop in /home/[user-name]/.config/autostart/

[Desktop Entry]
Type=Application
Exec=sudo example
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=myscript
Comment=Startup Script

Here Exec=sudo example or Exec=sudo example.sh runs your script as a root from /usr/bin
Give execute permission to .desktop file.

Now, Script runs on startup.


I've come across this problem once. I've solved the problem by using:

ffmpeg -f alsa -ac 2 -i pulse -acodec alac -ab 128k -f x11grab -s `xdpyinfo | grep dimensions:'|awk '{print $2}'` -r 25 -i :0.0 -sameq final.mkv

I've explained the details of this command in a blog post here.


installing packages from usb to ubuntu server 14.04

Assuming you have all those packages downloaded as .deb files (you did not say, if you don't have them you can get any packages from the Ubuntu repo here) on your USB, copy them to a folder we will call it packages and put it in /home, or you can just change to the USB if you know its path

mkdir packages

Put all your .debs in here and change to the directory

cd ~/packages

Then run

sudo dpkg -i *.deb

To install all .deb files in the folder, to resolve dependencies

sudo apt-get -f install


I post how I solved the problem, with the help of @Nmath.
First of all, I was confused about the environment, I was not using GNOME, but something else that was not GNOME nor Unity. It was labeled as "Ubuntu" on the login screen.
So I run:

sudo apt update && sudo apt purge unity

After reboot, the "real" GNOME appeared as a selectable option on the login screen. I still had some bugs, but where solved with:

sudo apt-get autoremove

The bugs might have appeared by not doing a clean installation since some versions ago.


Ubuntu 14 on HP Stream with 32GB eMMC. Please help before I buy!

Ubuntu will run perfectly fine on the Stream. 32 GB eMMC will be slightly tight, but will be faster than a standard 5400rpm hard disk. 2GB of RAM is also slightly tight, but shouldn't be a problem for normal use.

Edit: There were issues in the kernel concerning eMMC on the Stream. However, several people have successfully installed and the kernel issues have been fixed. See this link:

  HP Stream 13-C004TU Notebook for Ubuntu Install

Edit2: There seems to be a few network issues concerning the Broadcom wireless card.


I assume you want to compare with the Unity desktop? Changing to Gnome Classic will improve it a little. If you want to have a lightweight desktop environment, I suggest trying Xfce (http://www.xfce.org/). This is the default desktop environment for the Xubuntu releases.

You can install it on Ubuntu 14.04 LTS with:

sudo apt-get install xubuntu-desktop

for Ubuntu branding or

the original Xfce desktop:

sudo apt-get install xfce4

(Source: How can I install XFCE along side unity?)


"Software" and "OS Updates"available in Ubuntu Software

All three ways  point to the same updates ..
If you start "Software Updater" or do a sudo apt update && sudo apt upgrade in a terminal, you should see exect the same updates as you see in "Software Center".


Do you intend to use Lubuntu on this USB flash drive in one computer or in a few computers or in several computers?

An installed system is portable between computers, but
a persistent live system is more portable.
On the other hand, an installed system is more stable and can be updated & upgraded without limits like any installed system (like in an internal drive),
while a persistent live system can install and upgrade application programs, but not the linux kernel and not device drivers, that are started directly by the kernel.

See this link and links from it for more details,

How do I install Ubuntu to a USB key? (without using Startup Disk Creator)

The main general advice is to disconnect or turn off the internal drive before you start installing into the USB flash drive. This helps to

avoid mistakes (overwriting the internal drive) and also
write the bootloader to the USB flash drive (important particularly if you install in UEFI mode.)


Removed zsh, but forgot to change shell back to bash, and now Ubuntu crashes (wsl)

If you can log in to the WSL machine as root i.e. either
wsl -u root

or (if you have more than one WSL distribution)
wsl -d <distrib> -u root

where <distrib> may be obtained by running wsl -l in command prompt; then you can execute chsh for your user account from there i.e.
chsh -s /bin/bash <username>

where <username> is replaced by the actual login name of the user.


Is the gnome-screenshot modified for Ubuntu?

Look at the package version names on https://launchpad.net/ubuntu/+source/gnome-screenshot. They all end in *-[D]ubuntu[U], where D and U are digits and dots. If the placeholder D is not 0, it stands for the current Debian version of the package (meaning, the source package was modified for Debian), while U stands for the current Ubuntu version of the package (meaning it was altered for Ubuntu).

Some examples from the current state of the gnome-screenshot package in Ubuntu:

3.18.0-1ubuntu2

upstream version: 3.18.0
Debian version: 1 (modified in Debian)
Ubuntu version: 2 (modified in Ubuntu)

3.16.2-0ubuntu3

upstream version: 3.16.2
Debian version: n/a or 0 (not modified in Debian)
Ubuntu version: 3 (modified in Ubuntu)

3.4.1-0ubuntu1.1

upstream version: 3.4.1
Debian version: n/a or 0 (not modified in Debian)
Ubuntu version: 1.1 (modified in Ubuntu)

We can conclude that Ubuntu doesn't use the unaltered upstream version of gnome-screenshot. Whether the changes affect the described behaviour, I cannot say.


How to remove firefox installed from a debian package?

I think the following link will help those who have the same problem as me: FirefoxNewVersion

Basically under the Uninstallation section of the document, do the following:

Delete the ~/firefox directory and the ~/bin/firefox file
Run firefox -ProfileManager and delete mozilla-build

In my case I just deleted all the firefox folders mentioned above but I don't think this is a very clean removal of Mozilla-Build-of-Firefox...


13.04: Chaged graphic driver, lost unity

Ok what I would do is:

Bring up a terminal window by pressing ctrl+alt+t or by going to crtl+alt+F2 and logging in to a text console there.
(press ctrl+alt+F7 to get back to the gui console)

sudo apt-get install ppa-purge
sudo ppa-purge xorg-edgers

sudo apt-get purge fglrx*
sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
sudo apt-get update
sudo apt-get dist-upgrade
sudo reboot

See if things are looking better...

If not, get to a terminal again;
wget https://launchpad.net/~amith/+archive/ubuntutools/+build/3910667/+files/unity-reset_0.1-8_all.deb

sudo dpkg -i unity-reset_0.1-8_all.deb
(or copy it from another computer to a usb stick and install it from there)

Then go into the gui console (CTRL+ALT+F7)
Get a terminal window (CTRL+ALT+T) or otherwise try using ALT+F2,
and type:
unity-reset
Wait for a couple of minutes while the script does its' thing.
Hopefully Unity will be recovered.

Then go here and download the latest fglrx package:
https://launchpad.net/~xorg-edgers/+archive/ppa/+packages and download your preferred fglrx package (I would avoid the beta one).

Then install it, restart and see if everything works.
If not, try running unity-reset again, and hopefully that will fix it.
If the driver still messes things up, you could alternatively uninstall it and use the open source one, or try one of the fglrx drivers that are in the Ubuntu ppa. (sudo apt-get install fglrx) or (sudo apt-get install fglrx-updates)


How can I export and load configurations of Geany?

Copy ~/.config/geany to your new computer on the same location


In VirtualBox Ubuntu on Windows host can I specify that the Ubuntu guest uses the same MAC address as the host machine?

please ref this
http://ccm.net/faq/40897-virtualbox-how-to-refresh-the-mac-address-of-a-virtual-machine
NAT will not send ethernet frame with new MAC address. Please check weather the network uses other security setup like Network Access Control(NAC).


Ubuntu Server Terminating SSH Connection

The machine refusing to connect suggests that the sshd service crashed, or the OS crashed, or possibly the entire server shut down for some reason. If you have the ability to see what's going on physically with the server, or an IP-KVM/iDRAC, etc. that will give you a view of what's on the screen, you'll be able to see what happened specifically and go from there.
EDIT: If you can get to the console through one of the methods mentioned above, check the status of the SSH service (sudo systemctl status sshd), if it says active, then there's another issue going on (Likely firewall). If it says inactive or dead look over the logs posted below the status for some more information. Try starting it again (sudo systemctl start sshd), see if it starts successfully or errors out.
If it is started, and it's a firewall issue, check to see if UFW is running (sudo ufw status), if it's inactive, confirm your iptables (iptables -L), if it looks like this then it's not a firewall issue:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination


Is there a faster way to only occupy disk space than dd

I think that the limitation will be the write BW of your disks. Anyway, it is important too to choose the right blocksize:

⌂89% [romano:~/tmp] % time dd if=/dev/zero of=test1.tmp count=2M
2097152+0 records in
2097152+0 records out
1073741824 bytes (1,1 GB) copied, 12,6078 s, 85,2 MB/s
dd if=/dev/zero of=test1.tmp count=2M  0,37s user 3,18s system 27% cpu 12,721 total
⌂86% [romano:~/tmp] % time dd bs=1M if=/dev/zero of=test1.tmp count=1k
1024+0 records in
1024+0 records out
1073741824 bytes (1,1 GB) copied, 11,671 s, 92,0 MB/s
dd bs=1M if=/dev/zero of=test1.tmp count=1k  0,00s user 1,10s system 9% cpu 11,783 total
⌂64% [romano:~/tmp] % time dd bs=100M if=/dev/zero of=test1.tmp count=10
10+0 records in
10+0 records out
1048576000 bytes (1,0 GB) copied, 10,3397 s, 101 MB/s
dd bs=100M if=/dev/zero of=test1.tmp count=10  0,00s user 1,16s system 11% cpu 10,457 total

...as you can see the speed is more or less limited to around 100 MB/s, but the CPU usage varies wildly (the default blocksize of dd is 512 bytes).

The correct solution is fallocate, as in the linked duplicate.


Is there any image viewer with one-click rotation?

One tool that can do this is exiftran.

To install it use the command:

sudo apt-get install exiftran

If you'd like to do auto-rotation for all the images in a directory.  then you can do it with this command:

exiftran -ai *.jpeg

so all the .jpeg images presented in that directory will be rotated automatically and they will save the rotation too.


This Python script did the job:

import os.path as osp
import os
import re

for directory in os.listdir('images'):
    files = [f for f in os.listdir('images/'+directory+'/') if not re.match(r'([a-za-z]|[0-9])+.*\.jpeg', f)]

    for f in files:
        complete_file_path = 'comments/'+ directory+'/'+f[:-4]+'.txt'
        if osp.exists(complete_file_path):
            os.remove(complete_file_path)


installing Windows Vista after installed Ubuntu 11.10 Oneiric

Yes it is possible, however, usually windows overrides the boot record, which makes linux seem unbootable. After installing windows you can boot from the ubuntu live cd and repair the boot sector, if necessary.


Open a terminal window and copy and paste the following:

sudo apt-get remove ttf-kochi-mincho ttf-kochi-gothic ttf-arabeyes ttf-arphic-ukai ttf-arphic-uming ttf-baekmuk ttf-bengali-fonts ttf-devanagari-fonts ttf-gentium ttf-gujarati-fonts ttf-indic-fonts ttf-kacst ttf-kacst-one ttf-kannada-fonts ttf-khmeros-core ttf-kochi-gothic ttf-lao ttf-malayalam-fonts ttf-mgopen ttf-oriya-fonts ttf-punjabi-fonts ttf-takao-pgothic ttf-vlgothic ttf-tamil-fonts ttf-telugu-fonts ttf-thai-tlwg ttf-unfonts-core ttf-indic-fonts-core ttf-wqy-zenhei

Then copy and paste:

aptitude search ~i| grep font

remove any other remaining fonts you don't want BUT:

DO NOT REMOVE:

Any xfonts or xfont utilities
x-tccidfont-conf
ttf-opensymbol
ttf-dejavu
anything that starts with lib
fontconfig
defoma
anything that starts with console
gsfonts

Hope you find this useful


Kubuntu logo shows instead of the Ubuntu logo

Remove the packages plymouth-theme-kubuntu-logo and plymouth-theme-kubuntu-text.
This should revert to the default logo. If it still does not work, then try changing the plymouth theme (which is what determines this logo) using the answer by Dima in this Askubuntu question.


This is possible. snapcraft help copy knows more about the subject:

- files:
  (object)
  A dictionary of key-value pairs. The key is the current location of the
  file relative to snapcraft.yaml (unless `source` is specified, in which
  case it's relative to the root of the source). The value is where to
  place the file in-snap, and is relative to the root of the snap. This
  works like `cp -r <key> <value>`. Note that globbing is supported for the
  key, allowing one to use *, ?, and character ranges expressed with [].

Using snapcraft init, I put together a very quick project for this:

daniel@daydream:~/test$ touch bla .bla blubb .blubb
daniel@daydream:~/test$ find
.
./blubb
./.bla
./bla
./snapcraft.yaml
./.blubb
daniel@daydream:~/test$

The snapcraft.yaml file looks like this:

name: my-snap
version: 0
summary: This is my-snap's summary
description: This is my-snap's description
confinement: devmode

parts:
    my-part:
        plugin: copy
        files:
          "*": contents/
          ".*": contents/

After running snapcraft, I can see the following files in the package:

daniel@daydream:~/test$ find prime/
prime/
prime/meta
prime/meta/snap.yaml
prime/contents
prime/contents/blubb
prime/contents/.bla
prime/contents/bla
prime/contents/.blubb
daniel@daydream:~/test$


18.04: re-enable preferred keystroke combination for Workspaces?

Workspaces is set in Tweaks.

If you have Tweaks installed, go to Workspaces and set the number of Workspaces required there.


Give rsyslog read access to all log files that I want to monitor

change rsyslog's permission in /etc/rsyslog.conf

from:

$PrivDropToGroup syslog

to

$PrivDropToGroup adm

or other group that can access those log files.


Why does alt+left arrow go into tty now? That's a chrome shortcut for 'back' and it keeps taking me to tty or login screen

This is a known bug.  See Alt+left/right arrows switch between tty consoles (Gnome Shell vanishes), cannot disable for details.

For what it's worth, the same thing happens in Firefox.


Ubuntu upgrade error (16.04 > 18.04). "Please install all available updates for your release before upgrading". No update seems to be available

Remove the package and try again.
sudo apt remove --purge ruby2.3 ruby2.3-dev
sudo apt autoremove
then download [This file][1] and install it using software installer
then do upgrade.
[1]: http://security.ubuntu.com/ubuntu/pool/main/r/ruby2.3/ruby2.3_2.3.1-2~ubuntu16.04.14_amd64.deb


As stated in the comments, you can use chgrp to change the group:

sudo chgrp managers /engineers

where managers is the group name and /engineers is the directory name.


Wifi not working on Acer Aspire One D270 (Broadcom BCM4313 wifi adapter)

I have acer laptop and using broadcom too, many story with it along ubuntu 12.04, imo there are something issue between the kernel and the proprietary drivers (I've tried with ubuntu 12.04.2 untill 12.04.5 with different experiences)
The easiest method is try to install the newest ubuntu 14.04.


error:attempt to read or write outside 'hd0'

I was having a similar problem after a fresh Ubuntu installation on a virtual drive - fixed it by...

Physically disconnecting all drives not part of the virtual drive I was installing Ubuntu on
wiping the contents of the virtual drive ([re]initialized it in the raid controller GUI)
Completed the Ubuntu installation, shut down the machine, removed installation media
It booted into Ubuntu like normal and I was able to physically reconnect all drives without adverse effects :)

Hope this helps someone out there


You must to have root privileges. For this, put sudo in front of the command:

sudo mount -o remount,exec /tmp

When you are asked about password, just insert your usual user password.


14.04, 3 screens in portrait, adjustment to be done each reboot

Automatically arrange your screens on log in

The fact that your screen setup is not remembered on restart (re- login) is most likely the result of a minor incompatibility between your screen(s) and the graphics driver. To work around:

If I made no typo or mistake, the command:

xrandr --output DVI-I-1 --pos 0x0 --rotation left --output DP-1 --pos 1024x0 --rotation left --output DVI-D-0 --pos 2048x0 --rotation left

...should make your screen setup

How to add to startup applications

Copy the code below into an empty file, save it as setup_screens.sh, and make it executable

#!/bin/bash
xrandr --output DVI-I-1 --pos 0x0 --rotation left \
--output DP-1 --pos 1024x0 --rotation left \
--output DVI-D-0 --pos 2048x0 --rotation left

Test-run the script by the command:

/path/to/setup_screens.sh

If all works fine, add to Startup Applications: Dash > Startup Applications > Add. Add the command:

/bin/bash -c "sleep 15 && /path/to/setup_screens.sh"

Explanation

The explanation on why and how can be found on this answer. The sleep 15 is to make sure the desktop is "ready" before the setup is done.

Is this question a dupe?

Yes and no:

Yes, there are many almost similar questions on screen setup (not) being persistent.
No, not a literal dupe, since all situations are slightly different.

If you are not familiar with xrandr commands, reading the (almost) dupes does not help you much, therefore I'd still write an answer to help out in this specific situation.


Why ubuntu 19.10 can not find second monitor

I had the same problem and after doing quite a lot of reading it seems that there are different reasons for this to happen.

So YMMV, but for me the problem was that the nvidia card was not enrolled in secure boot.

The quickest way to diagnose if this is the issue is to run the command from this answer:

andrew@desktop:~$ glxinfo|egrep "OpenGL vendor|OpenGL renderer*"
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce RTX 2080 SUPER/PCIe/SSE2

Mine was not showing nvidia, it was showing some default thing.  Now that it shows nvidia my second monitor lights up automagically, without touching the CLI.

So if yours is showing nvidia stuff in there, then ignore the rest of this answer.

Another diagnostic symptom was that running xrandr was giving this error: "xrandr: Failed to get size of gamma for output default"

I followed the advice on Ubuntu forums (here), but I think that is more aggressive than needed.

Really what I needed to do was get it enrolled in Secure Boot.  So you could try:

sudo apt-get purge nvidia-driver-435
sudo apt-get install nvidia-driver-435

Note: You can find the correct number by looking in "additional drivers" in your settings.

When you reinstall the driver it asks you for a MOK password.  I used a complicated one and it failed to match (not sure if this answer was helpful or not).

After the MOK password failed I decided to try using the most current version of the NVidia drivers, downloaded from their official page.  Their installer handles all the MOK stuff and I used a six character english word password which I was able to match.

If you don't know which nvidia driver to select from their page try running lspci | grep -i nvidia

So, my 2c is to try:

Reinstalling the default driver to get it enrolled in secure boot
Use the nvidia installation from their site and get it enrolled
in secure boot


Gparted: What does it mean when a partition is labeled as Image?

dev/sda5 is the Windows Recovery Image that your manufacturer places on your laptop so you can restore Windows to its factory state if something goes wrong in Windows. dev/sda4(Windows Recovery Tools) work hand in hand with dev/sda5(the manufacturer factory image). If you use Windows and Linux(dual boot), please don't touch it, move it, rename it, edit it, etc. So, you can't delete it if you dual boot.

If however, you plan to only use Ubuntu(and only Ubuntu/Linux), then there is no need for the partition.


Certain USB-C cable / port combination not working

I believe I found your problem, it's the hub and cable not adhering to the USB spec.  Here's the evidence:

(Type A male) <--> (Type A male)

And this:

By work, I mean the LED comes on (also have tested it to actually work).

A cable that complies with the USB spec is not supposed to be able to have a male USB-A connector on both ends and still provide power.
Here's an example of a USB-A to USB-A cable that meets the spec: https://www.datapro.net/products/usb-3-0-super-speed-a-a-debugging-cable.html
In the description it points out that a compliant cable leaves the USB D+/D- and 5V pins unconnected.  Your USB-A to USB-C cable will connect the power pins on both connectors but it's "smart" enough not to supply power to a cable with a USB-A male end on it as the USB spec does not allow USB-A ports to take in power.
Do yourself a favor, and a favor to anyone around you, and destroy that cable and hub before someone uses that non-compliant cable in something other than that hub and starts a fire or something.
Replacing this hub with one that is new and complies with the spec would be something like $20.  Not replacing it runs the risk of far more damage than $20.  Take that cable and cut it in pieces so no one else picks it out of the trash to use.  Drop a brick on the hub too while you are at it.  Then go buy a new hub.


VM can't ping LAN name but sees it via nslookup

I would try the basics first.

Do you have a name caching daemon installed.
If so:

/etc/init.d/nscd restart

Next check if you have some iptables rule causing this.

iptables -F

That would flush your rules, and from there try again.


Try it using Wine. It has a high possibility of working, judging from this.
PES 2013 has already been tested, but in older versions only. There is a possibility it might not work on newer versions. If so, you are out of luck.

I see that you are new to Linux. Windows executables (*.exe) do NOT run directly under Ubuntu or similar Linux OSs. You need to install 'Wine' from the Software Center.
Even then, many applications will fail to run. But fortunately, we have the Wine Compatibility Database to check if the application we're trying to run has already been tested and if it was a success. Very often, you also get tips to make it work.

So, thats it. You can't just run Windows applications as if they are Linux applications.
Just as a side-note, Gaming on Ubuntu is best done through native clients like Steam, Desura, etc.


The system is running in low-graphics mode after bumblebee

I have solved the problem by removing packages one by one

sudo apt-get purge nvidia-304
sudo apt-get purge nvidia-prime
sudo apt-get purge nvidia-common
sudo apt-get purge nvidia-current
sudo apt-get purge nvidia-settings


All desktop settings are messed after logout

After further research I solved the problem by

Turning on "Start with empty session" from  System Settings -> Startup and Shutdown -> Session Management
Deleting all plasma-related files (~/.kde4/share/config/plasma*)
Log out
Log in and and turn off "Start with empty session"

The hint is from panosk answer


How to install Ubuntu 12.04 on my Acer Aspire ZG5?

Install Acer Aspire One ZG5 microphone on Ubuntu 12.10

https://help.ubuntu.com/community/AspireOne/AOA150

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


Ubuntu 14.04 login loop with nvidia proprietary driver

i used to have the 7737 version of that laptop but i don't remember using 14.04 on the bare metal with that one, it was 16.04 mostly and maybe 15.10.

If you don't have a specific reason to be stuck on 14.04 then i would recommend upgrading to at least 16.04 as there are many worthwhile improvements in hardware support for that laptop.

Make sure you have the graphics drivers ppa setup , you should use the drivers nvidia-304

To do that just run this

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-304 nvidia-prime
sudo reboot

That version is correct at the time of writing, if anyone is reading this later they should check the recommendation on this page
https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa


Please check where the /mnt folder is mounted and check?
can check it with command
df -h
OR
mount
and post your output this will help to solve your problem soon.

The error tells that /mnt/iso folder is not formatted to a filesystem.

OR
Try mounting it using a GUI.

Navigate to the *.iso file using a file manager, then  Right click -> Open with Archive Mounter.

Or

you can install the Furius ISO mount. It is available in the Ubuntu Software Center
sudo apt-get install furiusisomount


Where can I find a comprehensive list of compatible USB devices?

You can try looking at the following link:

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

Especially, check the compatible hardware section.

You can also check the Hardware Component Catalog for things that are certified to work.


Ubuntu 20.04 Dual-boot Installation failed in MacBook

Well, I have been to the Apple's service center in Korea and the answer they gave me was I don't know and the possible reason for this is due to T2 chip that the Apple has put since 2017 Model (or 2018). So, as of now, no can do for dual-boot Ubuntu on Macbook pro that has T2 model.
Not sure whether Apple will make an software update to allow to boot this kind of external booting disk, but for those who are looking for a solution, go for Virtual Machine to get some work done in Ubuntu.


External Yeti Michrophone not detected on Ubuntu 18.04

lo,

Had some troubles too with my external microphone (not USB but with micro in-plug), this one:

Philips SBC MM300

Looked around on the Net and wrote a small bash script with my modest knowledge (see further on).

The number '1' loads microphone module and the number '0' resets sound.

As mentioned in the script, 'Pavucontrol', should be installed but that should be alright on Ubuntu 18.04 (I use Linux Mint 19 Xfce myself).

Give the script Rights Everyone in all cases (maybe easiest by rightclicking the script).

To reload it, the name of the script file has to be the exact name as the file name at the bottom of the script. In the example: 'Microphonesound_On-Off.sh'.

Put the script somewhere and possibly shortcut it to your pc desktop (easy with PCman FM file explorer). Start by clicking or rightclicking and 'Open in terminal'.

If you still experience trouble after activating the micro sound module, go to your volume settings and check under 'Configuration' tab if 'Analog Stereo Duplex' is selected under 'Built-in Audio'.
Test your Volume settings in general after having activated the microphone sound with the script.

Different systems, different configurations. But it gives an idea.

Finally the script (copy all the text until 'Microphonesound_On-Off.sh' and save as 'Microphonesound_On-Off.sh'):

#!/bin/bash

clear

echo "MICROPHONE SOUND ON OR OFF"

# Requires Pavucontrol

echo

echo "Sound On = 1, Sound Off = 0 (zero):"

echo

read INPUT

if [ $INPUT == '1' ] # space before/after brackets!

then

echo

sleep 2 # required to load module

pactl load-module module-loopback latency_msec=10 # microphone sound On

echo "Micro sound On!"

elif [ $INPUT == '0' ]

then

echo

pulseaudio -k # reset all sound to default

echo "Micro sound Off!"

else

echo

echo "Wrong Input."
echo "Type 1 or 0."

fi

echo

echo "Enter = Reload"

echo

read

./Microphonesound_On-Off.sh


How to/When sync gmail contacts with ubuntu one?

It is indeed being worked on. I hope we can get one-way sync for Google contacts on production within the next 2 months, and two-way sync shortly after that.

So, soon  :)


ufw on new install of 19.10 blocking web

The firewall default was set to deny (outgoing). I remember that in previous versions the default at install was allow (outgoing). A simple ufw status does not show that. By checking status with verbose however:

sudo ufw status verbose

Status: active
Logging: on (low)
Default: deny (incoming), deny (outgoing), disabled (routed)

The fix is to

 sudo ufw default allow outgoing


Why does Ubuntu opens the folder cointaining the file instead the file itself?

Oh, many thanks Braiam, I couldn't google any info in previous formulating. Deinstalling XFCE packages seems to solve the issue:

sudo aptitude purge exo-utils libexo-1-0 libexo-common libexo-helpers libxfce4ui-1-0 libxfce4util-bin libxfce4util-common libxfce4util6 libxfconf-0-2 xfce-keyboard-shortcuts xfconf


Toggling touch sensitivity for WACOM CTH-300 Bamboo Pad

Try using

xsetwacom --set "device name" Gesture off        # disable multitouch gestures or

xsetwacom --set "device name" Touch off          # disable touch


It looks like your current opened project/directory in Brackets is the default Getting Started project. This means that whenever you create a new file or directory in the sidebar, Brackets is trying to create a file or directory in that demo project, which likely fails because it does not have permission to write there.

To fix this, simply open a directory where you have permission to write to.


I don't think this is possible if the user has physical access. They can always boot into single user mode, which gives them a root prompt. They could then give any user sudo rights.


Unable to download from multiple sites with uGet

It looks like you are downloading the same file multiple times...uGet will not do that...it will recognize that you already have it and immediately say it is done because you already have it.

You need to test this on a new file or delete the existing file to see it working.

Edited on March 7th, 2014:

Now that I've revisited this issue it looks as though you don't actually have aria2 installed. For more information about the aria2 plugin please go to http://ugetdm.com/downloads-aria2


I solved the problem by adding a boot option n the BIOS setup. I thought it was logical to first try \EFI\Ubuntu\grubx64.efi which worked. I am back in my system. Here is a clearer explanation:

Reboot into the BIOS setup
Click Add Boot Option
Give it a name (e.g. Ubuntu)
For File Name, under \EFI\Ubuntu directory select grubx64.efi.
Save the settings and exit.
You should see the grub soon.

As a precaution, once in my system I ran sudo update-grub and sudo grub-install though both are redundant to each other.


Aeroplane mode disables the Wifi (or WLan), bluetooth and Telephony (2G/3G etc) signals. This can be seen from system log. Also This wikipedia article says same thing about airplane mode or Aeroplane mode -

    When the "airplane mode" is activated, it disables all voice and text telephony and other signal-transmitting technologies such as Wi-Fi and Bluetooth.

And this Gnome Help article says, more clearly

    Using Airplane Mode will completely turn off all wireless connections, including WiFi, 3G and Bluetooth connections.

When it's disabled I find entry in systemlog like these

Sep 10 16:14:13 anwar-pc NetworkManager[957]: <info>  [1473502453.7404] manager: WiFi now disabled by radio killswitch
Sep 10 16:14:13 anwar-pc NetworkManager[957]: <info>  [1473502453.7616] device (20:54:76:75:5B:C6): state change: disconnected -> unmanaged (reason 'removed') [30 10 36]
Sep 10 16:14:13 anwar-pc URfkill[864]: device_changed_cb: ideapad_bluetooth
Sep 10 16:14:13 anwar-pc URfkill[864]: device_changed_cb: hci0

When disabled, The entries are like this

Sep 10 16:15:31 anwar-pc NetworkManager[957]: <info>  [1473502531.8393] manager: WiFi now enabled by radio killswitch
Sep 10 16:15:31 anwar-pc systemd[1]: Starting Load/Save RF Kill Switch Status...
Sep 10 16:15:31 anwar-pc systemd[1]: Started Load/Save RF Kill Switch Status.
Sep 10 16:15:31 anwar-pc URfkill[864]: device_changed_cb: ideapad_bluetooth
Sep 10 16:15:31 anwar-pc URfkill[864]: device_changed_cb: hci0
Sep 10 16:15:32 anwar-pc NetworkManager[957]: <info>  [1473502532.0363] manager: (20:54:76:75:5B:C6): new Bluetooth device (/org/freedesktop/NetworkManager/Devices/17)

In the first log, device (20:54:76:75:5B:C6) is the bluetooth device.


Ubuntu freezes on startup at login screen

Try to boot in recovery mode by pressing left SHIFT or ESC, then switch from the NVIDIA drivers to the xserver-xorg-video drivers within the Driver Manager - then reboot. You could also try an earlier version of the NVIDIA driver.


Keyboard layout changing from UK to US, not showing as changed in settings

This should permanently fix the problem in 13.10 and 14.04:

In the ubuntu software center, install "dconf Editor" (dconf-editor) (if you don't already have it). Open it, then open desktop -> ibus -> general. Now enable the property "use-system-keyboard-layout". (You want it to have a checkmark next to it.)

Source: https://bugs.launchpad.net/ubuntu/+source/indicator-keyboard/+bug/1240198


How to rearrange items in the Unity 2D panel?

From Launchpad Question #156866:

  You need to press and hold the left mouse button for 500ms on the icon you want to move. Then start moving the icon, it will follow the mouse cursor until you drop it, either by releasing the mouse button or by exiting the launcher's area.


No, it is not a bug.

Reinstalling = Remove all data and install over it. What were you expecting? Did you want to keep your data?


You can use WDS which is supported by hostapd. But the speeds are not good. So you can try the solution that I am working on:

Verify if your wireless driver has mac80211 support here

Install hostapd from apt apt-get install hostapd. Untill recently the apt binaries did not have support for mac80211. So for compiling it you can refer this

I did not get the hostapd conf file. So googled and got it. You can use mine from here. Place it as /etc/hostapd/hostapd.conf. The changes you need to do are the following; eithet comment them out, or modify:

interface=wlan0
driver=nl80211
bridge=br0
ssid=test
channel=1

With regard to ssid if you have the same one as your wireless routers and if your wireless router is in AP mode (just an entry door for the wireless devises to your wired network; and routing, firewalling, dhcp, dns is done by your wired router open to WAN), it would be bit more convenient.

The following code will make you pc an AP too (by creating a network bridge):

#!/bin/bash

service network-manager stop
ifconfig eth0 0.0.0.0 #remove IP from eth0
ifconfig eth0 up #ensure the interface is up

ifconfig wlan0 0.0.0.0 #remove IP from eth1
ifconfig wlan0 up #ensure the interface is up

brctl addbr br0 #create br0 node
hostapd -d /etc/hostapd/hostapd.conf > /var/log/hostapd.log &
sleep 5
brctl addif br0 eth0 #add eth0 to bridge br0
brctl addif br0 wlan0 #add wlan0 to bridge br0

ifconfig br0 192.168.1.15 netmask 255.255.255.0 #ip for bridge
ifconfig br0 up #bring up interface
route add default gw 192.168.1.1 # gateway

Change interface names, ip, gateway according to your needs.

If you want to have security you can refer to the above mentioned link. You can try having WPA-PSK with a common shared key for all your AP's.


I download and install League of Legends almost everyday in my Ubuntu 14.04, so what you are asking is a routine for me.

First step download Tuxlol,unzip, open folder, right click on tuxlol.exe, properties, copy file location.

Secont step open Terminal like a pro ctrl+alt+T, write cd, right click on Terminal, paste, enter.

Third step open Home directory, go to Play On Linux, then LeagueofLegends, drive_c, Riot Games, League of Legends and then right click on the folder Rads, then go to properties and final copy file location.

Fourth step go to Tuxlol homepage, copy text mono tuxlol.exe patch --dir " to your url or in a text file, paste your Rads file location, add an " at the end and copy all.

Final step Open your terminal (not a new one), write sudo, right click, paste,enter.

Job done. GG


Crontab on Ubuntu Phone - Scheduling synchronisations

From How to autostart a shell script on Ubuntu-touch?

Hacky solution is to create an upstart script in /usr/share/upstart/sessions/ or ~/.config/upstart/ (that is writable)

description "my script"
start on started unity8-dash

exec /path/to/your/script

and have an infinite loop that makes updates there.


Installation error, live system does not exist

Seems like the USB stick creation was not really well done. I would try to use another USB stick creator like UNetbootin and try again.

If that also fails you can try another USB stick or a different computer, might be an issue with one or the other.


How to reapply for Ubuntu membership after it expired?

Here is the rejoin process documented:
https://wiki.ubuntu.com/Membership/Rejoining


As far I can understand you can simply download it as phpMyAdmin-4.7.7-all-languages.tar.gz.

Then extract somewhere to /var/www/html/ or to other VirtualHost directory and use it (follow installation procedure).

In such case you do not need the great power of APT.


It looks close, but might not be what you need. Apport automatically changes /proc/sys/kernel/core_pattern.  So if that can't be changed, you're pretty much out of luck.  On the other hand, apport is in the default Ubuntu install now, so practically everyone using Ubuntu already has that parameter changed by it.  I'm also not aware of any way to tell apport to keep more than the most recent crash from a particular app, but as long as each crash is uploaded, that's not an issue.
I'd refer to it as third-party.
Apport supports executables installed in /opt.  You will need to provide a hook in /opt/path/to/your/app/share/apport/package-hooks.
You can set a custom crash database in the package-hook for your package.  But if your crash database doesn't act like debbugs or launchpad, you will also need to create a custom crash database connector implementation, which doesn't look like it can be done without installing a python file outside of /opt.
The executable needs to be installed by dpkg, which means you need to package it in a .deb file.
You have to create a source package in order to create a binary package, because binary packages are created from source packages.  You do not need to distribute the source package.
Apport works with anything packaged as a .deb file.


Installing Ubuntu as D: drive partition on HDD

When you start installing Ubuntu it will ask you a option like this- Installation Type

You will be asked here if you want to erase the disk or do something else.Select something else.Here select the unallocated partition of 150 GB(in your case). Partitions

This way data from the disk will not be deleted(in your case 781 GB).

In response to your other question-No,unallocated part does not have NTFS format until you format it as NTFS or some other file system.


I need Ubuntu Desktop for developers. Can someone mail it to me

You can download the installation disk from:

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

However, if you want to get the CD or DVD, you can try to get it from:

http://shop.canonical.com/index.php?cPath=17


These are network drives, judging from their icon. The file manager seems to have a problem with their names probably because of the square brackets. Do you have any software running that might connect to a large numer of network shares or exports? Scanning for them, perchance?
Would be easier to guess at what's going on if you'd enlarge the left column so that the names are fully visible.


How do I do a B43 Legacy install on Ubuntu 11.10?

Did You try to run this command:

sudo apt-get install firmware-b43legacy-installer

However most of the broadcom wireless cards will need this package:

sudo apt-get install b43-fwcutter


Script to write all filenames inside a folder and its subfolders to a csv file

To search for .tif files inside a folder and its subfolders, then write the output in a .csv file you can use the following command:

find /path/to/folder -iname '*.tif' -type f >tif_filenames.csv

To search also inside .zip files and append the output to the previous tif_filenames.csv file you can use:

find /path/to/folder -iname '*.zip' -type f -exec unzip -l '{}' \; | process

where process is the following bash function:

function process() {
  while read line; do
    if [[ "$line" =~ ^Archive:\s*(.*) ]] ; then
      ar="${BASH_REMATCH[1]}"
    elif [[ "$line" =~ \s*([^ ]*\.tif)$ ]] ; then
      echo "${ar}: ${BASH_REMATCH[1]}"
    fi
  done
}

Source: https://unix.stackexchange.com/a/12048/37944


trying to run ./configure and ./make for ecos bintuils -

In your ./configure you've got --prefix=../gnutools and it should be --prefix=/gnutools. It wants an absolute path, not ..relative.


Try scanning the server with nmap, this should tell you which ports are available and which are blocked.


Computer reboots instead of shutdown, only after suspend

Problem was fixed with an update to 14.04.

Not sure what did it, perhaps it was the switch to lightdm to manage the lock screen.

Then it broke again with an update.

Finally fixed in 14.10. Not sure what sorted it out.


USB 3.0 coping with slow speed on Ubuntu as opposed to Windows

According to the information provided by you, it's unlikely that this is an Ubuntu related issue. The transfer speed on your Ubuntu machine, while a bit low, lies within the USB 2.0 specification. The speed on your Windows machine exceeds the USB 2.0 specification, which is probably because your USB hub in that machine allows higher transfer rates than specified, as is the case for some newer 2.0 hubs.


How do I adjust the resolution on an Intel gma x3100?

Because of my determination to keep using my motherboard's build in video card, I finally managed to find out how to fix this issue with 12.04 and 12.10.

I have an 9800GT video card which i'm not using. I set it up, booted and the resolution was 1280x1024, which was exactly what i wanted. Checking the drivers let me know that some generic nvidia driver was used. I shutted down the machine, pluged out the video card and booted again. Voilla, ubuntu was wise enough to keep the resolution at 1280x1024.

Also I found out that this issue with gma x3100 is starting with 11.04 till the most recent one. So.. if you have the same problem and you can borrow a video card for simple plug in/out, you will continue using your gma happily.


Only Apple iApp applications like iPhoto can directly access items stored on iCloud. You can access your iCloud files through the iCloud website from any platform/browser.


Apt-get broken when running sudo apt-get install -f (No solution on the duplicates works)

After doing further reasarch on the exact .deb file I found another one having trouble with it here: https://askubuntu.com/questions/1187545/dpkg-error-conflict-while-installing-packages/1189151
This together with the information of doug helped me to figuer out that the fault was in the following ppa: https://launchpad.net/~paulo-miguel-dias/+archive/ubuntu/mesa

removing this helped.


How can I decode a file where each letter has been replaced with the letter 13 letters ahead of it in the alphabet?

Here is a way with an example

echo "hello world" | tr "$(echo -n {A..Z} {a..z} | tr -d ' ')" "$(echo -n {N..Z} {A..M} {n..z} {a..m} | tr -d ' ')"

Output:

uryyb jbeyq

Make it a function:

function rot13() {
    cat | tr "$(echo -n {A..Z} {a..z} | tr -d ' ')" "$(echo -n {N..Z} {A..M} {n..z} {a..m} | tr -d ' ')"
}

Usage:

➜ echo "hello world" | rot13
uryyb jbeyq


Error on installing aircrack-ng "/usr/bin/ld: cannot find -lnl-genl-3"

EDIT

To deal with that particular error install the following packages and try again. Open a terminal and execute the following commands after you cd into the proper directory:

sudo apt-get update
sudo make clean
sudo apt-get install libnl-genl-3-200 libnl-genl-3-dev libnl-idiag-3-dev
make
sudo make install

Short Answer

You don't need to manually download software you need to install silly, this is debian ubuntu not windows :) why do you think we don't have so many viruses and malware like windows does? It's because of certified package management and debian / ubuntu by far has the largest repo of any other unix like distro.

Open a terminal and execute the following commands to install aricrack-ng

sudo apt-get update
sudo apt-get install aircrack-ng

To search for software available through the official ubuntu repositories, you can open the ubuntu software center or you can run the following commands in a similar way described in the following example:

apt-cache search aircrack-ng

or to limit the results to only those containing the word aircrack, use grep like so:

apt-cache search aircrack-ng | grep aircrack


How do I remove a MATLAB program running on Ubuntu 14.04

As the comments were getting long, thus this answer

Goto to the folder where Matlab is installed:

E.g., If your folder is in /home/abc/matlabroot, then goto /home/
matlabroot is the name of the folder which you want to remove

Open a terminal and type:
cd

Then, drag the folder 'abc' into the terminal and drop it there.

Hit enter.

Now type:
sudo rm -rf matlabroot


have you tried boot-repair while live booting Ubuntu with USB drive? if you haven't yet, you should try it and make following commands:
  $sudo add-apt-repository ppa:yannubuntu/boot-repair
  $ sudo apt-get install boot-repair

after installing, you can run boot-repair via either terminal or application menu

On another hand, you can try to fix GRUB on windows with Easybcd also !


I kept on searching and found some further info and tried ccsm again. It worked this time. I don't know why it worked this time and not the other times. Anyway, I have my familiar desktop back.


Prevent .zargo files to be opened as compressed files

Save the following as arguml.xml:

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
  <mime-type type="application/x-argo-uml-diagram">
    <comment>Argo UML diagram</comment>
    <glob pattern="*.zargo"/>
  </mime-type>
</mime-info>

Then open a Terminal and run

xdg-mime  install --novendor argouml.xml

This creates a new MIME Type application/x-argo-uml-diagram and associates it with .zargo files.

Now add the line

MimeType=application/x-argo-uml-diagram

to your5 .desktop file to let the system now that Argo UML can open application/x-argo-uml-diagram files.


Says that my computer is running in low-graphics mode, but cannot run failsafe x. How do I fix this?

1.Goto command console and login with your username and password.

2.enter the command $sudo nano  etc/X11/xorg.conf

3.delete all its content and save the file by pressing ctrl+o

4.exit the file by ctrl+x

5.$sudo reboot


How to remove nautilus without screwing up unity?

You don't need to remove Nautilus - just set Nemo as default - see here.

To install Nemo, open a terminal.

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

If you need to install extensions for Nemo (optional)

sudo apt-get install nemo-compare nemo-dropbox nemo-media-columns nemo-pastebin nemo-seahorse nemo-share

To use Nemo as default File Manager, you will need dconf-tools

sudo apt-get install dconf-tools

To disable Nautilus from drawing the desktop item,

gsettings set org.gnome.desktop.background show-desktop-icons false

To Set Nemo as the default file manager (replacing Nautilus),

xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search

If you have removed unity, you should be able to reinstall it.

Start your computer and login & open a terminal.

If you can't login, enter the tty with Ctrl+Alt+F2.

Then run:

sudo apt-get install unity-2d
sudo apt-get install ubuntu-desktop
sudo apt-get install ubuntu-desktop-2d
sudo apt-get install compizconfig-settings-manager
sudo apt-get install xserver-xgl
sudo apt-get install emerald
sudo apt-get install compiz-fusion-plugins-extra
sudo apt-get install git compiz-plugins-extra
sudo apt-get install compiz-plugins-extra
sudo apt-get install unity

Then reboot - if in the tty just run:

sudo shutdown -r now


Create multiple sites in a single apache instance

I think the problem is that you access the site with localhost/example.com/htdocs

You can do the following:

In your vhost configuration switch ServerName and ServerAlias:

ServerName  example.com
ServerAlias www.example.com

restart apache2 with:

sudo /etc/init.d/apache2 restart

Now in /etc/hosts add the 2 lines:

127.0.0.1 example.com
127.0.0.1 www.example.com

You sould now be able to access the site with www.example.com or example.com.
(This works if you are working on the same machine where you have your apache installed)

And your path should work as expected.

Please comment, if you have any problems.


How to boot WUBI installed Ubuntu within Windows 8?

Wubi doesn't work on UEFI systems that use GPT disks. Every new computer with Windows 8 has a UEFI boot, because that's the only thing that supports secure boot.

Therefore Wubi won't work on any new computer with Windows 8.

It works fine with Windows 8 if you boot with BIOS, so if you upgraded to Windows 8, you likely have a BIOS board and it will work.

There's no practical workaround at this time, other than waiting for a fix from Canonical's Ubuntu installer team. The amount of effort required to switch to a legacy BIOS boot and replacing the GPT disk with a MBR partition table setup would negate the whole point of Wubi: to easily install and remove Ubuntu from Windows (for trial purposes).

Here's the bug report: https://bugs.launchpad.net/bugs/694242


One thing you could do is to use your installation device USB/CD to log into a live Ubuntu session. For this boot from your device and choose 'Try out Ubuntu'. There your can view your patitions with 'gparted' and change whatever you like.

You should find your lost partition there.

Under Windows 7 you can go to Computer Management and then to Disk Management.


Reinstalling network manager & icon issues

I solved the issue and learned a few things:

network-manager package manages all connections the internet (ethernet, wifi, etc).  You can use network manager or configure internet connection using /etc/network/interfaces file.  I did the latter which is why I had internet, but did not configure network manager.

All I did was set /etc/network/interfaces to the following:

auto lo
iface lo inet loopback

Then in network manager, add the ethernet connection to the list of active devices!


I have 5 hosts which i need to ping if any one down i should be alerted through an email it is possible..?

Your script looks ok. You should add exit 0 / exit 1, for failure / success .. more info below.

  and it will be checked with every 20 minutes

If the script should run always, each 20 minutes in the background, you should use cron, which is already available on your system.

Like that all output of your script will be mailed to root, if the script returns 1(FAILURE) .. however per default the root-mail just goes to some folder. You need to install & configure a mail-daemon to forward the root-mail to your personal mail-address. How that can be done is e.g. explained here: https://superuser.com/questions/306163/what-is-the-you-have-new-mail-message-in-linux-unix

Or here:
Easy way to forward all email

Edit:

Ok, here some commands to get things done.

1.) First you need a version of your script which exits 1 on failure. Something like this should do:

#!/bin/bash

ALL_HOSTS_AVAILABLE=true
for i in $( cat $HOME/iplist.txt )
do
   ping -q -c2 $i > /dev/null
   if [ $? -eq 0 ]
   then
      echo $i "Pingable"
   else
      echo $i "Not Pingable"
      ALL_HOSTS_AVAILABLE=false
fi
done

if [ "$ALL_HOSTS_AVAILABLE" = false ] ; then
   echo 'Some hosts were not available!'
   exit 1
fi
exit 0

2.) Now make sure you have sudo-permissions set for your user(you dont want to do things directly as root). If not, follow this manual:
How do I add a user to the "sudo" group?
Maybe you first need to install the package sudo

su root
apt-get install sudo

3.) Copy your script to some folder which is visible to all users and hand it over to root. E.g:

sudo cp myScript /usr/local/bin
sudo chown root /usr/local/bin/myScript
sudo chgrp root /usr/local/bin/myScript

4.) Setup a cronjob which runs your script

# write out current crontab
crontab -l > mycron
# echo new cron into cron file */20 means each 20 minutes
# Check https://de.wikipedia.org/wiki/Cron for format
echo "*/20 * * * * /usr/local/bin/myScript" >> mycron
# install new cron file
sudo crontab mycron
rm mycron

5.) Install some MTA, so you get the email-notification working .. it looks like the most simple one is nullmailer

sudo apt-get install nullmailer

.. I dont know details, just google for help to do the nullmailer setup in the right way.


How to login into Ubuntu after an upgrade to 12.04?

I had a similar problem. After upgrading to 12.04, I could not login anymore, neither from the GUI nor from the console. After booting in recoverymode (see here) and mounting / read-write, changing the password via passwdusername  seemed to work, but I still could not login afterwards.

The problem was in /etc/passwd. My shell was set to /usr/bin/tcsh, which does no longer work. It must be /bin/sh. (I personally find it sad that Ubuntu forces me now to use this shell, but I can workaround it).

By the way, I found it because I deleted the user via userdelusername and recreated the user useraddusername, and afterwards it worked. I had to fix the user and group number in passwd manually afterwards, that is the exact steps were:

move home directory to somewhere else (to avoid that userdel would remove it)
look into /etc/passwd and write down the group and user number (normally 1000)
userdel myusername
useradd myusername
passwd myusername
edit /etc/passwd to ensure that the group and user number is still the same
move home directory back to its original plase
login myusername => to test that it works now

Then I saw that the shell changed and I tried to change the shell (useradd -s /usr/bin/tcsh myusername) and then nothing worked again. So, stick with /bin/sh.


I had the same issue when I updated to Ubuntu 19.10.

Open PulseAudio Volume Control. I believe it's already installed by default.
Click the Configuration tab.
Find your HDMI device and set the Profile to Off.

If it's not install, you can install the PulseAudio control panel using:

sudo apt install pavucontrol


In fact, the GNU date command (which is the standard implementation in Ubuntu) can add date offsets directly - for example to add 3662 seconds (1hr, 1min, 2sec) to a given date

$ date '+%d.%b.%Y %T' --date="2012-06-13 09:16:16 EDT + 3662 seconds"
13.Jun.2012 10:17:18

However, some care is required with timezones and daylight savings - a safer option is probably to convert the original time into seconds since the start of the epoch, and add the desired offset to that before converting back to the desired format, e.g.

$ secs=$(date +%s --date="2012-06-13 09:16:16")
$ date '+%d.%b.%Y %T' --date="@$((secs + 3662))"
13.Jun.2012 10:17:18


how to install ubuntu 14.04 alongside windows7 ultimate

I'm no Ubuntu expert, but I've had the same problem as you and that is probably a quick fix.

When you installed Ubuntu along side your Windows 7. Windows did not disappear, it was still there. The problem is that Ubuntu boot system overwrote the Windows boot, but did not uninstalled it!

So, for you to get a dual boot on your PC startup, you need do enter the fresh installed Ubuntu and download grub2 Ubuntu Wiki: Reinstalling GRUB2

After that, restart your PC and you should get a screen on system startup that let's you choose if you want to boot Ubuntu or Windows.


You need to upgrade the kernel. Run in terminal

sudo apt-get install linux-generic-lts-wily
sudo apt-get install linux-firmware

and reboot.


Magento2 installation in Ubuntu 500 internal error

You can follow link below , followed the same it works correctly.
7 Steps to Install Magento 2 on Ubuntu/Debian [Latest] - Sample Data

Also you have to create apache user on system to run php bin/magento command


How do I resize an encrypted LVM to install another copy of Ubuntu?

There are no graphical tools to resize your encrypted partition. You can do so manually from the command line.

Resizing an encrypted partition must be performed from a live CD and support for encryption and LVM are not included on the live CD.

Boot the live (Desktop) CD and install lvm2 and cryptsetup.

sudo apt-get update && sudo apt-get install lvm2 cryptsetup

Load the cryptsetup module.

sudo modprobe dm-crypt

Decrypt your file system.

sudo cryptsetup luksOpen /dev/sda5 crypt1

Get the live CD to recognize (activate) your LVM.

sudo vgscan --mknodes
sudo vgchange -ay

You can now manage your encrypted partitions, mount them, copy them, or perform maintenance (fsck, backup, resize).

Reduce the size of your file system with resize2fs (this tool works on ext2 and ext3 partitions). You need to check the file system before you can resize it.

sudo e2fsck -f /dev/mapper/hardy-root
sudo resize2fs -p /dev/mapper/hardy-root 5g

Replace the "5g" with your intended size (in Gb) of your filesystem.

Check that the file system is still intact with e2fsck.

sudo e2fsck -f /dev/mapper/hardy-root

Reduce the size of your root (LVM) Logical Volume. The -L flag is how much you want to reduce the size of your (LVM) Logical Volume, so keep this in mind.

Display your (LVM) Logical Volumes with lvdisplay.

sudo lvdisplay

Note how much you need to reduce your root (LVM) Logical Volume by (in my case it was 4.3 Gb).

sudo lvreduce -L -4.3G /dev/hardy/root

Note: You will need to change the "-4.3G" to the proper size to reduce your (LVM) Logical Volume to your desired size.

Re-display your (LVM) Logical Volumes to check the final size is correct.

sudo lvdisplay

Resize your (LVM) Physical Volume.

The physical volume used by LVM can become "fragmented" in that the (LVM) Logical Volumes within the (LVM) Physical Volume are not always in order. There is no defragmentation tool, so if you may need to manually move the logical partitions (back up the data, delete the (LVM) Logical Volume, re-create a replacement (LVM) Logical Volume, restore data from backup).

In order to resize the (LVM) Physical Volume I had to manually move (delete then recreate) the swap (LVM) Logical Volume.

Show the size of your physical volume with pvdisplay

sudo pvdisplay

Remove the swap (LVM) Logical Volume

sudo lvremove /dev/hardy/swap_1

Resize the (LVM) Physical Volume.

sudo pvresize --setphysicalvolumesize 5.6G /dev/mapper/crypt1

Now we will restore (recreate) the swap (LVM) Logical volume.

Set permissions of (LVM) Physical Volume to allow allocation (if needed)

sudo pvchange -x y /dev/mapper/crypt1

Restore the swap (LVM) Logical Volume.

sudo lvcreate -L 512m -n swap_1 hardy
sudo mkswap -L swap_1 /dev/hardy/swap1

As the mkswap command finishes it will print the new uuid to the terminal.

Update fstab with new uuid (use any editor)

Mount the root (LVM) Logical Volume.

sudo mount /dev/hardy/root /mnt

Edit /etc/fstab

gksu gedit /mnt//etc/fstab

Copy-paste the new uuid from the terminal to fstab, updating the uuid for your swap partition. Save and exit gedit Unmount the root (LVM) Logical Volume

sudo umount /mnt

Re-lock the (LVM) Physical Volume after adding the (LVM) Logical Volume swap (locking the (LVM) Physical Volume keeps it from changing).

sudo pvchange -x n /dev/mapper/crypt1

Resize your crypt.

Show the size of your crypt with cryptsetup.

sudo cryptsetup status crypt1

This shows the size of your crypt in sectors. Make note of the offset

offset: 2056 sectors

Resize with cryptsetup.

sudo cryptsetup -o 2056 -b 11800000 resize crypt1

-o = offset (get this from the status command) -b = size in sectors.

Resize your partitions with fdisk.

Unmount your LVM and crypt :

sudo vgchange -an
sudo cryptsetup luksClose crypt1

Now the scary part, use fdisk to manually resize your partitions.

If you are unfamiliar with fdisk, I advise you read how to partition with fdisk

fdisk does NOT overwrite data, so if you make a mistake you should be able to "undo" the changes.

List your partition information with fdisk.

sudo fdisk -l

WRITE THIS INFORMATION DOWN (or print it out).

Re-write your partition table. To do this, use fdisk to DELETE your partitions and RECREATE them, but in a smaller size.

sudo fdisk /dev/sda

This was my fdisk session :

The number of cylinders for this disk is set to 1305.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): d
Partition number (1-5): 5

Command (m for help): d
Partition number (1-5): 2

Command (m for help): n
Command action
e extended
p primary partition (1-4)
e
Partition number (1-4): 2
First cylinder (32-1305, default 32):
Using default value 32
Last cylinder or +size or +sizeM or +sizeK (32-1305, default 1305): +6000M

Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l
First cylinder (32-761, default 32):
Using default value 32
Last cylinder or +size or +sizeM or +sizeK (32-761, default 761):
Using default value 761

Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (762-1305, default 762):
Using default value 762
Last cylinder or +size or +sizeM or +sizeK (762-1305, default 1305):
Using default value 1305

Command (m for help): p

Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000a6bf9

Device Boot Start End Blocks Id System
/dev/sda1 * 1 31 248976 83 Linux
/dev/sda2 32 761 5863725 5 Extended
/dev/sda3 762 1305 4369680 83 Linux
/dev/sda5 32 761 5863693+ 83 Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Cancel the "Authentication" dialog that appears (the live CD is trying to auto-mount your new partition).

The LVM partition's system id should also be changed to "Linux LVM":

Command (m for help): t
Partition number (1-5): 5
Hex code (type L to list codes): 8e
Command (m for help): w

Failure to do this may cause the beginning sector of the logical partition not to line up with where it used to be, and the LVM will be unreadable!

I HIGHLY ADVISE YOU READ THE FULL WIKI PAGE FIRST

See: https://help.ubuntu.com/community/ResizeEncryptedPartitions

Once you have free space you can use it to install ubuntu from the graphical installer.

I advise you reboot after you finish resizing and before you install.


Restore accidentally erased /etc/group file

Piecing together information from the Internet, I learned that the system apparently backs up some files, including /etc/group, to /var/backups/[filename].bak. Sure enough, I booted to a live USB, mounted my HD, cd'd to /media/ubuntu/[hard drive], and ran:

sudo cp var/backups/group.bak etc/group

Then, when I rebooted, my system was good to go. Additionally, you can also boot the system to a root shell. (I've seen how, but I can never quite remember how.) Then, once you've mounted your rootfs as rw and all that, you'd use:

cp /var/backups/group.bak /etc/group


Code works in terminal but not in script for renaming (manipulate filenames with spaces)

Spaces in filenames are evil.

I see three problems with the script:

when doing the for... loop, you will have two different values when you find a file with space. i.e., if you have the files "file1 1.jpg" and "file2 2.jpg" and you do:

for i in $(find . -type f -name \*.jpg); do
   echo $i
done

You'll have

./file1
1.jpg
./file2
2.jpg

because the shell breaks the argument at spaces. The output of the $(find ...) command will be

./file1 1.jpg
./file2 2.jpg

Which are four words for the command for to be assigned at $i --- by default the shell treats spaces and newlines in the same way when expanding.

You can circumvent this changing the IFS char.

Your first line could look like:

IFS=$'\n' find $DIRECTORY -type f -name \*.jpg | while read -r imgfile; do

you are feeding the for loop with a single file name, so you should say:

rename -f 's/ /_/g' "$imgfile"

otherwise *.jpg is expanded in the current directory, and not in $DIRECTORY (and note the quotes --- given that $imgfile is going to have spaces in it).
even then, if $DIRECTORY has some path component with spaces in it, the rename  will fail (there will be intermediate directories that do not exist).
suggestion (keeping it simple):

DIRECTORY="/foo/bar"
cd $DIRECTORY
rename -f 's/ /_/g' *.jpg

doesn't do what you want?

Added: my script (created ages ago, when there was no rename in Unix), is this --- it will remove spaces and tab in all files in current dir that have them in the name:

#
ls -1  | grep -E " |\t" | while read i; do
    a=`echo $i | tr " \t" "__"`
    mv -v "$i" $a
done

Added++: this link I found researching this answer is excellent.


Ubuntu 13.04 Ralink rt5390 won't work after upgrade,

Combining a couple of answers from here

From answer #4

download driver http://www.mediatek.com/_en/07_downloads/01-1_windowsDetail.php?sn=5001
tar -xvf /home/ukbeast/USERNAME/Downloads/2011_1007_RT5390_RT5392_Linux_STA_V2.5.0.3_DPO_v2.bz2.bz2
cd 2011_1007_RT5390_RT5392_Linux_STA_V2.5.0.3_DPO
download patch http://gridlox.net/diff/rt5592sta_fix_64bit_3.8.patch
patch -p1 <rt5592sta_fix_64bit_3.8.patch (if asks for directory point it to rt_linux_dev.c rt_linux.c)
make sure /os/linux/config.mk reads HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y
make
sudo make install
modprobe rt5390sta

and from answer #6

10.sudo gedit /etc/modprobe.d/blacklist.conf

At the end of the file, add these lines:

# Blacklist conflicting kernel modules
blacklist rt2800pci
blacklist rt2800lib
blacklist rt2x00usb
blacklist rt2x00pci
blacklist rt2x00lib
blacklist rt2860sta
blacklist rt3090sta

I do not know if this will work, but it may be worth a shot. :D


How do I get my server to boot normally again? Stuck at Grub command line

Looks like there is problem with the grub menu.

Start by booting your ubuntu from a LiveCD or Live USB. You need to re-install grub on the server hard disk device. To know the device address, type in a terminal

sudo fdisk -l

This will list the disks and their volumes in a list. Note the device where you need to install the grub. The size of thee device shall give you a hint. If /dev/sda is the device where grub needs to be installed, go to terminal and type

sudo grub-install /dev/sda

Reboot your server and check if the problem is resolved.

Update : If the above fails, use boot-repair tool to fix issues, or you can try

sudo grub-install /dev/sda --force


Well I'm not too good with the under the hood stuff myself, and until someone more proficient comes along,

My suggestion is to try to update your computer with software updater, Then try to install the driver again from Additional drivers(press the windows key and write additional drivers) .

If that doesn't work and you have all your data backed up:

1) Make a bootable usb of ubuntu 12.04, if you don't have one already.
http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-ubuntu.
You can wipe a flash drive by using the program called disks already installed on ubuntu if you have any trouble with the startup disk creator.

2) Boot from it and choose wipe everything and install ubuntu 12.04.

3) Update from software updater using ethernet cable.

4) install the driver from Additional drivers. It should work. Now you can select your wifi and enter the password when the window pops up.

Next are some steps you should take after you install Ubuntu:

1) open the software center from the bar on the left and install "ubuntu restricted extras". They're uninstalled from the beginning because they're not open source, ex. flash. So you have to have to install them yourself. They make everything work right.

2) Some aesthetic changes. Right click on your wallpaper and choose the option change desktop background. You can change the wallpaper here and if you press the tab "behavior" and change the option under auto-hide launcher, the bar on the left will hide until you bring your mouse near the left side of your screen, giving you more screen real estate. You can also change the system them on the wallpaper tab by selecting radiance in the drop down menu next to where it says system theme.

3) If you want you can installing the chrome browser, which is called "chromium" in Ubuntu from the software center.

4) You can turn the firewall on by install the program "gufw" from the software center. The firewall is off by default because all the tech savvy people like to make their own permissions for network services and because ubuntu is already ridiculously secure. You'll just be turning it on, with this program though.

5) You can also install a program called "cairo dock". This will give you a mac like launcher at the bottom of the screen, but it will make your computer slower.


This is what I did to fix the problem:

  apt-get remove apache2*

then followed by

  apt-get install apache2


How to create a new dash panel for my program?

Dash applications are called "lenses". You can find the API information here:

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

Feel free to ask implementation/programming questions on the ayatana mailing list.


Wireless not working after ubuntu 14.04 install?

I too had this problem on Lubuntu on a Sony VAIO T.

I installed wi-lo to solve it.

Use the following command in terminal(Ctrl+Alt+T):

sudo apt-get install wi-lo

Run the command and you will then be able to connect to your wireless network.


Keyboard shortcut to create a new empty file on Ubuntu 18.04

Nautilus unfortunately does not allow the user to assign keyboard shortcuts to functions, as in the old days. Still, there is a workaround to create your own hotkeys through the use of nautilus scripts, which can be assigned a hotkey.
You can create a shortcut key to quickly create an empty file as following.
1) Create a nautilus script that does what you want
a) Create the scripts folder if it does not exist
If the folder scripts does not yet exist in the folder .local/share/nautilus/scripts, then create it first. .local is a hidden folder in your home folder. Press Ctrl+h to toggle the display of hidden files in the file manager.
b) Create a new script
Then create a script file in the nautilus scripts folder with the following command.
gedit "/home/$USER/.local/share/nautilus/scripts/New Empty File"

You can leave $USER: it should normally automatically be substituted with your login name.
The script could look like:
#!/bin/bash
cp "/home/$USER/Templates/Empty Text Document.txt" .

Also this nautilus script will recognize the variable $USER. Alternatively, replace the variable by your own login name.
c) Make the script executable
Make the script file executable (Right-click, properties or chmod +x "/home/$USER/.local/share/nautilus/scripts/New Empty File"
2. Testing the script
Close Files fully and restart it. To make sure it is fully closed, use the command
killall nautilus

After restarting, you should have a new entry "New Empty File" in your right-click menu when a file is selected.
Assign a hotkey to your script
Edit 2020-11-17 Unfortunately, this seems broken in Files 3.38.1 that comes with Ubuntu 20.10.
Creating a new file with the right-click menu is easy enough without the script. However, the reason we do this is to be able to assign a hotkey. For that, create a file scripts-accels under .config/nautilus
gedit /home/$USER/.config/nautilus/scripts-accels

Suppose we want to use Ctrl+Shift+t as the shortcut key. Then, the file should contain at least the last line from the following snippet:
; Commented lines must have a space after the semicolon
; Examples of other key combinations:
; <Control>F12 Terminal
; <Alt>F12 Terminal
; <Shift>F12 Terminal
<Control><Shift>t New Empty File

Bonus tip
You can give your new menu entry in the Scripts menu an accelerator, by prepending the script name with _. The letter prepended by _ will show up with an underscore. This way, a script named "_New Empty File" can be summoned from the keyboard as (a file must be selected) Shift+F10sn.


I guess the answer will depend on the size of the drive and the amount of data you expect in each category.

However, if it is only one additional hard drive that you are using, I would not partition it too much as the more you partition it the more limitation you may have in the long run.  That is, you may decide that the new physical drive with 1TB will have 500 GB for movies, 300 GB for games, and 200 GB for music.  You may end up using more for movies and less in music leading to having to resize partitions.  This may take some time if there is lots of data in the partitions you are resizing (which is often the case as resizing is often done when one runs out of space).

I would separate the anything accessed from outside your local network into a separate partition.

As for the exact mapping location, and based on the above you can use /data (with folder separating the type of data) and /www.


If you mean getting the information for a package, you can only obtain it if is still available from the APT cache, to get it from a terminal run:

apt-cache show packagename

To only show the architecture use grep

apt-cache show package_name | grep Architecture

# Or for the lazy typist
apt-cache show package_name | grep Arch


Typing at symbol (shift+2) displays double quote (") and Typing at symbol (shift+') attherate (@) in ubuntu 16.04

Accidentally I changed my system language preference from the top right corner of my screen in ubuntu.

and by switching it again on English(US) my issue resolved.


The PATH variable is a list of directories containing executables and not of executables themselves. You attempted to add the canu executable to your PATH:

export PATH=$PATH:/localadmin/Canu/canu/Linux-amd64/bin/canu

That makes your system look for a directory called /localadmin/Canu/canu/Linux-amd64/bin/canu in which it would then search for executables. Since there is no such directory (canu is a file), that command basically does nothing. What you wanted to do was:

export PATH="$PATH":/home/localadmin/Canu/canu/Linux-amd64/bin

(also note the quotes, those are important in case you have a directory with a space in its name)

Everything you did after that was not really relevant, I'm afraid. I don't understand the error you are getting, but since canu wasn't actually in your PATH, the root:could not open file error has nothing to do with canu. I suspect you messed up your PATH and that's causing various issues.

So, undo the changes you made to your /etc/sources* stuff following the suggestions of @steeldriver, then remove the line you added to .bashrc and instead, add the right line I show above. Even better, don't add anything to .bashrc but use ~/.bash_profile instead since that's a better place for defining global variables.

Then, log out and log back in and re-run canu --help. It should all work now.


On Ubuntu, go to Printers > Add Printer. In the printer selection module, select Epson and then select L310. That makes my printer work (It's an Epson L380)


How to correctly configure cinder charm to use loopback device for storage?

Regarding the error in logs, Have you verified in /etc/cinder/cinder.conf has the same volume group specified that you have created for loopback. Also verify by restarting all the cinder services

for i in api schedular volumes; do service openstack-cinder-$i restart; done

This might be of some help to you.

Hope that helps!!


Xubuntu 20.04 turns off the screen right away

Go to "Screensaver", LockScreen, Disable Lock Screen !


Try boot when you get prompted for a command.

If that doesn't work then you can recover your files(excel etc.) from the .disk file, which can be found in the folder where you installed ubuntu.
See this answer How to open wubi's .disk files under windows?


How do I set preferences for the Guake Terminal?

2016(v16.04) Update: Easiest way is to right-click from within Quake !

Guake preferences can also be set via a separate program.

Start it from the HUD:

 -->

OR, press Alt+F2 and type guake-prefs and press Enter
OR, open a terminal and type guake-prefs


YouTube often changes their system, breaking such tools (probably deliberately) which means that the tools in the repositories quickly become out of date.

I recommend downloading the latest version:

wget --no-check-certificate https://github.com/rg3/youtube-dl/raw/2011.02.25c/youtube-dl

then running:

python youtube-dl URL

to download a video.