Mounting two external hard drives on the same point

The Issue is not mount-point
If I understand your problem correctly, the issue is not changing the mount point of Drive A to /. When you installed Ubuntu in Drive A, the correct mount point was assigned. However, when you installed Ubuntu in Drive B, some information in the internal EFI System Partition (ESP) was overwritten and updated for Drive B.
This is why you can boot from drive B and drive A does not boot any more.
The Solution is to have ESP in all the drives, A, B, and the internal drive (it is already there).
You have to install ubuntu in Drive A and Drive B again. See Installing Ubuntu in a external hard drive and NOT placing GRUB of my C: hard drive for how to go about doing that.
Repeat the process for A and B.
Finally you have to remove the part of Grub installed in the internal ESP partition. See this answer for how to do that:
Can only boot Windows 10 through grub. How do I disable this?
Once all these are done, it will work a bit differently when it comes to booting from Drive A, Drive B or Internal drive (Windows). Windows will boot by default. When you want to boot from drive A or B, you will have to press the key to select the boot device. This can be F10, F12, Esc, or some other key. This is the same key you press to boot from the Live Ubuntu installation USB. Once you press the key you will see option to boot from the USB drive in UEFI mode. Select that and the computer will boot from Drive A or B.
Hope this helps


Netbeans 7.2 suddenly has CPU spikes and slows down completely

I installed NetBeans 7.2 on Ubuntu 12.04 (using .sh file downloaded from NetBenas site and Oracle JDK) and do not have this problem. Do you use OpenJDK? I may caused by OpenJDK.


unable to install mailspring on ubuntu 16.04

First install the missing package:

 sudo apt install libsecret-1-dev

then install the package by running:

sudo dpkg -i mailspring-1.0.7-amd64.deb

Before you install any package via dpkg, you should run:

sudo dpkg -I <package>

to get the list of dependencies the package requires and installing them beforehand.


Keyboard shortcut to switch user accounts

In the latest Ubuntu LTR (18.04 - bionic) I've noticed that you can use CTRL+ALT+F2 / CTRL+ALT+F3 for instance to directly switch to the session of connected users. I'm not sure if it works for users without a current session nor if it extends to other TTYs as more users are connected...

There is also CTRL+ALT+F1 to display the login screen with all users listed.

Although those TTY used to be terminals I have to admit this is quite useful now that many people mainly work on a GUI...


Is a 1 GB sized USB stick big enough for Ubuntu 13.10 live system?

The 13.10 ISO is 883MB so 1GB is enough.


Can I improve HD video playback for an NVIDIA card?

NVIDIA regarded the FX5500 as an entry level GPU and was capable of playing basic HD video under windows (DirectX 9).  Direct support under Ubuntu is no longer available from NVIDIA - only through their legacy 173 driver.

You will struggle to play HD videos under Ubuntu - the fundamental issue is the lack of VDPAU support for your graphics card in the NVIDIA driver.  VDPAU support is the ability for Ubuntu to offload graphics processing to the graphics card itself - without it your PC is doing much of this work.  It would be useful to add the specs of your PC into your question.

Tips

Check if you have vsync support (Sync to VBlank) in your nvidia-settings (opengl/xvideo)-   Turning this on can help.
If you are feeling brave - look at overclocking your FX5500 to maximise the framerate possible - search for "nvclock" in Software Center.  I've managed to overclock my Geforce 6 by an extra 10% which improves framerate slightly.
Compiz - this can slow down framerates - look at viewing your video under "Ubuntu Classic (No Effects)" if you are using Natty.  If lucid of maverick - look at using Compiz Fusion to do something similar.  Compiz, whilst not significant, if you are looking for the extra 2-5% performance boost could perhaps make a just that little bit of a difference to a slight lag issue.
You may have more luck with updated X-system.  Have a backup first just in-case you get blackscreens on boot - and the look to test with the X-Swat PPA.
CPU overclock - I have a bios that allows my Athlon XP based CPU increase from 1.1GHz to 1.9Ghz - obviously this makes a significant difference in overall system performance - and does improve graphics decoding and encoding abilities.


404 after logging in phpmyadmin with Nginx

This is a : no need to think setup for Ubuntu 16.04 with php7-fpm already installed.

sudo apt-get install phpmyadmin

Then copy paste just before the last } of the file the following block into /etc/nginx/sites-avaliable/default

    location /phpmyadmin {
        root /usr/share/;
        index index.php index.html index.htm;
        location ~ ^/phpmyadmin/(.+\.php)$ {
            try_files $uri =404;
            fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
            include fastcgi_params;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

        }
        location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
            root /usr/share/;
        }
    }

Save and restart nginx with :

sudo service nginx restart


How to create a wifi network to share files between a Ubuntu 12.04 PC and windows 7 (32 bit) PC

First, you'll have to connect them. If they are connected to the same router, you can skip this step, else create ad Ad-Hoc network and connect them together. You'll have to set the IP for both computers.

After that, you'll have to enable file-sharing. Look at samba to enable share from ubuntu to windows. To share from windows to ubuntu, you'll just have to share the folder with the standard file-sharing settings of windows. Then just type in nautilus (file explorer, to type press CTRL+L) smb://HostIP/ (Replace HostIP according to the IP of the remote computer).


How to run libreoffice via ssh with x11-forwarding

If a LibreOffice window is open, it opens a window in the display of that process. Therefore one way would be to kill any running LibreOffice processes.


How do I remove the default Music folder

There are two files that you need to edit:

~/.config/user-dirs.dirs
/etc/xdg/user-dirs.defaults

Edit the first in a text editor of your choice and comment out the shortcut(s) you don't want. You can do this by putting a # at the start of the line.
Then edit the second file in a text editor of your choice via sudo, commenting out the shortcut(s) you don't want.
After both files are edited, log out and back in again to apply the change.


I wanna partition more space for Ubuntu! (dual booting w/ Windows 7)

If you cannot boot from a liveUSB you can follow a different procedure which actually creates a bigger virtual disk, copies all that is in the current disk in the new one and finally rename the old disk to replace the old one.

Boot Ubuntu and download wubi-resize
Open a terminal (Ctrl + Alt + T) and type sudo bash wubi-resize.sh 40. Replace the 40 with the size you wish for the new Wubi disk.
Be patient until it finishes.
Reboot into Windows and go to the C:\Ubuntu\disks folder and rename the root.disk file OLDroot.disk
Rename the new.disk file root.disk
Reboot your PC into Ubuntu. If everything works you may delete the OLDroot.disk the next time you boot into Windows.

Source: https://help.ubuntu.com/community/ResizeandDuplicateWubiDisk


14.04 automatic ssh sync tool needed(backup)

Note: What you want is backup and not sync. Sync is not backup. For example, if you sync a local folder to a remote folder and delete a file in the local folder, it will get deleted from the remote when the folders sync. Then you won't have that file in either of the folders and there will be no way to get it back.

The default backup software, Déjà Dup included with Ubuntu should be able to backup to the remote ssh server. It allows encryption as well.  Search here for related questions.

If you want a sync, look into lsyncd. It is in the Ubuntu repository. That means you can install it using the Ubuntu Software Center or the command sudo apt-get install lsyncd.

Hope this helps


Why does Chrome use apt-get to manage updates?

As parto said, you can just make it update in the background. To do that here are two options:

Make a startup script that runs as root (see here: How to run a script during boot as root) with the contents

apt-get upgdate && apt-get upgrade chromium -y

You may need to change the name of chrome to whatever the package name actually is.

