You should be able to remove in from the URL chrome://settings/content/notifications
It will have " watch-video.net" or "blastnotificationsx.com" in the list of notifications. Delete them. Also have a look through cookies for similar names.
And lastly make sure to track down the Chrome Extension that causes this (Chrome menu-icon, Extensions).


Change brightness works in Unity but not spectrwm

My installation was a fresh install, thus it used a lot of default settings in the setup.

Accessed the "Additional Drivers" window:

  $ software-properties-gtk --open-tab=4

My graphics card (G86M Quadro NVS 130M) was using the open source Nouveau driver by default. Selected the recommended Nvidia binary driver (version 340.76 from nvidia-340 (proprietary, tested)), clicked on Apply Changes then restarted my laptop.

It now works!

xbacklight -get returns the current brightness percentage and xbacklight -set correctly adjust the brightness! This works both when running Unity or when using spectrwm.


Is there a changelog for Ubuntu Security Notices?

Unfortunately, there are no changelogs of updates to the USNs themselves. Usually, once published, the USNs do not change, other than to fix a typo or make a slight wording change.

For the set of kernel USNs that covered the Stack Clash issue (CVE-2017-1000364), mistakes were made in the publication process that included references and descriptions to fixes that were not actually included in the kernels published to the -security pockets. They covered issues that were pending for the next round of regular Stable Release Update cadence kernels. Due to this, the USNs were updated to include only the CVE-2017-1000364 reference and description.

These issues will be addressed in the next round of kernel updates, which were planned to be released already, but were delayed due to the need to incorporate the fixes for CVE-2017-1000364, as well as to address regressions introduced by the Stack Clash fixes.


Can't connect to MAAS due to "Files does not exist: /var/www/maas" error

The URL is http://<server>/MAAS, not http://<server>/maas.


Permission denied for 'sudo' after 'sudo chmod 666 /usr'

If you just did sudo chmod 666 /usr then things are no too bad - since that will have changed the permissions only on the parent /usr directory, not any of the files of subdirectories within it.

If however you added the recursive flag -R then you are almost certainly better off re-installing the system. Even so, there should be no reason to lose data: you can boot from a live USB or DVD and backup your important files from there first.

If you only did a non-recursive sudo chmod 666 of the /usr directory, and you have physical access to the machine, then the simplest fix should be

Boot into recovery mode via the grub advanced menu and select 'Drop to root shell'
Remount the filesystem in read-write mode

mount -o remount,rw /

Execute the command

chmod 755 /usr

Don't add any other command line options and don't use any shell wildcards.
Type exit to continue booting normally

Note, chmod lives in /bin rather than /usr/bin so shouldn't be affected by the permissions on /usr. If (for example) you'd change the permission bits on the /bin directory, or on the / directory itself, then this method would not be appropriate since you wouldn't be able to execute chomd from recovery mode - the best option in that case would probably be to boot a live CD/DVD/USB of any available Linux distribution (it doesn't need to be Ubuntu); identify and mount the broken system's root device (at /mnt in the live system, for example); and then run chmod 755 /mnt/usr from the live system.


How to cd to where I extracted a package, and run dpkg-deb -D?

cd ./Downloads and dpkg-deb -D --build tpfan admin_0.96-ubuntu1_all are two separate commands. You must run them separately.

So, after cding to the Downloads folder, just run this command as before:

dpkg-deb -D --build tpfan admin_0.96-ubuntu1_all

It appears that the only problem was that you were in the wrong place when you ran it. Or, more accurately, that you specified a relative path (see this article), which was wrong relative to the current working directory. By changing the current working directory, the relative path tpfan should be correct, assuming tpfan exists in your Downloads folder.

Edit: Whatever directory contains the tpfan directory, that's where you should be (i.e., where you should cd to) when you run your dpkg-deb command.


Can't login into shell - password field immediately registers newline

For anyone having the same problem - this is a known bug in the current kernel (as steeldriver linked https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1812679)

Solution: when booting up, go to Advanced options and select the previous last kernel version.


