How can I install Adobe Reader on Ubuntu 17.10

As stated on the german wiki, Adobe Reader is not in partner sources anymore. Instead it is recommended to install Acrobat DC via playonlinux.

sudo apt install playonlinux
playonlinux

click on "install a program" and wait for the list to get refreshed. Search for Acrobat as soon as it is finished:

You will be guided through the installation. It will take some time but after that you can run Acrobat DC via wine.

Edit: Errata

With current Ubuntu 17.10 and wine 1.9.0 Acrobat DC installation seems to be hanging.

There is a solution from Martin Bruvelis, the maintainer of the install recipe on playonlinux using wine 2.2.1 and the newest download link. It is not yet accepted as a working solution but it will probably the next days.

Download the install-script manually under the section "new sourcecode" revision 2017-11-20 11-38 published on 20 November 2017. Save it in your Downloads directory i.e. under acrobat_new.sh. Then install from the menu using "run local script":

Acrobat DC will install successfully:


How to make octave configure detect Qt in Ubuntu 14.04

If you have installed the required Qt packages in their standard locations, then AFAIK no special steps are required to make the Octave 4.0.0 configuration script detect them.

According to the INSTALL.OCTAVE file provided with the source distribution, the required Qt components are:

Qt
     GUI and utility libraries ().  Qt is required for building the GUI.
     It is a large framework, but the only components required are the
     GUI, core, and network modules.

on Ubuntu, you can obtain these libraries and their header files by installing the libqt4-dev development package.


I recently found a crude solution to this: purging all nvidia* related files using:

    sudo apt-get purge nvidia*
    sudo apt-get purge bumblebee*
    sudo apt-get update

And then using "Additional Drivers" from Dash, I selected "Using Nvidia binary driver- version 331.38 from nvidia-331(proprietary,tested) and selected "Apply Changes" to confirm.

A short download later, I could run glxgears with 4 times the framerate I ever got with the Intel HD 3000.

Although this is not a solution to my problem, still it enables me to use my Nvidia GPU,so I think i'll use this for now till I get a satisfactory solution to bumblebee.


How to limit network bandwidth apt-mirror

According to another question over on ServerFault, apt-mirror has this ability built-in. Just add the following line of code to your mirror.list file:

set limit_rate 50k

The answer also states that the limit is per thread, so if you have 10 threads, the limit would be 50k * 10 = 500k. It also appears that the setting is in KiloBytes/s instead of KiloBits.

Source: https://serverfault.com/questions/88780/how-can-i-limit-the-bandwidth-of-apt-mirror


The right way to compare those two strings (S1 and S2) using if is:

if [ "$S1" = "$S2" ]

Do not be stingy in use spaces in this case.

See: http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_01.html


Texmaker not displaying the menu bar with Ubuntu 14.04 and Gnome 3

I had exactly the same problem, and solved it by maximizing the Texmaker window before rolling mouse on the program header. Also it works if you place mouse over the panel on the very top of the screen even without maximizing (not the panel with the close-minimize-maximize buttons). Hope it could also help you!

[Update]: screenshot can be found here:

Red arrow shows where you likely tried to put cursor on, and green arrow shows position where it should be put - at least how it worked for me.


What is the best way to have output of multiple commands in one console?

(Note: You can only Display one program/task at once. Also, some programs like apt-get don't work properly this way.)

First, add an & symbol to the end of the line, so the line looks like this:

karma start & coffee -o js/app -cw coffee/ & sass --watch sass/:css/ &

That puts the last program in the background too.

Then, type in jobs to list the programs. You'll then have an output that somewhat resembles this:

karma start [1]
coffee -o js/app -cw coffee/ [2]
sass --watch sass/:css/ [3]

To bring a program to the foreground, type fg followed by the number of the program. For example, to bring karma start to the foreground, type fg 1. To put it back in the background, press Ctrl+Z. Repeat as required.


Try to reinstall xserver-xorg-input-synaptics

sudo apt-get purge xserver-xorg-input-synaptics
sudo apt-get install xserver-xorg-input-synaptics

Then

synclient -l | grep TouchpadOff

if this outputs "1".

Change it to "0" by

synclient TouchpadOff=0


You can use iptux

iptux is an IP Messenger client for Linux.

It supports:

auto detect other clients in the intranet.
send message to other clients.
send file to other clients.


I face same problem and get in a solution:

Download the JDK here.
Then go to /var/cache/oracle-jdk7-installer/
In that dir remove jdk-7u51-linux-x64.tar.gz and paste the version downloaded from Oracle website.
Try sudo apt-get install oracle-java7-installer again.. this time should work fine!


Resetting User Configuration

For some reason, pulseaudio's user configuration files can become corrupt(unsynced?) in some way, and deleting them (and forcing fresh ones to be generated) fixes a no sound condition. After using the command below, log out/in.

Ubuntu 12.10/Quantal (and earlier)

rm -r ~/.pulse*; pulseaudio -k


Install pkg-config.

sudo apt install pkg-config

If the problem is solved you're done, otherwise continue to step 2.
Install watchman.

sudo apt install -y libssl-dev autoconf automake libtool build-essential python-dev
cd $HOME
git clone https://github.com/facebook/watchman.git -b v4.9.0 --depth 1
cd watchman
./autogen.sh
./configure
make
sudo make install


Hidden parts of recently uninstalled software

1) Yes, downloaded packages are stored in /var/cache/apt/archives/. You can remove them by running sudo apt-get clean.

From man apt-get:

  clean

    clears out the local repository
    of retrieved package files. It removes
    everything but the lock file from
    /var/cache/apt/archives/ and
    /var/cache/apt/archives/partial/. When
    APT is used as a dselect(1) method,
    clean is run automatically. Those who
    do not use dselect will likely want to
    run apt-get clean from time to time to
    free up disk space.

2) Packages gets updated over time. When you're notified of new updates, packages have not been downloaded yet (or you must have configured otherwise, and packages are downloaded, but not installed).
If you make your packages information up to date by running sudo apt-get update or pressing Refresh in your package manager, the latest versions of packages will be known to the package manager. When proceeding with the upgrade, either by running sudo apt-get upgrade or by pressing Apply at Synaptic, the latest version of a package will be used. If this file was previously downloaded, that one will be used. If that file was outdated, a new one will be retrieved.

If you look in your cache directory at /var/cache/apt/archives, you'll notice that packages are identified by name and version. For example, I've three different files (versions) of chromium-browser in that directory:

chromium-browser_11.0.696.57~r82915-0ubuntu0.11.04.1_amd64.deb
chromium-browser_11.0.696.65~r84435-0ubuntu0.11.04.1_amd64.deb
chromium-browser_11.0.696.68~r84545-0ubuntu0.11.04.1_amd64.deb

The purpose of this cache is to speed up re-installing applications if needed. You can compare it to your Internet browsers cache, images are only downloaded the first time. In the future, the browser checks at the server whether the image is up-to-date. If so, the cached one will be used. Otherwise, a new one is downloaded rendering the old one useless.


Asus G73SW's backlit keyboard doesn't work, nor does the FN+F3- & F4 hotkeys

Perhaps this would work for your backlit keyboard. Just came across it.

http://ubuntuforums.org/showthread.php?t=1752900


If you can edit your /etc/sudoers with visudo add to it:

non-sudoer-username localhost=/foo/bar/guiapplication

Then gksudo should work for that non-sudoer user and that guiapplication.


Pages loading too long on new router (Ubuntu 18.04)

Your problem is with the MTU setting for your DSL connection.

There's a MTU setting in Ubuntu's network configuration, and a WAN MTU setting in your router.

For DSL, a common MTU setting is 1492. Just go ahead and try this value first and see if your web sites are now accessible.

To determine the correct setting, start with all MTU settings = 1500 and VPN = off. (VPN requires different testing).

In terminal:

ping [-c count] [-M do] [-s packet_size] [host]

The options used are:

c count: number of times to ping
M hint: Select Path MTU Discovery strategy.  may be either do (prohibit fragmentation, even local one), want (do PMTU discovery, fragment locally when packet size is large), or dont (do not set DF flag).
s packet_size: Specifies the number of data bytes to be sent.

You should always start at 1472 and work your way down by 10 each time. Once you get a reply, go up by 1 until you get a fragmented packet. Take that value (last good value) and add 28 to the value to account for the various TCP/IP headers. Eg. let's say that 1452 was the proper packet size (where you first got an ICMP reply to your ping). The actual MTU size would be 1480, which is the optimum for the network we're working with.

ping -c 4 -M do -s 1472 8.8.8.8 # this will probably show fragmentation

ping -c 4 -M do -s 1462 8.8.8.8 # may show fragmentation

ping -c 4 -M do -s 1452 8.8.8.8 # no fragmentation?

ping -c 4 -M do -s 1453 8.8.8.8 # still no fragmentation?

reference: How to determine the proper MTU size with ICMP pings


Working on making a Minecraft skyfactory 2 server to play on with my friends, I want to run a .bat file, how would I do that?

Here's a version of the Windows batch file ported to a Sh script:

#!/bin/sh

# When setting the memory below make sure to include the amount of ram letter. M = MB, G = GB. Don't use 1GB for example, it's 1G ::

# This is 64-bit memory ::
memsixtyfour=2G

# This is 32-bit memory - maximum 1.2G ish::
memthirtytwo=1G

# Don't edit past this point ::

case "`uname -m`" in
    i?86)
        mem=$memthirtytwo;;
    *)
        mem=$memsixtyfour;;
esac

java -Xmx$mem -XX:MaxPermSize=256M -jar forge-1.7.10-10.13.3.1395-1710ls-universal.jar nogui

See How do I run .sh files? if you don't know what to do with it. I assume you know how to set up a Minecraft server on Linux because I don't.


if command is true for X seconds run code in bash shell script

This is not possible, you have to stick with the loop, or at least test, sleep 3, test again.


Cannot recover grub due to missing vmlinuz and intrd.img

Sorry to hear you had to reinstall... but for future readers of this question, here is my answer.

The cause in my case:

I was messing with my boot... thought I backed it up with:

# cd /
# tar czf boot.tgz boot

Then deleted and reformatted my boot partition. Then I was going to put the files back, but there was no boot.tgz :/

# file /initrd.img  /vmlinuz
/initrd.img: broken symbolic link to `/boot/initrd.img-3.2.0-23-generic'
/vmlinuz:    broken symbolic link to `boot/vmlinuz-3.2.0-23-generic

So I had the same problem as you.

And the solution:

Reinstall the initramfs stuff (which generates the initramfs file in /boot; not sure which of these is the important one, so I did all, was quick):

# aptitude reinstall grub2-common grub-pc-bin grub-gfxpayload-lists grub-common

FYI to get the list of packages for my command above, I did this:

# aptitude search grub | grep -E "^i"

Reinstall the kernel stuff (which puts the kernel in /boot; this takes long; use search first to find the right package name):

# aptitude reinstall linux-image-3.2.0-23-generic

The links were no longer broken. :)

