returning results from a function while making it applicable in an if

There is an extra dollar sign in the local path statement.  Try this:

containsfilepath () {
  local e
  for e in "${@:1}"; do [[ "$e" =~ .*".out" ]] && return 0 && local path="abc"; done
  return 1
}

In this code, because the return 0 statement is executed before the path assignment statement is reached, path is never assigned a value.  If you want to have path assigned to a value that can be accessed later, the statements need to be reversed and the local qualifier needs to be removed. try:

containsfilepath () {
  local e
  for e in "${@:1}"
  do
      [[ "$e" =~ .*".out" ]] && { path="abc"; return 0; }
  done
  return 1
}


How do I restore my system back to windows 8.1 (from ubuntu 14.04)?

you can burn the windows.iso in liunx. and reboot and reinstall windows that way.

so you boot in ubuntu, and launch brasero, burn the windows.iso and reboot.

another solution may be to reinstall using an OEM partition that contains all the file to reinstall windows. I don't know how. May be use boot the windows cd and look for a recover or reinstall option ?


How to add a playlist onto ipod using clementine?

Once you create a playlist, select all the songs in the playlist, and right-click to select "Copy Device".   I have no idea why it's so hidden.

This guy clued me in -- at 6:14 he starts talking about Devices:

gotbletu -- Clementine - Modern Music Player - Kubuntu 10.10


If I understood you correctly there were some movies that xbmc looked at, but did not understand well enough to put them into your movie library.

Basically you have to use the "files" view. The problem is finding it. It is annoyingly well hidden, despite being an incredibly useful feature. It's location depends a bit on which xbmc skin/settings you are using, but there may be a "files" tab under "videos" or "movies" in the main menu. If not, go to your movie library and to the ".." (parent directory) twice.

As far as I understand, the (internal) video menu system in xbmc works like this:

Top level menu:

Movies
Recently added movies
Files (the one you want)
Playlists
Video add-ons

If you select the Movies menu item you get:

Genres
Title
Year
..etc

If you select the Title menu item, you will see your normal movie library.

So, it seems the "movies" menu item on the xbmc main menu really is a link to an internal submenu that is two levels further down from the root menu. And it is the root menu you want, in order to find the magic and elusive "files" view.

Once you find it, you should see a list of ALL your movies, where in your case a few of them are displayed by filename instead of the movie name. If the movies have their own subdirs you will have to enter the subdir to see if the movie title was detected or not. Normally some movies are not detected because xbmc doesn't understand their file name.

Once you have highlighted one of your missing movies, hit C on the keyboard to access the context menu. Then select movie information, and you should be able to enter a new title for the movie. Play around with that until the internet scraper finds your movie, and voila!, it's finally loaded into the library.

Phew.

Final note: If you have movies that do not exist in the lists of the internet scraper, it is possible to manually create movie meta data on the file system that xbmc can read instead. See here: XBMC Wiki


Network problem on working days at the same time

Problem was caused by employees HTC phone connecting to Wi-Fi. I've managed to find the problem starting unplugging areas from the network, when I've found router is the problem then log showed me who connected at the time of crash. I have written simple app for Raspberry Pi that constantly pings all servers and sends an email to admins so I know exact time of packet loss.

Can anyone explain why just that server had problems with network?


When your computer boots up, hit the key that brings up Boot From menu and select your hard disk.Next it will prompt you to select either Windows or Ubuntu to boot from .


Dual boot Ubuntu (14.04) with Windows 10

I've been dual-booting Windows 10 preview for 3 months now: no problems whatsoever in BIOS mode...  (No UEFI here!)

However, I have 2 hard drives in my machine and change the boot order to boot from one hard drive or the other one.  I did run for a week or so from one hard drive, but something got screwed up, so I reverted to booting from 2 hard drives again...

And as to waiting: you can always wait for the new CPU, the new Windows, the new GPU, ...  If you're out of time to wait, get a system with Windows 8 and dual boot that as Microsoft has announced that anyone with a Windows 8 system can upgrade for free within one year...


Missing window list on bottom panel in gnome-classic

You will need to use one of the shown panel-applets.

Press Win+Alt and right-click the bottom panel bar - N.B. Win is the Windows Symbol key

(If you are using Gnome Classic (No Effects) i.e. gnome fallback mode then to add to the panel use Alt and right-click)

Lots more information and some very useful links to customise your classic desktop can be found in the linked question.

How to revert to GNOME Classic Desktop?


Why can this command unlock my lock screen without password? (Security question)

In both use-cases, these seem like secondary issues.

If somebody can run gnome-screensaver-command or loginctl as you, remotely, your home, your $PATH, essentially your whole computer —from the perspective of your security and privacy—  is compromised.

If somebody just rocks up at your computer, they can't just run this stuff.


create one shortcut for maximize and restore window

The shortcut is already there for you to use: it is Alt+F10.
If you want to also have Super+Up behave this way, then change the configuration. You can do so with following commands:
gsettings set org.gnome.desktop.wm.keybindings maximize ['']
gsettings set org.gnome.desktop.wm.keybindings unmaximize ['<Alt>F5']
gsettings set org.gnome.desktop.wm.keybindings toggle-maximized ['<Alt>F10,<Super>Up']

To undo, change these commands so set reads reset, and the part between [...] is removed.


lscpu output differs when called indirectly?

That's a coincidence, it's your system changing the current cpu frequency.

Check with this command in a terminal:

watch -n 0 "lscpu | grep 'MHz'"

You will see (when waiting a bit) that the system's cpu frequency is switching.

You can also get your current cpu frequency with this command:

cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq

And your maximum/minimum cpu freq with those:

cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq

Change the behavior? The cpu governor decides what frequency should be used. See this documentation of the linux kernel to decide with cpu governor fits best for you.

Get the governor: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Change the governor: echo "powersave" >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor


This might be because you have the 64-bit libqt4-qt3support libraries. Get the 32-bit libraries like so
dpkg --add-architecture i386
apt-get update
apt-get install libc6:i386 libqt4-qt3support:i386


Exchange mapi option not available after Exchange support for the Evolution groupware suite installed

Try installing the package python-samba and then restarting Evolution. Apparently there is a missing dependency in the install.


Do you have your settings something like this? Need to make sure your tray icon is set to show.


Run the installation script from a folder whose name does not contains spaces, and same for any parent folder.

For example, "/home/yourname/Downloads" is okay, "/home/yourname/Downloads/Parallel Studio" is not.

try:

mv install.sh /home/yourname/Downloads
cd /home/yourname/Downloads
sh install.sh


Picasa icon disappeared in Unity Launcher

SOLVED!!!
It was just a matter of editing my ".local/share/applications/picasa.desktop" with "gedit" and change the icon value.
It had "gnome-panel-launcher" and I wrote the path to my favorite Picasa icon and ... voilà!


You seem to be right. There is no packages in Ubuntu and they don't appear to have any available for download either. That means you'll have to do it yourself. It may sound complicated, but it really isn't. You will have to read a couple of pages, though: https://help.ubuntu.com/community/CompilingSoftware

Basically: (the above page explains all of this in detail)

Install some required tools.
Download and extract the compressed file from their site: billreminder-0.4.0.tar.bz2
Run a script to configure the software.
Run a script to compile the software.
Run a script to package and install the software.


virtual memory exhausted while using wine

Upgarding wine fixed the problem.

sudo apt-add-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine


Ubuntu 20.04 on HP Pavilion 15-n055sm Notebook PC, how to fix/Update BIOS?

I just upgraded the BIOS on a HP 340s, which runs Ubuntu 20.04. I wasn't able to locate any "update BIOS" menus whatsoever, and didn't want to experiment with copying files manually to the EFI partition either. It seems that the BIOS .exe for that particular machine is packed in a way that can't be easily extracted under Linux, so sadly, I needed a windows machine. Below are the steps that should do the trick:

If you can get your hands on a Windows machine, prepare a USB boot drive with the BIOS installer .exe (I think it was the second option, install on a USB drive or similar).
Plug in the USB drive and restart the notebook to be updated. Hold ESC to bring up the system information/setup etc. options, then choose F9 (boot devices), then "boot from an EFI file".
You should be able to see the USB drive you created under Windows, named "Hp Tools" or something similar.
Go to the Hewlett-Packard/BIOSUpdate directory and choose the HpBiosUpdate.efi file.
The next screen will warn you to switch to AC power and will proceed with the BIOS update.

This did the trick for me. The USB drive was FAT32 formatted and I don't think that the BIOS (pre-?)installer did something special to it under Windows.


Ubuntu 16.04 desktop grub update, now broken - cannot unencrypt disk

As you still have access to your system (if not, do it after mounting your FS via a liveUSB/CD), try running :

sudo grub-install /dev/sda3
sudo grub-install --recheck /dev/sda3
sudo update-grub

See How to Ubuntu : how to repair/reinstall Grub2 for further reading.


MySQL upgrade stuck at version selection

Please try this first:

apt-get purge mysql-server mysql-client mysql-common mysql-client-5.5 mysql-server-5.5

then reinstall mysql server.

If this doesn't work only then try the following:

sudo apt-get remove --purge mysql-server mysql-client mysql-common

or :

sudo apt-get remove --purge mysql*

followed by :

sudo apt-get autoremove
sudo apt-get autoclean

If you want to preserve the configuration files then omit the '--purge' part in the first line.

Then to reinstall:

sudo apt-get update
sudo apt-get install mysql-server
sudo mysql_install_db
sudo /usr/bin/mysql_secure_installation

warning: I never had to use the second method myself. Make a decent backup of your databases, if you have any, before trying this.


Why is my apache cache not working fine?

Your configuration looks exactly same like the Digital Ocean configuration  https://www.digitalocean.com/community/tutorials/how-to-configure-apache-content-caching-on-ubuntu-14-04

You can add %{cache-status}e to the LogFormat line to log the cache status in access.log of Apache.

I am using the same configuration as above, but in my case the cache serves always the same content, don't matter what i click on the homepage.

I am afraid that config does not work for Ubuntu 16.04 and Apache 2.4.18.


Is there a way to append nohup output file?

Try the below command to append the output as well as the standard error to /var/log/a.log file.

nohup python a.py >> /var/log/a.log 2>&1&

>>- Append

>- Overwrite


Yeah you have sent your application to the wrong queue I'm afraid, it should have gone to https://myapps.developer.ubuntu.com/dev/click-apps

I'll send your application back to you.  Sorry for the inconvenience.


How do I configure an Nvidia RTX 2080 Ti with Ubuntu?

I wrote a complete article on how to install drivers and cuda for RTX 2080 series GPUs on Ubuntu, mainly because it can be a time consuming task for some(most?) users. You are advised to follow the article along with the following answer.

I observed the same issue with both Ubuntu-16.04 and 18.04. In Ubuntu-16.04 the machine hadn't found the correct Nvidia driver and it had been using open source Nouveau display driver. Hence you're required to download and install the proper driver from Nvidia.