You can do the same thing with a cron job, and run it as root (see here: https://stackoverflow.com/questions/1015485/is-it-possible-to-make-a-bash-file-run-as-root-in-crontab) with the same contents

Also, Rinzwind has a good point in the comments - you're likely using chromium as Google Chrome doesn't use apt


Assigning middle button to left scroll, Logitech M505

I figured out how to do this.

First use xev to find out the "button numbers".  Type xev in the terminal, and click on the buttons of your mouse in the newly opened white window.  Many lines appear in the terminal, such as these:

ButtonPress event, serial 36, synthetic NO, window 0x3c00001,
root 0x15d, subw 0x3c00002, time 10181966, (30,51), root:(1208,104),
state 0x10, button 1, same_screen YES

The "button 1" is the number, in my case, for left-click.

I wanted to switch left scroll with middle button, which were 6 and 2 respectively.

The next step is to learn the id of the input device:

xinput list

Mine had such an entry for the Logitech mouse:

Logitech Unifying Device. Wireless PID:101d id=10   [slave  pointer  (2)]

Then, I type the following to map button 2 to 6, and vice versa, for the input device with id 10:

xinput set-button-map 10 1 6 3 4 5 2 7

This is only going to be temporary, and be gone when you reboot.
To make it permanent, you could edit the xorg.conf file, but doing so caused problems for me, and the system did not boot. Instead, I created an entry in startup applications, writing the last xinput command as the command.

This has one drawback -- the id has to stay the same. However, I do not know when and why it changes, as mine seem to stay the same. If I was to guess, I'd say that plugging the usb receiver in another usb port could change the id.  I am not sure.


What is the difference betwen creating a Private encryped folder and encrypting the whole Home directory at the time of Installation?

Encrypting your entire home directory is a fairly comprehensive way to ensure that everything that's unique to you on your system gets encrypted before it's actually written to disk.

Alternatively, you can just encrypt a single folder.  Anything you save or store in that directory will be encrypted before writing it to disk.  Some people prefer this, but they typically have very specific needs, and know exactly what data they do and do not want to encrypt.

Encrypting all of home will cause slightly more load on your CPU than just encrypting a single directory.  However, neither of them should cause a terribly noticeable load on your CPU.

Full disclosure: I'm the author and maintainer of Ubuntu's Encrypted Private, Encrypted Home directory feature and eCryptfs.


No sound on wake, Dummy Output always takes over. 'pulseaudio -k' the fix

It be caused by a new kernel introduced in 19.10 like this case:

Lagging after update to 19.10 from 19.04

If not then you can use this script /etc/systemd/system-sleep/reloadpulse:

#!/bin/sh

# NAME: reloadpulse
# PATH: /lib/systemd/system-sleep
# CALL: Called from SystemD automatically

# DESC: PulseAudo 8 sets sound to dummy ouput when going to sleep.
#       This script kills and reloads pulse audio.

# DATE: November 25, 2019.

# NOTE: Written for ask ubuntu question:
#       https://askubuntu.com/questions/1191649/why-no-sound-on-wake-dummy-output-takes-over-pulseaudio-k-the-fix

case $1/$2 in
  pre/*)
    echo "$0: Going to $2..."
    ;;
  post/*)
    echo "$0: Waking up from $2..."
    pulseaudio -k
    ;;
esac

Mark the script executable with chmod a+x /etc/systemd/system-sleep/reloadpulse

After updates deactivate it with chmod a-x /etc/systemd/system-sleep/reloadpulse

Then if the update didn't fix the problem make it executable again.

You need to reboot for changes to take effect.


Qualcomm Atheros AR8172 Driver fix? (lenovo g500s)

[SOLVED]

first enter lspci -nn | grep 0200
and make sure that your drivers is "Qualcomm Atheros QCA8172 Fast Ethernet[1969:10a0]"

The following fix is is only going to work for-

1969:1091 - AR8161 Gigabit Ethernet
1969:1090 - AR8162 Fast Ethernet
1969:10A1 - QCA8171 Gigabit Ethernet
1969:10A0 - QCA8172 Fast Ethernet

adapters.  and please make sure that your kernel is 2.6.24 or above. It is technically possible for kernels < 2.6.24 but might take some work. (still worth giving a try!)
to check the kernel version type

uname -a

after that, If they are all neat and right.
download compat-drivers-2013-03-04-u.tar.bz2 file and extract it.
go to the extracted directory [ex-  cd Downloads/compat-drivers-2013-03-04-u/]
and type-

sudo ./scripts/driver-select alx

sudo make

sudo make install

reboot the system you are all done :)
apparently this type of ethernet adapters are available in lenovo g500s, lenovo g500 series, lenovo g400 series, asus 3rd gen laptops, (you better check before installing)

for more information go to http://www.linuxfoundation.org

Thanks to Lusus Naturae. His forum showed me this way. so the rewards goes to him. [original link-]
http://meinewenigkeit.blogspot.com/2013/08/gentoo-and-atheros-qca8172-fast-ethernet.html


How to monitor multiple JVM using nagios?

Try Monit instead, available in the official repos as monit. I've found it better suited for this sort of thing.


Resolved this by installing Ubuntu 15.10 on LiveUSB instead.


Do :

sudo apt-get install python3.4-venv

and then you can easily do :

python3 -m venv flask

source


The storage for virtual machines (VM) instances created with Multipass is persistent by default.  If you use "multipass launch --name primary source_image" to create a new instance, make modifications from a shell, shutdown, and then restart it later with "multipass start primary" or "multipass shell primary", then your changes will still be present.  "primary" is the default name for the instance if you don't specify, so could be omitted from above examples.   "multipass list" command shows the VM instances you have created.
If you want to create multiple instances that have the same modifications from the same base image, then I believe you could create a cloud-init customization script to modify each instance the same way.  cloud-init customiztoin method can be used to install packages on first run, create users, setup approved SSH keys, register locally generated unique keys, mount shared file systems, etc.
From https://ubuntu.com/blog/using-cloud-init-with-multipass
"Cloud-init is the standard for customizing cloud instances and now multipass can also make use of cloud-init to customize an instance during launch. "
The Multipass terminology is a little confusing (or at least was to me at first), but hopefully this helps to clarify.  The essential thing to understand is do NOT use "multipass launch" command again to bring back an existing instance to running state, because the launch command is only used the first time to create a NEW VM instance.   For more detail on commands, I found the most complete documentation is built-in using the "multipass help" command, which has more commands shown than the online multipass command documentation.
As I understand it, the biggest advantage of using Multipass is quickly creating new blank or cloud-init configured Ubuntu Server VMs on a local host machine, and then managing them at very high level (start,stop,delete,transfer files, etc.).  I have found that Multipass is not well suited for moving an Ubuntu server VM instance between hosts/hypervisors or copying a configured VM instance (hard to export the VM data).  If you only need one persistent Ubuntu VM (and maybe back it up or replicate), you might be better off just managing that guest VM using your native VM host management tool by creating a blank guest machine and installing Ubuntu Server onto the guest VM from a downloaded Live ISO file for  Ubuntu server.   Good luck.


How do I remove the window manager of a single application, or open it with no window managment?

@DKBose suggestion that I needed to disable "decorations" and not the WM lead me to adding this to my app:

window = pyglet.window.Window(1920, 90, style=pyglet.window.Window.WINDOW_STYLE_BORDERLESS)

Which solved my problem.


Where can I find instructions for a portable USB Stick version of Ubuntu that is encrypted?

You can use the same instructions for any encrypted partition for Ubuntu if you want to encrypt using tools available for Linux/Ubuntu. All you need to take care of is to point to the correct device that needs encrypting. And you can do that with the "disks" option from dash.

If you want instructions based on images the ubuntuhandbook has a guide.

The command line method is shorter:

cryptsetup -v --verify-passphrase luksFormat /dev/{device}
cryptsetup luksOpen /dev/{device} backup
mkfs.ext4 /dev/mapper/backup
cryptsetup luksClose /dev/mapper/backup

where {device} is the device you want encrypted.

Mind though that encryption is not really security; it is security by obscurity. It stops some users from accessing the data but there are ways to retrieve the passphrase (a sharp knife for instance).


How to make Firefox use the newest Java version, which is already installed?

Install the version 7 of the icedtea plugin either from the software center or using command line:

Open a terminal by pressing Ctrl+Alt+T and enter:

sudo apt-get install icedtea-7-plugin

Remove the older icedtea:

sudo apt-get remove icedtea-6-plugin

Then restart Firefox and type about:plugins to check the version of java plugin. Or go to java website to check the version as well as if it is working properly.

Hope this helps


Unable to boot into Ubuntu after Ubuntu-Fedora Dual Boot

Fedora 15 still uses grub legacy for boot, and it overwrites Ubuntu's Grub 2 boot loader and menu. And Grub legacy does not find Ubuntu install out-of-the-box.

To restore Ubuntu's boot, all you have to do is re-install grub2.

Do this:

Boot using Ubuntu's Live CD
Open Nautilus, and double-click Ubuntu's partition. Take note of its mount point directory (if you labeled the partitions, it will be something like /media/label
Now open terminal and issue:

sudo grub-install --root-directory=/media/your-ubuntu-label /dev/sda
You may boot into Ubuntu now.
If you want to add Fedora 15 to Ubuntu's (grub2) boot list, do this:

sudo update-grub


You should enter the code in the terminal. Open the terminal with Ctrl+Alt+t. Next, type:

sudo apt-get update

Press Enter. You will be asked for your password. Simply type it in and press Enter. For security reasons, it will not be echoed back, not even ****. Next:

sudo apt-get install git

Press Enter. Next:

git clone https://github.com/lwfinger/rtlwifi_new.git

Press Enter for this and after each subsequent command. Next:

cd rtlwifi_new
make
sudo make install

Reboot.


How would I broadcast a http website over WiFi?

The website is listening on a port, usually 80, on you laptop.  Assuming you can connect to "localhost" with a browser (on the laptop) and connect to the website, then all is well.

Your laptop has an ip address, such as 192.168.0.100 for example.  You should be able to use that address instead of localhost on your laptop, and you should also be able to use that same address from any computer on your LAN; ie, http://192.168.0.100, or whatever the actual address is.  For other computers that run linux, windows, or OSX, you can enter an alias in the hosts files so you can type a name, instead of the numbers, such as http://laptop.

If you want to connect from both inside and outside your LAN, you can use a dynamic IP address service that can direct requests to the website.

You can actually have multiple virtual websites running on the laptop either way.  I use dyndns, for which I pay a small amount each year.  I can access my server by using something like http://myname.homelinux.net, or many other URLs.


Prevent users from encrypting their home folders

If you don't want to remove the ecryptfs-utils package, then the easiest way to do this would be to remove the setuid bit on /sbin/mount.ecryptfs_private.

You should use a dpkg state override to make this setting persistent, like so:

dpkg-statoverride --add root root 0700 /sbin/mount.ecryptfs_private

This will ensure that ecryptfs-setup-private and ecryptfs-mount-private fail with an EPERM error for non-root users.

If this becomes a popular request, we could easily add this as a debconf question/option in the package.


GParted: Add disk space from another non-use disk

You need to shrink sda9, making a free space to appear. Then the problem falls down to the fact that the free space should be adjacent to sda8. So you need to repeatedly move every partition in between sda9 and sda8 so that free space would approach to sda8, until they become adjacent. And finally, just extend sda8 to the freespace.

I'd recommend to backup important data, as there's always risk of something going wrong, like electricity turning off, etc.

Also note: if one of those partition is the system you're currently running, then you need to do it from a live cd, like Ubuntu (idk whether it have gparted installed though), or Gparted live cd, because how otherwise the system would access its binaries, whilst partition being unmounted and resized.


How to install a pkg in 14.04 after failed repeated attempts following different approaches?

The answer to this question about removing and cleaning is:

Remove the offending library components.  By performing in reverse the steps that were done to initiate the various failed installs.
In this case remove the failed install instances and the failed repository$ sudo apt remove --purge wine$ sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/ --remove$ sudo apt update$ sudo apt upgrade$ sudo apt dist-upgrade
Perform fresh install from the default repository then address any dependency issues or errors.$ sudo apt install wineThe install process will show where the problems exist and allow the user to address the errors.  This will mean addressing each program one issue at a time.  The immediate error added to your question is the dependent installation of wine : Depends: wine1.6.  This is fixed with:$ sudo apt install wine1.6  This is where the actual problem lies.  The apt to install the depended package (as per the chat dialog) was the necessary library... the missing/broken package 1:1.6.2-0ubuntu4.  The specific error lines:The following packages have unmet dependencies:wine1.6 : Depends: wine1.6-i386 (= 1:1.6.2-0ubuntu4)E: Unable to correct problems, you have held broken packages.
Fix each broken or missing dependency one library... one library at a time until there are no more errors.

The repair process can be a timely one.  But the above is the steps.  The package manager actual provides for which packages are depended and need to be fixed in that manner.


No targets specified and no makefile found in Nominatim installation

You do not need to fix, you're just acted unfavorably.

Maybe it's safer if you delete the directory first and checking out again: git clone git@github.com:twain47/Nominatim.git and cd Nominatim

If checking out from git run:

./autogen.sh

Compile Nominatim:

./configure
make

Get OSM data and import:

./utils/setup.php --osm-file <your planet file> --all

Point your webserver to the ./website directory.

Source


Is there any note taking software designed for taking notes in school?

I quite like FreeMind for taking notes - it's a mind map application.

You can create bubbles for each topic, and put detailed notes in each, decorate the bubbles with icons, and break large clusters out into their own linked files.

FreeMind is written in Java and will work on Windows and OSX as well.

For more prosaic note taking I often find myself using a TiddlyWiki - this isn't an Ubuntu app per-se, it's just an HTML page with some clever JavaScript embedded in it. You can take notes and link between topics easily, much like Tomboy. I have an empty TiddlyWiki in my templates directory so that I can create a new one with a right-mouse click any time.

Both these approaches work well on any major operating system - and TiddlyWiki doesn't even need you to install anything.


Script for changing access rights of multiple files and directories?

You won't need a script. Try sudo chmod 777 -R /folderTreeBeginning to make /folderTreeBeginning completely world writable, readable, and exectuable. Look under man chmod for changing the values of 777 to what you need. Use the -R to make the change recursive, this is what you are looking for.


Why does the Synaptic package manager exit when it starts?

I just reformatted it's all good now. I have been meaning to do this anyway.


Why am I getting Gwibber notifications without Gwibber installed?

use sudo apt-get autoremove gwibber  to remove the package.

Also remove the data from .config folder.

rm ~/.config/gwibber


Software Center doesn't find apache, php

Try
apt-cache search apache

The name of package is apache2, so you may try
sudo apt-get install apache2


How to add the "shutdown applet" back after installing `ubuntu-desktop`

The package responsible for the buttons in the right upper corner is indicator-session. In order to get the buttons displayed, you also need indicator-applet-complete. Install these packages it with:

sudo apt-get --no-install-recommends install indicator-applet-complete indicator-session

After the installation, you need to re-login in the graphical session.

I've verified this by removing all packages related to the Ubuntu desktop on an Ubuntu 11.04 Live CD and by installing the server using tasksel. After that, I did exactly what you did: installing ubuntu-desktop by running:

sudo apt-get --no-install-recommends install ubuntu-desktop

You should not start X directly through startx, rather run sudo start gdm.


403 Forbidden error in sudo apt-get upgrade ubuntu 17.4

Yesterday I experienced the same problem with the bg. mirror on my 2 computers with Ubuntu. I tried to open http://bg.archive.ubuntu.com from the browser and received an error. Then I tried http://archive.ubuntu.com and I saw it's working.

So the solution was temporary switching from the local repository bg.archive.ubuntu.com to the central repository archive.ubuntu.com by editing of the file /etc/apt/sources.list. You can do this from the command line by using sed command in this way:

sudo sed 's/bg.archive.ubuntu.com/archive.ubuntu.com/g' /etc/apt/sources.list -i.bak

Later you can restore the original state by the command:

sudo mv /etc/apt/sources.list.bak /etc/apt/sources.list


No internet on Ubuntu Server 14.04 or 12.04

In a server, if you want a static IP address, which I recommend so that you can ssh and ftp into it, it is your responsibility to set the network details including DNS nameservers. I recommend you amend /etc/network/interfaces to something like this:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.1.125
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 192.168.1.1

Substitute your details here. Be sure to select an address outside the DHCP pool in the router, switch, etc. Get the system to re-read and use the changes:

sudo ifdown eth0 && sudo ifup eth0

Check:

ping -c3 192.168.1.1
ping -c3 www.ubuntu.com


You've got until Monday to make any changes and submit your app. Any submissions after Monday 00:01 UTC will not qualify for the contest, so you've still got more than 3 days to finish off your app!

Check out the countdown banner on the Ubuntu App Showdown site.


rsync has been interrupted - copy from beginning

In my opinion the better choice would be the --update option in rsync.

rsync --help | grep update

  -u, --update                skip files that are newer on the receiver

Also the --partial option is useful in such cases.

  --partial

  By default, rsync will delete any partially transferred file if the transfer is interrupted. In some circumstances it is more
  desirable  to  keep  partially transferred files. Using the --partial
  option tells rsync to keep the partial file which should make a
  subsequent transfer of the rest of the file much faster.

I would use --partial and --update together.


Mac Mini late 2012 14.10 Server won't boot after install

The system is unbootable because the Mac bootloader expects the EFI partition to be formatted as HFS+, the typical Mac filesystem, while the Ubuntu installer actually formats it as VFAT.

Refer to my earlier answer for detailed steps to install Ubuntu properly on a Mac.


Package operation failed while trying to install prozilla

I found the solution here and this works on Lubuntu 13.04


You need to use the Glib::Object::Introspection module, and load the Unity package through it to get access to the API for launchers. For indicators, you'd want to use Indicate for example. You'll also want to fail gracefully when they aren't available.


Just burn an Ubuntu DVD or create a bootable USB stick and boot from it. At the point the installer asks how to partionize you HDD, you choose manually then choose your SSD.


Apache2 failed to start on Ubuntu 14.04, log file is empty

Run netstat as superuser to actually see the process that is using port 80 (like it is telling you basically).

sudo netstat -antp | grep 80


Unity launcher and panel diappears when changing text colour in libreoffice

Fix of this bug has been released.  Checkout this on  Launchpad.


Convert odt to pdf via command line, WITHOUT exporting as pdf form

One possible solution is to use "unoconv" while setting the --export=ExportFormFields=false option.

unoconv -f pdf --export=ExportFormFields=false mydocument.odt

References:

http://linuxsleuthing.blogspot.fr/2012/01/unoconv-is-number-one.html
https://wiki.openoffice.org/wiki/API/Tutorials/PDF_export


Usually we have several supported Ubuntu release versions in parallel. These differ in stability, in the actuality of packages contained, and in the time span they will be supported.

Most stable are the LTS (long term support) releases, and least stable of course the lastest release that comes with up to date package version that may still have the one or other bug. LTS releases are supported for 5 years but the support for a normal release will end soon after a newer version was released.

For differences see: What's the difference between a Long Term Support Release and a Normal Release?

LTS-releases will get interim updates, mostly for support of newer hardware. A support for newer hardware can be installed to a LTS version later. At present this would be 16.04.2 point release. LTS point releases may come with a newer kernel. For 16.04.2 this would e.g. be the 16.10 kernel.

So if you are new to Ubuntu I would recommend you install the present stable LTS-release (i.e. 16.04.2 at present). Only very new hardware may be better supported with a still newer kernel we get with a latest Ubuntu release (i.e. 17.04).

Guides will stick to a LTS version rather than to a normal release cycle but usually changes are not so dramatic that they would make a guide entirely obsolete (except the switch to Unity from 10.04 to 12.04).


Landscape GUI failed to start after a reboot

Run this command on both landscape/0 and landscape-msg/0:

sudo lsctl status

Looks like the landscape services are down. Or at least the path from apache to them, which looks like this:

apache ---> haproxy ---> backend services (app, msg, ping, etc)


I am not using gnome, but you can do like this:
Open the directory where it has alerts sounds /usr/share/sounds/gnome/default/alerts (not sure about directory) as root and replace a sound file (for example glass.ogg) with a that one you want. Reboot your system and than choose Glass in sound settings.


Open Disks, it will tell you the drive model which you can then look up on the internet


Ubuntu 14.04 second monitor's screen overflowing

Check running the below command from your terminal window and see whether this helps,

Resetting an out-of-range resolution

rm ~/.config/monitors.xml

You can direct xrandr to set a different resolution like this:

$ xrandr --output LVDS --mode 1024x768
$ xrandr --output VGA1 --mode 1024x768

Hope this helps


How do I set command line mode vga=788 permanently?

grub.cfg is an auto generated file, hence the big warning at the top that says not to edit it.  Instead you need to edit /etc/default/grub.


Run a screen session on boot from rc.local

I think both -c parameters (su and bash) will have to be quoted at a minimum.

su - username -c "/usr/bin/screen -dmS test bash -c '/var/www/path/to/script/script.sh; exec bash'"

Also - is expected to be last and may not be desirable here (see man su).

A few more remarks. sudo could be a better choice for a one-shot command like yours, but not necessarily:

sudo -iu username /usr/bin/screen -dmS test bash -c '/var/www/path/to/script/script.sh; exec bash'

In particular, you can use one less level of quoting with sudo.

Another thing you want to be careful with is executing commands without absolute path in a privileged context. This holds for su (or sudo) but also for the path to bash in your command. You are doing it right with screen.

Just tested the following and it works nicely. I think the - is the main issue in your original line:

/bin/su username -c "/usr/bin/screen -dmS test bash -c '/home/username/test.sh; exec bash'"

Evil remark: why don't you give tmux a try? I have recently switched and never looked back. The only thing I needed to change immediately was the prefix key combination which in tmux defaults to Ctrl + B - back to GNU screen's Ctrl + A.

It allows splitting your window into an almost arbitrary number of panes (vertically and horizontally) and its configuration file format (including the one for the status par) is actually intelligible to humans. Of course tmux is as good as screen when you simply want to run some program/script not originally written as daemon in background. If you intend to interact with the terminal multiplexer, however, I warmly recommend tmux.


Configure Gedit to always open documents in new tab

This did the job in Ubuntu 18.04:

gsettings set org.gnome.gedit.preferences.ui show-tabs-mode 'always'

ref. configure gedit to always open in new window


Ubuntu 12.04: memory always above 80% and swap around 50-60%

You have many google extentions enabled, tabs or windows and firefox as well
You may have to watch why Chrome is using so much memory.

But I think you should shrink your swap. You have 3.8 memory installed and your swap is 3.8 gb.

Try this:
https://www.linux.com/news/software/applications/8208-all-about-linux-swap-space

If your swap is encrypted, then follow this guide: http://webcache.googleusercontent.com/search?q=cache%3awww.logilab.org/blogentry/29155&hl=en&tbo=d&strip=1

Edit: I think your CPU is just fine. Your ram is running out of space.
Edit 2: Backup your chrome data and install one fresh. However if you have too many apps running with your chrome, I'd check how to backup them properly before anything else.


How do I prevent the lp module from loading on boot?

Building a custom kernel is not necessary

This is my procedure (legacy app, virtualized in vmware player, needing access to parallel port dongle)

in order for the parallel port dongle to work, the Ubuntu user needs to be a member of the lp group. As root (or sudo):

vigr    (add user to group lp)
vigr -s (repeat)

Next, you need to prevent the kernel module lp from loading

Edit /etc/modules to ensure lp is not loaded at boot:

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

#lp
rtc

Blacklist lp module (Ubuntu 10 and later) to allow the player to have access to it.

Create a file: /etc/modprob.d/blacklist-vmware.conf

#/etc/modprob.d/blacklist-vmware.conf
blacklist lp

Execute the following to update boot image:

dpkg-reconfigure linux-image-$(uname -r)

Edit /etc/default/cups to look like this:

# Cups configure options

# LOAD_LP_MODULE: enable/disable to load "lp" parallel printer driver module
LOAD_LP_MODULE=no

Reboot and test!

lsmod | grep lp

(should be a null response)


Do this test from different sites in your infrastructure.

Install nmap like so,

sudo apt-get install nmap

and then try to scan the database server like so:

From localhost/same machine do

sudo nmap -sS 127.0.0.1

From the same network/other machine close by do (e.G.)

sudo nmap -sS 192.168.X.X

From the Internet do (e.G.)

 sudo nmap -sS 80.34.X.X

If the first and second test go well, you have a problem with your router. This problem is then not Ubuntu-related anymore, but a problem with the router you use to connect to the internet.

If the first test fails, your port is completly closed and you have to work on your mysql conf again.

If the first succeeds and the second one fails, recheck that mysql really listens to 3306. Do a

 sudo netstat -tlpn

Check that 0.0.0.0 is the source ip for port 3306/tcp. If that is the case you will have to recheck the settings with ufw. Disable the ufw for testing, to see if it makes a difference.


Creating File 1c9e:98ff for VKOM 3G Modem

Presumably you need to create a file with additional content (see you installation guide for details).

You can easily do that by opening a text editor, which would be Gedit in you default installation. Search for "gedit" or "text editor" in the Dash (press Win key to open).

Then you can copy & paste the content for this file there to then save the file by giving it the name 1c90e:98ff. Memorize the location (folder or path) you saved it for further installation steps.

To simply create an empty file open a terminal and type

> 1c90e:98ff

This will create an empty file in the current directory (usually /home/<yourname>/). This file can then be opened later with an editor to fill it with content.


Why won't Thunderbird report notifications to the indicator-applet on 12.04?

I have recently gotten these notifications to work. I'm not sure if this will work for everyone. I'm also not sure if this is a bug or not. It seems more like an oversight of forgotten software that should be installed by default. I installed the following packages to get everything (sound, bubble, messaging indicator) to work:

sudo apt-get install notification-daemon esound python-notify

Good luck to everyone else having problems with this!


Is there a faster way to check if a file is in use?

If you are using this as a lock, it will not work as neither lsof or fuser prevent race conditions.

The basic process that lsof does is trawl through all processes /proc/*/fs looking for open file descriptors. This is going to take time no matter what you do.

You can do this yourself, but it is not likely to be any faster as you have to check for every open process on the system.

If what you are doing is time critical, figure out another way to do it.

If you control the file through a program that you wrote; use a lock file.
If you are running some command that operates on the file, look and see what documentation that command/program offers and see if it can't make a lockfile. Failing that, see if it can't make a file with its PID inside it. Then you can look at /proc/<PID>/fs to see if your file is currently open or not. Looking at only one processes open file descriptors will be much faster then mapping across all of them.
Otherwise in order to help you I am going to need more information about what you are doing.

You gave more information in a comment that you want to determine if Firefox is running on a given system. The best way to do this is to look for Firefox's lock files. These are stored in default locations specified on the Mozilla wiki.

For example, on linux, have your program do the following:

open up the ~/.mozilla/firefox/ directory.
List all directories, filtering for directories ending in .default. (I think all profiles end with .default, if not just crawl into every directory.)
In each directory above, look for the existence of a file named lock or .parentlock. If you see one or both files, Firefox is open.

This algorithm ought to execute faster than what you do on windows currently.


Open the dash and type update manager will display your Update Manager.  Click the Settings button (bottom left)

You can set the frequency of updates and well as what you update as shown by the arrows in the picture.

Open the dash again and type startup applications

Make sure that update notifier is checked - this will then automatically run update manager according to your update frequency defined above.


restore Ubuntu's default settings without having to reinstall

You can restore gnome-related (not you video card, display, x-server, etc.) settings using:

rm -rf .gnome .gnome2 .gconf .gconfd .metacity

Here is a link to ubuntu forums which discusses the same: http://ubuntuforums.org/showthread.php?t=1060406


Installing Ubuntu 14.04 on Asus Zenbook (RAID)

The BIOS boot partition(s) must be created on the disk(s) not the RAID device.

One BIOS boot partition is enough for you as your system won't boot with one disk only.

Linux soft RAID works on partitions, not drives. So you'll have to create one partition for the BIOS boot and one for the RAID.

You could have to create a third partition. /boot can be on RAID 1, can't be on RAID 5, and I'm not sure about RAID 0 but it probably can't.


Create System Image(Steps to clone all partitions)

I'll post a way that doesn't use disk images. In this case the operation is a bit involved.

All told, you have about 40GB of data on a 750 GB disk. Making disk images of the full thing would be considerable waste of time and space.

What I'd recommend, given that the SSD is a much smaller disk, is copy the content and not the entire disk/partition:

Plan the layout of the new disk according to the disk usage. Example: 100GB for / (includes /home), 5 GB for swap, and the remaining ~150 GB for the NTFS partition.
Archive the content to an external drive (DVDs too small) with around 40GB of space.
To do this, boot to a live USB, connect your external disk and do:

sudo mount /dev/sda1 /mnt
sudo tar -zcf /media/some-disk/root.tar.gz -C /mnt .
sudo umount /mnt
sudo mount /dev/sda3 /mnt
sudo tar -zcf /media/some-disk/E.tar.gz -C /mnt .
sudo umount /mnt

Here /media/some-disk is where the external disk got mounted. We're creating compressed archives, which might save a bit of space, so you could make do with less than 40GB of free space on the disk.
Swap your disks, boot again to the live USB, use GParted or Disks or your preferred partition tool to make the corresponding partitions. Lets assume they're numbered the same way. Now we extract the files.

sudo mount /dev/sda3 /mnt
sudo tar -zxf /media/some-disk/E.tar.gz -C /mnt
sudo umount /mnt
sudo mount /dev/sda1 /mnt
sudo tar -zxf /media/some-disk/root.tar.gz -C /mnt

Note that I haven't unmounted /mnt and that it has the root filesystem mounted on it.
Now we set it up to boot correctly. This involves updating GRUB and the system's fstab. This is a regularly seen issue on AskUbuntu when the OP resizes their partitions. The steps are:

Note the UUIDs of the new root and swap partition. Use the blkid or lsblk commands. For example:

$ sudo blkid
/dev/sda1: UUID="d3504dc2-8f01-48f1-be05-d265110e2e73" TYPE="ext4
/dev/sda5: UUID="1895a8c0-f6ea-48fc-a074-ead385f6c7f3" TYPE="swap

chroot to the installed system:

for i in /dev /dev/pts /sys /proc; do mount --bind $i /mnt$i; done
chroot /mnt /bin/bash -l

In the chroot, update the fstab:

sudo nano /etc/fstab

Change the UUIDs of the root and swap partitions:

# / was on /dev/sda1 during installation
UUID=d3504dc2-8f01-48f1-be05-d265110e2e73 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=1895a8c0-f6ea-48fc-a074-ead385f6c7f3 none            swap    sw              0       0

Now install and update GRUB:

grub-install /dev/sda
update-grub

Exit the chroot and reboot:

exit
reboot

Done.


You need to force apt-get to reinstall the package files, since a regular 'install' command will take shortcuts.  You may also need to reinstall some of the other vim-related packages.  Try this:

sudo apt-get install --reinstall vim vim-common


check startup applications with a different user

So you want to get the list of startup applications of another user.
To do so, you must need to know the username and password of that user.
So, while you are using your account open terminal and type
su username
then terminal is waiting for you to type the password for that user.
Given below command is used to get list of startup applications by the specific user.
find /etc/init.d -user username -ls
If you do not get the list then use given below command to get the list of  autostart applications.
find ~/.config/autostart -user username -ls

  Note:
   replace username with the specific username

EDIT :

If you want to remove a specific application from autostart -
Suppose you want to remove teamviewer.desktop as shown in the list output then use.
rm -iv ~/.config/autostart/teamviewer.desktop

here -i will prompt before every removal.
-v will explain what is being done.


Internal Microphone not working on HP 625 in 12.04

Installing Pulse audio volume control from USC and fiddling with its settings got my mic working.


power failure during installation of ubuntu

It seems your GRUB may be crashed or booting files are missing , so repair your boot loader or GRUB from same ( ubuntu 13.04) pen drive.


How to decrease brightness even more in Ubuntu?

dconf approach

There are many options. But I am quite satisfied with using setting brightness value in dconf – this is a Ubuntu alternative to windows registry.

First, you have to enable Zoom options in settings / Universal access / Zoom /
Then install a nice tool to manipulate dconf and run it:

sudo apt install dconf-editor
dconf-editor # this can be done from your start menu too

Find /org/gnome/desktop/a11y/magnifier folder (either by clicking through the tree or by hitting Ctrl+f and typing "magnif".
Tweak brightness-red/green/blue values
Or launch these commands to reduce the brightness programatically:

gsettings set org.gnome.desktop.a11y.magnifier brightness-red -0.6
 gsettings set org.gnome.desktop.a11y.magnifier brightness-green -0.6
 gsettings set org.gnome.desktop.a11y.magnifier brightness-blue -0.6

/sys/class approach

If you are not happy with enabling Zoom, you may try to edit brightness file in a backlight folder. At my computer, I find it on /sys/class/backlight/intel_backlight/brightness

I check current brightness level:

$cat /sys/class/backlight/intel_backlight/brightness
400

I set the file to be editable:

sudo chmod o+w /sys/class/backlight/intel_backlight/brightness

I decrease the brightness to 100:

echo "100" > /sys/class/backlight/intel_backlight/brightness

The lowest level seems to be "1", if I try to put "0" or invalid input, write permisssion is denied.

xrandr approach

xrandr is a great tool to handle display properties. First run it without parameters to check out your monitor names. Ex: my monitor name is eDP-1

$ xrandr
Screen 0: minimum 320 x 200, current 5208 x 1080, maximum 8192 x 8192
eDP-1 connected primary 1368x768+3840+0 (normal left inverted right x axis y axis) 309mm x 173mm

Now you can put a float number to the brightness property (software only modification):

$xrandr --output eDP-1 --brightness 0.5

As of Ubuntu 18.10, it seems I could combine all three approaches independently.


How to throttle jigdo-lite's download rate

Had same question and found a workaround while on tdlp1. jigdo-lite (0.7.3 here) writes user choices in ~/.jigdo-lite, whitch contains a wgetOpts= string. Putting --limit-rate=xxx
there worked for me.
jigdo-lite have to be executed at least once first, but then it works. Wget man page also instruct about that option (lots of small files might not trigger the throttle efficiently)
Bye.

The Linux documentation project


MS teams sharescreen and blur background features

I just found this: https://gitlab.com/parrot_parrot/ms-teams-replace-background
I tested it, but I am having problems installing one of its requirements, tensorflow_gpu==1.15.3 ... I have a Python version superior to the one specified here, maybe that has something do to with it.
Still, think of this as a starting point for other's experiments, I will update this comment if I fix and make it work


According to man chfn, you should be able to control access to the GECOS data fields using the CHFN_RESTRICT setting in login.defs

CONFIGURATION
       The following configuration variables in /etc/login.defs change the
       behavior of this tool:

       CHFN_RESTRICT (string)
           This parameter specifies which values in the gecos field of the
           /etc/passwd file may be changed by regular users using the chfn
           program. It can be any combination of letters f, r, w, h, for Full
           name, Room number, Work phone, and Home phone, respectively. For
           backward compatibility, yes is equivalent to rwh and no is
           equivalent to frwh. If not specified, only the superuser can make
           any changes. The most restrictive setting is better achieved by not
           installing chfn SUID.


Extremely slow boot - ubuntu 12.04 64bit

I really have to say that it's very likely that your filesystem has been damaged or the upgrade really hosed key system files. I would highly recommend backing up your files and reinstalling as when a system is in such a state it's usually too much hassle to pinpoint the problem.

To back up your files, you can download Ubuntu and use a LiveCD to mount your Ubuntu partition in the file manager. Navigate to /home// and your files will be there for the taking. Back them up to a thumb drive, wipe the computer and reinstall, then move the files back.

Another task that might be beneficial is to make sure that your hard drive is not failing. You can use Ubuntu's Disk Utility: Select your hard drive, then select "SMART data". Perform a short test and see if it tells you that the drive is about to fail (if it has a few bad sectors it's not worth fretting about as it's not uncommon).


I think you should look at it this way:

                        1 2 3 4 5 6 7 8 9  <--position-- physical keys
Option "ButtonMapping" "1 9 3 4 5 6 7 8 2" <--function-- logical keys

The position that indicates the key id as reported by mouse (through driver). So it's up to the manufacturer how to order them, however most stick to common order.

Mouses still using the old protocols like PS2, it doesn't have a way store or tell info about available buttons and their functions. So X server can't tell you the id of each physical button, only by trying them using a tool like xev that shows the X events:

xev -event mouse

Or evtest that shows the raw events:

sudo evtest

The logical key are the ones actually mapped some where else for extra functions. At this level, X looks at them as: button1, button2, button3, button4,...,button24 and it does not know their function.

Official reference examples:

  7.  Configuration Examples

  This section shows some example InputDevice section for popular mice.
  All the examples assume that the mouse is connected to the PS/2 mouse
  port, and the OS supports the PS/2 mouse initialization.  It is also
  assumed that /dev/mouse is a link to the PS/2 mouse port.

  Logitech MouseMan+ has 4 buttons and a wheel. The following example
  makes the wheel movement available as the button 5 and 6.

  Section "InputDevice"
          Identifier      "MouseMan+"
          Driver          "mouse"
          Option          "Device"    "/dev/mouse"
          Option          "Protocol"  "MouseManPlusPS/2"
          Option          "Buttons"   "6"
          Option          "ZAxisMapping"      "5 6"
  EndSection

  You can change button number assignment using the xmodmap command
  AFTER you start the X server with the above configuration.  You may
  not like to use the wheel as the button 2 and rather want the side
  button (button 4) act like the button 2. You may also want to map the
  wheel movement to the button 4 and 5.  This can be done by the
  following command:

          xmodmap -e "pointer = 1 6 3 2 4 5"

  After this command is run, the correspondence between the buttons and
  button numbers will be as shown in the following table.

  Physical Buttons        Reported as:
  ------------------------------------
  1 Left Button             Button 1
  2 Wheel Button            Button 6
  3 Right Button            Button 3
  4 Side Button             Button 2
  5 Wheel Negative Move     Button 4
  6 Wheel Positive Move     Button 5

  Starting in the Xorg 6.9 release, you can also achieve this in your
  configuration file by adding this to the "InputDevice" section in
  xorg.conf:

          Option "ButtonMapping" "1 6 3 2 4 5"

  For the MS IntelliMouse Explorer which as a wheel and 5 buttons, you
  may have the following InputDevice section.

  Section "InputDevice"
          Identifier      "IntelliMouse Explorer"
          Driver          "mouse"
          Option          "Device"    "/dev/mouse"
          Option          "Protocol"  "ExplorerPS/2"
          Option          "Buttons"   "7"
          Option          "ZAxisMapping"      "6 7"
  EndSection

  The IntelliMouse Explorer has 5 buttons, thus, you should give "7" to
  the Buttons option if you want to map the wheel movement to buttons (6
  and 7).  With this configuration, the correspondence between the
  buttons and button numbers will be as follows:

  Physical Buttons        Reported as:
  ------------------------------------
  1 Left Button             Button 1
  2 Wheel Button            Button 2
  3 Right Button            Button 3
  4 Side Button 1           Button 4
  5 Side Button 2           Button 5
  6 Wheel Negative Move     Button 6
  7 Wheel Positive Move     Button 7

  You can change button number assignment using xmodmap AFTER you
  started the X server with the above configuration.

          xmodmap -e "pointer = 1 2 3 4 7 5 6"

  The above command will moves the side button 2 to the button 7 and
  make the wheel movement reported as the button 5 and 6. See the table
  below.

  Physical Buttons        Reported as:
  ------------------------------------
  1 Left Button             Button 1
  2 Wheel Button            Button 2
  3 Right Button            Button 3
  4 Side Button 1           Button 4
  5 Side Button 2           Button 7
  6 Wheel Negative Move     Button 5
  7 Wheel Positive Move     Button 6

  For the A4 Tech WinEasy mouse which has two wheels and 3 buttons, you
  may have the following InputDevice section.

  Section "InputDevice"
          Identifier      "WinEasy"
          Driver          "mouse"
          Option          "Device"    "/dev/mouse"
          Option          "Protocol"  "IMPS/2"
          Option          "Buttons"   "7"
          Option          "ZAxisMapping"      "4 5 6 7"
  EndSection

  The movement of the first wheel is mapped to the button 4 and 5. The
  second wheel's movement will be reported as the buttons 6 and 7.

  The Kensington Expert mouse is really a trackball. It has 4 buttons
  arranged in a rectangle around the ball.

Source: ftp://ftp.x.org/pub/current/doc/mouse.txt


In what cases should I install (and configure) Postfix as a desktop user?

Postfix is a Mail Transfer Agent, so broadly it can accept mail to send to other people, and it can deliver mail locally.

Installing Postfix on a desktop/laptop/netbook end-user machine is something people normally do when they want to be able to queue up mail on the local machine when it's disconnected, for later transmission to another server.  For instance, if you want cron scripts to be able to send mail off your desktop to your "real" address, this would be a good reason to install Postfix.  (And this is the reason it's pulled in by things like mdadm and devscripts.)  You can find descriptions of how for instance to get Postfix to relay your mail through Gmail.  This is case #1 in your list.

Secondarily Postfix is useful when you want to deliver mail to local mailboxes.  It is fairly rare these days to do this onto your desktop, but certainly still valid.

In case #2 Evolution will take care of spooling and transmitting messages itself.

In case #3 with Gmail, normally you'll use its web interface.  If you want to use a mail client like say mutt with it, or you want to be able to send mail from the command line to gmail, postfix would be a good addition.


LVM raid5 support is rather new and experimental.  As such, it isn't supported in 12.04.  The conventional thing to do is to use mdadm to create a raid array, then use lvm to carve that up into logical volumes.


How to run Civilization III (Game of the Year Edition) under Lubuntu 16.04 in WINE?

My error messages probably referred to the USB-CD/DVD-Drive I used. On a Laptop (MacbookPro8,3 from 2011, Lubuntu 16.04) with built-in drive the game works out of the box.

It does not work on my Shuttle Barebone PC with two Apple cinema displays hooked to it. Probably a graphics card/driver issue (after the NoCD-patch is applied the /dev/sg0-messages are gone).

It does also not work on my Acer Aspire One D270 with Lubuntu 14.04, I think because of lacking DirectX-support, although there is no message in terminal (as in the Shuttle case).

My game is a German one, probably version 1.16. This is labeled "garbage" on WineHQ but with older versions of WINE. It now works on the old MacbookPro with Lubuntu 16.04, although I have not been testing longer term.

A good page for finding patches relating to different versions of the game is this: https://www.civ-wiki.de/wiki/Versionen_(Civ3).

A summary of patches including an official NoCD-patch is in the downloadlink at the bottom of the page here.

I first applied the patch for 1.29f and then copied the Civilization3.exe from the Civilization 3 PC Games Patch ohne Conquest von v1.21f (d).zip into my directory.

Now, the game runs without CD.

To fix a graphics issue after the intro (cropped screen) I unchecked two options in winefcg under graphics: allow decoration and control by window manager. I also run it in Win XP mode.


This is probably simpler to do with a while loop instead of -exec:

find . -type f -name -name '*.rar' -print0 |
    while IFS= read -r -d '' file; do
        dir=$(dirname "$file")
        rar=$(basename "$file")
        cd "$dir"
        unrar -e "$rar" && rm "$rar"
        cd -
    done


What's the best way to make a program update from a new PPA (when an old one is no longer maintained)?

As far as my experience has gone since asking the question the simplest answer is: you just add a new PPA and let it update the package(s). The program settings stay untouched as per the usual update (because it is basically the usual update - the only thing that changes is the new source of the package(s)).


XKB will be appropriate for Xwindows or Wayland GUIs.  It will not affect virtual consoles, but GUI terminal emulators will be fine.  For XKB background I'll point you to some (overview, system vs user) .. other (custom options) .. answers (custom rules).

The following will allow you to add a new option like caps:myf13 to an existing XKB layout with whatever tools you'd normally use (setxkbmap, localectl settings, GNOME panel, etc).

Defining the option

Existing XKB capslock options are listed in /usr/share/X11/xkb/rules/evdev.lst.  Looking at the corresponding options in the .../rules/evdev file, you can see these options are all loaded from the file .../symbols/capslock.  All of them are modifier keys, which probably aren't the best example, but caps:backspace might be a good comparison.  Looking at the file, we find the stanza defining this option:

hidden partial modifier_keys
xkb_symbols "backspace" {
    key <CAPS> { [ BackSpace ] };
};

grep'ing through the other symbol files, we can see that the F13 symbol is simply F13.  The new option stanza might look like this:

hidden partial modifier_keys
xkb_symbols "myf13" {
    key <CAPS> { [ F13 ] };
};

As you can see, we only changed the name of the option and the symbol assigned to the key.

Hooking it up

The only thing left to do is hook up the new stanza.  On a basic Xwindows system, using commandline tools like setxkbmap and xkbcomp, a custom user location will do fine; for GNOME, KDE or a Wayland system you'll need to make your changes in the system XKB database.

As an example for system changes (you will need sudo access to create or edit these files):

Place the custom stanza in a new symbol file, eg /usr/share/X11/xkb/symbols/mycaps.
Add this to /usr/share/X11/xkb/rules/evdev just below the line for caps:backspace:

  caps:myf13   =   +mycaps(myf13)

... add to /usr/share/X11/xkb/rules/evdev.lst:

  caps:myf13      Caps Lock is F13

... add to /usr/share/X11/xkb/rules/evdev.xml:

      <option>
        <configItem>
          <name>caps:myf13</name>
          <description>Caps Lock is F13</description>
        </configItem>
      </option>

Finally, make backups of your .../rules/evdev* files, or create a patch file.  Your changes will be overwritten whenever the xkb-data package is updated.  If you saved your modification stanza into the .../symbols/capslock file, it will need to be backed up as well.

Once these changes are made, you should be able to set this option as if it were any other XKB option.  You may need to restart any GNOME/KDE session for control panels to pick up the changes, but tools like setxkbmap should find it immediately: setxkbmap -option caps:myf13


How to replace line with 3 lines / add 2 before found / add 2 before 1 from end

These might work for you (they all achieve the same thing!):

 sed '/^exit 0/i\echo deadline > /sys/block/sda/queue/scheduler\necho 1 > /sys/block/sda/queue/iosched/fifo_batch' file

Search for line beginning exit 0 and insert 2 lines.

Or:

 sed '$i\echo deadline > /sys/block/sda/queue/scheduler\necho 1 > /sys/block/sda/queue/iosched/fifo_batch' file

Insert 2 lines before last line of file.

Or:

 sed '$c\echo deadline > /sys/block/sda/queue/scheduler\necho 1 > /sys/block/sda/queue/iosched/fifo_batch\nexit 0' file

Change last line of file to 3 lines.


How to remove the Ubuntu Software Center Suggestions from the Dash

Install dconf-tools sudo apt-get install dconf-tools then run dconf-editor. Go to desktop/unity/lenses/applications and uncheck display available apps.

Lets hope they make this easier in future versions.


Video on Gooddrama not playing "You have no flash plugin installed"

I visited the  site  adobe.com/software/flash/about  and  checked the adobe version, it said:Flash Player not installed or enabled. Then I installed the 11.2 Flash version and the video  from the site 'Gooddrama' started playing.


Maybe your keyboard settings got a little out of whack. Try this:

Open your System Settings, either through the Dash of that little cog on the top right corner of your desktop:

Open the keyboard settings:

Look at the Repeat Keys settings (under the mouse cursor). Try sliding the "Delay" option towards "Long". You may also like to set "Speed" more closely to "Slow". An extreme alternative would be to disable "Key presses repeat when key is held down", which would require you to press a key once for every sequential repetition you want of it.


Problems installing Ubuntu server and desktop

You may have a corrupted CD/DVD in which you burned Ubuntu on. Try re-downloading the iso files and burn them again.

Tranlation to spanish:

A lo mejor tienes un disco CD/DVD malo. Baje el iso de Ubuntu otra vez, y quemalo o tostarlo otra vez.

If you can't install using the CD/DVD, try using the USB thumbdrive method

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

Spanish:

Si no se puede instalar usando el CD / DVD, pruebe a utilizar el método de USB pendrive.


How to get out of "sudo -s" command in Terminal?

Press Ctrl+D will log you out of Super User and return you to normal user status. Alternatively, you can type exit


There is no spotify client in the official repositories.

However if you are using 14.04 you can add the repository by going

Update manager --> Settings

Select the "Other Software" tab click on add and add this

deb http://repository.spotify.com stable non-free

Now you need to add the keys so open a terminal and enter

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 94558F59

Enter your password when asked.

Now enter these commands:

sudo apt-get update

sudo apt-get install spotify-client

source here


Right click anywhere inside the terminal, and you'll get a similar pop up menu that lets you reenable it.

If you're running an application like vi you won't get this menu.  In that case exit or suspend the application first, then it should work.  (I.e. ^Z (control-Z) to suspend, then right click to get this menu, and select Show MenuBar, then finally enter % and ↵ Enter to resume.)


Restore Boot Partition from running ubuntu

I managed to get past this error by settings GRUB_ENABLE_CRYPTODISK=y, i.e. y instead of 1, despite what the error message says.

I found this solution on the ArchWiki.


You cannot run them inside directly using Ubuntu (or any Linux distro for that matter) as they are designed to run on Windows DOS OS, but you CAN run some EXE's using this Ubuntu program called WINE for Linux.

Repeating again, the scope of wine is limited. The EXE may not run or may run but not work correctly.


Unity may still have problems with Java applications like:

Open/LibreOffice
IntelliJ idea
eclipse
rssowl

especially when switching window-hints and floating tool bars are involved.
It might help to try another, more standards-conforming window manager, like xfwm4 or metacity.


service lightdm modifing /etc/alternatives/x86_64-linux-gnu_gl_conf

I was having the same issue with Dell Vostro 1500 (GeForce 8400M GS, the nvidia-340 driver) after updating to the recent Ubuntu 16.04.2. It took me almost a day to find out.

It turned out that after

setting the alternatives back auto (i.e. nvidia proprietary drivers)
running ldconfig
and manually inserting the DRI modules (sudo modprobe nvidia_340 nvidia_340_uvm nvidiafb)

startx run from commandline started X correctly with the proprietary driver. Also the display manager when run manually (not as a systemd service) was using the proprietary driver.

After some more investigation it turned out that the culprit was the /usr/bin/gpu-manager (run via /lib/systemd/system/gpu-manager.service). Its log /var/log/gpu-manager.log was saying:

Looking for nvidia modules in /lib/modules/4.4.0-72-generic/updates/dkms
Found nvidia module: nvidia_340_uvm.ko
Is nvidia loaded? yes
Was nvidia unloaded? no
Is nvidia blacklisted? yes

And eventually it updated the alternatives to the mesa/ld.so.conf.

From this point on it was easy to find out that the nvidia-340 module was indeed blacklisted in /etc/modprobe.d/bumblebee.conf

This was apparently a leftover from a previous driver nvidia-304, which was using bumblebee. The nvidia-340 driver doesn't use bumblebee.

So simply deleting /etc/modprobe.d/bumblebee.conf solved the problem.
The other alternative is to purge delete previous nvidia driver installation, as other tutorials say. Obviously I haven't sufficiently purged the previous driver installation...


exiftool is also very powerful.

Exiftool


I get only a GRUB terminal after installing Ubuntu alongside Windows 8. How do I fix this?

If your goal is to fix Windows, this may help you, or at the very least it will save someone else about 6 hours of googling:

I had the same problem after trying to dual-boot Windows 8 and Ubuntu 14.04 then deleting the Ubuntu partitions. I tried using the usual bootrec /fixmbr, /fixboot, etc.

None of this worked. The problem is that you have to first move to the EFI partition, rename the BCD file, then run the bootrec /fixmbr, bootrec /fixboot, and bootrec /rebuildbcd commands.

See this tutorial: http://www.fixedbyvonnie.com/2013/12/how-to-repair-the-efi-bootloader-in-windows-8/#.VAQWdDJdU4o

Then after step 3:

Enter: bootrec /fixmbr [Press Enter]
Enter: bootrec /fixboot [Press Enter]
Enter: bootrec /rebuildbcd [Press Enter]

It will ask you which installations you want to rebuild the BCD file for. I just entered All. Then I restarted and all was back to normal. Hope that helps.


Desktop icon view issues in Kubuntu 16.04

I've found a solution. For future reference here is what I did:
Right click on Desktop -> Configure Desktop. Select the Icons tab and deselect the text file preview. For some reason, it generates a conflict with the .desktop files preview thus showing the Home icon like the picture above. The other previews can all be enabled except for that (if you are using a Desktop view layout). Hope it helps. Cheers.


Permission denied error while creating file by using script file

I'd personally use tee which you can run as root to append to files:

echo "blacklist snd_hda_intel" | sudo tee -a /etc/modprobe.d/sound.blacklist.conf

But that might not be expected half-way through a script. If you're doing things that require root privileges, it might —and I'm not saying this for certain— make more sense to only let root run the script by sticking this near the top of the script:

if [[ $EUID -ne 0 ]]; then
  echo "Only root can run this. Run again with sudo" 2>&1
  exit 1
fi


No installation candidate for libopenmpi2

Quite likely issue 1817, which as the final note says is "quite weird" in that it appears to be an installation order issue. The suggested fix (please read the issue for more detail):
$ sudo dpkg --remove --force-all libopenmpi-dev
$ sudo apt install libopenmpi-dev


all the previous version of skype has been outdated on July,1st 2017. So in order to install skype for linux download .deb file from link https://www.skype.com/en/download-skype/skype-for-linux/ and after download

Go to the download directory and open terminal
Type command sudo dpkg -i skypeforlinux-64.deb

All done !!


Sending email via gmail smtp ubuntu 18.04 php

you will have to install sendmail and php-mail packages for the emails on PHP to work


Software updater just show the menu not the window

I would first try to do an update/upgrade in a Terminal.

sudo apt-get update
sudo apt-get upgrade

I personally do prefer 'synaptic' as application for program installation and update/upgrade Wikipedia: Synaptic

sudo apt-get install synaptic

If you are lucky, your problem is solved with an update/upgrade via a Terminal.

If an update/upgrade doesn't help, you could try to reset unity to default settings. One way to do this is...

sudo apt-get install unity-tweak-tool
unity-tweak-tool --reset-unity

Found here... How do I reset my Unity configuration?


Permission error in virtual machine manager

I had the same issue as well. I fixed it by doing the following:

Run virt-manager with sudo:

        sudo virt-manager

Attempt to create your VM. When the error dialog appears, click Yes to correct the error.

What this does is change the user and group of your image file (to libvirt-qemu:libvirt-qemu if that's your virt-manager user). You could also sudo chown libvirt-qemu:libvirt-qemu <image-file> if you want to do it manually.
When you get to the next step, cancel the creation process and close virt-manager.
Now relaunch virt-manager without sudo and attempt to create your VM again.


Easy way to download package from a PPA?

If you know the package name you can use apt to either get the source or the binary:

apt-get download packageName

Will download the binary to the current directory.

apt-get source packageName

Will download the source code of packageName to the current directory.


Upgrade-grub and boot-repair fails. Unable to boot one of my Linux systems, is there a way around?

The 10.04 Ubuntu and the 12.04 Xubuntu grub2 failed for different reasons, so I used the third Linux system to solve the problem, see os-prober fails to identify a linux system so I need to write a custom grub2 menu entry as a workaround, how? for details.


The "segmentation fault" error message means that there is most likely a bug in the program/command you executed, in this case "apt-key". It is probably a good idea to report the bug so that it can be fixed:
How do I report a bug?


How can I create a new Ubuntu desktop environment/window manager?

Read this to understand the difference: What is the difference between a desktop environment and a window manager?

You pick a window manager or a desktopmanager you like and download the source.
Edit the source files
Package it under a new name
Install it with that new name

Each of these options can be fairly difficult and require expertise. For instance: without thorough knowledge on coding software you are not going to get far.

Setting up your new manager is fairly easy:

As a starter you can create a custom xWindows session.

  This page will teach you how to design your own personalized X (graphical desktop) sessions by editing shell scripts. Desktop environments like GNOME often have their own session managers. These session managers allow you to specify which additional programs will be loaded at the beginning of your session by providing a graphical interface. However, knowing how to create X session scripts can grant you greater flexibility in customizing your desktop environment whether you use GNOME, KDE, XFCE, Openbox or other lesser-known window managers like Blackbox or FVWM. Furthermore, being able to create X session scripts allows you to run a graphical desktop even if the graphical login manager, GDM, is broken or not installed.

  Content:

  Anatomy of a simple X session script
  How to create a X session script
  Sample ~/.xinitrc File
  LightDM configuration


The tilde (~) is interpreted by your shell, as a short form of $HOME.

  Try the following commands:

echo ~
HOME=foo
echo ~

  This should first print your real home directory and afterwards "foo", as you set $HOME` to that.

  The default value of $HOME comes from you system configuration. Use getent passwd to list all known users and their home directories. Depending on your system configuration those entries might come from /etc/passwd or any remote directory service.

  If you only want to temporarily redefine your home directory, just set another $HOME.

  If you permanently want to change it you have to change the passwd entry, e.g. by manually editing /etc/passwd.

Taken from this U&L question.


how to completely uninstall everything from ubuntu 14.10

If you are going to be doing such a wipe as that, just backing up and reinstalling the OS is the easiest way. You could go into the Software Centre and look at what is installed, there, and uninstall based on History or what you have installed. There isn't a script for everything! ;D


Ctrl + Super + Left/Right not working in Ubuntu 16.04

The grid plugin of compiz is responsible for window placement via Ctrl+Super+Arrow Right/Left. For whatever reason, you may not have it enabled.

Install Compiz Config Settings Manager with sudo apt-get install  compizconfig-settings-manager and ensure that Grid is checked just like in the screenshot below


You'll need libc-bin version 2.15-0ubuntu10.2 to go along with your libc6 2.15-0ubuntu10.2 package. You probably need a few others too- if you have libc6-dev or libc6-dbg, those also need to match the libc6 version exactly so they'll need to be downgraded at the same time.

2.15-0ubuntu10.2 is the version of these packages in Ubuntu Precise, and 2.15-0ubuntu10.4 is the current version in precise-updates. So one way for you to get all those packages (since you surely have the standard precise apt sources too) is:

apt-get install $(for pkg in libc6 libc-bin libc6-dev libc6-dbg; do \
    dpkg -s "$pkg" &> /dev/null && echo "${pkg}=2.15-0ubuntu10.2"; \
done)

You might have other packages which require an exact libc6 version.

The changes between 2.15-0ubuntu10.2 and 2.15-0ubuntu10.4 can be found here.

However, it's not at all obvious to me that you really actually need the ...10.2 version. It's more likely that whoever made your script just grabbed the version of libc6 that was current in ubuntu at the time and sent it out as "libc-ubuntu.deb". But the version of libc6 you already have is, in all likelihood, perfectly fine for the binaries in their package. Debian and Ubuntu package updates to stable distributions, like Precise, are extremely careful to avoid making changes to library ABIs or APIs or other documented interfaces, so if the ...10.2 version works and the ...10.4 version doesn't, that's probably a bug that Ubuntu will want to know about. I would try just installing your Steam package(s?) without bothering with the libc-ubuntu.deb file.


Accidentally unchecked Unity in system settings - blank desktop?

I'm not sure how you managed to run nautilus, but either way:

Open a nautilus window and press ctrl+l.
Type in /usr/share/applications in the location bar, and press enter.
Find the launcher for ccsm(Compiz Config Settings Manager).
Run it by double clicking, and enable Unity from within the window again.

Unity should start again (if compiz is actually running). If it is not, then from here you have two options:

Either:

Log out and log in again.

Or:

Find the launcher for the terminal.

Open the terminal and type in unity & disown (the whole line highlighted in grey including &).
This should get you Unity again, and from here you should have no issues.


Dual boot Ubuntu MATE and Mac WITHOUT using rEFIt or rEFInd

Sure you can!

I have an unconventional installation with 3 partitions containing two Yosemite-10.10 and RecoveryHD on an external USB drive; it boots without trouble.

Since at boot time MacBios sees ALL bootable partitions present, putting another bootable partition on a HDD is similar to external USB.

Have a look at Macbook revival playground.


dpkg: error processing package tuxcut (--remove):

Press Ctrl+Alt+T and do:

sudo touch /usr/bin/run-tuxcut
sudo apt purge tuxcat

Enjoy!

What do these commands mean?

You created an empty file called run-tuxcut and re-run sudo apt purge tuxcat. If the file exists then dpkg continues doing the purge. If not, shows your above-mentioned error.


Yes, refer to this page. You will need to create the bootable USB stick on another machine first though (or the same machine if it is already running Windows).


Windows 10 and Ubuntu 14.04 using Burg bootloader

The last I heard, BURG was a BIOS-only boot loader. You appear to have an EFI-based installation of Windows. As such, BURG will be useless for booting Windows, or for controlling the overall boot process; the best you can do with BURG is to use it to select your Linux kernel, and leave the Windows-vs-Ubuntu boot choice to something else. I tried to track down more concrete information on this, but the best I found was package information at https://launchpad.net/~n-muench/+archive/ubuntu/burg/+packages, which indicates no EFI package for BURG. I couldn't even find an active home page for BURG, which could mean it's been abandoned (or maybe Google's just doing a very bad job on this search).

If you want to use BURG because of its graphical nature, you may want to look into my rEFInd boot manager instead. Like BURG, rEFInd is graphics-oriented and themable, although the themes are not compatible. Unlike BURG, rEFInd is designed for EFI-based computers, which yours seems to be.

Note that if you're currently booting Ubuntu via BURG, installing rEFInd may be tricky, because you're booting Ubuntu in BIOS mode. You may need to create and boot via a USB flash drive or CD-R image of rEFInd (downloadable images are available on the rEFInd downloads page). Once you boot in this way, you'll be in EFI mode, and can install the rEFInd PPA or Debian package. Alternatively, you can install rEFInd from Windows -- but the procedure for doing that is more tedious than the Ubuntu installation procedure, particularly if Secure Boot is active on your computer.


If you have a local web server you can use info2www.

dwww is a frontend for info2www (and some other packages) that lets you  search and read all sorts of local docs (including info and man pages) via a local web server.


Which version of Ubuntu for Raspberry Pi should I download?

Raspberry Pi preinstalled Ubuntu 20.10 Desktop and preinstalled Ubuntu 20.10 Server images are available from ubuntu.com. The preinstalled images allow you to unpack a preinstalled version of Ubuntu onto a target device.
Download the first link in your question. It is the official Ubuntu 16.04 image for Raspberry Pi 2 at the ARM/Raspberry Pi - Ubuntu Wiki webpage. The instructions for installing this image are at the same webpage.
Official images
armhf

Raspberry Pi 2: ubuntu-18.04-preinstalled-server-armhf+raspi2.img.xz (4G image, 402MB compressed)

Raspberry Pi 3B/3B+: ubuntu-18.04.2-preinstalled-server-armhf+raspi3.img.xz (4G image, 419MB compressed)

Ubuntu MATE for Raspberry Pi 2/3

Raspberry Pi 4: Ubuntu 19.10 Raspberry Pi 32-bit and 64-bit preinstalled images (raspi3) now support the Raspberry Pi 4 platform out of the box. You can install Ubuntu Server + desktop environment (optional) on a Raspberry Pi 4 by following the instructions in this answer.

Further releases can be found at http://cdimage.ubuntu.com/ubuntu/releases/. Please note that even though these images are labelled "+raspi3" they are compatible with the Raspberry Pi 2 and 3 (and 4 in the case of 19.10 and later.

arm64

Raspberry Pi 3B/3B+: ubuntu-18.04.2-preinstalled-server-arm64+raspi3.img.xz (4G image, 419MB compressed)

The generic arm64 ISO images can be used with the Raspberry Pi 3. Instructions for booting these are here.

Login username is "ubuntu", password is "ubuntu". You will be asked to change the password on first login.
Update: Canonical has released official [Ubuntu Core 16 and Core 18 images for Raspberry Pi 3. The instructions for installing it are at Install Ubuntu Core on a Raspberry Pi 2 or 3. As the wiki says: Snappy Ubuntu Core is a new rendition of Ubuntu with transactional updates - a minimal server image with the same libraries as today’s Ubuntu, but applications are provided through a simpler mechanism. A new release of Ubuntu Core is released every 2 years on even numbered years (2016, 2018, etc.).

Ubuntu Core 16 is based on Ubuntu 16.04, and is supported for 5 years.

Ubuntu Core 18 is based on Ubuntu 18.04, and is supported for 10 years.

Ubuntu MATE 16.04 has fully working bluetooth and wifi on the Raspberry Pi 3.
The Raspberry Pi image for Ubuntu 14.04 is no longer maintained. Please use the more recent images instead.
Raspberry Pi packages
Although the majority of the Raspberry Pi cloud/server image works like any other Ubuntu system, there are a few packages in all currently supported versions of Ubuntu that you may not be familiar with.

linux-firmware-raspi2 - GPU firmware bootloader files and WiFi firmware configuration files
linux-raspi2 (linux-image-raspi2) - Linux kernel with patches from https://github.com/raspberrypi/linux
u-boot-rpi - Provides the various uboot* binaries under /boot/firmware
flash-kernel - Automatically copies the latest kernel, dtb file and u-boot script to the Pi's FAT-formatted GPU firmware partition.


libre office word completion not working

I think there is a bug. To get the word completion to work, I need to do the following:

start Write
disable 'word completion' and 'collect words'
start writing (maybe 6-9 words)
enable both 'word completion' and 'collect words'

VOILA - Now it works

I don't remember my libre office version, but I'm running Ubuntu-gnome 14.04 with Finnish spelling (Voikko) installed on libre office.


Install the dependencies

Run in the terminal:

sudo apt-get install -f

This will fulfil the dependencies missing - dpkg isn't capable of doing this. It will also configure (finish) the installation of Fern-Wifi-Cracker_1.6_all.deb automatically.


There is no direct mapping between IPv4 and IPv6 addresses. The most reliable way I can think of (which requires you to be on the same network as the IPv4 node) is to get the MAC address for the IP, and construct a link-local EUI-64-based address from it. That is, IPv6 nodes will almost always automatically configure a MAC-based link-local address, so this should work in most cases.

The following quick-and-dirty example script works on Ubuntu Xenial (16.04) as long as the python3-netaddr package is installed. It doesn't seem to work on Trusty (14.04) since the netaddr library is missing some of the required functionality.

#!/bin/bash -e

IP=$1
ping -c 1 $1 > /dev/null 2> /dev/null
MAC=$(arp -an $1 | awk '{ print $4 }')
IFACE=$(arp -an $1 | awk '{ print $7 }')

python3 -c "
from netaddr import IPAddress
from netaddr.eui import EUI
mac = EUI(\"$MAC\")
ip = mac.ipv6(IPAddress('fe80::'))
print('{ip}%{iface}'.format(ip=ip, iface=\"$IFACE\"))"

Example usage (assuming you pasted the contents into ipv4-to-ipv6.sh and did a chmod +x ipv4-to-ipv6.sh):

./ipv4-to-ipv6.sh 192.168.0.1
fe80::224:b4ff:fe9c:1329%eth0

Note that this is a link-local address must be scoped to a particular link in order to be useful, so requires the %<interface> to be usable in most application. If your hosts have a global unicast prefix on this network as well, they would be probably be reachable using the MAC-based address there, too. (you could, for example, change the ip = mac.ipv6(...) line to use your global prefix, and that should work.)


for sure, there is a skype-client for linux-based systems!

it is even available in the repositories, so it integrates in your package system and will be updated like all the other software in one place! - please have a look at this question: How do I install Skype?

MS Office is not available for Linux-based systems but you can try to install the windows-version via Wine.

it might get a bit tricky, so please read this questions first:
Can I install Microsoft Office? If so, how?
Installing MS Office 2013 on Ubuntu 12.04 LTS

although i suggest you to try LibreOffice (it is installed by default and nearly equal featured as MS Office) and maybe also the free standardized odf-format!
IMHO most people don't need MS Office anyway... they just want a familiar GUI: so if you like the WinXP/2003-look you will love LibreOffice, if you want the Win7/2007-look maybe give WPS Office a try for a native office suite: Can Kingsoft Office be installed?


system does not beep while taking screenshots in scrot

I'm not familiar with lubuntu per-se, but at least on my version of ubuntu, you need to enable pcspkr module: modprobe pcspkr - you may need to do that with sudo and may want to add it to /etc/modules

then again, i may be completely off the mark for your use case. good luck.


Problem with crontab, script runs when executed from command

Try changing your cron command to

bash -c '/home/user/scripts/backupDB.sh && echo "Backup Successful: $(date)" >> /home/user/tmp/mybackup.log'

I have found wrapping things in bash has helped setup environment values in the past. You might even be able to dump parts of your script as a result.


Ubuntu menu and applications bar gone, and some programs too

Get to a TTY (Control+Alt+F1), check if ubuntu-desktop is installed:

$ apt-cache policy ubuntu-desktop
ubuntu-desktop:
  Installed: (none)
  Candidate: 1.299
  Version table:
     1.299 0
        500 http://archive.ubuntu.com/ubuntu/ raring/main amd64 Packages

In my case it is not. I assume you've triggered a cascade removal of certain packages and that has nuked Unity. To fix, just reinstall ubuntu-desktop and all should be fixed.

sudo apt-get install ubuntu-desktop


Protecting samba shares with ubuntu 10.04

There are many things you can do to secure samba from passwords to kerberos.

First, to access the share, you will be using a user name and password configured on the samba server.

I assume you already have a (login) user.

You then assign a samba password to the user

sudo smbpasswd -a username
sudo smbpasswd -e username

You then define your shares in /etc/samba/smb.conf

sudo -e /etc/samba/smb.conf

gksu gedit /etc/samba/smb.conf

In the section where you define your shared directory

[private]
comment = private share
path = /path/to/share/point
browseable = no
read only = no
guest ok = no

After making those edits, restart the samba server.

sudo service samba restart

There are a number of security features for samba, see also

Ubuntu Server Guide Securing Samba

Ubuntu Community Wiki Samba Server Guide


unable to mount sd card from sony camera to ubuntu 16.04.1 system

To gain access to your sd card, just install the exFAT drivers (not installed by default):

sudo apt-get install exfat-fuse exfat-utils


ffmpeg: capture area outside screen size

Your screen has a height of 768 pixels. Your capture area has a height of 288 pixels. Your y offset is 500 pixels. 288+500=788. This exceeds your screen height. With capture area height of 288 the max y offset is 480.


how to get dropped files on unitys launcher in my quickly app?

The command in your .desktop file's Exec line needs to contain a %f or %u.

When you drop a file on a launcher icon that gets replaces by the file name/URL and the resulting command is run.


Bash - executing commands in current shell

It is because you don't terminate the second line: { cmd1; cmd2; } is correct. The semicolon means "end of command".


How can I have Windows and Ubuntu on my computer?

You can make two partitions on your disk (three if you want swap partition for ubuntu into a different partition than the OS's).
You install windows on one partition and ubuntu on the other.
I suggest this order because in my experience windows installs his bootloader without asking the user if he wants to, and this would overwrite grub installed by ubuntu.
You can always restore grub, but it's faster if you do not have to!
Suppose you have installed ubuntu and windows and grub, then you boot up ubuntu, open a terminal and type sudo update-grub or sudo update-grub2 (depends on your version). Now grub should find windows and allow you to boot windows from the grub menu!


You can use the last command to view login logs:

last -d

Will, to quote the manual page:

  For non-local logins, Linux stores not only the host name of the
                remote host but its IP number as well.  This  option  translates
                the IP number back into a hostname.

There is also:

last -i

  This  option is like -d in that it displays the IP number of the
                remote host, but it displays the IP number  in  numbers-and-dots
                notation.

for more information run man last to view the manual page.

You can also use lastb, which will display only the bad login attempts:

sudo lastb

last reads from:

/var/log/wtmp

lastb reads from:

/var/log/btmp

You can also view the last successful login of a user with this:

lastlog -u USERNAME

which, if it is a ssh login, will display something like:

Last login: Thur Jan 02 09:52:12 2014 from 192.168.1.5


So after researching online for some time, here's my understanding of the output's meaning:

Take a look at the KeyPress and KeyRelease events from a letter key, like m.

KeyRelease event, serial 28, synthetic NO, window 0x6e00001,
    root 0x2c9, subw 0x0, time 17599679, (-746,426), root:(337,478),
    state 0x10, keycode 58 (keysym 0x6d, m), same_screen YES,
    XLookupString gives 1 bytes: (6d) "m"
    XFilterEvent returns: False

It has the keycode and reports the window id where the key has been pressed.

Function keys, like Fn+F6, which actually is the brightness decrease key, output no such information. They report 0x0 id for the window and no keykode. Thus, it means these keys cannot be reassigned and are controlled by software , like the X server or console; they are dependent on the environment in which they run. Which also somewhat explains why the Super key may or may not work within a particular desktop environment - it's up to the developers to include functionality of that key into their desktop environment.

MappingNotify event, serial 28, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

KeymapNotify event, serial 29, synthetic NO, window 0x0,
    keys:  1   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0


Is it possible to install Wubi using the ISO?

Yes.

Download or copy wubi.exe and put it in the same folder as the desktop iso. Run wubi.exe from there.

If needed,you can download wubi.exe from here : http://www.ubuntu.com/download/ubuntu/windows-installer

See Wubi guide


Connectivity issues, message "Network unreachable"

I had created a server with only an IPv6 network interface.
8.8.8.8 is an IPv4 address, so I couldn't connect to it from the IPv6 network interface. Same for the Docker server.
In order to get IPv4 access to/from my server, I will need to attach an IPv4 interface to it.


I suspect I know what the problem is.  You see, when you installed Ubuntu, you almost certainly depended on that wireless connection for the internet access Ubuntu needs to install properly.  It probably worked just well enough to try and fail.  Fortunately you probably don't have to re-install.  You simply need to connect internet to it via an Ethernet cable and then attempt to update your computer.  When you open the system update screen, be sure to press CHECK to make sure it compares and updates.

If that doesn't fix your problem, please re-install Ubuntu but only with a wired connection.  I suspect it will download the correct drivers automatically and then the WiFi will work properly after that.


I solved it by running,

pulseaudio -D as root on each start up.


How to change ugly gray startup animation screen that KDE installed?

sudo rm /etc/alternatives/default.plymouth
sudo ln -s /lib/plymouth/themes/ubuntu-logo/ubuntu-logo.plymouth /etc/alternatives/default.plymouth

u have to paste it into terminal,
and then chose a ubuntu plymouth.


Firefox's popping up advertisement windows

Block the popup advertisements from Firefox by installing this Firefox extension: Adblock Plus.


You need to install the VirtualBox Guest Additions into Ubuntu.  This gives a few benefits, including resizing the Ubuntu screen to match the host window.
Start the VM, then select from the VirtualBox menus:

Devices ⇒ CD/DVD Devices ⇒ VBoxGuestAdditions.iso

Then follow the instructions.


General methods to investigate issues with gnome shell:

Disable all extensions and check if that solves it.
If so enable 1 extension at a time and find the culprit.
If you find a culprit visit the extensions page and file a bug report if there is not one filed yet.

If 1. is not the answer switch the video card driver to another and check if that fixes it.


How do I get close to 1600x1600 resolution with dual monitors?

You can increase the virtual resolution by editing /etc/X11/xorg.conf in the Screen section on the Virtual line.  Example:

Section "Screen"
    Identifier "aticonfig-Screen[0]-0"
    Device     "aticonfig-Device[0]-0"
    Monitor    "aticonfig-Monitor[0]-0"
    DefaultDepth     24
    SubSection "Display"
        Viewport   0 0
        Depth     24
        Virtual 2880 2880
    EndSubSection
EndSection

helpful information on the virtual screen at this link

At the link it says making the virtual screen square makes rotation easy.  By setting it to 2880 x 2880 I was able to get both 1440 x 900 monitors into portrait mode using the System > Preferences > Monitors tool.  Unfortunately after getting into this mode, paring back to the minimum such as 1800 x 1440 (assuming side by side portrait 900 x 1440) and rebooting resulted in an error message.  The reverse ordering of dimensions, 1440 x 1800, also resulted in an error.  Leaving it at 2880 x 2880 seems wasteful but at least it works.


Wireless network connection dialog keeps popping up

You've set that old wireless connection to "Connect automatically". To fix this:

LClick and hold on Network Manager (the radar screen icon in the top row).
Scroll down to "Edit connections" and select that.
Click on the "Wireless" tab.
Select the old, unwanted connection, and click "Delete" or "Edit" and uncheck "Connect automatically".


How to restore file names that were renamed by a script

If you still have the output from the script, you can manually rename the files that were inadvertently changed. For future reference, Linux can handle spaces in filenames just fine.


Ubuntu external hard drive doesn't show up in MacBook boot menu

Ubuntu installs grub and other files in the first EFI System partition on the external drive. The process of making the Ubuntu appear on the Startup Manager is a fairly trivial. The steps are given below.

Open a Terminal application window and enter the command given
below.

diskutil list

From the ouput, determine the name and identifier of the EFI
partition on your external drive. I will assume the name will be NO NAME and the identifier will be disk1s1. Make the appropriate substitution if necessary.
Mount the EFI System partition by entering the command given below.

diskutil mount disk1s1

Create a folder named Boot in the folder /Volumes/NO NAME/EFI.
You can use the Finder application or enter the command given below.

mkdir "/Volumes/NO NAME/EFI/Boot"

Copy the file grubx64.efi from the

/Volumes/NO NAME/EFI/ubuntu

folder to the

/Volumes/NO NAME/EFI/Boot

folder. Next, rename this file bootx64.efi. This step can be
accomplished by using the the Finder application or by entering the
command given below.

cp "/Volumes/NO NAME/EFI/ubuntu/grubx64.efi" "/Volumes/NO NAME/EFI/Boot/bootx64.efi"

(Optional) Download a collection of icons from the sourceforge web
site Mac icns. Use the Finder application to open the
downloaded file mac-ices.dmg, then enter the command below to copy
the Ubuntu icon file os_ubuntu.icns to the EFI System partition.

cp /Volumes/mac-icns/os_ubuntu.icns "/Volumes/NO NAME/.VolumeIcon.icns"

This will add the following Ubuntu icon to the Startup Menu.

  Note: When finished, you can use the Finder application to eject the mac-icns volume.

Use the Finder application or enter the command below to unmount
the EFI System partition labeled NO NAME.

diskutil unmount disk1s1