# file /initrd.img  /vmlinuz
/initrd.img: symbolic link to `/boot/initrd.img-3.2.0-23-generic'
/vmlinuz:    symbolic link to `boot/vmlinuz-3.2.0-23-generic'

To avoid an error "cat: /boot/grub/video.lst: No such file or directory" running update-grub, I ran grub-install. (I had to run on multiple disks since I am using raid):

grub-install /dev/sda
grub-install /dev/sdb
...

Then just to be sure... update-grub again (which the reinstall grub should have also done, but didn't have video.lst, and maybe needed the kernel file or others too):

# update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.0-23-generic
Found initrd image: /boot/initrd.img-3.2.0-23-generic
done

Then to finish up, I make sure my boot and fstab are correct:

# umount /boot
# mount -a
# ls /boot
abi-3.2.0-23-generic  config-3.2.0-23-generic  grub  initrd.img-3.2.0-23-generic  lost+found  System.map-3.2.0-23-generic  vmlinuz-3.2.0-23-generic

(no idea what abi-3.2.0-23-generic is. I didn't have that file before)

And generate the initramfs again just in case it generates some relevant error messages (replace filename with correct one on your system).

# mkinitramfs -o /boot/initrd.img-3.2.0-23-generic
(no output if it works)

For example, before fixing my boot and setting up my mdadm.conf file, I would get this message:

grep: /boot/config-3.2.0-23-generic: No such file or directory
W: mdadm: the array /dev/md0 with UUID 656eb2a6:21526b55:a6f1834a:d3cc95e4
W: mdadm: is currently active, but it is not listed in mdadm.conf. if
W: mdadm: it is needed for boot, then YOUR SYSTEM IS NOW UNBOOTABLE!
W: mdadm: please inspect the output of /usr/share/mdadm/mkconf, compare
W: mdadm: it to /etc/mdadm/mdadm.conf, and make the necessary changes.

After this, I tested boot, and it worked. :)

And some basic background info... which is all that is necessary to put the above solution together:

Grub needs to install into the MBR to tell the BIOS what to boot.  (created with grub-install)
The MBR points to the grub boot code (created with grub-install) on the disk somewhere outside partitions. (in my case with GPT, this is a bios_grub partition).
Then this boot code finds /boot to load the grub.cfg. (created with grub-mkconfig -o  or update-grub which also creates other important files)
When you select a boot option, grub is gone, replaced by the Linux kernel (vmlinuz). The kernel starts using the initramfs file (created with mkinitramfs), which I think contains some info about the system (raid, lvm, etc. with some uuids of partitions or raid/lvm volumes) and also the modules you need (ext3, ext4, lvm, raid, etc.).
at some point it mounts the regular system and your rc.d stuff takes over

So that is why you need all those files.


Can I sync two Android devices to the same U1 account?

I posed this question to the Ubuntu One support team and they confirmed that you can stream music to multiple devices at the same time.


How to run WineTricks in 32 bit mode on a 64 bit system

Set up a 32 bit Wine Bottle Prefix on a 64-bit System by using Wine Bottles, like so:

32-bit:
winearch=win32 WINEPREFIX="/path/to/new/wine/bottle" winecfg

64-bit:
winearch=win64 WINEPREFIX="/path/to/new/wine/bottle" winecfg

Never use the default WINE bottle.  Use winetricks to select the bottle.


How do I use strftime to customize the default date-time format?

Right-click on the date/time, select "time and date settings", on the second (Clock) tab you can configure 24-hour time.

As for the day/date/month order, that's locale-dependent, for instance, I have en_CA "English (Canada)" and I see 'Fri 24 Feb'. Go to system settings, Language Support, and on the second (regional) tab you can select a locale that better matches what you want. If you select "apply system-wide" this should also affect Nautilus and (well-behaved) command-line utilities; I haven't tried this last part though, so no promises :)


How to start a graphical utility from command line

Try to add an "&" behind your command. So putty& will be your command, this will tell the terminal to run it in background. Next you have to type "disown" to detach the process from the terminal.

so:

user@yourhost:putty&
user@yourhost:disown


How do I get long command lines to wrap to the next line?

Make sure all non-printable bytes in your PS1 are contained within \[ \]. Otherwise, bash will count them in the length of the prompt. It uses the length of the prompt to determine when to wrap the line.

For example, here bash counts the prompt as 19 columns wide, while the prompt displayed by the terminal is only 10 columns wide (My prompt written in cyan, and > written in default color):

PS1='\e[36mMy prompt\e[0m>'         # bash count: 19, actual: 10

while here it only counts the prompt as 10 columns wide because it ignores the bytes between the special \[ and \] escapes:

PS1='\[\e[36m\]My prompt\[\e[0m\]>' # bash count: 10, actual: 10

For good practice though, use tput to generate the terminal escapes rather than hard coding them:

cyan=$(tput setaf 6) # \e[36m
reset=$(tput sgr0)   # \e[0m
PS1='\[$cyan\]My prompt\[$reset\]>'

See http://mywiki.wooledge.org/BashFAQ/053, and also http://wiki.bash-hackers.org/scripting/terminalcodes for more on tput.


Dash application search unresponsive at startup

I have a similar problem. If I've just logged in and attempt to access the dash, then the search field doesn't automatically acknowledge my typing. I have to use my mouse to click on the search field. Or I have to close the dash and open it again.

The best answer I can give, from my experience, is to wait a bit longer before accessing the dash. Perhaps it's still loading stuff in the background...


I am having trouble booting into Ubuntu 14.04

I believe it is due to where it is mounted, when I originally mounted it i set it at "[/]" but now it is set to mount at "[/mnt/99324b15-036c-4d4b-9c05-f5b006f41198]"

Your comment about where you mounted it is confused. It's all relative. Your root device probably has UUID "99324b15-036c-4d4b-9c05-f5b006f41198". When your boot process is correct, whatever device contains your root partition is shown to you as /

If you haven't been goofing with boot related stuff, I'd take a look at your bios settings. Maybe your boot device is set to something else? It sounds like you're booting in to something, is there a USB installer still attached to your machine and you're booting off of that?

EDIT: Added Boot Repair notes below.

Boot Repair

You should follow the steps to run Boot Repair.

Here are the key steps:

Boot off of your USB Installer
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo sed 's/trusty/saucy/g' -i /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list
sudo apt-get update
sudo apt-get install -y boot-repair && (boot-repair &)


Test application without modifying system

I think you can try with "Arkose"

Also has a gui-tool "Arkose-gui"

According to the description:

Arkose is currently made of:
 - arkose: Command line utility with C helper
 - arkose-gui: GUI for integration in the gnome desktop (Similar to the Run dialog)
 - arkose-nautilus: Nautilus integration
 - arkose-wrapper: Wrapper for regular apps to have them start in a container

It basically lets you start any installed binary in a configurable container. You can choose how much disk space you want to give it, if it should have network access and if it should be able to access your /home.

Here you have more information about the tool and the author and his blog Stéphane Graber.

Hope this will helpful.


Pretty old question, but I will provide an answer because I was also searching for this and some blogs/tutorials on this topic do not mention that you have to install nux-tools via
sudo apt install nux-tools


Fresh installation and user's management

Adding a new user will not overwrite the existing /home/username. You will however, want to look at your current /etc/passwd file and make sure that the UID's for each user on the newly installed system match the existing one. For example, User 1's UID = 1000; User 2's UID = 1001; etc.

The way to check this is to open a terminal and run cat /etc/passwd

The following is an example of an /etc/passwd file:

root:!:0:0::/:/usr/bin/ksh
daemon:!:1:1::/etc:
bin:!:2:2::/bin:
sys:!:3:3::/usr/sys:
adm:!:4:4::/var/adm:
uucp:!:5:5::/usr/lib/uucp:
guest:!:100:100::/home/guest:
nobody:!:4294967294:4294967294::/:
lpd:!:9:4294967294::/:
lp:*:11:11::/var/spool/lp:/bin/false
invscout:*:200:1::/var/adm/invscout:/usr/bin/ksh
nuucp:*:6:5:uucp login user:/var/spool/uucppublic:/usr/sbin/uucp/uucico
paul:!:1000:1000::/home/paul:/usr/bin/bash
jdoe:*:1001:1001:John Doe:/home/jdoe:/usr/bin/bash

So when you make new users be sure that Paul is user 1000 and John Doe is user 1001; etc. That way the files that belonged to these users will still belong to them. Linux identifies the file/directory ownership by UID's and GID's. So you'll want them to match.


How can I remove an unfinished java installation installed via terminal?

you've installed the packages: sun-java6-jdk and  sun-java6-plugin. to remove them just type:

sudo apt-get purge sun-java6-jdk sun-java6-plugin

if you want to install them again, then just type

sudo apt-get install sun-java6-jdk sun-java6-plugin

the purge command removes everything there is and clear all config files of those programs, so if you have a broken install a purge + a new install is recommended.


It turns out heynnema was right. The company that makes the board I was using released a BIOS update 5 months after I posted this. When I update the BIOS it works just fine.


No upgrade options since booting via CD Ubuntu 11.10

If your CD is 11.10 you can use it to update from an earlier version (e.g., 11.04).

To upgrade from 11.10 to 12.04 you need a 12.04 installation CD.


Default vim usage in Ubuntu Bionic feels regressed from 17.10

I found the answer in another thread

Open ~/.vimrc and add this;

:set nocompatible

This fixes all 3 issues to how they were in 17.10:

No more odd reactions when you search with '/'
No more odd tab/space inserts when editing
No more odd character inserts when using arrow keys in edit mode

I believe this to be a bug in Ubuntu Bionic, at least in the pre-GA release.


Configuring hotkeys for Fn combinations not recognised by acpi_listen

I had a old keyboard that i configured the action keys manually, open SYSTEM SETTINGS > KEYBOARDS > SHORTCUTS. Here you will find the option Custom Shortcuts.

I hope to help you.


airmon-ng is used to put wireless interfaces into monitor mode, so that you can capture packets (the equivalent of "promiscuous mode" on Ethernet cards).

The command that you are trying airmon-ng start eth1 is trying to turn on monitor mode for eth1, which is an Ethernet interface, not your wireless interface, so it will not work. You need to use airmon-ng for your wireless interface. Your wireless interface is usually wlan0.

To find out the exact name of your wireless interface, you can execute the command iwconfig, which should show you something like this:

alaa@aa-lu:~$ iwconfig

wlan0     IEEE 802.11bgn  ESSID:"Alaa"
          Mode:Managed  Frequency:2.472 GHz  Access Point: xx:xx:xx:xx:xx:xx
          Bit Rate=72.2 Mb/s   Tx-Power=20 dBm
          Retry  long limit:7   RTS thr=2347 B   Fragment thr:off
          Power Management:off
          Link Quality=58/70  Signal level=-52 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:514   Missed beacon:0

vmnet8    no wireless extensions.

lo        no wireless extensions.

eth0      no wireless extensions.

vmnet1    no wireless extensions.

From the output, you can see that wlan0 is a wireless interface.