Now install the drivers as follows.

1) cd Downloads/

2) ls
#(NVIDIA-Linux-x86_64–410.57.run #output of ls)

3) chmod +x NVIDIA-Linux-x86_64–410.57.run
#(to get permission to execute the run file)

4) sudo ./NVIDIA-Linux-x86_64–410.57.run --no-x-check

Note: --no-x-check flag is important. Otherwise you will have to disable the x-server and log out from the GUI.

Once the drivers are installed reboot the machine and verify the installation with nvidia-smi command on a terminal. It will show you GPU and installed driver information.

The next part is installing cuda which can be a pain at times. You will have to log out from the GUI and perform all the actions on a terminal.

Download your relevant cuda run file from this link. Then create a file called blacklist-nouveau.conf in your home directory and add following lines to this file.

blacklist nouveau
options nouveau modeset=0

Now we have to log out from the GUI by pressing (ctrl+alt+f1) to install cuda. Enter your username and password to go to the terminal.

Now follow the steps below.

1) sudo service lightdm stop

2) sudo -i

3) sudo cp /home/avin/blacklist-nouveau.conf /etc/modprobe.d
#change avin with your user name

4) sudo update-initramfs -u

5) exit

6) cd Downloads/

7) md5sum cuda_10.0.130_410.48_linux.run #(Optional)

8) sudo sh cuda_10.0.130_410.48_linux.run

Cuda installation wizard will appear. Follow apparent steps, along with the article.
Once the installation is finished run reboot on this terminal.

Once the machine is rebooted add cuda path to the .bashrc.

1) sudo gedit ~/.bashrc

2) Add following 2 lines at the end of the .bashrc file

export PATH=/usr/local/cuda-10.0/bin${PATH:+:${PATH}}

export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

3) source ~/.bashrc

Now run nvcc -V on a terminal which should yield an output as follows.

installation message

Now that the drivers and cuda are installed you might want to install tensorflow gpu version. Here is a good tutorial for the very same task.


Maybe you can try to boot from Ubuntu live CD and use Photorec and Diskutils to recover some of the lost data. However since you wrote new data to the partition some files may be lost forever. Remember that you must recover the data on an external hard drive or flash disk.


Ubuntu 16.04.3 update GPG error (public key not available)

Import the new repository key:

    wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

    sudo apt update

You should be good to go.


Try to boot from a live cd. You must install grub boot loader again. Do as I say:

Make a bootable usb disk and boot from it (in this way you will have a live ubuntu)
Mount your previous ubuntu partition in any way you know (You can do this by opening filemanager and go to partition where your ubuntu is installed on, then copy the path to this partition)
Then press Ctrl+Alt+T and open terminal, then run sudo grub-install --boot-directory=/path/to/mounted/folder/for/ubuntu/boot sda. (make sure that you typed sda and boot at the end). In my case this is like sudo grub-install --boot-directory=/media/76s876sd86d8f7sdfsdf/boot sda


Solving permission problems when using external EXT4 hard disk with multiple linux installs

The simplest solution is to make sure your Ubuntu & Fedora user accounts have the same user id (UID).

I think Fedora starts user accounts at 500 by default, while Debian & Ubuntu start them at 1000, so it's very likely that in one OS you are user number 500 and in the other you are user number 1000.  The file system uses this UID number to keep track of permissions, so if you make sure they have the same UID, they will be considered the same user, and no permission issues will happen.

I think the best you can do is make them both UID = 1000, so change the UID in the Fedora system, then make sure all files on the external disk and in the user's $HOME in the Fedora install are owned by UID 1000.  After that you should have no permission problems anymore.


When I am trying to restart mt postfix and nagios the following messaged is displayed in the mail.log file

This is normal if you are using dynamic public IP. This is effort to block spamming used by ISP.

However if this is private IP then you need to contact the blacklist host site administrator to exclude you from the list or your ISP to help you out.

To check blacklist IP Blacklist Checker.


Updates to 16.04 leads some inconsistency

boot into recovery mode
choose root
enter: sudo fsck -f /
repeat step 3 until there are no errors
reboot into recovery mode again
choose dpkg and let it try to repair any errors there
reboot and see if you're OK now


Update time for daylight savings time, set system clock to UTC time, and stay in sync with online server

See if you have a file /etc/ntp.conf, then see if this file contains line starting with the keyword 'server' (without the quotes of course). If you have this then the time will be regularly synchronized with timeservers.

If you do not have this file then no time keeping service is installed. To install ntpd, from a terminal prompt enter:

sudo apt-get install ntp

That is about it in a nutshell. If you do not have this file or if you are not sure what about what you are doing please refer to this resource: https://help.ubuntu.com/lts/serverguide/NTP.html. It contains more useful information than I can explain here. Although it is about servers it works equally good for desktops and laptops.

To modify the systems to use UTC time, edit /etc/default/rcS (e.g. sudo emacs /etc/default/rcS) setting UTC=yes.


Meaning of "netinet" in socket programming

"#include <netinet/in.h>

The header file in.h contains constants and structures needed for internet domain addresses."

As quoted at http://www.linuxhowtos.org/C_C++/socket.htm


Unity-Tweak-Tool is not starting from Ubuntu Dash

I assume you mean "Launcher".

Right click the Unity-Tweak-Tool icon on Launcher and select "Unlock from Launcher"
Launch it from Terminal
Right click the Unity-Tweak-Tool icon on Launcher and select "Lock to Launcher"

This icon now should allow you to launch it from Launcher.

Please also make sure that you have properly installed it by following these steps:

sudo add-apt-repository ppa:freyja-dev/unity-tweak-tool-daily
sudo apt-get update
sudo apt-get install unity-tweak-tool

Source: www.iloveubuntu.net/unity-tweak-tool-002-adds-new-features


Ubuntu 12.10 XBMC audio output with echo effect

Page 98 of the Sony's receiver manual, the "Audio Out" section.

Settings-->HDMI-->Audio Out

Change to AMP


-j1 flag from running out of memory.

$ cabal -j1 install hedis


12.04 Running slow when downloading files

The freezing is likely caused by a slow hard drive. This is common on older computers which use the slower PATA drives, as opposed to the newer SATA drives.

Though even SATA drives can be slow if too much data is being read or written. You can monitor drive activity with iostat available in the sysstat package.

It can also be caused by a failing hard drive. Run dmesg, and look for any lines mentioning your drive. Or even better, run dmesg | grep sda1, assuming your drive is /dev/sda1. You can also install a "SMART" drive diagnostic tool from the Ubuntu Software Center such as gsmartcontrol to see the physical health of the drive.


I am doing a client server application. When i try to get the IP address for the server , it show "null"

This is more of a programming question than an OS issue. You would be better served by reposting this question on stackoverflow along with the associated source code.

Having said that. This is how you iterate through all physical network interfaces on any Linux.

#include <stdio.h>
#include <sys/types.h>
#include <ifaddrs.h>
#include <netinet/in.h>
#include <string.h>
#include <arpa/inet.h>

int main (int argc, const char * argv[]) {
    struct ifaddrs * ifAddrStruct=NULL;
    struct ifaddrs * ifa=NULL;
    void * tmpAddrPtr=NULL;

    getifaddrs(&ifAddrStruct);

    for (ifa = ifAddrStruct; ifa != NULL; ifa = ifa->ifa_next) {
        if (!ifa->ifa_addr) {
            continue;
        }
        if (ifa->ifa_addr->sa_family == AF_INET) { // check it is IP4
            // is a valid IP4 Address
            tmpAddrPtr=&((struct sockaddr_in *)ifa->ifa_addr)->sin_addr;
            char addressBuffer[INET_ADDRSTRLEN];
            inet_ntop(AF_INET, tmpAddrPtr, addressBuffer, INET_ADDRSTRLEN);
            printf("%s IP Address %s\n", ifa->ifa_name, addressBuffer);
        } else if (ifa->ifa_addr->sa_family == AF_INET6) { // check it is IP6
            // is a valid IP6 Address
            tmpAddrPtr=&((struct sockaddr_in6 *)ifa->ifa_addr)->sin6_addr;
            char addressBuffer[INET6_ADDRSTRLEN];
            inet_ntop(AF_INET6, tmpAddrPtr, addressBuffer, INET6_ADDRSTRLEN);
            printf("%s IP Address %s\n", ifa->ifa_name, addressBuffer);
        }
    }
    if (ifAddrStruct!=NULL) freeifaddrs(ifAddrStruct);
    return 0;
}

Output on my system:

ppetraki@:tmp$ make net
cc     net.c   -o net
ppetraki@:tmp$ ./net
lo IP Address 127.0.0.1
br0 IP Address 10.1.0.12
virbr0 IP Address 192.168.122.1
lo IP Address ::1
eth7 IP Address fe80::56ee:75ff:fe6d:d29e
br0 IP Address fe80::56ee:75ff:fe6d:d29e

You're probably better off using hostname and name resolution for a more portable client/server app. Good luck!


Chrome could not load google talk plugin

The long and short of this is that you cannot - at least with any new version from Google Chrome v35 and onwards.

Google consider the mechanism it used - NPAPI - to be a security risk and is not part of modern browser technology.

From v35 they have effectively turned off support for NPAPI plugins.  Google-Talk is one of these plugins.  Standard Adobe Flash is another.

The replacement for Google Talk is now Google Hangouts and as such they are pushing you towards that direction.

Obviously, you can try to download an older version of Google Chrome e.g. v34 - but remember these old versions are no longer patched, so you'll be opening yourself to security risks whilst browsing.


How to install wvdial without getting the following error?

Download the package using the computer that has connection to the Internet.

http://packages.ubuntu.com/quantal/wvdial

Download the package appropiate for your architecture, i386 or amd64. I assume here you have Quantal; if not, choose another release.

After you put the package on the computer you want to install it run:

sudo dpkg -i package_file_name

e.g.,

sudo dpkg -i wvdial_1.61-4.1_amd64.deb


Graphical error on moving from 11.10 to 12.04

Hold down the Shift key while your computer is booting up, and don't let go until it actually shows the grub menu

choose recovery mode and from there update your system using sudo apt-get update and check for the problem by reviewing dmesg


Deploy Ubuntu 20.04 on bare metal or virtualbox VM by pxelinux, cloud-init doesn't pick up user-data file

I was able to use these steps to do an autoinstall on a BIOS based VM.  They are slightly modified from my UEFI steps.  Hopefully they will provide an example to help you figure out your problem.  You can tailor them to your environment
Build a tftp server
All the following steps are run as root.  These were tested on an Ubuntu 18.04 server.
Install the tftp server, web server, and syslinux files
apt-get -y install tftpd-hpa apache2 pxelinux

Configure apache to serve files from the tftp directory
cat > /etc/apache2/conf-available/tftp.conf <<EOF
<Directory /var/lib/tftpboot>
        Options +FollowSymLinks +Indexes
        Require all granted