You can upload compiled programs to Apple from an Ubuntu machine without any issues, since (I'm pretty sure) that the process takes place via a browser.

Since iOS uses Objective-C, you can always "code" the app (write it using gedit or Geany, or anything else) on Ubuntu, but you won't be able to compile it into an .ipa file.

However, in order to compile and test it, you will require Apple's SDK, which is only available on Mac OS X. - So, not possible.

There are always alternative ways to program iOS apps however.
One way is that you purchase a retail Mac OS X DVD, and set up a VirtualBox Machine (or VMWare, if you want). Then, download the SDK from the apple website.
Another way would be is to use "on-line" app makers, such as Tiggzi (My personal favourite, since it has a lot of options for compiling and such). On-line app makers use HTML and JavaScript for the design and functions, then compile it using PhoneGap.So, there's no need for Objective-C.

So, long story short, No, you can't make iOS apps on Ubuntu, however you may write them, but you won't be able to compile them into .ipa files. You can always submit iOS apps to Apple from any Ubuntu machine, since it is done by a browser. There are alternative ways to make them on Ubuntu - such as Virtual Machines and on-line app creators.


why is an error popping up saying "unable to write to /usr/local..."

This installer is probably running as your user and not root or via sudo.

Without that privilege level it won't be allowed to write to system areas such as /usr/

Depending on how that program works you have two options :

Install to another folder

try changing the install path to somewhere within your home directory

Escalate privileges

instead of clicking on the file go to the terminal and run it via sudo.
Doing this implies a lot of trust in the installer and could damage your system.


Ubuntu / Windows Dual Boot with seperate partition for Desktop, Documents etc

With the help of oldfred's comment I have now solved the problem.
Mainly, what I had to do was add an entry to the fstab file to mount the partition at /mnt/data/. I did not even have to create links in my home directory, editing the user-dirs.dirs file worked for me.


Ubuntu 16.04: can't open the terminal after trying to install Python

I had the same terminal problem after upgrading Python from 3.5 to 3.7. As noted, Python 3.5(m) comes preloaded in Ubuntu 16.04 and the executable is in /usr/bin whereas Python 3.7 is installed in /usr/local/lib. My XTerm showed:

dell:/usr/bin$ gnome-terminal
bash: /usr/bin/gnome-terminal: /usr/bin/python3: bad interpreter: No such file or directory

Once I changed the first line of "gnome-terminal" from #!/usr/bin/python3 to #!/usr/bin/python3.5m, it was working. On the other hand, if I changed it to #!/usr/local/bin/python3.7, it encountered the following error:

dell:/usr/bin$ gnome-terminal
Traceback (most recent call last):
File "/usr/bin/gnome-terminal", line 9, in <module>
from gi.repository import GLib, Gio
ModuleNotFoundError: No module named 'gi'

This shows that ubuntu 16.04 gnomi-terminal is supported by Python 3.5, but not 3.7.

In your case, your error was "ImportError: No module named 'encodings'". I suppose your Python is 3.5 or earlier. I searched the Ubuntu16.04 gnome-terminal script, there is no such statement as "import encodings". As suggested, you might want to reinstall gnome-terminal. I am not familiar with Anaconda, but looks like the default installation of Anaconda2 includes Python 2.7 and Anaconda3 includes Python 3.7. For Python 3.5, you need to follow this instruction. So make sure your gnome-terminal Python script is supported by the installed Python version, to be sure, issue shell command "/usr/bin/python3 --version" or python3 -c "import sys; print('\n'.join(sys.path))"


Grub not showing on startup for Windows 8.1 Ubuntu 13.10 Dual boot

First, turn off the Windows 8 Fast Startup feature, as described here. That feature causes filesystem corruption, which can in turn cause odd boot issues. There's a good chance that this issue caused your problem initially. Disabling Fast Startup might or might not cause GRUB to reappear the next time you reboot.

If that doesn't fix the problem, you should try re-registering GRUB with your firmware's NVRAM. The way to do this that's most reliable is to use bcdedit in Windows. Open an Administrator Command Prompt window and type:

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

If you're booting with Secure Boot active, change grubx64.efi to shim.efi (or maybe it's shimx64.efi; in Linux, check the contents of /boot/efi/EFI/ubuntu to see what's there). Doing this in Windows is more reliable than other methods because some users have reported that some versions of Windows repeatedly re-register themselves as the default boot loader if the default is set outside of Windows. Although this is rare, it's consistent with what you're seeing, so using Windows for this task may be necessary.

An easier way to do it, but potentially less reliable in your case, is to use Boot Repair. This tool automatically fixes certain types of boot problems, and it's likely to work for you. The biggest risk is that if an overzealous Windows caused GRUB to become inaccessible to begin with, the Boot Repair change won't work.

If you continue to have problems, post back with details. (If necessary, edit your original post and comment on this one to alert me to the change.)


Can I remap right alt to compose in 13.10 and keep left alt for HUD?

The general way to troubleshoot such a problem is:

Look in the layout settings whether there is a layout which provides the feature you want to look. Also check there whether you can change the options for a certain layout to behave the way you would like.
Look in xev for the keycodes and keysym of the left and right ALT respectively, and reconfigure it with xkbcomp so the right ALT has the ISO_Level3_Shift keysym. Following is the relevant section from my XKB layout:

key <RALT> {
type= "ONE_LEVEL",
symbols[Group1]= [ ISO_Level3_Shift ]
};

To get your layout use

xkbcomp $DISPLAY keylayout.xkb

and edit it in a text editor. To upload it to the Xserver use

xkbcomp keylayout.xkb $DISPLAY

If it works you have to make it permanent by writing a script with the previous command in it and making it autorun on startup. (You can make it autorun either with the /etc/lightdm/lightdm.conf file or any other way you like.)
If the right ALT has the proper keysym and some keys with the right ALT key produces the desired output, but some others don't, then only change the keysyms for that ill behaving key. More instructions for this situation here.
If none of the above works, then it is possible that you have a special, programmable keyboard, which was programed in a way that it sends the same scancode for the left and right ALT keys, so the kernel sees them the same. In this case either reset your keyboard or program it correctly. Check this Q&A for a similar problem.

P.S. There is a good wiki about linux and keyboards here.


How to use a pre-installed Ubuntu, which is on an external drive to boot from any computer?

by no means an expert but I would assume that an "installed" Ubuntu is to an extend tailored to its HW. I can therefore see that moving the disk to other HW would lead to issues. I would likewise also expect that the Bootloader is very generic. So can you get to the bootloader screen e.g GRUB. If so I think that selecting recovery mode would then be your best try to see whether you can get some indication of what the machine is telling you when trying to boot.


Why does Wine need Windows service pack?

Wine is a compatibility layer. It duplicates functions of Windows by providing alternative implementations of the DLLs that Windows programs call, and a process to substitute for the Windows NT kernel.

WindowsXP-KB936929-SP3-x86-ENU is downloaded automatically by Play On Linux. Play On Linux uses pre-made custom scripts to install software. For instance if you would install Command And Conquer: Red Alert 3 the log file shows, amongst a lot of other lines this:

09/17/12 13:46:15 - [POL_GPG_install_key] Message: Importing PlayOnLinux public key
09/17/12 13:46:16 - [POL_Source] Message: POL GPG : Good signature
09/17/12 13:46:16 - [POL_Download_Resource] Message: Downloading resource
http://download.microsoft.com/download/d/3/0/d30e32d8-418a-469d-b600-f32ce3edf42d/
WindowsXP-KB936929-SP3-x86-ENU.exe
09/17/12 13:46:23 - [POL_Download_Resource] Message: Resource already present

That file is needed for service pack 3 and holds fixes or changes to network tools.


Not easily.  The two paths to this that people have used are:

Use the included utility software which includes a live view window and run a software capture of what's in that window.  This unfortunately probably won't work at all on Linux.
Use the HDMI output of the camera and capture this with capture hardware.

I suspect that in both cases the live view video you'll get will be standard def and/or low quality and with limited ability to do any adjustments to things like frame rate, shutter speed/angle, etc.  On some Canon cameras you may find that the HDMI output has controls on the display including a focusing rectangle which can't be disabled even in the minimal display mode.


Is there any way to install Ubuntu 18.04 on RAID0?

You haven't said what type of RAID.

If hardware raid - you just install normally.

If software raid - the documentation

https://help.ubuntu.com/community/Installation/SoftwareRAID states

  "If you're building a desktop then you need the "Alternate" install
  ISO for Ubuntu."

It provides a link to

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

where you'll have to follow the "Alternate Installations" section as stated in first link.  The prime difference is the media used, or as stated in the documentation

  "The Alternate CD allows more advanced installation options which are
  not available with the standard LiveCD."


remove this repository from your sources: go to System Settings then Software Sources then look for this repository under Other Software

(if it is not immediately obvious, you may have to click Edit to see the URL of each repository in that list)


How to import my thunderbird settings from Thunderbird 68 to thunderbird 78?

EDIT to reflect change in question:
Thurderbird installed from the site creates a new profile by default on Linux, but it is possible to make it use the original profile.

Open a terminal, change to the folder containing thunderbird and run ./thunderbird -Profilemanager.
Select your profile, set it as default and open it.


How to show a window of an already active app when trying to open a new instance of that app

Lets start by saying that there are lots and lots of ways.
You normally setup a token/identifier when the program starts, so later instances can look for the existence of that token.

I will describe one way which uses dbus.

Overview:

When starting a program, it can register itself on the session dbus under a unique name (e.g. "org.nicklemaire.myprogram"). Further instances of the program can check if such an accesspoint is already registered, and if so, tell the program what to do via this dbus access point (e.g. get focus, open a website, play a song). The last part is probably necessary when you want behaviour similar to "firefox askubuntu.com", which opens this page in a new tab in an already running instance.

Code:

#!/usr/bin/env python
import sys
import gtk
import dbus
import dbus.service
from dbus.mainloop.glib import DBusGMainLoop
from multiprocessing import Process

class MyDBUSService(dbus.service.Object):
    def __init__(self):
        bus_name = dbus.service.BusName('org.nicklemaire.myprogram', bus=dbus.SessionBus())
        dbus.service.Object.__init__(self, bus_name, '/org/nicklemaire/myprogram')

    @dbus.service.method('org.nicklemaire.myprogram', in_signature='s')
    def startup(self, arg):
        print "got the following parameter from another instance:", arg

def call_instance():
    try:
        bus = dbus.SessionBus()
        programinstance = bus.get_object('org.nicklemaire.myprogram',  '/org/nicklemaire/myprogram')
        bus = dbus.SessionBus()
        programinstance = bus.get_object('org.nicklemaire.myprogram',  '/org/nicklemaire/myprogram')
        startup = programinstance.get_dbus_method('startup', 'org.nicklemaire.myprogram')
        try:
            arg = sys.argv[1]
        except IndexError:
            arg = ""
        startup(arg)
        print "Another instance was running and notified."
    except dbus.exceptions.DBusException:
        exit(-1) # process had an error

if __name__ == "__main__":
    p = Process(target=call_instance)
    p.start()
    p.join()
    if p.exitcode > 0: # process had an error
        DBusGMainLoop(set_as_default=True)
        myservice = MyDBUSService()
        gtk.main()

Test:

Open a terminal and run the program: myprogram.py . It will not terminate because we currently want to have it running and waiting for a second instance to start.

Now do this: open another terminal and run the program again, this time with an additional argument myprogram.py askubuntu.com.
It should print: "Another instance was running and notified."
While in the first terminal, you should get an output similar to this: "got the following parameter from another instance: askubuntu.com"

The other part of your question: raising a program is described here: https://stackoverflow.com/questions/9054462/how-do-i-raise-a-window-that-is-minimized-or-covered-with-pygobject

Basically, you have to call mywindow.present() in the startup method.


If they are really untrusted, and you want to be sure, you'd set up a separate box. Either really, or virtually.

Further, you don't want that box to be in the same network as your important stuff, if you are paranoid enough. In all solutions you'd set up a separate user with no rights, so not to open too much tools to the would-be compromiser.

So the safest option would be a separate box removed physically from your network.
You could give in a bit by adding it to the physical network, but on a different subnet: no 'real' connection inside
A virtual machine  would be an option, but might have to give up some performance

If you are bound on running it on the same box, you have for instance, this option

chroot. This is a default option for doing this for lots of people, and for non-specific threats it might even work. But it is NOT a security option, and can be broken out of rather easily. I'd suggest to use this as intended, i.e. not for security.

In the end you might need to set up a specific sandboxing model without the hassle of virtualization or separate boxes, or the still-at-risk situation of chroot. I doubt this is what you meant, but look at this link for some more in-depth information.


Ubuntu cluster management with torque+maui

You could explicitly prohibit running certain programs for common users (however they might still be able to run some interpreted language, if you forbid e.g. make, gcc).

Better approach would be using cgroups (introduced to linux kernel in 2.6.29 - your kernel should support them) or some light virtualization (lxc-containers).

See: https://wiki.archlinux.org/index.php/cgroups

With cgroups you could limit user to 1 CPU (or even less) and 50MB RAM, which would allow user using ssh access but not really running expensive calculation (if user exceeds limit, the process will be killed).


Installed programs in Ubuntu wont launch

I actually have a similar problem on Ubuntu 18.04, with several program such as Carnet (note-taking app) or Rambox (a multiple-messenger managment app). I have installed them through SNAP and when I click on "launch" nothing happens. When I try to launch them from the start menu, nothing happens either. It is as if they are not really installed, even though I had no message telling me that something went wrong with the installation.


How to load Xmir on my tablet/phone with Ubuntu Touch Saucy

to run X sessions under Mir, with Mir acting as the system compositor, create the file /etc/lightdm/lightdm.conf.d/10-unity-system-compositor.conf to look to look like this:

[SeatDefaults]
type=unity

then restart ligthdm.
see http://unity.ubuntu.com/mir/using_mir_on_pc.html for more details.


Is there a way to run a script every time I insert a usb modem?

You can accomplish this with some udev rules, as @Rinzwind suggested.

First, save your script to somewhere accessible by other users. For example, you could save it as /usr/local/bin/script.sh.

Now, make the script accessible by others.

sudo chmod 555 /usr/local/bin/script.sh

Now, plug in your USB modem and then run lsusb. Below is an example output:

$ lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 002: ID 0fcf:1008 Dynastream Innovations, Inc. Mini stick Suunto
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Find the line with your modem's name at the end. Now, find the portion near the middle in the format ID XXXX:####. The XXXX and #### portions will be, the Vendor ID and Device ID respectively.

For this example for the third line, which reads … ID 0fcf:1008 Dynastream …, the vendor ID is 0fcf and the Device ID is 1008. Your device will have different values for these IDs.

Now, we will use these IDs to create a rule for udev.

Now, create a rule for this device with udev.

Make a rules file with

sudo nano /etc/udev/rules.d/90-local.rules

Add the following line:

ACTION=="add", SUBSYSTEM=="usb", ATTRS{vendor}=="0xXXXX", ATTRS{device}=="0x####", RUN+="/usr/local/bin/script.sh"

Replace XXXX with the vendor id from earlier, and replace #### with the product id from earlier.

Now, force udev to reload it's rules (alternatively you could skip this step and reboot)

udevadm control --reload-rules
sudo service udev restart

And you're done!

Sources: Similar question on SU concerning udev rules, Creating udev Rules


Do you have windows and ubuntu installed on the same pc?

If so you need to install GRUB or another Bootloader.

From user hhlp

1.boot from cd

2.run fdisk -l and see which is your linux partition say /dev/sda2

3.mount the partition to say /mnt using mount /dev/sda2 /mnt

4.now the magic command run the following from anywhere

5.grub-install --root-partition=/mnt /dev/sda you will get the message "no error reported"

6.reboot

7.enjoy!


Matlab 2016b Ubuntu 16.04 LTS installation problem (dvd2)

I was facing the same issue and did the following trick and it worked. I first installed Furius ISO Mount from Ubuntu Store. Then I mounted the DVD 1 iso file and started the installation. When the prompt asking for DVD 2 popped up, I unmounted DVD 1 from Furius. Then I renamed the DVD 2 iso identical to DVD 1 and mounted it with Furius. On pressing Ok at the install prompt, the installation resumed and worked perfectly.


protected videos are not working on Ubuntu 14.04 on TVNZ on Demand

I expect there is some proprietary Digital Rights Management stuff required to view their shows similar to what Netflix here in the U.S. uses. We have to run a browser and Microsoft's "Silverlight" under wine to make Netflix work. It seems Netflixs is frightfully worried that the open source crowd will find a way to copy their material if they make it available to open source software.

If you have to have this show, http://www.cbs.com/shows/big_bang_theory/ but you might need to VPN into the U.S. market to use it. I used airvpn.org to watch the London Olympics straight off the BBC here in Califonia. A good VPN service is also valuable for privacy protection.


After upgrading to IOS 5 ipod is not detected by ubuntu 10.04 anymore

The reason why it doesn't show up under 10.04 is because with the iOS5 upgrade, Apple changed the way it talks to computers, and due to the fact that 10.04 is an LTS, it is highly unlikely that it'll get an update to "fix" it.

However, it does mount under 11.10 - if using 11.10 is an option, that is the solution.


HTTP header is not set to at least 15552000 seconds

I had the same issue and I fixed it by entering:

Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"

Maybe the max-age needs to be larger than 1552000, but I also executed the command:

sudo a2enmod headers

after inserting the line. As the response was something like:

  module headers has been enabled please restart Apache to take effect.

I assume that the module simply was not active before.
After restarting Apache and re-running the security verifier the message was gone.


Middle-mouse click doesn't work in Ubuntu 20.04 LTS?

The name of the function you mean is Autoscroll. It can be activated in Firefox settings (try searching for 'Auto', the Finnish text translates as "Automatically scroll the page"). It seems that Chrome has an extension for it. I don't use the function very often, and don't know how many other programs have it.

The middle click is used as an alternative copy paste function in unix/linux. That's why it's not commonly used for autoscroll.


What is the difference between locate --basename and locate --wholename on Linux?

The basename is the last part of the full path

/etc/default/grub
              ^
             basename

By default locate matches a pattern anywhere in the path.

With -b (basename) it matches only paths where the pattern appears in the last part of the pathname, the filename or directory name itself.

For example, output from locate gimp would include

/etc/gimp
/etc/gimp/2.0
/etc/gimp/2.0/controllerrc

And many other things, but locate -b gimp would find

/etc/gimp

Without including the subdirectories, since there is no gimp string in their basenames.


path not getting added to environment variable after script execution

The script execute the source inside its context.

Once the script ends, its context ends with it.

So the current context doesn't hold the content of the updated ~/.bash_profile.

You need to re-login or source the ~/.bash_profile again in order to get the updated variable.


How to find the reason behind sudden CPU max usage and server crash

First of all replace you real IP Address by some dummy IP in question.
Try to change default ssh port on server.
Create file /etc/ssh/sshd_config.d/01-port.conf with line (21412 port only for example, you can use any port from range 1024-65535)
Port 21412

restart sshd
systemctl restart sshd

Don't logout from server till you test login to server with new ssh port in another terminal.
To ssh login with new port use
ssh -p 21412 user@yourserver


What version of Ubuntu for a Compaq Armada E500?

I've setup one of those for my mother with LUBUNTU. It has been working for a couple of years with version 10.04 LTS.
I'm actually trying to upgrade it to Lubuntu 14.04, but I'm having some issues with chromium and some library.
It works with Firefox but it's a bit sluggish.

I've tried several distros and Lubuntu has been the best that I find for old machines.

Try the dark theme with Moka icons and it will look beautiful!


Can you have a desktop environment without a display manager?

The display manager takes care of automatically starting the display server ( X11 ), and then prompts you to log in instead of starting your desktop environment as the user the display manager is running as ( root ).  startx starts the display server and your desktop environment as you, when you are already logged in.  What you are missing by not having a display manager is the ability to log in within the gui instead of having to log in at the command line.


Destination is Read only error on ubuntu file system

Open the terminal and write the command

sudo fdisk -l

It will show your file system

identify the partition you want permission for read and write

then type the command and give the partition name like this

sudo ntfsfix /dev/sda3


How can I install ubuntu on a server that has openfiler already?

What is openfiler? Probably you need to get into BIOS and change the boot sequence so that CD is before HDD. Other way is to keep pressing the proper key that has description at pre-boot screen: boot menu.


Why do I see a difference in file count between Nautilus and find?

Nautilus doesn't count hidden files.

Files and directories starting with a dot (.) are hidden in Linux.

Steps to reproduce:

mkdir somedir && cd somedir
touch .hidden .hidden2 regular regular2      # 4 files, 2 hidden
find . | wc -l                               # outputs 5 (4 files + dir itself)

Nautilus reports: Contents: 2 items, totalling 0 bytes

Using Git

Here's a quick demonstration on the amount of files for the metadata used in Git, all in the .git directory.

git init myrepo                              # Initialized [...] in myrepo/.git/
cd myrepo/
find . | wc -l                               # outputs 23! for an empty repository
tree -a                                      # outputs 10 directories, 12 files

echo "have to add something for git ls-tree" > somefile
git add somefile && git commit -m "Initial commit"
find . | wc -l                               # outputs 38 (!)
git ls-tree -r HEAD | wc -l                  # outputs 1

And also Nautilus reports 1 there.

My suggestion: use tree

As Gilles pointed out in his answer, using find and piping it to wc isn't overly reliable if the file names contain special characters.

It seems that tree is capable of doing this right:

tree -a
.
├── dir
│   └── regular3
├── dir2
├── .hidden
├── .hidden2
├── regular
└── regular2

2 directories, 5 files


At the login screen, press Alt-Ctrl-F1 to switch to a full-screen text console. F2...F6 will give you other text consoles.

Press Alt-Ctrl-F7 to switch back to the GUI session.


Which are the default Ubuntu 14.10 gtk, icons, cursors and windows themes?

GTK Theme - Ambiance

  Icons - Ubuntu-mono-dark

  Cursors - Dmz-white

Why do you want to remove the others anyway?


We discussed these issues on freenode #ubuntu-libertine, recapping here.

You can find logs for libertine applications in the $HOME/.cache/upstart directory. For information about individual apps, the file pattern to look for is application-legacy-$CONTAINERID_$APPNAME_0.0-.log. For instance, if you launch gedit from the puritine container (default on UT), the log will be available in $HOME/.cache/upstart/application-legacy-puritine_gedit_0.0-.log.

There might also be some interesting information in $HOME/.cache/upstart/unity8.log for general Unity 8 messages, or $HOME/.cache/upstart/scope-registry.log for messages pertaining to running the scope.

Note that vivid is no longer supported by app developers, so not all applications are guaranteed to work. There's also the possibility that app developers will release non-working armhf builds of their apps due to the small user pool.


How can I install petrify and set it up?

From the Petrify website, I downloaded the "New version 4.2 (only for Linux)" (clicking will download the file).
I unpacked it using tar:
tar xfz petrify-4.2-linux.tgz

Inside the created petrify directory is the INSTALL file you quoted from, and the directories it refers to, bin and man. The files are all ready to use and no compiling is required. The two symlinks to the petrify binary in bin apparently require a program called Dot, but the link to that program on the Petrify website is broken, so I did not attempt to get those two commands working.
Firstly I suggest testing the petrify binary. Because it's a 32-bit binary, if you are using a 64-bit system, you will probably get this baffling error:
bash: ./petrify: No such file or directory

This is explained in this answer by Gilles.
For me it was sufficient to install libc6:i386:
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install libc6:i386

Now the program should run, but it won't do anything without input. If you don't have any files to work on, you can download some examples (clicking will download) from the site for testing. This file will need to be unpacked with tar xfz <file> too. I tested it, but I have no idea how to interpret the output, so I can only tell you that some output files were generated, and there weren't any errors!
To answer your actual question (finally), the reason you might want to set those environment variables is so that you can run petrify and man petrify from anywhere. Rather than modifying your PATH or setting MANPATH, you could simply copy the files to appropriate locations. Assuming you are in the petrify directory where you found the INSTALL file, you could run
mkdir -p ~/bin
cp bin/petrify ~/bin

This directory is automatically prepended to your PATH if it exists by a piece of code in the default ~/.profile on Ubuntu. You need to source ~/.profile to have it adjusted immediately, or log out and log back in for it to take effect (you only have to do that once). Now you can run petrify anywhere.
Alternatively, you could copy to /usr/local/bin:
sudo cp bin/petrify /usr/local/bin

This is already in the default PATH. This is the better option if multiple users need access to the program. You can also copy the symlinks from the bin directory to the same location as petrify.
For the man, I copied the file to /usr/share/man/man1 where the other man files on my system live:
chmod 644 man/man1/petrify.1
sudo cp man/man1/petrify.1 /usr/share/man/man1

Running man petrify now brings up a comprehensive man page.
If you prefer to configure the PATH and keep the files isolated, you can set the environment variables in your ~/.profile instead. You can add a line like this to append to the PATH:
PATH="$PATH:/path/to/petrify/bin"

replacing /path/to/petrify/bin with the actual path to the parent directory of the petrify binary file, wherever you put it.
Setting MANPATH can also be done in ~/.profile. Note that the directory structure is
man
└── man1
    └── petrify.1

If the full path of petrify.1 were
/home/zanna/petrify/man/man1/petrify.1

I would set the MANPATH in ~/.profile like this (without man1):
export MANPATH=":$HOME/petrify/man"

The leading colon is important here and must not be omitted. Also note that you do not need to export PATH (it is already exported, and changes to it will be inherited) but you do need to export MANPATH.


Expanding Physical Disk Ubuntu 16.04 LTS

Assuming you don't have anything important on the LVM physical disk /dev/sda3:

Turn off swap using swapoff.
Edit /etc/fstab and delete the line referring to the swap partition.
Deactivate and remove all LVM logical volumes, volume groups, and physical volumes using lvchange, lvremove, vgchange, vgremove, and pvremove.
Delete partitions /dev/sda5, /dev/sda3 and /dev/sda2 in this order.
Extend the partition /dev/sda1. (For steps 4 and 5 you may use tools such as Gparted or parted.)
Extend the filesystem on /dev/sda1 using resize2fs. (This may have been done automatically at step 5, depending on what tool you used to extend the partition.)
Reboot.
Create a swap file and edit /etc/fstab to refer to the swap file instead of a swap partition; use fallocate and mkswap to make the swap file, and swapon to start using it without rebooting.

Note: all data on the LVM physical volume /dev/sda3 will be lost and gone forever. Be certain that you have no data there or you won't ever need it.


Setting up Google Cloud Printer Server via CUPS

Try this:

./gcp-cups-connector

or

~/Downloads/cups-connector/gcp-cups-connector


How to pause installation package in ubuntu software center

You mean still can continue downloading, Yes but not exactly pausing.

Click cancel (X), Install the other package, then back to previous one.

APT keeps partial downloaded packages in /var/cache/apt/archives/partial/, So it will resume download then install it.


GNOME - Rebind Super key to custom keybinding

Changing the behaviour of pressing and releasing Super will, as far as I know, require the use of a utility ksuperkey. See my answer here for some more background on ksuperkey and where to find it. One caveat: Probably the utility will work fine in Wayland, but I am not sure.

The first thing you need to do in any case is disable the Super key for showing the overview:

gsettings set org.gnome.mutter overlay-key ''

You could now first try if your own approach now works. If it does, let us know because that would be most straightforward. I doubt it, however, and then you can try using ksuperkey.

Once started, ksuperkey by default redirects pressing and releasing Super to Alt+F1. There are two possible approaches: 1) you rebind Alt+F1 to your custom command (by default in Gnome, it shows the "menu", i.e., the overview) or 2) you redirect to another keyboard combination by launching ksuperkey with the -e option, e.g.