So, the command to turn on monitor mode for wlan0 is sudo airmon-ng start wlan0.

If however, you don't have a wireless interface (which is probably the case, looking at your output), then I need to ask the question of why do you want to run airmon-ng when you don't have a wireless card?

If you're installing this Ubuntu (or Kali) as a virtual machine, then aircrack-ng will never work, because a virtual machine will always see an Ethernet card, not the wireless card. The only way you can make a virtual machine see a wireless card is by using a wireless USB adapter, such as this one:


Try installing gnome:

sudo apt install tasksel

then execute and you should be good to go.

sudo tasksel install ubuntu-desktop


When trying to execute any Windows application with wine we need to make sure that it works correctly. Take the following steps to always know that your app will work:

SEARCHING FOR WORKING APP - Search in google or the winehq.org site for the app you want to use to see what rating the app has. Ratings such as Platinum or Gold are good. Ratings as Silver are good in some cases. Ratings as bronze or garbage are typically very bad. The rating is for the user to know if the app will work flawlessly in the PC or not. Will it install correctly?. Will it run correctly?. Can the user make changes to the video, sound or control settings with no problems at all?.

All of this questions are used to add a rating to an app. If it works as it should in everything, the rating is Platinum. If it has 1 or 2 small problems, a Gold rating might appear. This continues until a Garbage rating where the app does not work at all. To search for an app you can use Firefox or Chrome and just type in the URL "winehq leagueoflegends" for example. This will typically show you in the first 3 results the winehq like so http://appdb.winehq.org... Click on the appdb.winehq.org links and you should arrive at the winehq page for that particular app. It will show you several users that have rated the app. If all of them rated the app as Garbage your best bet is that the app will not work with wine right now. You will have to wait for a newer update of wine. If most users have platinum or gold you have a good bet it will work correctly.

You can also go to: http://appdb.winehq.org/objectManager.php?sClass=application&sTitle=Browse%20Applications&sOrderBy=appName&bAscending=true to search for the app you want in there.

Even better to go: http://appdb.winehq.org/index.php to see the best rating apps with the best score so far. Also make sure that the ratings applied to the app have the same version you are using of Wine or at least a very close version to it. An updated version is always better than an older version. Now that you know how to search first if your app works on wine or not we go to the next step. Wine installation.
INSTALLING LATEST WINE VERSION - Wine comes in several branches. The 1.2 stable branch and 1.3 dev branch. Let me be VERY CLEAR in this part. For the last 5 wine years in my life I have used always the latest. You can call it unstable, explosive, beta, alpha, dev or any name you want to give it but the fact remains. Any updated version of wine is always better than any older version. This is also true comparing the 1.2 stable versus the 1.3 dev.

The 1.2 is more stable in that it has been checked more for compatibility than the 1.3 dev branch but believe me when I say, the 1.3 dev is more compatible with more apps, has better solutions to many app problems, more directx fixes and in general will give you a better result than the 1.2 branch. Since the creation of the PPA for WineHQ I have used this as my 1.3 upgrading repository and it has never let me down. It has solved many problems with many apps, directx fixed, sound fixes and many MANY other. Every 2 weeks is like a party when a new release of the 1.3 branch comes to the PPA. So my really good suggestion is to use the 1.3 branch instead of the 1.2 stable one. And I mean GOOD SUGGESTION! since many problems will be gone in the 1.3 branch. The information to install the PPA is very easy as shown here: http://www.winehq.org/download/ubuntu

After installing the PPA winehq, updating the repositories and downloading/upgrading to the 1.3.x  version of wine (Should be 1.3.30 right now. To check, go to the terminal and type wine --version or open winecfg and go to About tab.) we can continue with the configuration.
CONFIGURING WINE - There are a couple of things you can do to tune and configure wine. The first steps should be opening the winecfg app for wine. Just open the dash or ALT+F2 and type winecfg. It will begin an automatic update for wine. Wait a couple of seconds and then go to the Graphics and Audio Tabs to configure them. If an app does not work in fullscreen you can change the max resolution in the Graphics tab. If an app is not making a sound or has some sound problems you can change the sound options in the Audio tab. You also have the famous winetricks. WineTricks is used to install additional apps that are needed for other apps to work. Example are the latest DirectX, .NET Framework, etc.. To open winetricks do like winecfg above but type winetricks instead. For multiple apps running and configurations related to this I suggest to go here: Adjusting resolution for individual Wine programs
GETTING HELP - When asking for help in Askubuntu or in the winehq forums/bugtracker. Always remember to include the wine version you are using, any additional packages installed by winetricks (if any were installed), how did you install the app (Via steam, web, directly with a setup.exe, CD...) and how did you execute the app (via a desktop link, directly with the executable...) and additional information so anyone that has some knowledge can help.

Following this 4 steps you can reduce:

Amount of problems using Wine
Know if an app works or not in wine
Know which configurations work best for a particular app (Changing windows Version, graphics, sound...)
Know tricks for configuration in the appdb.winehq.org site for a specific app.
Save time while asking for help for a particular app.


Is it possible to install kernel 3.0.0-xx in 12.04?

You may want to refer to what the Kernel Team states about the kernel, here: https://help.ubuntu.com/community/Kernel

If you want,  you can compile manually.  The Kernel Team has a wiki page about compiling the kernel: https://help.ubuntu.com/community/Kernel/Compile

Its a tad hard to summarize that, but given its a common topic on kernels, it's likely not going to disappear, so there won't be a chance of that link not working.  hence the lack of a summary.


It seems that Nokia 5 (TA-1053) does not support real MTP mode without some kind of hacks. By default, it shows some kind of faked USB CD-ROM drive which only contains Windows and Mac drivers. Those drivers probably should do some kind of magic to hide the faked USB CD-ROM drive and show the real MTP Android device. I don't know what kind of magic Nokia 5 requires.


Not that I know of but would be interested to know if you find a solution...

With Hikvision, some of their cameras/firmware seem to work without any browser plugin but their firmware/version control/releases are a nightmare, you would think they would update all their firmware so it all works without a plugin. Even on a windows PC this is a problem, some cameras work without plugin, some work with the plugin and some don't work even WITH the plugin!

I had to use their native software on a Windows PC really to configure everything I needed to.

The only way I have found to view a stream on Ubuntu is to use VLC media player and Open Network Stream to view the camera or NVR RTSP stream. Something like:

rtsp://<ip_of_camera_or_nvr>:554/Streaming/Channels/101

But that does not help in doing those few config jobs that require the stream to be shown in the web interface (like setting exclusion areas or line crossings etc).


"No such file or directory" when invoking java

This message is shown because some 32 bit libraries are absent in Ubuntu 64 bit. Run:

apt-get install libc6-i386

See Java is installed, in listing, but execution produces “./java: No such file or directory” for more details


In this particular case the website wasn't exactly clear that one needed to create a named desktop file which lead the Op to creating a file named .desktop

This wouldn't be considered a valid desktop file, more like a hidden file named desktop.

The solution was to rename the .desktop file to postman.desktop

Also to remember many websites turn -- into —which is useless in an Exec= line.


Ubuntu Installation Partition Screen is completely blank

The installer does not shows Any HDD because Your HP BIOS prevents the HDD. You have to disable this option by going into Bios Setttings and Harddisk configuration. After that You will able to see your HDD in Ubuntu Installer.

 To go into BIOS press F10 at start...


Completely remove Gnome Desktop / revert splash logo for boot screen

I had the same issue. Solved it by completely purging plymouth-theme-ubuntu-gnome-logo and plymouth-theme-ubuntu-gnome-text. This seems to do your edit with the update alternatives as well as restoring the aubergine colour.


Unable to connect my mobile device to chrome on ubuntu 14.04

I faced the same issue trying to debug app on my Nexus 4. I solved this problem by installing Chrome ( not Chromium ) to ensure having the same Major version of my Nexus.

https://www.google.com/intl/en-US/chrome/browser/desktop/index.html


Is there a way to go back and forth between Windows and Linux?

You have basically two options to have both Windows and Ubuntu installed on the same machine:

Dual boot:

You free up some unpartitioned space on your disk and then install Ubuntu there directly, next to Windows. On every boot you will see a menu where you can chose whether to load Windows or Ubuntu. Switching between the OS always requires a full reboot, but both systems will run with optimal performance.
Virtual machine:

You install a virtualization tool like VMWare or VirtualBox in your host system (Windows), then you can emulate a virtual computer running as application on your Windows system. You can install Ubuntu in this VM. As Ubuntu then only runs inside the VM application on Windows, you can quickly switch between the Ubuntu guest and the Windows host. Ubuntu will be slow though because it's running in a VM instead of on real hardware.


Is there a file manager in which you can sort files manually, as in Windows? or can I manually sort my files from the terminal?

Actually, Nautilus can arrange files in list view:

Ctrl+1 icon view
Ctrl+2 list view
Ctrl+3 compat view

<*_^>


Ubuntu Touch : Command to force OTA-13 reinstallation?

If you open the Terminal app on the phone, you can run sudo system-image-cli -vvvv -b 0 and it should download the image and flash it again. You may need to make sure the app stays in foreground and the screen doesn't blank while you run this, though.


vlc failed play rtsp video from command line

Changing the / to a ? works for me, but I have no idea why

cvlc rtsp://192.168.2.33:554?user=admin&password=&channel=2&stream=1.sdp?real_stream--rtp-caching=100

you might also try

cvlc rtsp://192.168.2.33:554/?user=admin&password=&channel=2&stream=1.sdp?real_stream--rtp-caching=100


How to set audio permissions for the desired users

Finally I found the solution of the problem:

Remove all ACLs from the devices:

   sudo setfacl -b /dev/snd
   sudo setfacl -b /dev/snd/*

Then, set permissions for user and group (I set 777 permissions...):

   sudo chmod 777 /dev/snd
   sudo chmod 777 /dev/snd/*

And my problem was solved! Now, I can use the speakers, the microphone and use alsamixer to set the volume in/out!


You array status shows all your members as SPARES not MEMBERS. The array
kicked that member for a reason, remove it from your system and the try
to reassemble the remaining drives. If that doesn't work then post
your issue on the mdadm mailing list.


I deleted my Ubuntu install with windows disk management, and now I can't boot into Windows

I solved the issue by reinstalling Ubuntu (those deleted Ubuntu partitions wered used for the space). Then after that I rebooted and chose to load Windows. After that I booted from my USB Ubuntu, and used os-uninstaller to correctly remove Ubuntu. Now things work normally, and Windows loads correctly every time.


This error has recently been informed to Ubuntu. Here is the way to fix these couple of errors. In case you see this error carefully, it already gives you information about what is wrong and how it can be fixed.

Step 1 : Open your terminal and type

cd /usr/lib/python3/dist-packages/DistUpgrade

Here you would need to work on two python files DistUpgradeFetcher.py and ReleaseNotesViewerWebkit.py.

Okay let's fix DistUpgradeFetcher.py first :)
Open this file with any text editor and fix the import lines to :

import gi
gi.require_version("Gtk","3.0")
from gi.repository import Gtk

Similarly open ReleaseNotesViewerWebkit.py and fix the import lines to :

import gi
gi.require_version('WebKit2', '4.0')
from .ReleaseNotesViewer import open_url
from gi.repository import Gtk

Doing this will fix the errors and when running sudo update-manager -d you won't get errors.


PHP 7.2 fastcgi doesn't work on Ubuntu 18.04 server

I unfortunately took the advice of the answers here, which either incorrect, or a tangental.

After a little digging, i realised that the module in question (proxy_fcgi) is actually part of the bionic apache2-bin package

so all that was needed was:

a2enmod proxy_fcgi


Unable to make files executable (on ntfs filesystem mounted as rw)

With "ntfs permissions are set at the time of mounting the partition with umask, dmask, and fmask and can not be changed with commands such as chown or chmod."source

Try changing umask=007 to dmask=027,fmask=037


Can't get rid of GPG-error: http://download.opensuse.org

If you don't need the source, you can look up and remove/comment the source entries. To find out where they are:

grep -iR opensuse /etc/apt/sources.list*

In all likelihood, they are in the sources.list.d folder, so this command should disable such entries:

sudo sed -i '/opensuse/ s/^/#/' /etc/apt/sources.list.d/*.list

You can ignore files with the .save extension.


Installing server on unsupported Areca RAID Controller

Looks like the only requirement is that the volume that Grub is installed on is less than 2TB.  In my case it looks like Grub just didn't install properly and reinstalling grub sorted out my issues.

However I've now documented my procedure for installing Ubuntu Server on an unsupported raid controller.  Hopefully this helps someone.


Broken ssh - "Write Failed: Broken Pipe" and "setresuid 1000: Resource temporarily unavailable"

setresuid 1000: Resource temporarily unavailable

This error means that the SSH server failed to start a shell as your user, because there are already too many processes running as your user.

If you can get into the system somehow, check if there are runaway processes and do some killing.

If you only see normal usage, the maximum number of processes per user is too low for you. The bash/zsh command ulimit -u will show you the current value of the limit. Increase the nproc limit in /etc/security/limits.conf, e.g.

tdiethe hard nproc 200


Preventing users from changing pinned applications in the launcher?

Go to the directory /etc/dconf/db/local.d/locks (or create it if it does not exist), and create the following file. You can choose the filename.

# prevent changes to pinned applications
/com/canonical/Unity/Launcher/favorites

Then run the following command in a terminal. (Ctrl-Alt-T)

sudo dconf update


Make sure that the multiverse and universe repositories are enabled.

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

sudo apt-get install ndisgtk

Source for command:Ubuntu Help


Require password even though I removed it

Yes, as minerz209 says you can try leaving the password empty. However, if that doesn't solve your issue and as from your statement i believe that its the SUDO password, you're referring to .

Hence while installing new software or editing critical configuration files, it will still prompt for it. In this case If you're sure you want to remove this requirement, you can try the following command or bash

sudo visudo

Find this line:(CTRL+W)

%sudo ALL=(ALL) ALL

Edit the line:

%sudo ALL=(ALL) NOPASSWD: ALL

Thats it, in terminal you can simply become root as sudo su
and while using aptitude or others like USC, you just need to confirm you are giving the credential.

Hope this helps.


HDMI sound working in Ubuntu 14.10 live USB, stops working after install

Cycling power to the TV fixes the problem.  Cycling power on the computer with the TV on causes the problem.  I think this is just HDMI being its crappy self.


Try to disable and then allow audio track in Audio -> Audio Track.


Unmet dependencies installing vim or vim-tiny

It looks like you didn't run sudo apt-get update.

Additionally, this looks like you have installed a ppa. The ppa should be listed in a file located in /etc/apt/sources.list.d and will not be listed on /etc/apt/sources.list.

Run the following commands:

sudo apt-get update
sudo apt-get install --reinstall vim=2:8.1.0837-0york0~16.04

If this does not work, please let me know and we can investigate to see if you still have the ppa installed. If not, then you may want to reinstall the ppa. If you don't want the ppa, then you will need to clear your apt-cache and do some other stuff to remedy and I can give you further instructions on how to do that if that is needed.

Please post any errors. Thanks!

First, fix your sources.list file because it contains a line that should not be there by running the following command:

sudo sed -i 's/\(deb http...archive\)/#\1/g' /etc/apt/sources.list
sudo apt-get update

If you have removed the ppa, run the following commands:

sudo apt-get clean
sudo apt-get update
sudo apt-get remove vim vim-common vim-runtime
sudo apt-get install vim vim-common vim-runtime

Please post any more errors. Thanks!


Which service (ubuntu 13.10) is putting my laptop to sleep when I close the lid?

This is said to be a bug or weird feature in 13.10. To disable going into the sleep mode edit the /etc/systemd/logind.conf file and uncomment/modify/add the line:

HandleLidSwitch=ignore

Then execute sudo restart systemd-logind or simply reboot.

Also you might wanna check System Settings/Power and check the action not to suspend when lid is closed.


How should I be doing LAN name resolution on 18.04

In Ubuntu 17.10 they changed to netplan to manage networks.

for desktop it is now netplan/networkmanager
for server (headerless) it is now netplan/networkd

So basically anything you have edited in the past doesn't really work anymore. To make life more confusing it is all still there, and editing it can just add further layers of problem (that's experience talking). Once I just started working with only the netplan stuff, everything started to work again.

As far as I understand you now edit gui from within the gui (I don't use the gui), if you google ubuntu 18.04 static ip netplan networkd you will probably find what you are looking for. I have only just discovered most of this, and I am still not 100% sure how it all works, which is why I have not told you how I setup my network stuff. Bad advise only makes things worse.

My key info was found here: https://websiteforstudents.com/configure-static-ip-addresses-on-ubuntu-18-04-beta/

I hope this give you some clues. It's not that well documented that I can see.


MSI GE Raider GE75 Ubuntu 20.04 no Speaker sound

On the title you said that your OS is Ubuntu 20.04 but you also say via windows updates etc, what is your OS?
If you have no sound on ubuntu (or have low volume) type alsamixer and tweak that settings.


You download it, extract it to ~/.themes, and you can use ubuntu tweak tool to select the theme. I will guide you through it with the grayday theme you selected in gnome-look.org.

Just a warning, not all themes work nicely under unity.

Download grayday, and double-click it in nautilus to open it in the archive manager. You will see a folder called "GrayDay".
Drag that folder into your ~/.themes folder. This is in your home directory. You will have to click "show hidden files" (under view). If you still don't see it, you will have to make the directory in your home folder. Just click make new folder and call it .themes.
Download ubuntu tweak tool from here. http://ubuntu-tweak.com/
Just double click the downloaded .deb file and you should be able to install it through the software-center.
Once you have it installed, open ubuntu tweak tool and go to "Tweaks" and click theme.
Select Grayday in GTK theme and Window theme.

It should work.


System freezing for ~20s when window is dragged to edge of screen

Looks like it is caused by this bug:
https://bugs.kde.org/show_bug.cgi?id=406180

I managed to fix it by running:
kcmshell5 qtquicksettings and setting render loop to Basic mode.


xampp is not in ubuntu repository. You must download the installer from the xampp website, and follow their instructions.

To resume with command lines:

$ wget https://www.apachefriends.org/xampp-files/5.6.15/xampp-linux-x64-5.6.15-1-installer.run
$ chmod 755 xampp-linux-*-installer.run
$ sudo ./xampp-linux-*-installer.run

See https://www.apachefriends.org/faq_linux.html


(OP stated issue resolved)

Turns out it was only stuck at grub and just hitting return carried on the boot process.


Set Audio to the Speakers with Headphones plugged in

edit /usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf

And in section [element speakers], try to change switch=on into switch=off


Run script on next reboot and remove script

You need to run crontab -e for the user who will run the script - sudo crontab -e for root or sudo -u user_name -e to edit crontab for user_name. Insert @reboot /path/to/file (NB! Don't forget the empty new line).
The script itself should look like this:

#!/bin/bash
do_your_stuff
# remove from root specific crontab setting all the information about the script
sed -i '/@reboot \/path\/to\/file/d' /var/spool/cron/crontabs/root
# remove the script file itself
rm -- "$0"
# reboot the machine in 2 minutes
shutdown -r +2

To automate this process you can use Ansible. Here is an example of a simple playbook, I ran it on my localhost:

---
- hosts: localhost
  tasks:
  - name: cron job
    cron:
      name: "a job for reboot"
      special_time: reboot
      job: "/path/to/file"

First, you need to run the playbook, it updates the cron tasks for root. After reboot the script should be deleted just like the /var/spool/cron/crontabs/root file entry with @reboot string. You are free to modify the file to totally delete crontab for root is necessary.


Canon IXUS 155 camera no longer found when connected to USB after update to 14.04

I could not access my Nikon Coolpix camera after installing Ubuntu 14.04.
I opened the Ubuntu Software Center, and downloaded "Camera (camera.app)".
It found my camera and downloaded my photos.


Is it possible to configure Ubuntu as a software firewall?

AFAIK almost every distribution can be set as a firewall. And also there are some distro specifically built for this purpose such as zentyal, clearos etc. 'zentyal' is based on Ubuntu while 'clearos' is based on Centos.


Before I give my main answer, as discussed in the comments, it may be worth noting another approach that can sometimes work for unblocking some sites, and that is using Google translate as a proxy. In combination with changing your DNS settings, sometimes this can be successful in unblocking some sites.

You can browse whole sites via Google translate, using an url such as this and you can select a translation setting so that the actual 'translation' will still be in English. Just change the u=http://www.bbc.co.uk in the above url to switch sites when you want to.

You can also change your DNS settings from your ISP to Google DNS, which may help if there is some DNS filtering done by your ISP, though it might not help if your ISP is using a transparent proxy to filter material. See my answer for this question for how to change your DNS in network-manager without needing to touch your router.

Obviously TOR is the service to use for anonymity, but because of the lack of speed and problems you had running it, perhaps a free vpn service is what you want, although there are very few services around.

I must say that I am wary of free proxies and vpns and am reticent to recommend any I haven't used personally, so the only one I can report that I have experience with on Ubuntu is one called SecurityKiss. I have found the service useful on the occasions that the ISP was blocking a legitimate site and changing the DNS did not solve the problem.

It must be said that the limit for free users is only 300 mb per day, which is fine for hours of surfing, but not for hours of downloading.

The service takes a while to setup, and is not exactly a 'quick' setup. You can either use PPTP or openvpn, but I usually prefer openvpn, so you need to install openvpn and the openvpn plugin for network-manager:

sudo apt-get install openvpn network-manager-openvpn

There are extensive notes at the SecurityKiss site specifically for Ubuntu, with ample screenshots, so on this occasion it is not necessary to simply repeat them all here.

However, the drawback is that before you can follow the above instructions you need to get a configuration generated for Linux based systems from here and then log on to the client area here and download your package which contains further configuration details.

The explanation detailed here on the official site is very good, and your SecurityKiss entry in Network Manager should look similar to screenshot below by the end. I have obscured the gateway in the screenshot below.

Once set up it will be available to use from network-manager.

It is worth trying the Google translate and Google DNS combination first and then the SecurityKiss solution if you need to; if neither of these are satisfactory you might have to try TOR again.


Is there a fast way to add album cover art to 199 different albums

Try Album Cover Art Downloader.

Album Cover Art Downloader will semi-automatically download album cover images for your music collection. All you have to do is point it at the root of your music directory and for each directory, the program will download a set of corresponding (well, best guess) album covers from the Internet, from which you can choose one that suits your fancy.Album Cover Art Downloader

Also you can take a look at Bliss


Can not boot! Failed to start AppArmor initialization... Computer hanging in booting.. can not start

When you see that crash screen try to get into the console by issuing

ctrl + alt + F3

if this gives you a text terminal login prompt then login and issue

 sudo apt-get install apparmor-easyprof-ubuntu

Lets try a new strategy ... reboot box and then immediately start to tap shift key repeatedly until you see the following :

use your arrow keys to scroll down to grub menu option :

Advanced options for Ubuntu

and hit enter ... now you will see this screen

again arrow key yourself down and hit enter on menu option root

now you should see a terminal prompt logged on as root ... if yes then issue

 sudo apt-get install apparmor-easyprof-ubuntu

Please tell how you get on


Yes, zenity is pretty limited. Luckily there’s a fork available which fills the gap: yad – “Yet Another Dialog” (sudo apt install yad). It uses the same syntax as zenity, but adds a ton of useful options, for example --button to explicitly define the buttons of your dialog window:

yad --list --button=OK:0

This displays a list window with just an “OK” button returning the exit code 0.

Example

Here’s a simple example inspired by one from the manpage:

yad --list --button=OK:0 --checklist --column "Buy" --column "Item" \
  TRUE Apples TRUE Oranges FALSE Pears FALSE Toothpaste

When “OK” is clicked in this state the program returns a 0 exit code and prints the checked options to stdout:

TRUE|Apples|
TRUE|Oranges|

Further reading

man yad
Sourceforge project page
Usage Examples


MySQL crash, after rebooting cannot access mysql and low screen resolution

That last bit isn't uncommon I believe, depending on what you use mysql for. It's probably some entries for specific users which only allow entries from the localhost. I don't know about the RStudio so can't help with that.

The screen resolution implies an upgrade to the video drivers  already done, has been corrupted during the crash. How you resolve that depends on the make and model of video card.

I do use mysql for my mythtv setup but I'm no expert, tbh, so I hesitate to respond but there's some stuff here...

https://superuser.com/questions/603026/mysql-how-to-fix-access-denied-for-user-rootlocalhost


Run these commands from the terminal, its may help:

$ wget "https://github.com/maateen/avro/releases/download/v2.0/avro_2.0-1_all.deb"
$ sudo dpkg -i --force-depends avro_2.0-1_all.deb
$ ibus restart

Now go to System Settings -> Keyboard -> Text Entry. Search and add Avro Phonetic as input source.


How can I remotely SSH into my PC which is behind a router-modem?

If and how you can do this depends on your router.
The way I do it is:

I allocate a fixed/static address to my computer (make sure that the address you use is on the subnet used by you lan -- it will probably start 192.168.0. Depending on your router you may have to either:

(i) telling the router to allocate a fixed IP a the MAC address of your PC; or

(ii) configuring the PC's IP address manually (and make sure that it is outside the range allocated by your routers DHCP server)
On the router, set up port forwarding. SSH uses TCP port 22, so you map port 22 on the router's WAN connection to port 22 on the IP address that you have allocated to your PC.

This should allow anyone to connect to the ssh server on your PC -- it is therefore vital that you secure this connection properly. There are lots of articles on how to do this (for example)


how do I disable the headphone jack so sound will come out of the speakers?

I haven't seen a way to change which device to use for sound output, but there is a way to make sound output through both speakers and headphones simultaneously. In command line (to open it press Ctrl +
Alt + T) run alsamixer and then using arrow keys move all the way to Auto-Mute option, press arrow keys up or down to disable it. Then you can use other options to configure the master audio. And if it says MM below a vertical bar, it means that audio option is muted, which you can unmute using m key. Let me know if that helps

On the hardware side of things, there's another solution - USB. There's plenty of USB speakers, headphones, and sound cards. For instance,  I have Toshiba Satellite A215, which has a dead internal sound card and touchpad. The solution I came up with is USB sound card, which has two bays for speaker and microphone jacks, which I use with a set of old desktop speakers. Among other things, there are bluetooth dongles. So if you don't mind to skip a lunch and save up for a usb device like that, then it's the simplest "repair" possible


Debugging system crashes with kdump (20.04)

Try running
kdump-config test

and increasing crashkernel size, though 512M should be sufficient.
Update /etc/default/grub.d/kdump-tools.cfg
GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT crashkernel=1024M-:768M"

and run
update-grub

finally try invoking panic:
echo 1 > /proc/sys/kernel/sysrq && echo c > /proc/sysrq-trigger

and check logs in /var/crash/.


Ubuntu 14.04 Live USB - Boots, then reboots?

Format your USB stick, and make bootable usb again using UNetbootin: http://unetbootin.sourceforge.net/
Did you make 64bit live usb? Make sure your pc support it.


Failed to start netplan-wpa-wlan0.sevice: Unit netplan-wpa-wlan0.service not found

Step 1: Identify your wireless network interface name
There are several ways to identify your network interface name. You can use the ip command, the deprecated ipconfig command or check this file:
ls /sys/class/net

This should give you all the available networking interface (Ethernet, wifi and loopback). The wireless network interface name starts with ‘w’ and it is usually named similar to wlanX, wlpxyz.
Take a note of this interface name. You’ll use it in the next step.
Step 2: Edit the Netplan configuration file with the wifi interface details
The Netplan configuration file resides in /etc/netplan directory. If you check the contents of this directory, you should see files like 01-network-manager-all.yml or 50-cloud-init.yaml.
If it is Ubuntu server, you should have cloud-init file. For desktops, it should be network-manager file.
The Network Manager on the Linux desktop allows you to choose a wireless network. You may hard code the wifi access point in its configuration. This could help you in some cases (like suspend) where connection drops automatically.
Whichever file it is, open it for editing. I hope you are a tad bit familiar with Nano editor because Ubuntu comes pre-installed with it.
sudo nano /etc/netplan/50-cloud-init.yaml

YAML files are very sensitive about spaces, indention and alignment. Don’t use tabs, use 4 (or 2, whichever is already used in the YAML file) spaces instead where you see an indention.
Basically, you’ll have to add the following lines with the access point name (SSID) and its password (usually) in quotes:
wifis:
    wlan0:
        dhcp4: true
        optional: true
        access-points:
            "SSID_name":
                password: "WiFi_password"

Again, keep the alignment as I have shown or else YAML file won’t be parsed and it will throw an error.
Your complete configuration file may look like this:
# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        eth0:
            dhcp4: true
            optional: true
    version: 2
    wifis:
        wlan0:
            dhcp4: true
            optional: true
            access-points:
                "SSID_name":
                    password: "WiFi_password"

I find it strange that despite the message that changes will not persist across an instance reboot, it still works.
Anyway, generate the configuration using this command:
sudo netplan generate

And now apply this:
sudo netplan apply

If you are lucky, you should have network connected. Try to ping a website or run apt update command.
However, things may not go as smooth and you may see some errors. Try some extra steps if that’s the case.
Possible troubleshooting
It is possible that when you use the netplan apply command, you see an error in the output that reads something like this:
Failed to start netplan-wpa-wlan0.service: Unit netplan-wpa-wlan0.service not found.
Traceback (most recent call last):
  File "/usr/sbin/netplan", line 23, in <module>
    netplan.main()
  File "/usr/share/netplan/netplan/cli/core.py", line 50, in main
    self.run_command()
  File "/usr/share/netplan/netplan/cli/utils.py", line 179, in run_command
    self.func()
  File "/usr/share/netplan/netplan/cli/commands/apply.py", line 46, in run
    self.run_command()
  File "/usr/share/netplan/netplan/cli/utils.py", line 179, in run_command
    self.func()
  File "/usr/share/netplan/netplan/cli/commands/apply.py", line 173, in command_apply
    utils.systemctl_networkd('start', sync=sync, extra_services=netplan_wpa)
  File "/usr/share/netplan/netplan/cli/utils.py", line 86, in systemctl_networkd
    subprocess.check_call(command)
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['systemctl', 'start', '--no-block', 'systemd-networkd.service', 'netplan-wpa-wlan0.service']' returned non-zero exit status 5.

It is possible that wpa_supplicant service is not running. Run this command:
sudo systemctl start wpa_supplicant

Run netplan apply once again. If it fixes the issue well and good. Otherwise, shutdown your Ubuntu system using:
shutdown now

Start your Ubuntu system again, log in and generate and apply netplan once again:
sudo netplan generate
sudo netplan apply

It may show warning (instead of error) now. It is warning and not an error. I checked the running systemd services and found that netplan-wpa-wlan0.service was already running. Probably it showed the warning because it was already running and ‘netplan apply’ updated the config file (even without any changes).
Warning: The unit file, source configuration file or drop-ins of netplan-wpa-wlan0.service changed on disk. Run 'systemctl daemon-reload' to reload units.

It is not crtical and you may check that the internet is probably working already by running apt update.


assuming you have a single partition on sdb (sdb1), and it is mounted as /mnt/data for example, you can make a directory using "mkdir /mnt/data/newdirname"

you can put sudo in front of the command if it says permission denied, and then follow up with a "sudo chown yourusername /mnt/data/newdirname" so your user account can create new files and folders inside the newdirname folder in the future without using sudo.

you could also do the chown on the main sdb mount "sudo chown yourusername /mnt/data" to allow new folders in the "root" folder of the sdb1 mount without requiring sudo.


Please explain the concept behind installing ubuntu as an .img file?

VMs have disks that they present to a guest and those are either backed by a full real disk/partition or backed by an image file which in your case seems to be the case.
There are various subtle details formats possible in your case most likely either raw format (as it is .img) or qcow2 (another common option). You can check that with qemu-img info <path-to-your-file>.
Now to mount those (and please only do that when the guest it NOT running or the filesystem might go corrupt) you can do depending on that format:

raw: Unable to Mount .img file
qcow2: How do I mount a qcow2 disk image?


Can't connect WiFi after upgrade from 16 to 18

Your file /etc/network/interfaces is malformed. In order for Network Manager to manage your wireless, the malformed entry must be removed. From the terminal:

sudo nano /etc/network/interfaces

Remove entirely the line auto wlan0. Save (Ctrl+o followed by Enter) and exit nano (Ctrl+x).

Restart Network Manager:

sudo service network-manager restart

Does Network Manager now see wireless networks and offer to connect?

I would also like to know if netplan is installed and running. Please post:

ls -al /etc/netplan

EDIT: Let's recreate the needed netplan file and see if it helps. From the terminal:

sudo mkdir /etc/netplan
sudo nano /etc/netplan/01-network-manager-all.yaml

Add the following text:

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

Netplan is very specific about spacing, indentation, etc. Please use spaces, not tabs. Proofread carefully twice. Save (Ctrl+o followed by Enter) and exit (Ctrl+x) the text editor.

Follow with:

sudo netplan generate
sudo netplan apply

Is there any improvement? Does the interface still reports as Disabled?

sudo lshw -C network

It might take a reboot.


X won't start (black screen after splash)

The key here is line 589 onward:

incompatible kernel module detected - HW accelerated OpenGL will not work

Right now, the X server in the repos does not work well with any fglrx driver in the repos. So do the following steps:

Hold Shift during boot to see the Grub menu.
Go to "Advanced Options for Ubuntu" using the down-arrow key and then scroll down once to the first Recovery Mode kernel option.
Go down to the option that says "enable networking" and press Enter.
Go down to the option that says "root shell prompt" and press Enter.
Very carefully type the following commands (for the long filename try just typing amd and then press Tab):

apt-get -y install build-essential
mkdir fglrx
cd fglrx
wget --referer='http://support.amd.com/en-us/download/desktop?os=Linux+x86' http://www2.ati.com/drivers/beta/amd-catalyst-13.11-betaV9.95-linux-x86.x86_64.zip
unzip amd-catalyst-13.11-betaV9.95-linux-x86.x86_64.zip
chmod a+x amd-catalyst-13.11-betaV9.95-linux-x86.x86_64.run
./amd-catalyst-13.11-betaV9.95-linux-x86.x86_64.run

You will be prompted to agree to a license agreement. Do not build the distribution-specific driver package when given the option. Go with the "Standard" or non-"Expert" install type. Enter through all the other options. Wait until you are allowed to return to the prompt and press Ctrl+Alt+Delete to reboot.


What's the easiest way to install a list of packages with latest version

There is often a delay between when an open source project produces a new release and when that new release is incorporated into the main ubuntu repositories.  This delay will be even greater for the LTS releases.  There are many reasons for this.  However, none of those affect your original question.

The easiest way to install a list of packages with the latest version (available in ubuntu), is:

$ sudo apt-get install package1 package2 package3


From a terminal you should be able to use:
free -m

From man page:

-m, --mebi Display the amount of memory in mebibytes.
--mega Display the amount of memory in megabytes. Implies --si.

Note: A kilobyte (kB) is 1000 Bytes.


Dual screen option is not showing in Settings → Devices → Displays in Ubuntu 18.04.4

I had the same issue. If you are using an HDMI cable to connect with any external monitor, please check if it is working properly. Changing the cables for me worked.


Try looking into GRUB issue and /dev/sda as this is kinda of famous for this kind of trivia that you are encountering now.


What is the purpose of group privileges in sudoers file?

The purpose of the group privileges in the sudoers file is to conveniently be able to add or remove users from the /etc/sudo group for granting or removing sudo access.

The default/etc/sudoers file allows for the sudo group to execute sudo commands.  To bring this default back, you would have to modify your files back to the defaults.  Compare your /etc/sudoers file with this default file:

#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults        env_reset
Defaults        mail_badpass
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d

The most likely culprit of your issue is highlighted in bold.

For this to work the /etc/group entry will also need to be formatted properly:

The sudo entry in the /etc/group file:

sudo:x:27:ljames,user1,user2


Ubuntu won't install on unallocated space alongside Windows 7

Maybe you are using the disk controller in RAID Mode on Windows and Ubuntu can't modify or use this RAID array. Are you using SSD caching or RAID? If you are using SSD Caching, try turning it off on Windows, then try changing the disk controller operating mode from RAID to AHCI on BIOS, boot Windows to check if it's working, then try to install Ubuntu again.

If you are using RAID between 2 or more disks, maybe this disk controller uses FakeRAID and Ubuntu doesn't support it.


What is release date for next long term release?

April 21st is the official release date for 16.04, which is an LTS release.


Just install Ubuntu 12.10 instead. In the latest version this graphics problem is fixed. But I recommend you Lubuntu 12.10. It takes the least amount of memory of all Ubuntu-based distros.


It sounds like it might have permission errors:

To solve it you need to use sudo:

sudo chmod u+rw,g+rw /media/USERNAME/DRIVENAME

This quite possibly isn't the problem


i guess your graphic card is just not fast enough for unity (because it is a compiz plugin thus not known as very resource saving)

i suggest you try some other ubuntu flavour with a more lightweight environment like xubuntu (XFCE) or lubuntu (LXDE)

regards, spheniscida


Not able to access Eclipse neon after installing it

The current repository version of Eclipse is 3.8 (Juno).  Since you mentioned you have Neon (the latest release (officially available at http://www.eclipse.org), the package doesn't require an install.  It can be run from the directory where you unpacked it.

You can run this command to locate the the folder:

$ locate -r "neon.*/eclipse$"