</Directory>
Alias /tftp /var/lib/tftpboot
EOF
a2enconf tftp
systemctl restart apache2

Copy the syslinux files to the tftp directory
cp /usr/lib/PXELINUX/gpxelinux.0 /var/lib/tftpboot/pxelinux.0.bios
cp /usr/lib/syslinux/modules/bios/*.c32 /var/lib/tftpboot

Download the live server iso
wget http://old-releases.ubuntu.com/releases/20.04/ubuntu-20.04-live-server-amd64.iso -O /var/lib/tftpboot/ubuntu-20.04-live-server-amd64.iso

Extract the kernel and initramfs from the live server iso
mount /var/lib/tftpboot/ubuntu-20.04-live-server-amd64.iso /mnt/
cp /mnt/casper/vmlinuz /var/lib/tftpboot/
cp /mnt/casper/initrd /var/lib/tftpboot/
umount  /mnt

Configure syslinux
MYIP=$(hostname --ip-address)
mkdir -p /var/lib/tftpboot/pxelinux.cfg
cat > /var/lib/tftpboot/pxelinux.cfg/default <<EOF
DEFAULT vesamenu.c32
TIMEOUT 600
ONTIMEOUT focal-live-install-autoinstall
PROMPT 0

NOESCAPE 1

LABEL focal-live-install
        MENU DEFAULT
        MENU label Install focal
        KERNEL vmlinuz
        INITRD initrd
        APPEND root=/dev/ram0 ramdisk_size=1500000 ip=dhcp url=http://${MYIP}/tftp/ubuntu-20.04-live-server-amd64.iso

LABEL focal-live-install-autoinstall
        MENU DEFAULT
        MENU label Install focal - autoinstall
        KERNEL vmlinuz
        INITRD initrd
        APPEND root=/dev/ram0 ramdisk_size=1500000 ip=dhcp url=http://${MYIP}/tftp/ubuntu-20.04-live-server-amd64.iso autoinstall ds=nocloud-net;s=http://${MYIP}/tftp/cloud-init-bios/

EOF

Configure cloud-init with the autoinstall configuration.  I first ran the install manually to get the generated /var/log/installer/autoinstall-user-data file to use as the basis.  I then made modifications based on my needs and errors encountered.
mkdir -p /var/lib/tftpboot/cloud-init-bios/
cat > /var/lib/tftpboot/cloud-init-bios/meta-data <<EOF
instance-id: focal-autoinstall
EOF

cat > /var/lib/tftpboot/cloud-init-bios/user-data <<'EOF'
#cloud-config
autoinstall:
  version: 1
  # use interactive-sections to avoid an automatic reboot
  #interactive-sections:
  #  - locale
  apt:
    # even set to no/false, geoip lookup still happens
    #geoip: no
    preserve_sources_list: false
    primary:
    - arches: [amd64, i386]
      uri: http://us.archive.ubuntu.com/ubuntu
    - arches: [default]
      uri: http://ports.ubuntu.com/ubuntu-ports
  # r00tme
  identity: {hostname: focal-autoinstall, password: $6$.c38i4RIqZeF4RtR$hRu2RFep/.6DziHLnRqGOEImb15JT2i.K/F9ojBkK/79zqY30Ll2/xx6QClQfdelLe.ZjpeVYfE8xBBcyLspa/,
    username: ubuntu}
  keyboard: {layout: us, variant: ''}
  locale: en_US.UTF-8
  # interface name will probably be different
  network:
    network:
      version: 2
      ethernets:
        ens192:
          critical: true
          dhcp-identifier: mac
          dhcp4: true
  ssh:
    allow-pw: true
    authorized-keys: []
    install-server: true
  # this creates an bios_grub partition, /boot partition, and root(/) lvm volume
  storage:
    config:
    - {ptable: gpt, path: /dev/sda, wipe: superblock, preserve: false, name: '', grub_device: true,
      type: disk, id: disk-sda}
    - {device: disk-sda, size: 1048576, flag: bios_grub, number: 1, preserve: false,
      type: partition, id: partition-0}
    - {device: disk-sda, size: 1073741824, wipe: superblock, flag: '', number: 2,
      preserve: false, type: partition, id: partition-1}
    - {fstype: ext4, volume: partition-1, preserve: false, type: format, id: format-0}
    - {device: disk-sda, size: -1, wipe: superblock, flag: '', number: 3,
      preserve: false, type: partition, id: partition-2}
    - name: ubuntu-vg
      devices: [partition-2]
      preserve: false
      type: lvm_volgroup
      id: lvm_volgroup-0
    - {name: ubuntu-lv, volgroup: lvm_volgroup-0, size: 100%, preserve: false,
      type: lvm_partition, id: lvm_partition-0}
    - {fstype: ext4, volume: lvm_partition-0, preserve: false, type: format, id: format-1}
    - {device: format-1, path: /, type: mount, id: mount-1}
    - {device: format-0, path: /boot, type: mount, id: mount-0}
write_files:
  # override the kernel package
  - path: /run/kernel-meta-package
    content: |
      linux-virtual
    owner: root:root
    permissions: "0644"
  # attempt to also use an answers file by providing a file at the default path.  It did not seem to have any effect
  #- path: /subiquity_config/answers.yaml
  #  content: |
  #    InstallProgress:
  #      reboot: no
  #  owner: root:root
  #  permissions: "0644"
EOF

Configure DHCP
Set the DHCP Options 66,67 according to the documentation for your DHCP server.
Boot your server
At this point, you should be able to boot your UEFI based server and perform a completely automatic install.


Short reply: remove optical drive and system boots normally.

I've been having the same hassle with a Samsung 350V Laptop. I revived it with a new battery and SSD, and installed Manjaro Linux. Occasionally I'd start getting the COMRESET error slowing my boot time down by a minute. I noticed that the Samsung splash screen during bios would hang for 20 seconds when the machine was in this state. The optical drive also made an audible reset when the system was booting normally. I searched every forum post on this issue and none of them seemed to resolve it conclusively.

I was able to get my system up and running a few times by unplugging the drive, doing a power cycle, even re-seating the RAM, but every time it came online after a different combination of repeated attempts, and the definitive solution eluded me.

Then I found the following link:

https://forum.hddguru.com/viewtopic.php?f=10&t=35309&view=previous

This put me onto the idea that it could be a power issue, despite SSD's using less power than HDD's (?)

I simply removed the optical drive and the system booted perfectly. Replaced and it still works fine. Remove SSD and replace... COMRESET error. Remove optical drive... Problem solved again. I'm still holding thumbs but it's been a couple of days and I have been able to repeat the sequence reliably thus far.


Emacs shell mode pointer always goes to middle

Question solved in this link.

That is, add the following code to ~/.emacs

(remove-hook 'comint-output-filter-functions
             'comint-postoutput-scroll-to-bottom)

after pressing c-l c-l in shell-mode.


Enable growth of VirtualBox guest's disk

You can modify the virtual disk container by using the vboxmanage modifymedium (Virtualbox 5.1) command in a terminal window. Then in the Windows guest, using Windows own Disk Management application to extend the size of the Windows partition.

$ vboxmanage (by itself to see the long help info)

  modifymedium              [disk|dvd|floppy] <uuid|filename>
                            [--type normal|writethrough|immutable|shareable|
                                    readonly|multiattach]
                            [--autoreset on|off]
                            [--property <name=[value]>]
                            [--compact]
                            [--resize <megabytes>|--resizebyte <bytes>]
                            [--move <full path to a new location>]

So to resize your 30G disk container to 45G, you'd do:

sudo vboxmanage modifymedium disk disk_container_name.vdi --resize=45000

note: In Virtualbox versions prior to 5.1, the modifymedium option may have been called something else. The command works the same, however. Type vboxmanage to get the help info for your specific version.


To configure the number of workspaces, right click on one of the workspace, choose Workspace Settings and adopt the Number of Workspaces to your needs.

Here's you can find a screenshot of the menu that opens (thanks to N0rbert).


Where is the sticky edges option (for multiple screens)?

I don't really know if this can help (I am not a Kubuntu user), but have you tried in System Settings > Workspace Behaviour > Screen Edges?
In older versions of Kubuntu, Sticky Edges were there...

Hope there are still there and solves your problem!


The cleanest way to compile Ubuntu from scratch?

If you are into self-compiling everything, maybe Gentoo is a better choice for you.
Having worked for a Linux distributor for 16 years (and counting), I can assure you that it's far from trivial to compile a complete Linux distribution. The business value of the companies that are doing that is in the know-how, infrastructure and work procedures (and their automation) to do that. This is not anything to easily replicate at home.
You can build one or a handful of packages at home easily, but when it comes to a full distribution, it's a massive task. How many man-years are you willing to spend?
Having said that, Gentoo Linux is based around the idea to let every user do exactly that at home; but still, you need to have some trust in those who provide the source tarballs and all the patches on top of them. If you are suspicious, you can dig deep into one or a few of them and check what they are doing, but it's unrealistic to do that for any meaningful percentage of the whole distribution.
Also, I have doubts that you will manage to optimize the resulting binaries better (at least in any meaningful way) than those who have been doing that for a living for many, many years.
Still, if you feel you must do it, go ahead. ;-)


gparted, fdisk and gnome-disks stuck (in various ways)

It is possible that there is a hardware problem with one of the hard disk drives.  If this is the case, then you can run the dmesg command in a terminal and scan the output for errors related to the hard disk drives.

Another way to see if the problem is drive specific is to pass a known good hard drive to GParted.  For example:

sudo gparted /dev/sda

That way only the /dev/sda hard drive will be scanned.

If the sudo fdisk -l command also hangs, then that lends more credence to the idea that there may be a hardware problem with one of the hard disk drives.


In my case it was due to a wrong runlevel. I reverted it by running:
systemctl set-default graphical.target

More details in Boot systems into different targets manually - RHCSA Objective Preparation


How to show top 10 largest items from git history

To reduce the space used by files, git packs objects stored in the repository into a .pack file. This pack file contains the actual git objects and the .idx contains the index used to quickly locate objects within the pack file.
$ git verify-pack -v .git/objects/pack/pack-7b03cc896f31b2441f3a791ef760bd28495697e6.idx

The above command reads the given .idx file and verifies it with the corresponding pack file. Using -v you get a verbose output.
The third column in the output is the size of the objects. Using sort -k 3 -n we are sorting the output numerically using the 3th column (based on size) and with tail -10 we are cutting out the last 10 which are the largest in size.
To get the name of files from their hash:
$ git ls-tree -r HEAD | grep HASH

To get a list of all names:
$ git verify-pack -v .git/objects/pack/pack-1daab5282d01ab18db98e21a985eb2d288f7faa0.idx | sort -k 3 -n | tail | cut -f1 -d' ' | while read i; do git ls-tree -r HEAD  | grep "$i"; done

100644 blob 6209b3840fa470a534e670cff93bce698ba60819    .bashrc
100644 blob 1131e7127cb2cf6c1f854f728a1794262cdf85f6    .vimrc
100644 blob a249a5ae9b33553f4484da42a019ed14e5f44e21    .vim/colors/clrs.vim
100644 blob f329f223953827e59954f67ad4d76568b6dd894e    .config/openbox/rc.xml

Read more:

$ git verify-pack --help

Unpacking Git packfiles
Git Internals - Packfiles
Git - finding a filename from a SHA1


Adding below to ~/.nanorc did the trick for me:

unbind ^J main

I think it breaks the justify, but I'm more than glad to give it for clean paste.


The short answer is MAYBE. The long answer is, as flash support, Adobe might take a long while to bring this to linux. Big chance that they will bring it as a proprietary software.

Anyway for alternatives you can use the following:

ePDFView
Evince
KPDF
okular
Xpdf

Extracted just my coincidence from a webpage i was working on back in 2008:

http://neogm.com/compatibilidad/

Which i seriously need to update to mysql and php XD.


Inproper connection using RTL8192CU 802.11n WLAN Adapter

First of all, ensure you have the necessary prerequisites:

sudo apt-get install linux-headers-generic build-essential dkms git

Clone the updated driver with git:

git clone https://github.com/pvaret/rtl8192cu-fixes.git

Set it up as a DKMS module:

sudo dkms add ./rtl8192cu-fixes

Build and install the driver:

sudo dkms install 8192cu/1.8

Refresh the module list:

sudo depmod -a

Ensure the native (and broken) kernel driver is blacklisted:

sudo cp ./rtl8192cu-fixes/blacklist-native-rtl8192.conf /etc/modprobe.d/

Let's not take any chances. Instruct Ubuntu to load the new driver when it starts up.

echo 8192cu | sudo tee -a /etc/modules

Reboot.

You're done.

Thanks to P. Varet for this awesome fix.


How can I get the 'Make' command in Ubuntu with USB?

You can install the tools needed to build that driver by using:

sudo apt install build-essential

This will install make and a C++ compiler.


Recommended size in percentage for each partition - Ubuntu 18.04

seriously, why do you need this kind of separation for each mount point. if its your personal computer,then there's actually no need to do this. Linux file system is too cool with that. you can just separate your / partition,swap area and /home partition and if there's requirement then the /boot. and this is totally fine. no need to have so many separate partitions.


Set different domain name on different port

The issue here is that different domains cannot automatically go to different ports.  You'd have to type http://admin.example.com:5555, since your browser will automatically try to use port 80.  There are some DNS configurations that will decide which website to serve up based on domain name, but they expect you to use port 80 for all of them.  If you're using different ports for security reasons, then you really can't bypass that.


I created file ~/.xsession with a one liner xfce4-session.


Build dependencies for emacs24 could not be satisfied 14.04

You could upgrade from Trusty to Vivid. But you use a LTS release, therefore, another possibility:

Change the dependencies with the steps below, but I can not guarantee that it is without side effects. On the other hand you do not have much choice if you do not want to downgrade the other packages.

But it's only a development library and therefore your system will not be otherwise affected.

Forcing installation via

sudo dpkg -i --force-all libwayland-dev_1.4.0-1ubuntu1_amd64.deb

would NOT work, after the next sudo apt-get dist-upgrade or sudo apt-get upgrade you would have the problem

You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libwayland-dev : Depends: libwayland-client0 (= 1.4.0-1ubuntu1) but 1.7.0-0ubuntu1 is installed
                  Depends: libwayland-server0 (= 1.4.0-1ubuntu1) but 1.7.0-0ubuntu1 is installed
                  Depends: libwayland-cursor0 (= 1.4.0-1ubuntu1) but 1.7.0-0ubuntu1 is installed
E: Unmet dependencies. Try using -f.

Therefore

Download the deb file libwayland-dev_1.4.0-1ubuntu1_amd64.deb

cd; wget http://mirrors.kernel.org/ubuntu/pool/main/w/wayland/libwayland-dev_1.4.0-1ubuntu1_amd64.deb

Change the dependencies

mkdir deb$$
cp libwayland-dev_1.4.0-1ubuntu1_amd64.deb deb$$
cd deb$$
dpkg-deb -x libwayland-dev_1.4.0-1ubuntu1_amd64.deb deb
cd deb
dpkg-deb -e ../libwayland-dev_1.4.0-1ubuntu1_amd64.deb
perl -i -pe 's/= 1\.4\.0-1ubuntu1/>= 1.4.0-1ubuntu1/g' DEBIAN/control

Recreate the deb file

cd ..
sudo dpkg-deb -b deb

Install the deb file

sudo dpkg -i deb.deb

Here is the installation on my Vivid

% apt-cache policy libwayland-client0
libwayland-client0:
  Installed: 1.7.0-0ubuntu1
  Candidate: 1.7.0-0ubuntu1
  Version table:
 *** 1.7.0-0ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
        100 /var/lib/dpkg/status
     1.7.0-0ubuntu1~vivid1 0
        500 http://ppa.launchpad.net/gnome3-team/gnome3-staging/ubuntu/ vivid/main amd64 Packages

% apt-cache policy libwayland-dev
libwayland-dev:
  Installed: 1.4.0-1ubuntu1
  Candidate: 1.7.0-0ubuntu1
  Version table:
     1.7.0-0ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
     1.7.0-0ubuntu1~vivid1 0
        500 http://ppa.launchpad.net/gnome3-team/gnome3-staging/ubuntu/ vivid/main amd64 Packages
 *** 1.4.0-1ubuntu1 0
        100 /var/lib/dpkg/status


HP Spectre XT screen dim (completely dark) on boot. Can this be fixed?

I needed to modify the GRUB once again.

I changed the entry from:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"
GRUB_CMDLINE_LINUX=""

Now, when my computer boots up, the LCD backlight is at max brightness. I have to decrease the brightness manually, but I'm glad to be able to see the login screen.

(Apologies) my question seems to be a duplicate. Found the answer here.


This can be solved by using ppa-purge to remove the packages you installed from the KDE Backports PPA:

sudo apt-get install ppa-purge
sudo ppa-purge ppa:kubuntu-ppa/backports


how to increase ubuntu's performance(overall)

I would format the drive completely
Do clean reinstallation, I don't upgrade Ubuntu to newer versions as it slows the OS down, also it goes wrong sometimes... That's the habit from times, when I was using Windows... and it really helps
Install preload:

sudo apt-get install preload

Preload is a daemon – a background service, in other words – that monitors the applications you use on your computer. It learns the libraries and binaries you use and loads them into memory ahead of time so the applications start faster.

remove unnecessary startup applications
use lighter DE

I have bad experience with installing additional DE to existing one. For example when you have Unity and install KDE alongside it... it went always wrong on my PC, weird glitches appeared etc. SO I would suggest downloading Ubuntu flavours as Xubuntu or Ubuntu MATE with XFCE and MATE as their default DE.

decrease swappiness (when using SSD, this is the "must have"), deault value is 60... if you go to for example 30, Ubuntu will write more data to RAM rather then SWAP on HDD, which is slow.

gksu gedit /etc/sysctl.conf

look for vm.swappiness=some value, if that line doesn't exist, you can simply add this line as:vm.swappiness=value you want

And really you will help yourself if you buy SSD!


Is there a driver for the touchpad of the Dell Latitude E7270?

With Linux Minut 18.1 based on Ubuntu 16.04.1, the touchpad is correctly detected:

$ xinput
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Atmel Atmel maXTouch Digitizer            id=11   [slave  pointer  (2)]
⎜   ↳ AlpsPS/2 ALPS DualPoint TouchPad          id=13   [slave  pointer  (2)]
⎜   ↳ AlpsPS/2 ALPS DualPoint Stick             id=14   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]
    ↳ Integrated_Webcam_FHD                     id=10   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=12   [slave  keyboard (3)]
    ↳ Dell WMI hotkeys                          id=15   [slave  keyboard (3)]
    ↳ DELL Wireless hotkeys                     id=16   [slave  keyboard (3)]


Yes, multi-button mice work in Ubuntu according to the community help wiki page... If you have more than seven buttons (note that a clickable scroll wheel counts as three buttons), then you should install imwheel from the Universe repository and run imwheel -cfrom a terminal window to launch imwheel's graphical interface.


Updated version 12.04 & now GRUB line command needed; tab shows many unknown possibilities

try if

update-grub

is sufficient.

If not you need to tell a bit more.
what windows are you using ? windows 7 or windows 8 with newer uefi-bios ?


Why does the Touchpad of Acer Aspire V3-551G not work on Ubuntu?

The OP said:

I solved this problem installing the xserver-xorg-input-synaptics package.


Cannot Access Remote Network IP & Host from Openvpn server

You have configured server.conf and created a self signed certificate, but after that you have missed a step. After creating self signed certificates, edit the server.conf file again and give a path to the certificates in the server folder:

ca /file_path/ca.crt
cert /file_path/server.crt
key /file_path/server.key
dh /file_path/dh2048.pem


just edit the file menu.lst located at /boot/grub

but first you have to create a backup of this file using for example this command

# cp /boot/grub/menu.lst menu.old


Is "laptop-mode-tools" still relevant for 12.04 and the 3.x kernels?

The changes we put into Precise 12.04 LTS pm-utils /usr/lib/pm-utils/power.d address a lot of the best low-risk power savings for a broad range of machines based on some in-depth analysis with a high precision multimeter.  These scripts cover power savings using hdparm, Intel Audio powersavings, PCI device power savings, PCI-e ASPM, USB bluetooth, SATA ALPM, Wireless, scheduler tweaks and VM dirty page settings.

I suspect these changes in 12.04 are a little more comprehensive than the laptop-mode-utils.

For a write up of the testing used for the 12.04 pm-util chanages please refer to:

http://kernel.ubuntu.com/~cking/power-benchmarking/pm-utils-results/results.txt
http://kernel.ubuntu.com/~cking/power-benchmarking/pm-utils-results/pm-tests.ods

We also did a lot of analysis of the PowerTop power saving recommendations that proved to work well (and reliably) across a range of machines and incorporated these into the pm-utils power.d scripts (see http://kernel.ubuntu.com/~cking/power-benchmarking/powertop-good-bad-recommendations) and we ran some community based crowd-sourcing to test these changes, see:

https://wiki.ubuntu.com/Kernel/PowerManagementPMUtils

I hope that throws some light into the kinds of savings one can achieve with the updated pm-utils scripts.

For more details about ways to save power, please also consult:

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


Calling script in script in crontab -e. Failed

Add full path to all commands

/bin/echo "This text"

And also add path to script-in-script.sh.

PATH doesn't work in crontabs.


How can I make SWF files be opened with the standalone player?

Well, I hadn't noticed this myself. In the previous Ubuntu version, you were able to specify as a command an application you wanted to open a specific file-type  with in the Properties > Open With window, but now that doesn't seem possible. You might as well file a bug report for this - it is a very important function that got lost.

I can think of a couple of workarounds though.

1. Desktop file approach

This is one "hacker" way of doing it. In order to start, you must first find out the mimetype name of the SWF file:

Right-click the file and open Properties and stay in the Basic tab. Look for the line that says Type and write down somewhere the last part of that line that is between parenthesis. It should be named something like application/swf-flash or something in that fashion.
Now you must create (unless it already exists, in which case you would edit) a *.desktop file in one of the working applications directories mentioned below:

/usr/share/applications/
/usr/local/share/applications
~/.local/share/applications [recommended]

and in the MimeType field include the mimetype you found in the previous step. To do this, simply create new line and write the following:

MimeType=application/swf-flash;

if you are editing an existing desktop file, append the mimetype you found and a semicolon to the line:

MimeType=mimetype1;mimetype2;application/swf-flash;

This is a working desktop file that I have come up with while you read:

[Desktop Entry]
Name=Flash Player Debuger
Type=Application
Exec=/usr/lib/flashplayerdebugger
Categories=GNOME;Player;AudioVideo;
MimeType=application/swf-flash;

Remember to change application/swf-flash for the working mimetype!

Once completed this step, the application you created a *.desktop file for should appear in within the other applications in the Open With tab in the Properties window of any SWF file.

2. Assogiate application

I don't know if this method still works, but I remember an application called assogiate which would let you change all the file associations made by the system among other things. You might want to install this, its in the Software Center.


Computer went to sleep during upgrade to 13.04, I get a blinking start up screen after restart

I would try to manually complete the update. Restart your computer and hold the Shift key down. You should see a simple menu (the GRUB menu). Select the rescue mode option (it's likely to be the second item on the list) and hit Enter.

If the rescue mode boots correctly, you should be represented with a new menu. Start by selecting the root with network option.

Depending on how badly the system update was interrupted, running the following command may finish the update:

apt-get dist-upgrade

If that commands says that there are no packages to be installed (or complains about broken packages), use these commands one after an other:

apt-get -f install
dpkg --configure -a

It is not necessary to run the second command if the first command finishes without any error messages.


solved it with

sudo apt-add-repository ppa:elementary-os/testing
sudo apt-get update

then the right version of libmutter0d is there


How do I resize the desktop on my second monitor?

Can you configure using xrandr? I'm not sure how you should configure it - as display names can vary, but i think this might work:

xrandr --output VGA 900x1440 --right-of --output LVDS 1280x800

you might want to look into how xrandr's documentation. I've found great success with that whenever I've worked with multiple monitors. It's also comparatively easy to set one monitor up in portrait mode.

AFAIK, even gnome-display-properties and XFCE use xrandr to configure the monitor, and having more fine grained controls might be useful.


DNS points to the right IP, but I can't SSH based on DNS

I suspect that there might be some issues in DNS resolving. try adding the DNS name and corresponding ip in /etc/hosts file and check.


How do I resolve package conflicts between Ubuntu and GIMP?

This kind of issue is usually fixed by a simple apt update.

Let's see why by querying the madison database for the available 18.04 versions of gcc-7-base and libgfortran4.

$ rmadison gcc-7-base
 gcc-7-base | 7.3.0-16ubuntu3       | bionic         | amd64, arm64, armhf, i386, ppc64el, s390x
 gcc-7-base | 7.3.0-27ubuntu1~18.04 | bionic-updates | amd64, arm64, armhf, i386, ppc64el, s390x

$ rmadison libgfortran4
 libgfortran4 | 7.3.0-16ubuntu3       | bionic         | amd64, arm64, armhf, i386, ppc64el, s390x
 libgfortran4 | 7.3.0-27ubuntu1~18.04 | bionic-updates | amd64, arm64, armhf, i386, ppc64el, s390x

You can see that libgfortran4 is the bionic (non-updates) version, and has the bionic (non-updates) dependency. gcc-7-base, on the other hand uses the newer bionic-updates dependency.

There are two common reasons for this kind of de-sync between a base repository and it's corresponding -updates repository on a single system.

The user has recently disabled the -updates repository. Easy enough to check and fix in /etc/apt/sources.list or your Software and Sources control panel.
The user simply hasn't run apt update in a while to refresh (update) apt's local database of available packages from both sources. That's an easy fix, too.

Your file /etc/apt/sources.list should have some combination of mirrors and sources that adds up to:

deb [mirror URL] bionic main
deb [mirror URL] bionic-updates main
deb [mirror URL] bionic-security main

The optional universe, multiverse, and restricted repos can be included on the same lines.


Make Ubuntu run like a new installation again without reinstalling?

Goto Synaptic Package Manager > Click Status Button > choose Installed (Manual) from the left side list. Then you will get all the packages you have manually installed. Select them all and remove.


Use the terminal:

sudo boinc --dir /var/lib/boinc-client

If the project is not attached yet, run:

sudo boinc --dir /var/lib/boinc-client --attach_project [URL] [KEY]

Where [URL] can be found in the project list and [KEY] is given by logging in in project site or by running after registration:

sudo boinc --daemon
sudo boinccmd --lookup_account [URL] [MAIL] [PASSWORD]

For instance, formilkyway@home, I run BOINC with:

sudo boinc --dir /var/lib/boinc-client http://milkyway.cs.rpi.edu/milkyway 6c2b64e6238a1223e3a4f8db56eabb3d

where my key is obtained using:

sudo boinc --daemon
sudo boinccmd --lookup_account http://milkyway.cs.rpi.edu/milkyway/ mymail@address.com mypassword

mymail@adress.com may be replaced by the username for certain project (including the worldcommunitygrid )


How to correctly fix a "dirty" NTFS partition without using chkdsk

Try using ntfsfix, which was part of the old ntfsprogs package and is now located in the ntfs-3g package (which you may already have installed).
This is a command line utility which attempts to fix common NTFS problems. It's been a while since I last used it, but it should do its job simply by typing:

sudo ntfsfix /dev/sdb1

It also offers a specific option to clear the "dirty" flag on the partition:

sudo ntfsfix -d /dev/sdb1

which might or might not be required in addition to the first command. Have a look at man ntfsfix for more information.


Booting Ubuntu causes LAN to stop working in Ubuntu and Windows until BIOS reset

Since you are experiencing this problem in two different operating systems, it could be a hardware issue with the network card.  Try performing a power reset or hard reset on the system.

The following steps are how to perform the reset:

Shut down the computer.
Remove all power from the computer.  (If it is a laptop, remove the battery)
With all power removed, press the power button and hold it for 15 seconds, or press it a few times in a row.
Connect power back to the computer and power it back on.

If this procedure does not work it could be an actual hardware failure and needs to be replaced.

This procedure can work with fixing computers that will not power on, network cards running slow, hard drives not being detected, etc.  Motherboards have capacitors on them that store power.   The slow power drain from capacitors can keep power going to other parts of the motherboard keeping memory in them when the computer is powered off.  Pulling the power and pressing the power button will cause the motherboard itself to try to power back on.  This causes all the capacitors to be drained thus clearing any memory stored.

Hope this helps!


Problem binding a shortcut to a function / multimedia key

Solution using udev

Since HAL is deprecated and udev is now used, this approach is preferred over my other answer (although I think that the solution using HAL is simpler).

However for many function keys you can simply use System Settings > Keyboard > Shortcuts to bind a script, try this first! It saves you a lot of trouble.
For for instance the brightness keys this doesn't work (I don't have a clue why not), so if you want to know how to change the behavior of for example the brightness keys, read on.

NOTE: If you are running a Samsung notebook you can fix all (depending on model) function keys by installing the samsung-tools package from http://www.voria.org/forum/

This howto assumes you know how to use a terminal, and uses the vim editor. If you don't know vim please replace it in the commands by either gedit or nano.

Determining your keyboard

/lib/udev/findkeyboards

should print the keyboards that are connected to the computer, in my case

USB keyboard: input/event9
USB keyboard: input/event7
AT keyboard: input/event4

Now there are two options:

USB keyboards:
If you want to remap your USB keyboard, inspect them by running

udevadm info --export-db | awk '/event9/' RS="" | grep -P 'ID_(VENDOR|MODEL)(?!_ENC)'

where you have to replace the 9 in the awk statement by the correct number. The output should be similar to

E: ID_MODEL=USB_Receiver
E: ID_MODEL_ID=c52b
E: ID_VENDOR=Logitech
E: ID_VENDOR_ID=046d

which correctly indicates that my keyboard is handled via my Logitech USB Receiver (input/event7 turned out to be my Logitech G9 mouse which has some programmable buttons).
Laptop Keyboard :
If you want to remap your laptop keyboard, you should remember the number for the AT keyboard which is 4 in my case. Also get the dmi information  for your laptop:

cat /sys/class/dmi/id/sys_vendor

which is in my case

SAMSUNG ELECTRONICS CO., LTD.

and

cat /sys/class/dmi/id/product_name

which is in my case

305U1A

Determine your current mapping of your function keys

Now we can determine our current keymapping by listening to the keyboard (insert correct number)

sudo /lib/udev/keymap -i input/event4

you can exit this command by using Esc on the keyboard, or Ctrl+c on another keyboard.

If your screen starts scrolling down very hard, press Esc and Ctrl+c a few times and try again with

sudo /lib/udev/keymap -i input/event4 2> /dev/null

or, if you still have the scrolling issue

sudo /lib/udev/keymap -i input/event4 > ~/keymap.log

In the last case you will still have the scrolling but if you press the functions keys they should go into ~/keymap.log where you can read them later.

Now we can check the current mapping of your Function keys by pressing them, which should give you a list like (this is my Fn+F1 through Fn+F12):

scan code: 0xCE   key code: kpplusminus
scan code: 0x89   key code: brightnessdown
scan code: 0x88   key code: brightnessup
scan code: 0x82   key code: switchvideomode
scan code: 0xF9   key code: f23
scan code: 0xA0   key code: mute
scan code: 0xAE   key code: volumedown
scan code: 0xB0   key code: volumeup
scan code: 0x43   key code: f9
scan code: 0x44   key code: f10
scan code: 0xB3   key code: prog3
scan code: 0x86   key code: wlan

Now write down the scan codes for which you want the behavior to change.

Changing the key codes for the scan codes

If you see the key code clearly doesn't cover what you expect the key to do you can have a look in /usr/include/linux/input.h under Keys and buttons to see if there is a key code that better matches  what you actually want to happen. The key codes there are in the format KEY_KEYCODE and you have have to write down the part after KEY_ in lowercase. Sometimes changing this is enough to solve the problem.

The brightness keys however often have the right keycode associated with them, and this is what doesn't allow them to be remapped. So we need to change them to other keycodes. We will use prog1 and prog2 for this example because these aren't in use on my computer, however you can also use f13 through f24, or f20 through f24 if you have an Apple keyboard which has F1 through F19 keys.

Create a custom keymap:
Create a keymap file in the directory /lib/udev/keymaps with a suitable name, have a look at the output of ls /lib/udev/keymaps to see for suitable names. I am going with custom-brightness for the purpose of this question.

sudo vim /lib/udev/keymaps/custom-brightness

and enter the scan codes of the keys you want to change followed by the scancodes you want them to have. My custom-brightness looks like this:

# /lib/udev/keymaps/custom-brightness

0x89 prog1
0x88 prog2

Create a custom key release file. Only if you are changin your laptop keyboard:
Sometimes the key release event is not properly send, causing the computer to hang. To avoid this we will also write a custom key release file

sudo vim /lib/udev/keymaps/force-release/custom-brightness

this file should contain the same scan codes, mine looks like

# /lib/udev/keymaps/force-release/custom-brightness

0x89
0x88

Make sure that the new mappings are loaded in the rules files
Now we need to make sure that your mappings are loaded. We can do this by editing /lib/udev/rules.d/95-keymap.rules, so it is smart to make a backup

Again we have two options:

USB keyboards:
Since you have a USB keyboard you should add your entry under LABEL="keyboard_usbcheck" and it should be past the other entries of your keyboard manufacturer. This is because my keyboard with

E: ID_MODEL=USB_Receiver
E: ID_MODEL_ID=c52b
E: ID_VENDOR=Logitech
E: ID_VENDOR_ID=046d

is already matched by one of the rules, and otherwise it gets overwritten.
Add the following rule, where you should change the ID_VENDOR_ID and ID_MODEL_ID and the name of your keymap appropiately

ENV{ID_VENDOR_ID}=="046d", ENV{ID_MODEL_ID}=="c52b", RUN+="keymap $name custom-brightness"

Laptop keyboard:
If /lib/udev/findkeyboards reported your laptop keyboard as AT keyboard your rule should go under LABEL="keyboard_vendorcheck", otherwise put it under LABEL="keyboard_modulecheck". Again put it under the other entries for your laptop manufactorer. Add the following rule (SAMSUNG ELECTRONICS CO., LTD. is bit long so I used a wildcard`)

ENV{DMI_VENDOR}=="SAMSUNG*", ATTR{[dmi/id]product_name}=="305U1A", RUN+="keymap $name custom_brightness"

Now also add a rule to /lib/udev/rules.d/95-keyboard-force-release.rules after backing it up

sudo cp /lib/udev/rules.d/95-keyboard-force-release.rules /lib/udev/rules.d/95-keyboard-force-release.rules.bak
sudo vim /lib/udev/rules.d/95-keyboard-force-release.rules

Again under the other entries of your manufacturer add

ENV{DMI_VENDOR}=="SAMSUNG*", ATTR{[dmi/id]product_name}=="305U1A", RUN+="keyboard-force-release.sh $devpath custom_test"

Make sure udev loads the new rules
To load the new rules run

sudo adevadm trigger

NOTE: udevadm control --reload-rules (still in instructions on many websites) does not work.

Now check if the rules were applied successfully by

sudo /lib/udev/keymap -i input/event4

which should now report for the brightness keys

scan code: 0x89   key code: prog1
scan code: 0x88   key code: prog2

Remap the keys in System Settings
If the last step reported the correct key codes, either the keys start automatically working (in case they first had the wrong key codes).

For the brightness you still have to bind the keys to a scrip which is now possible using System Settings > Keyboard > Shortcuts.

Enjoy

Notes:

If your keys had the wrong key code and were fixed by this approach, please follow the instructions in /usr/share/doc/udev/README.keymap.txt.gz (you can open this without extracting using zless) and send your results the email adres mentioned there, then the changes can be included in the next release. Many users will benefit!
Many thanks to this helpful post by Vaidas Jablonskis.


How to associate an icon with a shell script?

Try modifying your .desktop file. Look for the [Desktop Entry] for your java file and change the Icon value.

Making a "launcher" that will run your script will let you do this. Make a file called MyApp.desktop then edit it with a text editor like gedit.

Next paste this code into the file, changing the values for your program-

[Desktop Entry]
Type=Application
Name=MyApp
Terminal=true
Exec=/usr/bin/MyApp.sh
Icon=/usr/share/icons/icon.icon

For Exec= put the path and name of your script file, for Icon put the location and name of the icon you want. For Terminal= put true or false if you want it to show the terminal or not.

This will give you a file that you can put anywhere, in the unity launcher, or on the desktop that you can run the script and it will have the icon you want.


No, brtfs is not stable yet. Unacceptable performance issues have been reported on common use cases.


Media player that can be told what tracks I want to skip

You can use gmusicbrowser for that. It includes powerful filtering options which allow you to add filters (or intelligent playlists, as other players call it) such as "Comment does not include '[SKIP]'", "Rating >= 50%" or "Rating set to default".

When creating your filter rule, be aware that comments are saved in the file metadata while ratings are saved in gmusicbrowser's settings file ;)


dpkg: error processing package unity-tweak-tool (--configure)

Run

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

as recommended by the error message. You have probably deleted some of the files manually and broke the package.


In Ubuntu/Lubuntu 15.04 airodump-ng is provided by the package aircrack-ng from the default Ubuntu repositories. To install it open the terminal and type:

sudo apt install aircrack-ng

The dependency for aircrack-ng in Lubuntu 15.04 is not called libnl1, instead it is libnl-3-200.


How can I wipe my hard drive from the Debian command line to install Ubuntu to a blank hard drive?

If you're just looking to wipe the entire hard drive, you can just run:

sudo dd if=/dev/zero of=/dev/sda bs=4M

Assuming that sda is is the hard drive you want to wipe.

That being said, be careful! This will wipe THE ENTIRE HARD DRIVE, INCLUDING ANY OTHER OPERATING SYSTEMS YOU MAY HAVE INSTALLED. Since you overwrote your windows with debian anyway, you're probably hosed on that front, so this isn't so bad in your case.

I'm also not sure how long it will take - it took <1s on a 4 GB flash drive for me, but for a large HDD it could take a while.

That being said, this is not the best way to go about this. What you really want to do is
just pop in the live CD/USB and try again. The way to do this, from your current situation is:

For ubuntu 14.04 64-bit:

wget http://releases.ubuntu.com/14.04.1/ubuntu-14.04.1-desktop-amd64.iso

Plug in a flash drive, type dmesg and see at what /dev/sdX it mounted it (I'll say /dev/sdc for the example)

sudo dd if=ubuntu-14.04.1-desktop-amd64.iso of=/dev/sdc

The magic thing about ubuntu ISOs is that you can write them directly to the metal of a flash drive and be able to boot into it.

Reboot your computer and choose the flash drive from the boot menu your BIOS gives you, continue installing ubuntu as normal.


Removing

set-option -g default-command "reattach-to-user-namespace -l zsh"

from the configuration fixed the problem for me.


How to put the laptop to sleep/hibernatation by closing the LCD lid?

When an HDMI monitor is plugged in, the system considers it "docked" as if it were plugged into a docking station. As such you need to use:

sudo -H gedit /etc/systemd/logind.conf

Change the line:

#HandleLidSwitchDocked=ignore

to read:

HandleLidSwitchDocked=suspend

Then save the file and reboot.

Note: This is the most common solution and if it doesn't work we can explore other options.


Checking a floating point value within a range

You can't use && inside single square brackets. You have different options, though:

Use -a inside of [ ... ].

if [ $(bc <<< "$result > 17.5") -eq 1 -a $(bc <<< "$result <= 18.2") -eq 1 ]

Use double square brackets [[ ... ]] that support &&.

if [[ $(bc <<< "$result > 17.5") == 1 && $(bc <<< "$result <= 18.2") == 1 ]]

Use two [ ... ] conditions separated by &&.

if [ $(bc <<< "$result > 17.5") -eq 1 ] && [ $(bc <<< "$result <= 18.2") -eq 1 ]

You can use string compare on the result of the two expressions

[[ $( bc <<< "$result > 17.5; %result <= 18.2" ) == $'1\n1' ]]

bc understands &&, too:

if [[ $(bc <<< "$result > 17.5 && $result <= 18.2") == 1 ]]

I'd prefer 5.


apt-get update

Refreshes the repositories and fetches information about packages that are available online.

apt-get upgrade

Downloads and installs updates for all installed packages - as long as it doesn't bother dependencies (install new packages, remove old ones or crosses a repo source (switch a package from one repo to another)).

apt-get dist-upgrade

Does the same as "upgrade" but upgrades a package also when dependencies or sources are changed (something you want to avoid on servers without further testing).

To conclude - an update can break things but it is necessary!
So if you are on a desktop you should normally do a:

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

Without destroying something.

On a server most of the times a:

sudo apt-get update && sudo apt-get upgrade

should be enough AND security updates should be installed automatically (on servers and desktops)

Update to 16.04

Meanwhile the "apt" wrapper is the standard way in Ubuntu, so the commands are now:

sudo apt update        #to update the repo-information

sudo apt upgrade       #to install all security fixes and changes that doesn't harm the system or change the behaviour

sudo apt full-upgrade  #the new "dist-upgrade" that installs newer versions that can break backwards-compatibility

TL;DR!

Yes, you should update PHP in this example because it is a security fix (this can be seen through the versioning scheme of PHP; it also wouldn't have been pushed into the "upgrade" channel of Ubuntu.)


How to install themes in Ubuntu 14.04 LTS

If the .themes directory doesn't exist in your user's /home directory, you can just create it, then put any downloaded themes in there.

This alone will not install the theme, that's where the unity-tweak-tool comes in. This guide is nice and clear, they only add the Numix ppa as an example, but the rest of the instructions should be applicable.


How do I configure the ndots option in /etc/resolv.conf from netplan?

You have two separate issues:

host -t A bar.foo explicitly looks for an "A" record for "bar.foo".  Assuming you mean that "bar.foo" is a CNAME for "foo", I think specifying the -t A should return NXDOMAIN as there is no A record.
Netplan.io defers to system-resolved for DNS management.  It appears that systemd explicitly opted to NOT support ndots-like functionality.  I think this is a moot point as your problem is because of your options to the host command as described above.


Ubuntu doesn’t load after restoring BIOS

Access the BIOS setup utility when the computer is booting and change the boot mode from Legacy to UEFI. On the boot device menu, select the option that identifies both the firmware mode and the device. For example, select UEFI: SSD if the bootloader is installed on an SSD.

Select the Boot tab.
Use the up and down arrows to select the appropriate Legacy or UEFI boot mode, and press Enter.
Press F10 to save the changes and exit the screen.


This is a good tutorial: How to add and switch keyboard layout on Ubuntu 20.04 Desktop

Adding the input method "English (US, intl., with dead keys)" seems to work for me.


libreoffice writer --safe-mode

allowed me to disable the Antidote 8 extension (which was designed for LO 4). The problem is solved, thanks anonymous2.

So the Antidote 8 extension for LO isn't working anymore with LO 5... too bad.


How do I download Ubuntu for another computer, that has no Internet access?

The installation disk, with the default selection of programs, will fit on a CD - largely because it's designed to do so. The desktop version is bootable and can be run independantly.

Ubuntu booted off a LiveCD does not do anything to the host system hard disk unless you ask it to by selecting the "Install" option.

You may want to make a LiveUSB instead - this will perform much better than a CD, and also provide the option of storing data persistently across sessions.

For more serious use, I install Ubuntu "properly" to an external hard drive, and direct the host computer to boot from that. This works well over both USB and eSATA interfaces. Some slight care must be taken when installing updates in this mode - I have known the bootloader, when it's updated, to be written over the bootloader on the host system.


How do I make the Suspend Option Appear in 14.04 with Cinnamon 2.2

One way could be create a .desktop that can do the suspend action using a command.

Please see the necessary information to create a .desktop here:
https://askubuntu.com/a/102903/352251

Then read about the potential commands to produce a supend or hibernate here:
How can I suspend/hibernate from command line?

As an alternative you can install this applet:
http://cinnamon-spices.linuxmint.com/applets/view/175


Reboot the machine and check once

if its not solved

Check mount /dev/sr0 /media

Did your External Drive was in ext4 file system or its a NTFS ?


The OLELoadPictureEx errors are due to Wine bug 14218

However, they don't look like they should be fatal to an installer.  Could you try using the latest Wine1.3 beta here and report back?

Additionally, the Wine Application Database might be of help.


You are kind of going about this in the wrong order.

Try this:

First create the loop device:

sudo losetup /dev/loop0 /root/virtual.ext4

Second, create a mount point for the device, replacing <newdir> with an appropriate directory name

sudo mkdir /mnt/<newdir>

Thirdly, mount the device.  You will need to use appropriate options if you want to use this as a RW device.

sudo mount /dev/loop0 /mnt/<newdir>

Reverse the process to remove the device:

sudo umount /mnt/<newdir>
sudo rm -r /mnt/<newdir>
sudo losetup -d /dev/loop0

copied
 almost verbatim from http://www.walkernews.net/2007/07/01/create-linux-loopback-file-system-on-disk-file/


Dual booting Ubuntu 20.04 LTS version alongside with Windows 10

Another thing to try may be to turn off secure boot. I've encountered similar issues and that has resolved them


Edit existing desktop shortcut on Ubuntu 18.04

It turns out that you have to rename the desktop file in .local/share/applications to change the name of the icon in the desktop toolbar where the displayed name is shown.


How to backup and reinsert .bashrc-like files with post-install script?

Here's some of the suggestions I can give. Since .bashrc and .bash-aliases are just text files, you can use text storage websites, or just general cloud storage services, like dropbox.

TL;DR IMHO, the best option is git ( 3rd entry in this post )

pastebin.com and paste.ubuntu.com

These websites' purpose is to allow pasting and sharing plain text or code, however you can use it as temporary storage. Typically they keep the entries for up to 2 years.

Knowing a raw link to your paste, you can download that file with curl. Here's an example of me using curl to download paste of my .mkshrc file:

serg @ ubuntu $ curl http://pastebin.com/raw.php?i=8ETyB88j
PATH=$(echo $PATH:$(find /home/xieerqi/bin -type d -printf "%p:"))

PS1='serg @ ubuntu $ '

alias ls='ls --color'
alias addx='sudo chmod +x *'

As you can see I've downloaded that as plain text, the command also can be redirected to a file , for example curl http://url.com > filename

http://textuploader.com/ also allows storing plain text but the maximum I saw is 1 year

dropbox or other cloud storage

This is probably better option. The disadvantage is that you probably won't be able to download it with curl , but you can still download it with dropbox client, place in the same working directory as whatever set-up script you run, and that should do the job.

git or other version control software

git's purpose is to aid developers in " is the management of changes to documents, computer programs, large web sites, and other collections of information " (Source: Wikipedia). From my own experience , I've set up a github.com repository, downloaded git ( with sudo apt-get install git ) , and uploaded some of my scripts from command line in less than 20 minutes.

Having signed up for github, I've done from command line:

git init
git add README.md
git config --global user.email "******@email.com"
git config --global user.name "username"
git commit -m "first commit"
git remote add origin https://github.com/UserName/repository-name
git push -u origin master

And to retrieve stuff:

git clone https://github.com/SergKolo/repository-name

It's simple, allows you to keep track of revisions, and more importantly - there's no limit on storage time.

Special thanks to uses terdon and A.B. who introduced me to git and github


Problem with Ubuntu password setting with numpad off

I solved the problem by using getty terminal(Ctrl + Alt+ F1). I provided the password the same way I set it( using numpad with num lock). I don't know how it worked but it did.


both shift keys not working on Ubuntu 20.04.1 LTS

You can easily fix this by re-installing the input X Server’s driver again. But since the keyboard is not working in the first place, this gets a bit tricky. So, here is how you fix the keyboard not working:
Go to settings > Universal Access > Screen Keyboard (enable)
Search for the 'terminal' and type in:
sudo apt-get install xserver-xorg-input-all
Type in your password and hit enter.
Once we have the X Server keyboard input drivers installed, reboot your System. When the system is back up and running, you should be able to use your keyboard (and mouse).


Garbage on rotated screen when I rotate a certain monitor

So I resolved the issue by upgrading xorg using the xorg-edgers ppa.

What are PPAs and how do I use them?


Just tried this now on 14.04. Here is how I did it, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh

Once it finished installing, I typed heroku apps.  see image below for more info.


I found that it is because of a bug which is for usb 3.0 devices

https://bugs.launchpad.net/ubuntu/+source/usb-creator/+bug/1294877

hope that this will be fixed soon :)


Executing a program (.exe) from a USB stick

Files with the extension .exe are usually made for Windows, not for linux. In some cases such files can be run via Wine, but usually it is better to look for a linux program that can do the same or similar things.

In this particular case I think gpg is the linux alternative, and it comes (already installed) with Ubuntu. You can read man gpg and look for tutorials via the internet.


New to ubuntu can not find vlc on ubuntu search or install need some help here please

Install the latest version of vlc in Ubuntu via PPA

sudo add-apt-repository ppa:videolan/stable-daily
sudo apt-get update
sudo apt-get install vlc

Through the Ubuntu Software Center, you can download and install any software in Ubuntu.
Download Ubuntu software center from here.


I spent a few hours yesterday fiddling with nginx and gogs configurations with no luck.

What did work was to set the A Record on the DNS configuration of the domain name for the git subdomain to point to the right IP address.


How can I see what files have synced and how do you restore lost files?

You can login to Ubuntu One's website to view all of your synced files and folders between devices.

The Ubuntu One control panel provides the desktop experience, and on a new install of Ubuntu (or Windows etc) the control panel will show you the same folders that you have synced on other devices: selecting the checkboxes will download the folders locally and continue to sync them (restoring).


what does "-n" mean in a terminal command?

From the documentation:

usage: conda create [-h] [--clone ENV] [-n ENVIRONMENT | -p PATH] [-c CHANNEL]
                    [--use-local] [--override-channels]
                    [--strict-channel-priority] [--no-channel-priority]
                    [--no-deps | --only-deps] [--no-pin] [--copy] [-C] [-k]
                    [--offline] [-d] [--json] [-q] [-v] [-y] [--download-only]
                    [--show-channel-urls] [--file FILE]
                    [--no-default-packages]
                    [package_spec [package_spec ...]]

  ...

-n, --name    Name of environment.


What is the best way to keep two bzr repositories in sync?

One option would be to make the the repository in one location "bound" to the other. With this option, bzr acts more like a tradition vcs than a dvcs. Each commit in the "bound" branch is automatically pushed to its parent. Though this is generally designed with the idea that the parent will not have working trees. As I imagine you want to hack on both your laptop and desktop, that's not the case. You'll have to run bzr update for the working tree to be updated.

There is an automirror plugin that I haven't used. It hasn't been active for awhile, but it might just be feature complete.

See:

http://wiki.bazaar.canonical.com/BzrUsingBoundBranches

https://stackoverflow.com/a/7630846/598929

http://doc.bazaar.canonical.com/plugins/en/automirror-plugin.html


How to read file starting from a specific number of line within the "while read "?

while IFS= read -r line; do
    # ...
done < <(tail -n "+$lineNumberIs" $dataFile)

tail -n +K (with the plus sign) tells tail to start at the specified line number (see the man page).

The <(...) bit is a process substitution. It lets you specify a command sequence and let bash read from it like a file. It's very handy when you want to avoid the effect of the subshell created in a pipeline.

IFS= read -r is used to read the line exactly s it appears in the file, with no spaces or escape sequences removed.


I cannot install any software on my freshly installed Ubuntu 16.04 LTS

1- First of all run sudo apt-get update and check if the problems persists

2- Maybe the repository is disabled.

You can enable it in the grafical way, going to settings and then ubuntu software
You will see something like this

check them.

You can also enable then in command line. Press ctrl + alt + t and:
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"

Source: How do I enable the "Universe" repository? https://help.ubuntu.com/community/Repositories/Ubuntu


The PPA in question is outdated, its most recent supported Ubuntu release was “wily” (15.10). You should not use such a PPA on any currently supported Ubuntu version.
See also: What can I do if a repository/PPA does not have a Release file?, especially the answer by N0rbert might help you.


duplicate a 32GB disk image from a 64GB usbstick

I'm going to have to modify the larger partition first so am closing this thanks for the help and info
accepted

I should have stated that the original machine had Windows 10 installed which occupied about 24GB of the 32GB available! so there wasn't enough room to install linux alongside. The only time I will want to restore this abomination is when I'm ready to dispose of the machine.


Error wiping newly created partition /dev/sdb1

The most likely reason for the error message is that there is a directory called /dev/sdb1 preventing the creation of the device node for accessing that partition.

I'm guessing that in the past you accidently created this directory as a mount point under /dev.  You can check if you have with:

ls -ld /dev/sdb1

If the first character is d, you did, and you need to delete or move this directory elsewhere.

sudo mv /dev/sdb1 /tmp

If you get the error message:

mv: cannot move ‘/dev/sdb1’ to ‘/tmp/sdb1’: Device or resource busy

then something is still mounted there.  In which case mount | grep sdb1 to find out what it is, then try again with:

sudo umount /dev/sdb1
sudo mv /dev/sdb1 /tmp

It will now be able to create the device file when you next reconnect your flash drive, and should be able to create and format the first partition on that drive.


Cannot connect to wired connection after clean install (both 14.02 LTS and 15.04)

This appears to be a common issue with the network card. A similar issue was brought up a while back, and may find this helpful. Let us know!

Realtek Network Card Driver

I would also check and see if there is linux drivers included for the motherboard. I just bought a ASUS motherboard and was fortunate to find some.


How Do I Install Ubuntu 14.04 on Toshiba Portege z935 Using Something Else?

Step 1: Boot up the CD/USB and go into live mode (try without installing), when the computer has boot up, go to the terminal and enter sudo parted -l get to partition table for the disk you want to install ubuntu on with the disk space of roughly 128GB and make note of it.
(we will continue this process later on).

Basic recommended install

The most basic and recommended partitioning for a fully functional system, is a swap partition and a root partition / consuming the rest of the diskspace.

More Advanced Install

For this I will recommend;

DiskSpace -The goal of this page is to offer advice and strategy on partitioning a Linux system.

After this, begin the installation process.

When the installation arrives at Installation Type screen, select Something else

Now, on the next screen

Select the appropriate drive, the one you want to install the OS on with the 128GB or roughly estimated at 131072MB. This might be /dev/sda

We are going to be creating three partitions. BIOS, / (root) and swap
Select create new partition table... (option in the bottom left)

Partition 1 bios_grub

Select the free space and create the first partition which is the BIOS by clicking on the plus (+) button on the far left, horizontal to new partition table.

Your options for this partition should match the screen-shot below and click OK

Partition 2 swap

Swap is a controversial topic. However the amount of swap should be given on the premises of whether of not you're gonna be hibernating your pc. If you are going to hibernate, swap should be the size of RAM else 4GB (4096MB) should be fine. Choose accordingly and OK again.

Partition 3 / (root)

Basic: Give Root Partition Remaining Space

Advanced: Create a separate /home partition for personal files.

Recommended root for Disk Space available, 30GB
Give /home rest.

Follow snip below for root or alternate for /home partition

Select 128GB SSD to house boot loader


The Ubuntu setup will give you three options: "Install Ubuntu alongside Windows 10", This is the one you select if you are going to dual-boot. "Replace Windows 10 with Ubuntu", you can use this solution to erase Windows 10 and install Ubuntu. Or "Something Else", which allows you to resize partitions and you can select how much space the Ubuntu install will take up on your hard disk.


What is the difference between 'gnome-software' and 'ubuntu-software'

Canonical, the makers of Ubuntu, created the Ubuntu Software Center (software-center) as a user-friendly way to discover and install apt packages (friendlier than Synaptic, which was the package manager at the time).

Then the GNOME project thought, "hey, that's a really good idea. Let's make a software center for GNOME. It'll follow our own user-interface principles, and it'll work on all sorts of different Linux distributions, not just Ubuntu." Over time, they created the GNOME Software Center (i.e. gnome-software). (Now that I think of it, it's possible the Gnome Software Center already existed first, but Canonical rejected it for whatever reasons, deciding to write its own version instead. I think they were criticized over that decision, but it's their right.)

Both Software Centers existed for a while, but then Canonical changed their minds and decided it was silly to have two teams working on such similar projects. So in the latest Ubuntu release they have totally discontinued the Ubuntu Software Center in favor of using the GNOME Software Center. This will remain the default software center in the forseeable future of Ubuntu releases, and Canonical will work to improve the code and integrate it with Ubuntu.

However, many users who upgraded their installations to 16.04 from an older version (rather than doing a fresh install) now have both software centers, since the upgrader program tends not to like removing packages unless they're not being used anymore.

(disclaimer: I could have the timeline of events wrong; feel free to correct me)


Running an OpenStack test environment at home

I would go to the source on this one:

http://www.ubuntu.com/download/cloud/install-ubuntu-openstack

Their hardware requirements are high, not in terms of resources, but in terms of the amount of hardware needed:

  Installing Ubuntu OpenStack requires at least seven machines with two >disks, two of which have two network interfaces (NICs). Install Ubuntu >Server on one of the machines with two interfaces.

To meet these requirements, you can use the HP DL360 and some older machines you might have laying around or you can use VMs as noted in http://docs.openstack.org/juno/install-guide/install/apt/content/ch_basic_environment.html#basics-prerequisites

You can use many tools to create VMs, but as you would wind up with nested virtualization, Virtualbox is not an option.


My Bluetooth mouse freezes while being actively used

I had this problem on Mint 19.3 with a Microsoft Arc Mouse. It kept freezing at random intervals. The only way to get it working again was to shut the mouse down (in the case of Arc mouse this means un-arcing and re-arcing (is this even English?) it). Somehow I solved this by booting Mint with an older kernel (in GRUB, I jumped back some 4 versions). Using that kernel I removed the mouse (in Bluetooth), paired and connected it. And it worked flawlessly. After booting again in the latest (default) kernel. The mouse kept working as it should. No idea why but this worked for me. Goo luck!


Yes.
Create the folder .themes in your $HOME if you don't find one.


In order to use a 3rd party email client, Yahoo Mail wants you to generate a password which is different from the one you use to access your account on https://mail.yahoo.com

You can check here how to do that.


vsftp user created files cannot be read by apache2

You need to set the 'local_umask' option in vsftpd.conf (its default value is '077' IIRC, which you might want to change to '033' or '022').


Ubuntu 16.04 ubuntu-make android error: a default framework for category Android was requested where there is none

I found a solution in another askubuntu thread: Why can't I get Android Studio from umake anymore?

The following, taken from above link, worked for me, even though I am using Linux Mint:

You need to have the latest Version of umake, which is 17.03 as of the time of writing. Mine was old, so I replaced it.

umake --version

Don't install umake from the standard ubuntu repositories, instead add ubuntu-desktop repository to get latest umake version. Add repository by

sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make

Update software Source

sudo apt-get update

Now install/upgrade umake

sudo apt-get install ubuntu-make

Now install Android Studio by

sudo umake android


Problem with kernel 3.11.0-19-generic in Ubuntu 13.10

There was another update yesterday, and now it works.

Here's what I can see in the history:

The problems started after the updates on Tuesday ("mardi", Apr 1 2014), and were solved after yesterday's updates ("jeudi", Apr 3 2014).


You want -o (show the matched string only) and -w (match pattern as a whole word only)

$ echo "asjhdhahsjdajhsdabcasjdhas abc asdasdabc" | grep -ow abc
abc

Thanks to steeldriver for explaining how you can actually use the < and > instead of -w to indicate word boundaries. They should be \< and \> but the backslashes have to be quoted to be passed to grep as well as the < symbols, since they also have special meaning to the shell. So strong-quote the expression like this:

echo "asjhdhahsjdajhsdabcasjdhas abc asdasdabc" | grep -o '\<abc\>'

or go crazy with the backslashes:

echo "asjhdhahsjdajhsdabcasjdhas abc asdasdabc" | grep -o \\\<abc\\\>


Owncloud client : "No service keychain available" [Ubuntu 18.04]

The gnomekeyring package is missing :

sudo apt-get install libgnome-keyring0

Close the session, reopen it and enter for the last time the password. It should now be saved in Seahorse correctly.


Can't load WiFi adapter (Wireless-AC 9560 [Jefferson Peak])

This problem persists with Intel Wireless-AC 9560. Till now, there is no solution for this.
I have tried everything from switching to older kernel to updating the drivers.
There can be some work arounds:

Use external WiFi adapter.
Use USB Tethering from your phone.


Is the hard drive working on the laptop? Have you gone into setup on the BIOS and verified that your hard drive is present and visible? Have you tried the "Try Ubuntu without installing" option? That should read the OS into memory and can help diagnose hardware issues. If you have no bootable partitions or if the drive just failed, then it would be hard to perform an install and it would just appear to hang.

One thing have also seen in the boot up sequence for the install is a long "hang" if too many peripherals are installed (external storage usually the culprit). Can you verify that no external drives are attached as well? That might take a while to start the install as it verifies the external drives as well.

Just my personal experience though YMMV. Would not expect a failure to install these days unless you require the alternative Boot ISO due to some driver issues.


How do I save a shell's stderr and stdout to a file while still having it output to the terminal window?

I usually add 2>&1 | tee -a <filename> to the end of my commands so that stderr is redirected to stdout, then tee displays it onscreen while writing the output to a file.


Screen position changed after changing resolution using xrandr

Just came across this and tried the auto-adjust/auto-configure button on my DELL monitor. It appeared to have solved the issue. But when I switched to my Windows 7 PC (I use a KVM switch to toggle between my PCs), I saw that it had affected the positioning there.

So, I played around with Screen Resolution settings in my Windows 7 PC and changed the refresh rate from the default 60Hz to 75 Hz. And Voila! It positioned itself back to normal! Having read in this post that it recurs at startup everytime, I tried restarting the system as well as shutting down and turning it on back again too. I can confirm that it is back to normal now.

This has fixed the issue but for the sake of my curiosity I would love to know the mechanics behind this. It would be helpful if someone explained what is the exact reason behind this behavior. It doesn't appear as something that has got to do with xrandr afterall!


You have two options:
Hex edit vesamenu.c32

Open vesamenu.c32 in a hex editor.
Edit it.

Edit the source vesamenu.c and recompile

Open vesamenu.c in a text editor
Edit it
Re-compile it to vesamenu.c32


I managed to stop this behavior by switching from gnome classic back to the current gnome on the login screen.

After making this change my system no longer automatically enlarges on UI login when it does not need to and everything looks fine.


If you don't have over 4GB of RAM, then you don't need PAE. Ubuntu 12.04 and newer by default require PAE hardware.


How to share a single session between more than one user at the same time on Ubuntu 12.04

Edit the sesman.ini and unders the section [Sessions] add the following :

AllowSharing=1


For MySQL 5.7.6 and newer as well as MariaDB 10.1.20 and newer, use the following command.

ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password';

For MySQL 5.7.5 and older as well as MariaDB 10.1.20 and older, use:

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('new_password');


GnuPG 1 and 2

First of all, GnuPG 1.4.14 is not really outdated, there are two branches of GnuPG developed at the same time. Also see Are gnupg and gnupg2 compatible with each other?

On Debian and derivated distributions, GnuPG 1 is installed as gpg, whereas GnuPG 2 is installed as gpg2 (but you might need to install the gnupg2 package).

Key Versions

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1

This is not an OpenPGP v1 key, the comment just indicates that GnuPG 1 created it. Both GnuPG 1 and 2 generate OpenPGP v4 keys. You can see what format is actually used by running (no matter whether using gpg or gpg2)

gpg --export [key-id] | gpg --list-packets | head

which will output something like

:public key packet:
    version 4, algo 1, created 1356475387, expires 0

(Not) Building GnuPG on Your own

I strongly recommend not building GnuPG on your own. Apart from verifying sources, you need to regularly recompile to get security updates. Mint Linux already includes a fairly recent version of GnuPG 2 (2.0.22) with all security fixes backported, it should be totally fine sticking with that until a newer distribution will bring a new minor version.