ksuperkey -e 'Super_L=Control_L|space'

will redirect Super to Ctrl+Space.

The utility must be running, so you will need to have it autostart after login.


I wouldn't recommend disabling fsck indefinitely since it exists to protect the integrity of your drive and repairs any issues as and when necessary, so it really needs to run periodically and it runs at startup because the filesystem must be unmounted for it to run the filesystem checks.  However you could set fsck to only run say every d/w/m period, say 3 months, 6 months, though I personally wouldn't like the idea that the integrity of my drive would only be checked every 6 months, I would recommend setting aside a period of planned downtime for your kiosk per week, per month or whatever suits you best and set the check to run at some specific date and time.

You can tune the filesystem checks to suit your needs using tune2fs, which allows you to adjust tunable filesystem parameters on ext2/ext3/ext4 filesystems:

$ tune2fs
tune2fs 1.44.1 (24-Mar-2018)
Usage: tune2fs
    [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]
    [-i interval[d|m|w]] [-j] [-J journal_options] [-l]
    [-m reserved_blocks_percent] [-o [^]mount_options[,...]]
    [-r reserved_blocks_count] [-u user] [-C mount_count]
    [-L volume_label] [-M last_mounted_dir]
    [-O [^]feature[,...]] [-Q quota_options]
    [-E extended-option[,...]] [-T last_check_time] [-U UUID]
    [-I new_inode_size] [-z undo_file] device