The results will be something similar to:

/opt/eclipse/eclipse-jee-neon-M5-linux-gtk-x86_64/eclipse

I highlighted in bold the part that you will most likely see.  In my case I have moved my root eclipse directory to the folder /opt to make it available to other users who logs into the system, instead of my personal space.  You'll most likely see yours in an area such as:

/home/username/Downloads//opt/eclipse/eclipse-jee-neon-M5-linux-gtk-x86_64/eclipse

I inferred the latter because your message said you can't find it.  By default files are downloaded to the ~/Downloads folder.  Opening a package without specifying a folder will create a folder off the Downloads directory.

To run it, just go to the folder with the eclipse files and run:

$ ./eclipse

Unless you specifically installed the jdk package it'll give the appropriate error indicating.

YOu can correct this by installing the jdk package from the repository with:

$ sudo apt install default-jdk

For convenience you might consider moving the root directory of the package (eclipse-jee-neon-M5-linux-gtk-x86_64) to a convenient location and link a path to the eclipse execute file.  You can do this with:

$ ln -s [path of directory]/eclipse /usr/local/bin/eclipse

This way you could run eclipse from the terminal commanline from anywhere just by typing (without a path):

$ eclipse


HP Envy Touch Smart Wifi Disabled By Hardware Switch

This is not an Ubuntu issue. This is not any driver issue. This is caused by me (and possibly you).
While watching some video... I tried to increase volume with: Fn + F10 key combination ...
But I mistakenly pressed Fn + F12 which was Wifi button with 'Radio' symbol on it, which disabled my wifi connection.
Running below command in Terminal, you can see the issue:
> rfkill list all

0: Toshiba Bluetooth: Bluetooth           #or whatever it is
    Soft blocked: no
    Hard blocked: no
1: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: yes
<------ that's because I press Wifi button (above) mistakenly

Solution: Press again the Fn + F12 (or, some other key where you have Radio symbol)
Now run again the same command:
> rfkill list all

0: Toshiba Bluetooth: Bluetooth           #or whatever it is
    Soft blocked: no
    Hard blocked: no
1: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no

    <------ no means solved.

Now, go to:

(Windows button, if you have on the keyboard) > Settings > Wifi > move
to On > select your Wiki connection to enter credentials

Done, your internet is back on.
Reference = here
I hope this works ...


Misconfigured Compiz and lost desktop usage

I have left an answer in How to correctly enable Desktop Cube in Unity 3D? which covers several issues, but I am pretty sure this is not covered. Killing OpenGL will eventually create more problems than solutions.

In you case I would do the following:

Go to the terminal by pressing CTRL+ALT+T
Type ccsm
Activate the OpenGL plugin. If this casues the CCSM to disappear, repeat steps 1 and 2 until you have the CCSM opened again. If not proceed to step 4.
Activate the unity plugin by opening the unity option and selecting the Enable option. This will cause Unity to start asking you to enable other plugins needed for it to work. Eventually after activating all of them your desktop should be back.


where is the browserLoadURL file in Firefox directory in Linux?

Why do you think browserLoadURL is a file in Linux sense of file? What is your reference to its existence in current versions of Firefox?

If you read this from 2009, you'll see that it was a function (not a file):

  That particular function (BrowserLoadURL) is removed from browser.jar , so it is no longer possible the modify the BrowserLoadURL function to get that block. I had checked that at the first time of the new post (July 15) and couldn't find it, not code in other functions that looked similar. I didn't check other jar files (e.g. toolkit) to see if the code has been moved there.

I suggest you read that entire thread.

Also look at this very old bug:  Last Comment Bug 524951 - BrowserLoadURL override broken which extensions use limit file:/// access .


dual monitors on ubuntu server 20.04 on pi 4

I had the same issue running Ubuntu server 19.10.01(64 bit) with Ubuntu Mate (sudo apt-get install ubuntu-mate-desktop.) The Dell monitor would stay active but have a black screen.

I found the answer here:
https://www.raspberrypi.org/forums/viewtopic.php?f=131&t=270539&p=1641022&hilit=dual+monitor+ubuntu#p1641022

I modified the /boot/firmware/syscfg.txt(sudo -e /boot/firmware/syscfg.txt) and added the following line:

dtoverlay=vc4-fkms-v3d


ghost printer entry in printer dialogue after frozen installation process

for a WF-2630 on 16.04, I would delete any existing icons for the 2630 from the PRINTERS folder, as they do not work. Then ...

download the Epson driver from here http://download.ebz.epson.net/dsc/du/02/DriverDownloadInfo.do?LG2=EN&CN2=&DSCMI=71623&DSCCHK=e1fdb812f3b09b3da605fd49ef90a9e43b62db49 by clicking the ACCEPT button and for 64bit Ubuntu click on the epson-inkjet-printer-escpr_1.6.20-1lsb3.2_amd64.deb. If one selects OPEN for download, gdebi installer should install the package; if one selects SAVE, then find the package in the Downloads folder and double-click to install.

That should 1) install the drivers and 2) trigger the printer to be registered in lpadmin and show up to print; if 2) does not occur automatically, create a new entry using ADD from the PRINTERS folder


How to use Fingerprint reader in Ubuntu 19.10

Is your device on this list? https://fprint.freedesktop.org/supported-devices.html

I see a lot of elantech devices on the list that are fprintd-enroll supported.

Other options instead of fprint look like fingerprint-gui https://launchpad.net/~fingerprint/+archive/ubuntu/fingerprint-gui

Which supports these devices:
https://fprint.freedesktop.org/supported-devices.html

Or thinkfinger which is only think pads:
http://www.thinkwiki.org/wiki/Integrated_Fingerprint_Reader#Software_support

I have a Lenovo L380 and am still looking for a package that supports my Synaptics fingerprint reader. I'm kind of a newbie myself so I'm still learning things but that is where I would start looking.


Can't boot after update, stuck on a loop

Finally I tried a more radical approach: reinstalling ubuntu using a livecd... it took me two attemps, the first one killed my video card, and finally the second one solved all the problems!
Thank you all for your help.
Jonathan