The specific tune2fs options that allow you may want to change are:

-c max-mount-counts - Adjust  the  number  of  mounts  after  which the filesystem will be checked by e2fsck(8).  If max-mount-counts is 0 or -1, the number of times the filesystem is mounted will be disregarded by e2fsck(8) and the kernel.
-i interval-between-checks[d|m|w] - Adjust the maximal time between two filesystem checks.

To first check what the current parameters of your fsck are you can run the following command:

$ sudo tune2fs -l /dev/sda2 | egrep -i 'mount count|check'

For example to modify the check-interval to only check after 100 mounts or a 3 month period:

$ tune2fs -c 100 -i 3m /dev/sda2

The issue with the blank screen after the splash, I am not sure what would be causing that.

This article may also be of some use to you:
https://wiki.archlinux.org/index.php/Silent_boot


I have a similar problem with my Lenovo, on both the wifi and the ethernet connection here is the result of the comment you've asked:

  *-network
       description: Ethernet interface
       product: Ethernet Connection I217-LM
       vendor: Intel Corporation
       physical id: 19
       bus info: pci@0000:00:19.0
       logical name: eth0
       version: 04
       serial: 04:da:d2:bf:2c:ac
       capacity: 1Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=2.3.2-k firmware=0.13-3 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:45 memory:b2a00000-b2a1ffff memory:b2a3f000-b2a3ffff ioport:5080(size=32)
  *-network
       description: Wireless interface
       product: Wireless 7260
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: wlan0
       version: 83
       serial: 5c:51:4f:9e:a1:c9
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=3.13.0-74-generic firmware=22.24.8.0 ip=192.168.1.12 latency=0 link=yes multicast=yes wireless=IEEE 802.11abgn
       resources: irq:47 memory:b2800000-b2801fff

I tried restarting the computer, stopping it, removing the battery then restarting it, I tried restarting the box as well.


Is there any way to block renaming of a Particular Folder by any user in Ubuntu?

You have to set the ownership and permissions of the parent directory (in particular the write flag) only to the user/group which shall be able to change it.

Renaming in the end means writing to the folder which contains the file/folder.

Step 1 - ownership

sudo chown <USERNAME>:<GROUPNAME> </path/to/parent_folder>

This makes the file or folder be owned by the user <USER> (for blocking all normal users from the change this could be e.g. root).
The :<GROUPNAME> is optional and sets the group to  for that file or folder.

If you don't need a special group I'ld recommend use the 's group.
If you want multible users to be able to change, add them all to a new usergroup and set the ownership e.g. to

sudo chown root:<GROUPNAME> </path/to/parent_folder>

To verify it is setup as it should run

ls -la </path/to/parent_folder>

This shows you the a list of contained files and the very first entry . the folder itself with information about ownership and permissions.

Output could look like

drwxrwxr-x   1 root root     0 Dec  4 16:59 .

Step 2 - permissions

followed by

sudo chmod u+w </path/to/parent_folder>
sudo chmod g+w </path/to/parent_folder>
sudo chmod o+w </path/to/parent_folder>

This makes

u+r the owner(user) is allowed to write
g+r the group is allowed to write (this is optional and in some cases not wanted -> than change it to g-r)
o-r other users are not allowed to write

In some cases you might also want the -R option for all commands to set the ownership and permissions recursively also on the content of a folder.

Note:
Anyway there is no way to prevent that root changes anything in your system. So other users could still change using sudo.


Is it possible to install ubuntu 13.04 from 3 GB flashdrive

If you are seeking to install from a Flash drive,  a 3 GB drive should suffice. If the flash drive is using a USB 3.0 port, that will be faster, but a USB 2.0 port should work fine as well (USB 1.1 is going to be very slow by comparison).

There is a very detailed, step-by-step guide on help.ubuntu.com that thoroughly discusses the entire process and should be sufficient to be able to allow you to install from a USB Flash drive from various operating systems and in different scenarios.

Do hope that is helpful as this is an easy process once you have the USB Flash drive setup.


Rotate External Display with NVIDIA drivers

Timo Aaltonen has fixed this issue on on 2017-06-26. Thank you.

https://i.stack.imgur.com/qNc19.png


It might be Ubuntu's keyboard layout switching, which defaults to using Super+Space or Shift+Super+Space (Super is usually the Windows key) to switch keyboard layouts.

Open the Text Entry system settings application and see if English is in the input sources list. If it is, you can either remove it by selecting it and clicking the — button at the bottom or you can change the input source switching keys on the right to something you're less likely to press.


First, you will need to install PEAR via apt-get to get the necessary package and distribution system that both PEAR and PECL use. From a shell prompt enter:

sudo apt-get install php-pear

You will be prompted to confirm the install. Just press “y” and enter. If all goes well you should see it download and install the php-pear package.

Now you will need to install the php5-dev package to get the necessary PHP5 source files to compile additional modules. Enter the following from a shell prompt:

sudo apt-get install php5-dev

If you do not install the php5-dev package and try to install a PECL extension using “pear install”, you will get the following error:

sh: phpize: not found
ERROR: `phpize’ failed

The PECL_HTTP extension requires an additional dependency package to be installed. You can probably skip this for other extensions:

sudo apt-get install libcurl3-openssl-dev

Now we are finally ready to actually install the extension. From a shell prompt enter following but substitute “pecl_http” with the PECL extension name you are installing:

sudo pecl install pecl_http

The installer may ask you about some specific options for the extension you are installing. You can probably just hit enter one or more times to accept all the defaults unless you want to set specific options for your implementation. If all goes well, the module should download, build, and install.

Once the install is complete, it will probably ask you to add a “extension=” line to your php.ini file. Open up the php.ini file in your favorite text editor and add the line under the section labeled “Dynamic Extensions”. On Ubuntu the php.ini file seems to be located in the /etc/php5/apache2 folder:

sudo nano /etc/php5/apache2/php.ini

In this example, the pecl_http extension install asked me to add “extension=http.so”.
Now that the php.ini file has been updated, Apache will need to be restarted so the new extension will be loaded:

sudo /etc/init.d/apache2 restart

source


Thinking of switching from Win10 to Ubuntu. Installing Ubuntu on NVME

My assumption is that it is straightforward to install Ubuntu on an NVME drive. True?

Yes

My assumption is that Ubuntu no longer has problems being installed on laptops with UEFI. This true?

Yes


Problem installing Dolphin-emu, Unmet dependencies

According to the install guide available online, the following should work:

sudo add-apt-repository ppa:dolphin-emu/ppa
sudo apt-get update
sudo apt-get install dolphin-emu-master

You could also try a sudo apt-get upgrade immediately after the update command (these two are usually good commands to try when apt is misbehaving/having trouble on ubuntu).

UPDATE: also according to the dolphin install guide, if running ubuntu 12.04 or 14.04, run these commands first:

sudo add-apt-repository ppa:dolphin-emu/gcc-for-dolphin
sudo apt-get update


How do I recover my access to google groups?

Clear your history and cache

https://support.mozilla.org/en-US/kb/how-clear-firefox-cache
https://support.mozilla.org/en-US/kb/delete-browsing-search-download-history-firefox

If that won't help, proceed to step 2.

What often help in terms of firefox issues is creating a new profile:

open terminal
type: firefox -p
create new profile and set it as default
start firefox
try to login via new profile

If you can't get firefox -p to work:

close Firefox
enter firefox -CreateProfile user in terminal, where "user" is name (don't use space in profile name) of your new profile, that step will create new profile, but will not launch the application
next I'm going to refer to my answer about manually modifying Firefox profile: Import Firefox bookmarks from windows 7 (unbootable) to ubuntu using ubuntu, but YOU WILL SKIP the step no. 4. And you will manually add line Default=1 to you new profile, as seen in my referred answer (as well as delete this line from your old profile).

Alternatively you can try to enter this to terminal: firefox -P "user", which will open firefox with your new profile, but those changes won't be permanent, so it's good just for testing purposes, to see, if you can regain your google access that way.


How to make nautilus forget SMB session passwords without logging out

The only workaround that I am aware of is to select the "Forget password immediately" option while logging into the server. It showld be a radio button right beneath the username/password fill form.

That way when you unmount the device, you will be able to login again as the same ot different user.


Not seeing windows 10 when i trying to dualboot Ubuntu 20.04

great question!
When installing Ubuntu (or it's derivatives) alongside Windows 10, as long as you don't change the existing EFI partition, or create a new one, (UEFI systems only), or destroy the Windows 10 boot loader/partition, you should be fine.
During install, Ubuntu looks for other supported operating systems, and their boot loaders. When Grub is installed during this process, it will automatically configure boot options for Ubuntu, and most (if not all) other operating systems, but will set Ubuntu as the default boot option.
All modern versions of Windows are considered supported, so with Windows 10, you should be perfectly fine.
I've installed Ubuntu, and Kubuntu alongside Windows 10 on MANY occasions in the last 3 years.
UEFI based BIOS also have the option of selecting which boot loader to run on startup. If you have this kind of system, you can always switch which boot loader runs by default (Windows, or Grub for Linux)
One thing to note is that Windows does not add Linux to it's list of operating systems to choose from on startup, so you will want to use Grub (Linux boot loader) if you want to be able to easily, and quickly switch your OS on boot.


Provided you use bash you can use Command Substitution:

mr config:set 'design/head/meta_version_tag' $(date +%s)

This will first run date +%s in a subshell and include the output as a string, see man bash under EXPANSION/Command Substitution:

  Bash performs the expansion by  executing  command  and  replacing
  the
         command  substitution with the standard output of the command, with any
         trailing newlines deleted.

There's no need to quote the command substitution (like you would normally do) in this case, as the output of date +%s doesn't have any whitespaces.


Which private keys are tested by ssh without configuration?

The ssh client will check all your keys until it finds one that matches.

This is how it works (this is very simplified, before this a quite complex dance has been made to encrypt all of this):

The server creates an auth token.
The token is encrypted using your public key on the server.
The server send the encrypted token to the client.
The client tries to decrypt the token, using all known private keys.
If it is successful it will send the decrypted token back to the server.
If the token matchs the server will let the client in.

What files are keys depends on the client.

For the Openssh client (Ubuntu default client), according to its man page, the files that are supposed to be private keys are ./sshid_rsa, .ssh/id_dsa, .ssh/id_ecdsa, plus those given after the -i flag (it supports multiple files) and those declared in the config file.

You can give it the -v option to make it print a line when it tries to use any file as a key. This is an example from a non-key login:

$ ssh -v www.hostremoved.com
OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
<...>
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/javier/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/javier/.ssh/id_dsa
debug1: Trying private key: /home/javier/.ssh/id_ecdsa
debug1: Next authentication method: password
<...>

As you can see, it prints all the keys it tries, it fails all. You can use this in your system to discover what files is ssh using in your own system.

Below you can see the output if some existing key is found and tried

debug1: Authentications that can continue: publickey,password
debug1: Offering RSA public key: user@xyz

user@xyz is the information appended to the public key.

If you're wondering how your ssh client finds your private keys, it's not magic. Under Gnome (xfce and KDE also) there is a special ssh-agent that automatically adds keys in .ssh directory that have a correspondending public key with the ending .pub.

If you not have such a comfortable ssh agent, you'll have to add your private keys with ssh-add key.


Where is network directory mounted (direct path)?

OK, found it. It's:

/run/user/1000/gvfs/sftp\:host\=192.168.1.1

Could someone still explain a little bit more why it is mounted there?


How to remove remaining files after removing an application

remove it with the purge option

sudo apt-get purge zekr

The difference is purge removes the configuration files, remove does not.

See : https://help.ubuntu.com/community/AptGet/Howto#Removal_commands


Accidentally deleted kde plasma .desktop file

Save to /usr/share/xsessions/plasma.desktop. Then sudo service lightdm restart. If you're not using lightdm sudo service sddm restart or logout/login or reboot.

[Desktop Entry]
Encoding=UTF-8
Type=XSession
Exec=/usr/bin/startkde
TryExec=/usr/bin/startkde
DesktopNames=KDE
Name=Plasma
Name[ar]=بلازما
Name[ast]=Plasma
Name[bs]=Plazma
Name[ca]=Plasma
Name[ca@valencia]=Plasma
Name[cs]=Plasma
Name[da]=Plasma
Name[de]=Plasma
Name[el]=Plasma
Name[en_GB]=Plasma
Name[es]=Plasma
Name[et]=Plasma
Name[fi]=Plasma
Name[fr]=Plasma
Name[gl]=Plasma
Name[hu]=Plasma
Name[id]=Plasma
Name[it]=Plasma
Name[ja]=プラズマ
Name[ko]=Plasma
Name[lt]=Plasma
Name[nb]=Plasma
Name[nds]=Plasma
Name[nl]=Plasma
Name[nn]=Plasma
Name[pl]=Plazma
Name[pt]=Plasma
Name[pt_BR]=Plasma
Name[ru]=Plasma
Name[sk]=Plasma
Name[sl]=Plasma
Name[sr]=Плазма
Name[sr@ijekavian]=Плазма
Name[sr@ijekavianlatin]=Plasma
Name[sr@latin]=Plasma
Name[sv]=Plasma
Name[tr]=Plazma
Name[uk]=Плазма
Name[x-test]=xxPlasmaxx
Name[zh_CN]=Plasma
Name[zh_TW]=Plasma
Comment=Plasma by KDE
Comment[ar]=بلازما كدي
Comment[bs]=Plazma od strane KDe
Comment[ca]=Plasma pel KDE
Comment[ca@valencia]=Plasma pel KDE
Comment[cs]=Plasma z KDE
Comment[da]=Plasma fra KDE
Comment[de]=Plasma von KDE
Comment[el]=Plasma από το KDE
Comment[en_GB]=Plasma by KDE
Comment[es]=Plasma, por KDE
Comment[et]=KDE Plasma
Comment[fi]=KDE:n Plasma
Comment[fr]=Plasma, par KDE
Comment[gl]=Plasma por KDE
Comment[hu]=Plasma a KDE-től
Comment[id]=Plasma oleh KDE
Comment[it]=Plasma di KDE
Comment[ja]=Plasma by KDE
Comment[ko]=KDE Plasma
Comment[lt]=Plasmą sukūrė KDE
Comment[nb]=Plasma av KDE
Comment[nds]=Plasma vun KDE
Comment[nl]=Plasma door KDE
Comment[nn]=Plasma frå KDE
Comment[pl]=Plazma dzięki KDE
Comment[pt]=Plasma do KDE
Comment[pt_BR]=Plasma do KDE
Comment[ru]=KDE Plasma
Comment[sk]=Plasma od KDE
Comment[sl]=KDE Plasma
Comment[sr]=Плазма од КДЕ‑а
Comment[sr@ijekavian]=Плазма од КДЕ‑а
Comment[sr@ijekavianlatin]=Plasma od KDE‑a
Comment[sr@latin]=Plasma od KDE‑a
Comment[sv]=Plasma av KDE
Comment[tr]=KDE Plazması
Comment[uk]=Плазма KDE
Comment[x-test]=xxPlasma by KDExx
Comment[zh_CN]=KDE 的 Plasma
Comment[zh_TW]=Plasma by KDE
X-KDE-PluginInfo-Version=5.5.5


Startup applications not starting on user login, KDE messed it up!

I had the same problem, I just removed all the startup applications and added them again being in gnome session. It worked for me.


How to uninstall GRUB bootloader without starting OS?

Make a live usb with ubuntu 17.10
and insert following commands to remove grub error

sudo apt-get install lilo
sudo lilo -M /dev/sda mbr

It always have worked for me


Each new kernel supports more new hardware. Compiz continues to grow. Support for new features like snap. They all consume more memory. You can look at some of the specifics by using the top command in the terminal and sort on the memory column for details.

You might also try enabling low graphics mode using Compiz Configuration Manager, like so...


Does dnscrypt-proxy's configuration replace /etc/hosts?

When making DNS queries, the order of lookup is determined via Name Service Switch configuration in /etc/nsswitch.conf. You can check yours via:

cat /etc/nsswitch.conf | grep -i hosts

As an example, it might output the following:

hosts: files dns

Here files refers to local hosts file (/etc/hosts) and dns refers to the server specified in /etc/resolv.conf. The lookup is processed in the order they are written, therefore /etc/hosts will be processed first in this case. If the domain name is not found in the file, then it will try the server in /etc/resolv.conf.

Coming back to your case, if your nsswitch.conf file has files value before dns, and a particular domain is listed both in /etc/hosts and blacklist entry in dnscrypt-proxy.toml, the one in /etc/hosts will precede. Also, if a correponding enty does not exists in /etc/hosts, but in dnscrypt-proxy blacklist, it will result in refused response. Quoting from dnscrypt-proxy GitHub wiki page:

  blacklists: names, or patterns that will cause a query to immediately receive a REFUSED response.

References:

https://linux.die.net/man/5/nsswitch.conf
https://nambirajeshblog.wordpress.com/2016/12/12/difference-between-etchosts-vs-etcresolv-conf-in-linux/
https://github.com/DNSCrypt/dnscrypt-proxy/wiki/Filters


Can't Sync iPod Touch (5th Generation) Ubuntu 14.04

Do you have iOS8.x? If so
libimobiledevice may not support iOS 8 yet. The only solution is to wait until that's updated.


Ubuntu 13.04 isn't an LTS version which means that it's only supported for a short period of time which was especially short for Ubuntu 13.04. The support ran out a long time ago as you can see in this graphic:

If you want to use a system that long, please use an LTS version like 14.04. You'll be provided with updates for 5 years and will be able to install new software from the repositories for at least that long.


How to set a new home directory at every login?

Why not using the building guest account as suggested by Byte Commander ?
You can have a full control of the process by modifying the needed files. There is a good overview at help.unbuntu.com .

So skeleton files go in /etc/guest-session/skel and custom commands go in /etc/guest-session/prefs.sh .


What does " Command "python setup.py egg_info" failed with error code 1 " mean?

The syntax error Missing parenthesis... clearly shows you have a python3 interpreter trying to execute python2 code.  I do not know where you read the installation instructions for 'BeautifulSoup' but according to the documentation, you have two different packages, one for python2 and the other one for python3.
They are installed respectively:

$ apt-get install python-bs4 (for Python 2)

$ apt-get install python3-bs4 (for Python 3)

It is also possible to use pip but the recommended package is beautifulsoup4.  As a footnote, they state 'The BeautifulSoup package is probably not what you want. That’s the previous major release'.


I'm having the same problem when running your code. It seems to be a performance issue. To fix it, addSystem.setProperty("sun.java2d.opengl", "true"); to the main method in Game.java like this,

 public static void main(String args[]) {
    System.setProperty("sun.java2d.opengl", "true");
    new Game();
 }

Hope this helps!


user name and host are around the wrong way

  vncviewer -via 192.168.x.x@administrator localhost:0

Try

vncviewer -via administrator@192.168.x.x localhost:0

Also make sure you have you installed openssh-server?

apt-get install openssh-server


Using iwatch

iwatch o_O is a realtime filesystem monitoring program using inotify
 and a working local mail service

For a better obscurity you should change the mail address and start the deamon as root, or something else … :)

sudo apt-get install iwatch

Create a configuration file with the name iwatch.xml

<?xml version="1.0" ?>
<!DOCTYPE config SYSTEM "/etc/iwatch/iwatch.dtd" >
<config>
        <guard email="username@localhost" name="iWatch"/>
        <watchlist>
                <title>a title</title>
                <contactpoint email="username@localhost" name="foo bar"/>
                <path type="recursive" events="default">/home/username</path>
        </watchlist>
</config>
Start the deamon

iwatch -d -f iwatch.xml -p ~/iwatch.pid

-d Execute the application as daemon. iWatch will run in foregroud without this option.

-f Specify alternative configuration file. Default is /etc/iwatch/iwatch.xml

-p Specify an alternate pid file. Default: /var/run/iwatch.pid
Check your local mails ;)

Some interesting events

-e event [,event[,..]]
   Specify a list of events you want to watch. Following are the possible events you
   can use:
access          : file was modified
modify          : file was modified
attrib          : file attributes changed
close_write     : file closed, after being opened in writeable mode
close_nowrite   : file closed, after being opened in read-only mode
close           : file closed, regardless of read/write mode
open            : file was opened
moved_from      : File was moved away from.
moved_to        : File was moved to.
move            : a file/dir within watched directory was moved
create          : a file was created within watched director
delete          : a file was deleted within watched directory
delete_self     : the watched file was deleted
unmount         : file system on which watched file exists was unmounted
q_overflow      : Event queued overflowed
ignored         : File was ignored
isdir           : event occurred against dir
oneshot         : only send event once
all_events      : All events
default         : close_write, create, delete, move, delete_self and move_self.

More information here


I solved this issue by reprogramming my bios. out of the motherboard.


Make Ubuntu only start if an USB flash drive is connected

I did a thorough Google search and can't find the solution that I had saw months back, I apologise, but I did find something similar that may or may not work. I admit, that I don't know too much about Grub or whether or not you can use this for your purposes, but it does seem likely to work.

This link takes you to a page that describes how to create a GRUB Rescue USB

It is basically designed just for a situation that your Grub breaks. However, if I am correct, if you somehow manage to delete the Ubuntu entry from your pre-existing grub after creating it (assuming you Dual-boot) then starting up your PC will not show Ubuntu, unless you plug in your new USB that will boot-up the Grub that displays your Ubuntu install.

I know that this is risky, so I would recommend you wait till someone clarifies whether my idea works or not. If no one replies, then go ahead and ask on an Ubuntu forum.

Good luck, and I hope I haven't inconvenienced you with this idea. I'm not too knowledgeable when it comes to Grub.


How to specify installation directory when installing packages

Ubuntu will automatically update programs installed from the Ubuntu repos to be compatible with the new version of Ubuntu.
Updating may remove some packages, but I believe they are obsolete dependencies only.
That's a bad idea, and I'd advise against that. Eliah Kagan has a great answer that says why, and it boils down to: everything has a place, the system looks for things in specific places because it's linux, moving things will confuse the hell out of it (and you!).

The common wisdom seems to be that spliting partitions reduces damage. Your OS and your /home directory are kept separate so you can

reinstall over the system partition while keeping your data,
backup your data partition easily, or
move your data partition easily.


Why doesn't Transmission respect my 1 KB/sec upload limit?

The upload speed limit of Transmission limits the data itself, not the BitTorrent protocol data. It will have a steady consumption above the limit, the amount of consumption relates to the number of torrents, peers, DHT being on and other.
The only way to limit it altogether is to limit with outer resources, like creating a slowed down bridge connection or connecting through proxy on localhost.


How do I set a Smoothing to grayscale in fonts.conf?

none represents grayscale (no colors are used for subpixel rendering).


Upgrade Ubuntu within Docker from 14.04 to 16.04 using do-release-upgrade

For the record - it is not Docker best practice to update your image from within the image, it is suggested that you work from a Dockerfile which you will use to spin up a new image from updated sources which you will make live when it passes your tests, and then decommission the old image. Ultimately you would want to have production images that can not be updated from within the image. Docker is however very flexible and you can use it as you like.

While the above may seem ridiculously overdone, there is a reason behind it: A primary purpose of Docker is however to force your team to document repeatable instructions for creation of an image, and forcing them to do things from a Dockerfile ensures that you are never held hostage by the knowledge of the developer that set it up - and that you are using stable, more reputable sources.


Xscreensaver daemon is not running on display ":0.0"

Don't have  Xubuntu, but I installed Lubuntu last week.which is based on Ubuntu and had this same exact issue that was driving me nuts. I tried all the commands possible and yet nothing happened until I myself fixed it.

I started tinkering with the screensaver itself. So, I finally clicked the screensaver button/app, and when the screensaver box with animations came up, I clicked on file option, then from the drop down menu clicked kill daemon. Then I went to the core applications in my LX Configuration & where it says screensaver - the text field next to it was empty - I typed in xscreensaver and finally it got fixed.

Hopefully, this might help somehow.


Software Updater gives "Failed to download repository information - Public key is not available" Ubuntu 17.10

I edited  /etc/apt/sources.list

Then added # in front of the second to last line in sources.list

deb http://archive.canonical.com/ precise partner

Now I can fetch updates.


From 4.4 on, ubuntu kernels will not load unsigned kernel modules if secure boot is turned on.


make[1]: *** /lib/modules/4.14.0-041400-generic/build: No such file or
  directory.  Stop

The missing 'build' directory often suggests that the linux headers package required to compile modules is not installed. Check:

sudo dpkg -s linux-headers-4.14.0-041400-generic

If you find, as we suspect, that the package is not installed, please download and install it. I assume you obtained the 4.14.0-041400-generic kernel image here: http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.14/

Please select the .deb file appropriate to your architecture, either 32- or 64-bit, install it and try the rtl8822be compilation again.


When multiple boot, should you use have FAT32 EFI drive for each OS?

windows require an exFAT and installs from NFTS, Ubuntu is ext4 3 2 and exFAT and install from FAT64 or FAT32, and Manjaro is ext4 3 2 and exFAT and install from FAT 32 but this should not be a problem but if you are having trouble with choosing the OS from boot that is a different question.
EDIT: if you are having trouble with loading the other OSes then get ubuntu on USB live boot it and run in a command line (don't click the link)
sudo apt install software-properties-common;
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe";
sudo add-apt-repository -y ppa:yannubuntu/boot-repair;
sudo apt-get update;
sudo apt-get install -y boot-repair && boot-repair
this will install boot-repair then find it in applications and run recommended repair.


I'd probably look at pre-built versions of the Kernel before jumping into compiling your own. The Mainline Kernel PPA should be your first port of call. Pick a version, install the package and reboot. If it works: awesome. If everything explodes, just select an older version from Grub and remove the package once you're booted up.

If you do want to follow the dark path of compiling your own kernel, I've written a few answers over the years that might help point you in the right direction.

Building own kernel on ubuntu
Error when I try to compile the kernel 2.6.37
Correct way to apply patches to your kernel?
2.6.37 (or 2.6.36) Ubuntu Kernel in Maverick. Is this possible and where can I get it?

They're old posts but everything in them should still apply today.


How to create a dedicated user for running a service?

The way I settled upon was to create the dedicated user with password, but always manage the service as root, which does not require a password for su. To make this secure, I have created a group karaf-admins and added the following entry to sudoers:

%${KARAF_ADMINS} ALL=NOPASSWD: /etc/init.d/karaf-service

This allows members of that group to run commands like sudo /etc/init.d/karaf-service start as root without entering a password. The karaf-service-script itself will then switch to the dedicated user I have setup. As long as users in karaf-admins are not allowed to edit the service-script or the symlink (which they shouldn't be), this is perfectly safe.


Clicking twice on a launcher icon: why different behaviours?

I'm not sure there's an answer to this question. It's an ongoing process to find the best behavior, and you'll find a couple of long discussions about it on the Ayatana mailing list. The way it is in 11.04 is just the way it is, and it definitely has its flaws.


How do I hibernate with s2disk from the menu?

In /etc/pm/config.d/00_sleep-module, set the option to use uswsusp:

SLEEP_MODULE="uswsusp"


is it required to buy a wi fi router to access http://192.168.1.1?

Note : This is a general answer to give you the basic idea behind the stuffs as your question does not seem properly directed (IMHO).

If you are on the network 192.168.1.0/24 then you can access any service on any computer within your subnet provided you have sufficient privilege to do so or not blocked by any firewall.

Typically 192.168.1.1 would be the gateway address of the 192.168.1.0/24 subnet as it is the first usable IP of the subnet. Now you are sending a request using http protocol to that IP address by doing http://192.168.1.1, if that host is not listening for any http connection then you will simply not get the required service. This is true if 192.168.1.1 is running Ubuntu or a wireless router or anything else you can imagine.

So to answer your question you need a service that is listening on port 80 (http) on 192.168.1.1 to access http://192.168.1.1 .


Reinstalled samba, now nautulus doesn't have network share context menu item

You may need to install
nautilus-share
package.

Install it using

sudo apt-get install nautilus-share.


Installing juju gui on juju1.25.5 (ERROR cannot load cookies)

The bug was confirmed and reopened.

[Bug 1534643] Re: cookies file locked for too long


The LXD snap package checks whether you have set the EDITOR environment variable. If you have set it, it will use that text-mode text editor, otherwise it will select a default for you.

Therefore, set the variable EDITOR to nano as follows. Then, in the example (profile edit) it will open it up with nano.

$ export EDITOR=nano
$ lxc profile edit default

To make the change permanent, run the following once:

echo 'export EDITOR=nano' >> ~/.profile
source ~/.profile


Nautilus window background goes black when using custom themes

fortunately, I have found this temporary workaround to solve the problem:

https://github.com/shimmerproject/Numix/issues/121

the workaround is to disable the overly scrollbars when using custom themes, this can be done with the following command:

gsettings set com.canonical.desktop.interface scrollbar-mode normal


Couldn't get UEFI db list error on system boot

I was able to format my windows 10 laptop to ubuntu 18.04.3 using the following steps below:

Access grub settings before installation start
Add "nomodeset" parameter at the end of "linux" config (*)
Save grub setting by pressing "F10" then continue with the installation
After restarting, access grub settings to add again the "nodemodeset" (*)
Follow these steps for AMD installation
Follow these steps for Hybrid GPU
Follow these steps for disabling wayland
Reboot!

(*) - Temporarily add GRUB settings


If you suspend using sudo pm-suspend it will NOT block your session while you're using GUI, which is insecure. so you'll need to do it from panel or you can do it using

sudo pmi action suspend

For that you nee to install powermanagement-interface

sudo apt-get install powermanagement-interface

and suspend using

sudo pmi action suspend


How do I disable Dock and Panel transparency?

To force Ubuntu Dock to assume a fixed opacity, open Terminal and run

gsettings set org.gnome.shell.extensions.dash-to-dock transparency-mode 'FIXED'

Also you can change max-alpha and min-alpha (0 is completely transparent, 1 is completely opaque) of Ubuntu Dock following this:
How to make Ubuntu Dock fully opaque (black, like the top bar) when apps are touching it/fullscreen?

Getting rid of top-bar transparency is a bit tricky. You may use "Dynamic Panel Transparency" extension from here.

Once installed reload the page, a settings icon should appear. Click on it, a dialogue should pop up. Go to Background tab, toggle on "Enable custom opacity" and set "Unmaximized opacity" to a very high value, say 100%.

Then log out and log in again.

Alternatively you may try a different shell theme without a transparent top bar.


Resize efi partition on Ubuntu / Mac system on Mac Air

Macs normally come with EFI System Partitions (ESPs) of about 100 MiB, which is plenty big enough for most purposes. (I recommend making them bigger for reasons related to EFI driver bugs, but that's not an issue here.) If you're seeing just ~6 MiB of free space on your ESP (with a mount point of /boot/efi), then something is wrong. I recommend you discover what's consuming your disk space and delete or move anything that should not be there. Normally, you'll have an EFI/ubuntu partition with GRUB and/or an EFI/refind partition with rEFInd, neither of which should consume more than a few megs of space. There's also likely to be an empty EFI/APPLE directory and possibly an EFI/tools directory with two or three .efi binaries.

That said, I can't help but wonder if you might have mis-reported the problem. If you have a separate /boot partition, it often fills up with kernel updates; see these bug reports:

https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1357093
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1465050

The Linux /boot partition is not the same as the ESP. If this is the problem, then doing a sudo apt-get autoremove should clear it, provided there isn't an issue with the package system that prevents removal of the old packages.


Ubuntu-SDK Plugin Loader Errors: Could not resolve dependency 'Core(2.7.1)' Could not resolve dependency 'ProjectExplorer(2.7.1)'

I had had the same problem, but I solved it removing all the extras repositories that I had added to install ubuntu-sdk and removing my previus version of qt-creator and all the others stuff that I had installed trying to solve this problem.

After get the results of the commands:

apt-cache search ubuntu-sdk

and

dpkg -l | grep ubuntu-sdk

equals to zero.

I added the ppa repository and install the ubuntu SDK again:

sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
sudo apt-get update && sudo apt-get install ubuntu-sdk

After that the ubuntu SDK started to work ok for me.


How to configure ip static in Ubuntu Server 16.04 running in Hyper-V

Solution

Restarting all server.
Clean and writing the eth0 static configuration.
Executing the command /etc/init.d/networking restart.


Motherboard cannot see Raid Array 3ware 9650SE

Update: not sure how this was fixed, or if it had to do with the fact that I gave up on RAID 5 and ended up putting 2 drives into a RAID 1 array - but it started to work.


giving a short name for frequently opened directory via terminal

So far two great have been given in other answers, I have one more possibility:

ln -s /media/prasanth/01D0F888E7BC91801/github/projects ~/mygitfiles

Will create a symlink to the long path in your home.

Symlinks are like shortcuts that point to another file or directory, and most programs will treat them as normal.  you can safely rm the symlink without effecting the path it points to. you can observe where the symlink points to with ls -l.

You can use the symlink as if it was a real directory and do cd ~/mygitfiles.

Note that ~ is simply an alias for your home directory, which might be a sensible place for such a symlink.

Be aware that using this symlink ultimately effects your current working directory.

In the general case I would suggest Nicolas Delvaux, or Eduardo Cola's answer, but using a symlink might be just as - or possibly more useful.


LibreOffice stopped working Ubuntu 16.04 LTS

Tried installing from Ubuntu software and apt-get install but broken.

Remove LibreOffice completely.

sudo apt-get remove --purge libreoffice*

Remove the configuration files from:

~/.config/libreoffice

Download Fresh package

https://www.libreoffice.org/download/download/

extract and install using

sudo dpkg -i *.deb


Editing pommed.conf doesn't seem to have an effect

Do you have a config file set somewhere to make pommed start on startup as root?
And it does need root priviledges, according to my experience, or else it does nothing.

Also, to get the eject button to work, I made a keybinding to have the pressing of the eject button (XF86Eject on my Macbook 7,1 (white plastic, rounded edges)) execute the command "eject". Wasn't working via pommed.


I can't bind the ` (tilde) key as hotkey for DoTA 2 scoreboard?