Laptop selectively will/will not wake up from suspend on Ubuntu 18.04.3

February 18, 2020 update

Log file has been posted and when system suspends at 17:00 the next action is reboot at 20:00 (rather than resume):

Feb 17 16:25:30 neon-Predator-PH315-51 systemd-sleep[1430]: Suspending system...
Feb 17 16:25:30 neon-Predator-PH315-51 kernel: [32444.683507] PM: suspend entry (deep)
Feb 17 20:09:33 neon-Predator-PH315-51 systemd-modules-load[527]: Inserted module 'lp'
Feb 17 20:09:33 neon-Predator-PH315-51 kernel: [    0.000000] microcode: microcode updated early to revision 0xca, date = 2019-10-03
Feb 17 20:09:33 neon-Predator-PH315-51 kernel: [    0.000000] Linux version 5.3.0-7625-generic (buildd@lgw01-amd64-052) (gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)) #27~1576774585~18.04~c7868f8-Ubuntu SMP Thu Dec 19 20:37:47 UTC  (Ubuntu 5.3.0-7625.27~1576774585~18.04~c7868f8-generic 5.3.13)
Feb 17 20:09:33 neon-Predator-PH315-51 kernel: [    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.3.0-7625-generic root=UUID=7db19782-809c-409f-9ac5-e76d1cf84345 ro quiet splash nouveau.runpm=0 vt.handoff=1

This is similar to:

Laptop reboots instead of resuming from systemd suspend when on battery power (suspending on AC power works)
Dell XPS 15 (9550) rebooting after suspend

You need to find the error message(s) that are occurring during resume from suspend. Once you know the error then you can fix it.

When your resume breaks and you restart your system open the terminal and type gedit /var/log/syslog. Then scroll to the section where the system suspended and resumed. For example, my system suspended at 5:52 am before going to work and resumed at 16:56 (4:56 pm) when returning home:

Jan 27 05:52:11 alien kernel: [1305328.821795] PM: suspend entry (deep)
Jan 27 05:52:11 alien kernel: [1305328.821797] PM: Syncing filesystems ... done.
Jan 27 05:52:13 alien acpid: client 1428[0:0] has disconnected
Jan 27 16:56:19 alien kernel: [1305331.145883] Freezing user space processes ... (elapsed 0.003 seconds) done.
Jan 27 16:56:19 alien kernel: [1305331.148954] OOM killer disabled.
Jan 27 16:56:19 alien kernel: [1305331.148955] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.

Look through your own log file using this example until you find an error message and perform a google search on the error.

Use this same technique for all problems you encounter, not just suspend / resume errors.


Based on your description, sounds like Bug #541501 which is still open.

I have a similar problem on a Thinkpad T60 with ATI Radeon Mobility X1300. None of the workarounds suggested in the comments of the linked bug entry (modeset=0 and/or new_pll=0 parameters to the radeon module, a newer mainline kernel) seem to completely make the problem go away for me – however, some of them seem to help a bit though.


Transfering Persistent mkusb Files Ubuntu to Windows
Mkusb can create a drive with a Persistent ext4 partition labeled casper-rw or writable.
It can also create a NTFS partition named usbdata.
The casper-rw or writable partition is only accessible if a program like DiskInternals Linux Reader in installed. The basic version is a Free program available from https://www.diskinternals.com/linux-reader/.
I have tried Linux Reader and it allowed me to read/copy everything on the Linux disk including home folder, which is located in the upper folder of the persistence partition.
The usbdata partition is accessible to Linux and Windows with out any additional programs. If Apple is included in the equation the NTFS partition can be formatted to FAT32 without any problem.
For data access on other Bootable USB systems see: Can we put files other than bootable files in a bootable flash Drive?


Type of code conversion used in Linux executable files

It's binary. The source code has been compiled. You can view it in an editor (a hex editor like bless might make for more refined changes) but you really need to know what you're doing. It's likely only good for making string changes.
For anything more hardcore, you can start to reverse engineer the binary into assembly code. This is often regarded as the lowest level human-parsable computer language.
objdump -d helloworld | less

But it'll include a lot of compiler nonsense too. For example, if you compile the most simple helloworld.cpp with G++ and then objdump it, you end up with 226 lines (208 stripped) of yuck. You could write a "hello world" in just 15 lines of assembly, compile it and objdump it but that still blossoms into 166 lines (stripped).
If you're good enough with assembly, this may give you enough access to understand what's happening, and even let you change it... But to answer your original question:
You cannot turn compiled code back into the original source code.
Sorry. It's a one-way transformation that loses information (comments, formatting, readable algorithm concepts, etc), is statically linked to other things and is generally optimised in such a way that would make it unintelligible to anything but the best and most seasoned programmers.
To give you an idea of the scale of the problem, the whole idea of reverse engineering software has its own Stack Exchange site.


Could not read Password for "https://username@bitbucket.org":No such device or address

use SmartGit 3.0.10 (as well as SmartGitHg, the predecessor of SmartGit).

To add the PPA run:

sudo add-apt-repository ppa:eugenesan/ppa
sudo apt-get update

To install smartgit (after adding the PPA) run:

sudo apt-get install smartgit

To install smartgithg (after adding the PPA) run:

sudo apt-get install smartgithg

This should add a menu option for you

For more information, see Eugene San PPA.


MaaS: Use Cloud-Init to automatically customize deployment process

I finally found the answer.
I added the following code to /etc/maas/preseeds/curtin_userdata file after late_commands: line ...

  foo_00: ["sh", "-c", "echo === Start Customization Scripts ==="]
  foo_02: ["curtin", "in-target", "--", "sh", "-c", "sudo touch /etc/init.d/macvlan.sh"]
  foo_03: ["curtin", "in-target", "--", "sh", "-c", "sudo touch /etc/systemd/system/macvlan.service"]
  foo_04: ["curtin", "in-target", "--", "sh", "-c", "sudo chmod 777 /etc/init.d/macvlan.sh"]
  foo_05: ["curtin", "in-target", "--", "sh", "-c", "sudo chmod 777 /etc/systemd/system/macvlan.service"]
  foo_06: ["curtin", "in-target", "--", "sh", "-c", "sudo echo '#!/bin/bash' >> /etc/init.d/macvlan.sh"]
  foo_07: ["curtin", "in-target", "--", "sh", "-c", "sudo echo ' ' >> /etc/init.d/macvlan.sh"]
  foo_08: ["curtin", "in-target", "--", "sh", "-c", "sudo echo 'sudo ip link add eth0 link eno1 type macvlan mode bridge' >> /etc/init.d/macvlan.sh"]
  foo_09: ["curtin", "in-target", "--", "sh", "-c", "sudo echo 'sudo ifconfig eth0 up' >> /etc/init.d/macvlan.sh"]
  foo_10: ["curtin", "in-target", "--", "sh", "-c", "sudo echo '[Unit]' >> /etc/systemd/system/macvlan.service"]
  foo_11: ["curtin", "in-target", "--", "sh", "-c", "sudo echo 'Description=macvlan setup service' >> /etc/systemd/system/macvlan.service"]
  foo_12: ["curtin", "in-target", "--", "sh", "-c", "sudo echo ' ' >> /etc/systemd/system/macvlan.service"]
  foo_13: ["curtin", "in-target", "--", "sh", "-c", "sudo echo '[Service]' >> /etc/systemd/system/macvlan.service"]
  foo_14: ["curtin", "in-target", "--", "sh", "-c", "sudo echo 'ExecStart=/etc/init.d/macvlan.sh' >> /etc/systemd/system/macvlan.service"]
  foo_15: ["curtin", "in-target", "--", "sh", "-c", "sudo echo ' ' >> /etc/systemd/system/macvlan.service"]
  foo_16: ["curtin", "in-target", "--", "sh", "-c", "sudo echo '[Install]' >> /etc/systemd/system/macvlan.service"]
  foo_17: ["curtin", "in-target", "--", "sh", "-c", "sudo echo 'WantedBy=multi-user.target' >> /etc/systemd/system/macvlan.service"]
  foo_18: ["curtin", "in-target", "--", "sh", "-c", "sudo systemctl enable macvlan"]
  foo_19: ["curtin", "in-target", "--", "sh", "-c", "sudo systemctl start macvlan"]
  foo_20: ["sh", "-c", "echo === Done Customization Scripts ==="]

Thanks all.


That fastcgi_pass line and fastcgi_index line you have commented out in the PHP section of your config is what makes PHP work.  Uncomment those lines, restart nginx, and it should start working provided you update the fastcgi_pass line to point to the PHP socket on your system (refer to the config for PHP for the proper path).

As for the 404s, please refer to /var/log/nginx/error.log and make sure that you set the root in your server configuration outside of the locations to where your PHP files are actually stored - this needs to be done so NGINX knows where to look for your files.


How to reduce the saturation of of laptop monitor in Ubuntu 14.04?

Install  ccsm (compiz config settings manager) and compiz plugins:

sudo apt-get install compizconfig-settings-manager
sudo apt-get install compiz-plugins

In CCSM,  enable the Opacity, Brightness, Saturation Plugin. In that plugin, you can reduce the saturation (I myself make saturation zero and use invert plugin to invert colors (white on black is less strenuous on eyes when casual reading/browsing) generally to reduce eye-strain :))

To use the OBS plugin, simply make a New rule which can be used to match windows by name, type, class, etc. For example, to match all windows, use type=any

Screenshots:


cp file and rename it based on old filename?

Hi German Barcenas :) We have prepared a small script that does what you ask for at the end of the question:
The script
#!/bin/bash

# Get the input parameters
old_file=${1?No file given}
solvent=${2?no solvent given}

# Get the basename of the file
old_file_base=$(basename $old_file '.gjf')

# Run it through awk
new_file=$(echo $old_file_base | awk -v sol=$solvent '{split($0, tmp, "-"); \
        tmp[3] = sol; print sprintf("%s-%s-%s", tmp[1], tmp[2], tmp[3])}')

# It can all be compressed into one line
# new_file=$(basename $old_file '.gjf' | awk -v sol=$solvent '{split($0, foo, "-"); \
          # foo[3] = sol; print sprintf("%s-%s-%s", foo[1], foo[2], foo[3])}')

# Work with the file...

# Uncomment to check the new filename is correct
echo $new_file

# And copy the file
# cp $old_file $new_file

Breaking it down
We have tried the script on bash 3.2.57 and it should run as is. It'll just output the filename that would be added to the newly copied file but you can tweak it as you see fit. Let's take a look at each piece.

The input parameters

old_file=${1?No file given}
solvent=${2?no solvent given}

This part is copied from your example so we won't go into much detail. We just want to point out we changed the name of the first input parameter to try and make the naming clearer.

Getting the basename

old_file_base=$(basename $old_file '.gjf')

This part will save the base name of the file into the old_file_base variable. This extra step is not needed but we have added it to try and make everything clearer. We run this command to make the script work even if the provided path to the file is absolute (i.e. it's given from the root folder so it begins with /. An example of an absolute path is /absolute/path/to/foo).

Running it through awk

new_file=$(echo $old_file_base | awk -v sol=$solvent '{split($0, tmp, "-"); \
        tmp[3] = sol; print sprintf("%s-%s-%s", tmp[1], tmp[2], tmp[3])}')

This is where the "heart" of the program lies. We'll start by using echo to output the contents of old_file_name to STDOUT and then using a pipe (|) to redirect echo's STDOUT to awk's STDIN. That way awk will act on the base name we got in the previous step.
Note that we are using option -v when calling awk. We do so to "pass" external variables to awk so that they can be used when processing the input. With -v sol=$solvent we can reference sol within awk and its value will be that of the solvent variable in the script (i.e. the second parameter passed when running the script). We then find the awk "script" between the curly braces. It contains 3 distinct instructions:
a) split($0, tmp, "-"): The split() function will take the entire input ($0 within awk) and split it on the - characters. The results will be returned in the tmp array.
b) tmp[3] = sol: We'll just assign sol to the third element. Please note awk begins indexing at 1 not 0! We are hardcoding the index because we know the format the input filename will have. Otherwise you might need to be careful here and check the array's size manually.
c) print sprintf("%s-%s-%s", tmp[1], tmp[2], tmp[3]): The sprintf() function will "return" the string we get by assigning the passed values to the placeholders defined with the percentage (%) sign. As in C, %s is a placeholder for a string. In this case sprintf() will return the three elements of the tmp array joined by hyphens (-) as a string. As we changed the value of tmp[3] with the desired output before, the result will be what we expect it to be. We then call print to output that string to STDOUT. As this entire command is within a command substitution structure (i.e. $()) the contents outputted to STDOUT will be assigned to the new_file variable.
We then have the desired output! You can check that by running echo $new_file and checking your terminal's output. If you pass a 3rd parameter on the command line to control what input to alter in the filename you could just pass it to awk through the -v option and process the name however you want within awk itself.
Sample outputs
These are some of the outputs we got on our machine:
bash-3.2$ ./foo.sh input1-input2-input3 input-5
input1-input2-input-5
bash-3.2$ ./foo.sh input1-input2-input3 input-4
input1-input2-input-4

We did name our script foo.sh, we are kind of bad with names :P
I hope this script helps you in any way. If I misunderstood your query in any way or if you need any further guidance please let me know so that I can lend a hand :)


Can't access files on Windows D drive after installing Ubuntu

Windows lies about what drives are. It's likely that what you thought was your D drive was actually a separate partition on the same hard drive, so by telling Ubuntu to wipe your hard drive, it was wiped as well.


I don't know what is the origin of the issue but it seems like an update has overriden some key bindings and options in compiz, to fix it:

sudo apt-get install compizconfig-settings-manager

Then in the windows management options (from the left side panel) check the grid plugin (on the right side). When you click it it will prompt a message warning you that some keybindings are conflicting with others from the general options plugins, click on resolve the issues and replace all the keybindings with those of the grid plugin.

After this snapping and maximize/minimize should be working again.

Credits


How can access the Windows desktop from Ubuntu if they are on the same hard drive?

I think it is impossible. You can access Windows's files and run some software using Wine.
You cannot run your installed Windows from Ubuntu.


Ubuntu stuck and crash when downloading internet data

BIOS

Note: Have good backups before updating the BIOS

Note: Confirm that I have the correct web page for your computer

You have a very old BIOS version 1.3.3. Current is 1.18.0 and be downloaded here.

Memory

Edit your question and show me free -h and sysctl vm.swappiness

Go to https://www.memtest86.com/ and download/run their free memtest to test your memory. Get at least one complete pass of all the 4/4 tests to confirm good memory. This may take many hours to complete.

Disk

Edit your question and show me screenshot(s) of the Disks application SMART Data window.


Old files after upgrading to ubuntu 12.04 LTS

Sometimes our last resource is to use some recovery tool like photorec or foremost.

Photorec is easier to use:

1) Install testdisk,

2) Open a terminal,

3) Run sudo photorec and answer the questions.

Foremost lets you choose which files you want to recover:

1) Install foremost,

2) Open a terminal,

3) The command is something like sudo foremost -d -vqT -o /media/sda3/foremost -t jpg,ole,zip -i /dev/sdb1

The output folder comes after the option -o and the input comes after -i.

The recovered files chose here are jpg, ole (= docx odt), zip.


How do you automount additional pools with a zfs root?

workaround

This workaround is inspired by this link, the solution had to be adjusted to work with the cron daemon version as follows:

Added the following line in /etc/crontab

@reboot root zpool import -d /dev/disk/by-id <pool-name> >> /dev/null
# ex.: @reboot root zpool import -d /dev/disk/by-id tank/videos >> /dev/null

There are so many posts on the internet raising the same issue for different Ubuntu or (even other Linux) distributions.

It took me weeks to find this workaround as all proposed solutions didn't work for me.

Again, it's only a "workaround" until a formal solution is developed given the current status of zfs on linux in general and it's "experimental" status on Ubuntu 19.10 in specific.


Compile vim from source on Ubuntu 16.04 with python failure

I solved the issue by installing everything from https://launchpad.net/~jonathonf/+archive/ubuntu/vim and setting an alias of "vim-nox" equal to vim in .bashrc and thus overwriting the old vim command from the vim that doesn't work making the only vim command that work connected to the vim that actually works.


In order to uninstall a .deb package you can run, from the command line:

 sudo dpkg -r package_name


Trying to get a Dymo 4XL to work using a Pi Zero W as a print server

In your first link the SDK part has an incorrect link. Try downloading the file from:

http://www.dymo.com/en-US/dymo-label-sdk-and-cups-drivers-for-linux-dymo-label-sdk-cups-linux-p--1#

After you download the file you will need to extract the drivers as follows:

tar zxvf dymo-cups-drivers-1.4.0.tar.gz

That will create a dymo-cups-drivers-1.4.0.5 folder, then you should be able to continue on with your setup.


You've made a downgrade, I suppose by removing and re-installing packages.
This probably not removed all the configuration done previously.

The way the configuration of Apache is made in Ubuntu is no more to link every module load and configuration file separately and explicitely in the main config file but just by pointing to the site-enabled/, mods-enabled/ and conf-enabled/ directories for files ending by .conf and .load.
The content of these directories is in turn symbolic links towards a file in the site-available/, mods-available/ and conf-available/ directories, where the packages provided files are stored.

I suspect that the downgrade you've done removed the access_compat.load file in the mods-available/ directory but left the symbolic link mods-enable/access_compat.load untouched, so making it a dead link.
Look in your mods-enable/ directory for dead links and remove it (or them).


Make sure libapache2-mod-wsgi is installed, and that it is enabled:

sudo apt-get install libapache2-mod-wsgi
sudo a2enmod wsgi

If you're using Python3 you might need libapache2-mod-wsgi-py3 instead. They can't both be installed at the same time but they both use the same a2enmod command to enable in Apache.


I figured it out. I wasn't putting my server's name in when i was build the server key.


How can you completely remove a package?

This is a very general answer to the question about the effects of purging packages. For advice specific to your situation, you'll have to edit your question to include additional information--in particular, the complete and exact text of the error message you are getting.

Removing packages with sudo apt purge ... or sudo apt --purge remove ... will remove them and all their global (i.e., systemwide) configuration files. This is usually what people mean when they talk about completely removing a package.

But that doesn't mean your system is the same as it was before the package was installed. In particular:

This does not remove packages that were installed as dependencies, when you installed the package you're now removing. Assuming those packages aren't dependencies of any other packages, and that you haven't marked them as manually installed, you can remove the dependencies with sudo apt autoremove or (if you want to delete their systemwide configuration files too) sudo apt --purge autoremove.
This does not remove non-systemwide configuration files. Specifically, it does not remove user-specific configuration:

It does not remove the configuration files and directories located in users' home directories (or in the .config subdirectory of their home directories), created by the software the package provides.

If these files/folders are not stored in .config, they usually start with a . themselves. Either way, you can see them with ls by using the -a or -A flag, and you can see them in Nautilus and most other file browsers/managers by pressing Ctrl+H or going to View > Show Hidden Files.

It does not reverse changes made to existing user-specific configuration files.
It does not remove new gconf or dconf keys, or reverse any gconf or dconf configuration changes.

Using purge or --purge remove instead of remove does not reverse changes to existing systemwide configuration files provided by other packages or created manually by the user. However, sometimes such changes are undone by uninstalling the package (whether or not it's a purge rather than a remove).


Set Ubuntu 12.04 Dash's default lens to its application lens and some other tweaks!

This is quite a hacky answer.
I would suggest you assign this script to another key, such as a function key. I went for F3 because it doesn't do much in any applications I use.
You need to install xdotool:
sudo apt-get install xdotool

First run the commands
touch .dashopen
gedit .dashopen

and write into it

closed

And the commands
touch .filteropen

Now you need to create a cron job. Run:
crontab -e

and into it, write

@reboot echo 'closed' > .filteropen

then do
touch dasha.sh
gedit dasha.sh

into that you need to put the following:

#! /bin/bash

#DASHOPEN

# get the state of the dash.
do=$(<.dashopen)
fo=$(<.filteropen)

# if it is closed:
if [ $do = 'closed' ]; then
    # open the applications pane
    xdotool key super+a
    # and record that it is open
    echo 'open' > .dashopen
# if it is open
else
    # close it with the super key
    xdotool key super
    # record that it is closed
    echo 'closed' > .dashopen
fi

#FILTEROPEN

# if it is closed:
if [ $fo = 'closed' ]; then
    # get the mouse location
    eval $(xdotool getmouselocation --shell)
    # move to the filter button and click
    xdotool mousemove 1000 60 # CHANGE THIS LINE TO WORK ON YOUR SCREEN.
    # click after 1 second
    sleep 1 && xdotool click 1
    # and record that it is open
    echo 'open' > .filteropen
    # move back to original location
    xdotool mousemove $X $Y
fi

make it executable:
chmod +x dasha.sh

Now you need to add the keyboard shortcut:
Open system settings, and click keyboard.

Click Shortcuts, then custom shortcuts.

Click [+] then type the following:

Dash Application
./dasha.sh

Click disabled and press your chosen shortcut key:

Please comment if I've made a mistake


First verify the commands here work, or you can find equivalent terminal commands.

Then install indicator-script-runner and add those commands in.  You might/could alter the sudo to be echo password | sudo -S where password is your actual password; all depends on how secure/accessible your computer.


Ubuntu server ssh after reboot: Permission denied (publickey)

Well, the problem is that the key is stored in ~/.ssh/authorized_keys

With an encrypted home, you can not log in with the key as your home directory is encrytped.

Move authorized keys to somewhere else, I personally use /etc/ssh/.authorized_keys

You then edit /etc/ssh/sshd_config , add/edit the line

AuthorizedKeysFile /etc/ssh/.authorized_keys

Restart ssh server.

See also:

http://manpages.ubuntu.com/manpages/precise/en/man5/sshd_config.5.html