With the US international keyboard after your having typed the ` key the keyboard waits for the next character to decide whether you want to type an è, à or another letter with an accent grave. If you want to type a single ` you have to add a space.

Therefore this key is not suited as a hotkey with this keyboard.

You have the same problem with ~, as there are letters like ñ that can be typed with the US international keyboard.


What's the difference between set, export and env and when should I use each?

Let us consider a specific example. The grep command uses an environment variable called GREP_OPTIONS to set default options.
Now. Given that the file test.txt contains the following lines:
line one
line two

running the command grep one test.txt will return
line one

If you run grep with the -v option, it will return the non-matching lines, so the output will be
line two

We will now try to set the option with an environmental variable.

Environment variables set without export will not be inherited in the environment of the commands you are calling.
GREP_OPTIONS='-v'
grep one test.txt

The result:
line one

Obviously, the option -v did not get passed to grep.
You want to use this form when you are setting a variable only for the shell to use, for example in for i in * ; do you do not want to export $i.

However, the variable is passed on to the environment of that particular command line, so you can do
GREP_OPTIONS='-v' grep one test.txt

which will return the expected
line two

You use this form to temporarily change the environment of this particular instance of the program launched.

Exporting a variable causes the variable to be inherited:
export GREP_OPTIONS='-v'
grep one test.txt

returns now
line two

This is the most common way of setting variables for use of subsequently started processes in a shell

This was all done in bash. export is a bash builtin; VAR=whatever is bash syntax. env, on another hand, is a program in itself. When env is called, following things happen:

The command env gets executed as a new process
env modifies the environment, and
calls the command that was provided as an argument. The env process is replaced by the command process.

Example:
env GREP_OPTIONS='-v' grep one test.txt

This command will launch two new processes: (i) env and (ii) grep (actually, the second process will replace the first one). From the point of view of the grep process, the result is exactly the same as running
GREP_OPTIONS='-v' grep one test.txt

However, you can use this idiom if you are outside of bash or don't want to launch another shell (for example, when you are using the exec() family of functions rather than the system() call).

Additional note on #!/usr/bin/env
This is also why the idiom #!/usr/bin/env interpreter is used rather than #!/usr/bin/interpreter. env does not require a full path to a program, because it uses the execvp() function which searches through the PATH variable just like a shell does, and then replaces  itself by the command run. Thus, it can be used to find out where an interpreter (like perl or python) "sits" on the path.
It also means that by modifying the current path you can influence which python variant will be called. This makes the following possible:
echo -e '#!/usr/bin/bash\n\necho I am an evil interpreter!' > python
chmod a+x ./python
export PATH=.
python

instead of running Python, will result in
I am an evil interpreter!


I think your sound profile got changed somehow. Execute pavucontrol in a terminal. Then change the profile by going to the configuration tab. Also check the volumes and muteness. If it is not installed already, install it with sudo apt-get install pavucontrol command.


Wine Libasound2 File Conflict in 12.04 Wine 1.5/1.4 64bit

I had the same problem, I solved it by installing the following package.

https://launchpad.net/ubuntu/precise/amd64/libasound2/1.0.25-1ubuntu10

regards


Ubuntu GNOME 14.04.1 LTS Minimum Requirements

According to the Ubuntu GNOME Wiki, the minimum requirements are:

  1 GHz processor (for example Intel Celeron or better)
  1.5 GB RAM (system memory)
  7 GB of free hard drive space for installation

So, it doesn't sound like your computer will have enough RAM to run Ubuntu GNOME.  The processor and hard-drive space seem to be sufficient, so I suppose you could just get more RAM and see if it works, but you may have better luck anyways running Xubuntu or Lubuntu.


zenity file-selection how to get list items as you choose

The "ugly" solution that I have adopted is:

select file with zenity --file-selection with multiple selection enabled;
show the file selected an its order in zenity --list with multiple selection disabled

Every SINGLE file selected in list is loaded clicking "OK" (renamed "Select") and is put into a new variable that is display with zenity --notification.
When all is done, you clik cancel (renamed "DONE")
Not elegant, but  functionality.
I have not found other solution with zenity.
Maybe using yad ... but I have not installed end cannot install it ...
Emilio


OpenVPN does not connect via network manager plugin

I know this post is old, but I'm leaving this in case anyone's having same issue with me.

I was having same issue with the OP (can connect via command line but cant connect using network manager), and I noticed that the config was not loading TLS key correctly. I fixed this issue by storing the TLS-Crypt static key separately.

Create a file with static key. The key is in .ovpn file and it starts with < tls-crypt > and ends with < /tls-crypt >.
Tell network manager where to find the key by setting in VPN(openvpn) - Advanced - TLS Settings - Mode to TLC-Crypt.
Set Key file to the file you just created.

I havent tested it myself, but you can probably do the same with TLS-Auth.


If you are knowledgeable with any scripting that can do DBus, you can do the following:

At the session bus, invoke CreateIndexer on interface org.bansheeproject.CollectionIndexer, invoke Index on the returned object path and await the IndexingComplete signal, then exit the wait and issue ShutDown. If you keep the mpris2 plugin active, you then can shutdown banshee gracefully by issuing Quit on the org.mpris.MediaPlayer2 interface.

As a side note, your cloud backup solution may also be eligible for DBus remote control so you can await its completion somehow and send the computer into sleep after the fact via the Suspend invocation on org.freedesktop.UPower at the system bus.


You can use this addon, that packs the Firefox default/classic theme included in Windows builds.

To get it to work, with Firefox 5, you'll need to change the Max Version:

Download the xpi (use download as or wget)
Open it with the archive manager and change the Max Version in install.rdf

Later, you can open the xpi and thweak to your liking, for example,if you want to tweak the tab colors they're in /browser/skin/browser/tabview/tabview.css


I found this https://www.percona.com/blog/2016/03/16/change-user-password-in-mysql-5-7-with-plugin-auth_socket/ article which put light on the question.

Just to recap, after the installation do:

mysql -u root -p
UPDATE mysql.user SET authentication_string = PASSWORD('s0mePassword'), plugin = 'mysql_native_password' WHERE User = 'root' AND Host = 'localhost';
FLUSH PRIVILEGES;

And now I can login the way I am used to.

I still don't understand why this changed in a way that mysql_secure_installation can't handle but anyway, this is how it goes now.


Can't install 12.04 server under Intel Pentium M

Ubuntu 12.04 32bit ships with the PAE kernel by default, both the desktop and server editions, apparently. The generic 32bit kernel is still in the repositories, but if the CPU doesn't have PAE support, you can't use the regular installation image. That said, the Minimal ISO should work.


Internet wifi works, but don'know the name of the device

You can't use iwlist scan command as you expected on your Ubuntu VM (i.e Virtual Machine) because there isn't any wireless interface. Ubuntu VM is connected to internet through a virtual ethernet adapter created by Virtual Box.

In default configuration, VirtualBox put your VM in a different network and apply NAT (Network Address Translation) between VM and your host operative system.

So, even if your computer is connected via wireless to your router, from the point of view of Ubuntu VM it seems that it is connected to a router (in this case simulated by VirtualBox networking engine) through cable.

More information on https://www.virtualbox.org/manual/ch06.html.


Is running packages from Ubuntu universe more risky than running the same packages on Debian?

Even in Debian, there are many many packages that don't get regular security updates.  From the Debian security channel on OFTC IRC:

  The security team provides support for all packages, with the help of the package maintainers (and upstream developers).

From the general discussion, we can assume that major security breakages get their attention, but there is obviously a threshold for severity.

From the Debian Security FAQ for the question "How is security handled in Debian?":

  Once the security team receives a notification of an incident, one or more members review it and consider its impact on the stable release of Debian (i.e. if it's vulnerable or not). If our system is vulnerable, we work on a fix for the problem. The package maintainer is contacted as well, if they didn't contact the security team already. Finally, the fix is tested and new packages are prepared, which are then compiled on all stable architectures and uploaded afterwards. After all of that is done, an advisory is published.

However, the consideration point is that the security team isn't going to be fluent in all packages, and will rely on the support from package maintainers and upstream devs as well to 'fix' problems.

Upon further discussion in the Debian Security IRC channel, it was said that my analysis here sums up the situation nicely:

  The Debian security team provides support for all with the help of package maintainers and upstream, but they don't personally patch everything.
   -- teward

Ubuntu is no different, except that the community supports 'universe'.  The Universe packages are not actively maintained by the Ubuntu Security Team, and security fixes for those packages are community provided (with some exceptions, such as the nginx package which almost exclusively I provide patches for to the Ubuntu Security Team).  While you are not guaranteed any updates for these packages, a lot of the popular ones will have enough attention to usually have someone working to try and patch security issues.

To specifically answer, though, you'd need to provide the package list(s) you're curious about, but not on this site as that becomes an open ended unending set of questions and answers.

To truly answer the question of 'vulnerable system' is impossible within the scope of this site though, because while there are 'safeguards' you can take to mitigate some of the nonpatched software due to the nature of those packages, analyzing your use cases and determining mitigation for each thing also goes outside the scope of this site and the ability to answer within the restrictions set forth here.


How to recover .ecryptfs directory , and other contents of home directory

Sorry to hear about this.

All of your encrypted data was securely stored under the /home/.ecryptfs/ directory structure.  You would have had a /home/.ecryptfs/$USER/ directory for each of your users, under which there would be two more directories -- a .ecryptfs/ directory with configuration data about your encrypted mountpoint, and a .Private/ directory with your encrypted files.

If you recorded your randomly generated "mount" passphrase just after installation, you could easily rebuild your configuration data.  But your .Private data is gone, unless you have backups.


The installation Procedure for Google Chrome Browser 64-bit version 73.0.3683.86.

Step-1: First, add (if not added already) the Google Chrome repository on your system using the following command. While using PPA to our system we also receive the latest updates whenever you check for system updates.

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

Now add the PPA url to the /etc/apt/sources.list.d/google.list file as per Ubuntu system architecture.

$ sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'

Step-2: Install or Upgrade Google Chrome

After adding Google Chrome repository in our system use following commands to install the latest Google Chrome stable release. If you already have installed an older version, It will upgrade currently installed version with recent stable version.

$ sudo apt-get update
$ sudo apt-get install google-chrome-stable

Step-3: Verify version

$ google-chrome --version

Figure-1: Google Chrome latest version 73.0.3683.86

you will see the output will be Google Chrome 73.0.3683.86.

Step-4: Launch Google Chrome

After completing step-3 the Google Chrome has been installed successfully on your system. Finally issue command to see Chrome browser:

$ google-chrome-stable &

Note: You can also access Chrome browser through Gnome dash and double-click chrome browser shortcut.


What file or folder contains the contents for the Dash?

Application launchers - or rather their respective .desktop files - are stored under these directories:

/usr/share/applications - all users
$HOME/.local/share/applications - your user

If you look through these you should be able to find the culprit.

Another option are GUI menu editors. Out of the ones available I prefer MenuLibre, a pretty new project originally coded for the Ubuntu App Showdown. You can install the latest release from the developer's PPA by typing:

sudo add-apt-repository ppa:menulibre-dev/devel && apt-get update
sudo apt-get install menulibre

MenuLibre allows you to easily browse through your menu entries, identify duplicates and easily delete them:


Sound output selection in Dell XPS 15 L502X

I think there is already a bug report for that in Launchpad and you can mark it as affecting you and add some useful infos to that; there are also some workarounds you could try to solve your problem.


Changing second column in csv conditionally

bash solution:

readarray -t filename < <(cut -d ',' -f1 train.csv)
readarray -t class < <(cut -d ',' -f2 train.csv)

for (( i=0; i<${#filename[@]}; i++ )); do
    printf '%s,%s\n' "${filename[$i]}" "${class[$((i-1))]}";
done > new_file.csv

Equivalent awk solution:

awk -F, '
    {
        filename[NR]=$1
        class[NR]=$2
    }
    END {
        OFS=","
        print filename[1],class[NR]
        for (i=2;i<=NR;i++) {
            print filename[i],class[i-1]
        }
    }
' train.csv > new_file.csv

Both solutions first read the lines into arrays filename and  class. Only difference is that the bash array starts with 0, the awk array with 1.

Then, we loop over the arrays and print the desired output. In the awk solution, we need to treat the first line separately as, unlike in bash, array[-1] does not return the last element.

The awk solution is a bit faster.


aptitude - Package removal on jdk installation

Aptitude is very broken on 64-bit Ubuntu at the moment. This is due to the fact that it doesn't handle Multiarch. If this is your case, i.e. if you are running 64-bit, please just use apt-get instead for a while.


This probably indicates that you have installed g++ and then at some point manually removed the actual g++ binary or its symbolic link.

You can force re-install (including re-creating symlinks) by running apt-get install with the --reinstall option:

sudo apt-get install --reinstall g++


Deja dup: Permission denied when trying to read manifest on davfs

After debugging was turned on using DEJA_DUP_DEBUG=1 deja-dup --backup > dejadup.log 2>&1, your dejadup.log file contains:

DUPLICITY: ERROR 30 EOFError
DUPLICITY: . Traceback (most recent call last):
DUPLICITY: .   File "/usr/bin/duplicity", line 1532, in <module>
DUPLICITY: .     with_tempdir(main)
DUPLICITY: .   File "/usr/bin/duplicity", line 1526, in with_tempdir
DUPLICITY: .     fn()
DUPLICITY: .   File "/usr/bin/duplicity", line 1380, in main
DUPLICITY: .     do_backup(action)
DUPLICITY: .   File "/usr/bin/duplicity", line 1454, in do_backup
DUPLICITY: .     globals.gpg_profile.passphrase = get_passphrase(1, action)
DUPLICITY: .   File "/usr/bin/duplicity", line 198, in get_passphrase
DUPLICITY: .     pass1 = getpass_safe(_("GnuPG passphrase for decryption:") + " ")
DUPLICITY: .   File "/usr/bin/duplicity", line 93, in getpass_safe
DUPLICITY: .     return getpass.getpass(message)
DUPLICITY: .   File "/usr/lib/python2.7/getpass.py", line 83, in unix_getpass
DUPLICITY: .     passwd = fallback_getpass(prompt, stream)
DUPLICITY: .   File "/usr/lib/python2.7/getpass.py", line 118, in fallback_getpass
DUPLICITY: .     return _raw_input(prompt, stream)
DUPLICITY: .   File "/usr/lib/python2.7/getpass.py", line 135, in _raw_input
DUPLICITY: .     raise EOFError
DUPLICITY: . EOFError
DUPLICITY: .

and a bit further:

DUPLICITY: DEBUG 1
DUPLICITY: . Backtrace of previous error: Traceback (innermost last):
DUPLICITY: .   File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 365, in inner_retry
DUPLICITY: .     return fn(self, *args)
DUPLICITY: .   File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 563, in get
DUPLICITY: .     self.backend._get(remote_filename, local_path)
DUPLICITY: .   File "/usr/lib/python2.7/dist-packages/duplicity/backends/giobackend.py", line 146, in _get
DUPLICITY: .     self.__copy_file(source_file, target_file)
DUPLICITY: .   File "/usr/lib/python2.7/dist-packages/duplicity/backends/giobackend.py", line 119, in __copy_file
DUPLICITY: .     None, self.__copy_progress, None)
DUPLICITY: .  Error: g-io-error-quark: Error opening file: Operation not permitted (14)
DUPLICITY: .

DUPLICITY: WARNING 1
DUPLICITY: . Attempt 1 failed. Error: g-io-error-quark: Error opening file: Operation not permitted (14)

So the error must be on the davfs side and you should investigate the server as locally there is nothing wrong at all.


Why Ubuntu doesn't turn on TRIM for SSD by default

Ubuntu always goes for stable before cutting edge and TRIM is not perfect yet.

A couple of quotes:

The reason Ubuntu doesn’t TRIM SSDs by default is because the Linux kernel’s implementation of TRIM is slow and results in poor performance in normal use. Source

From OpenSuse:

  The kernel implementation of realtime trim in 11.2, 11.3, and 11.4 is not optimized. The spec. calls for trim supporting a vectorized list of trim ranges, but as of kernel 3.0 trim is only invoked by the kernel with a single discard / trim range and with current mid 2011 SSDs this has proven to cause a performance degradation instead of a performance increase. There are few reasons to use the kernels realtime discard support with pre-3.1 kernels. It is not known when the kernels discard functionality will be optimized to work beneficially with current generation SSDs.

Ubuntu is also looking at enabling TRIM automatically by having the system regularly run fstrim. This will hopefully be part of Ubuntu 14.04 so Ubuntu users won’t be forced to deal with SSD performance degradation or run fstrim on their own. Source

Update: fstrim (fstrim-all) was added to 14.04 in the new util-linux package (2.20.1-5.1ubuntu11)


According to the Nvidia web site, there are no Linux drivers for this card.

Assuming that the PCI card is properly installed (it's always a good idea to remove and reinstall any hardware that is not recognized), type:

lspci | grep Graphics

The 700M family of graphics cards has been around for a while and should be supported by Ubuntu by now.  If you have your monitor plugged in to the PCI graphics card connector, the card is obviously working.  You may have to suffer with a reduced Nvidia feature set though.


cp: cannot stat './1_true/*': No such file or directory, when find directories and copy files

You can simplify it quite a bit

cp ?_true/* ../out_true/

will work as well.

This will, however, not work when you have a very large number of files.