VirtualBox: same virtual machine in a shared folder result in file not accesible every time an user saves the state of the machine

I finally have copied one different VirtualBox VMs folder to each user folder. Then I have executed the command sudo chmod -R 777 MyVirtualBoxFolder within each user's account to correct the permissions. Finally changing the preferences as it is described here: https://superuser.com/a/400389/218025

However if you want to have one virtual hard disk shared between all users (because your hard disk is not very big, for example), my next approach was going to be to create the following script:

if [ stat -c %U MyVirtualBoxFolder ]
then
    echo "You are the owner"
else
    echo “Changing permissions of /Users/shared_folder/.VirtualBox VMs/“
    sudo chmod -R 777 MyVirtualBoxFolder
fi

echo "Opening VirtualBox…”
virtualbox

Notice I have not tested the command stat -c %U MyVirtualBoxFolder. I have just copied it from here: https://unix.stackexchange.com/a/19003/91196

The idea is simple, before opening VirtualBox, check if the permissions are correct. If not, correct them before launching VirtualBox.

UPDATE:

Maybe it is better to create a script that just change the permissions always before opening VirtualBox:

sudo chmod -R 777 MyVirtualBoxFolder
virtualbox

The only issue to reach perfection is that the user must type its password always to open VirtualBox (and must be admin by the way!)


How can I determine the size of an image from the command line?

Use the command identify, which is part of ImageMagick.

Examples:

$ identify ZEAKR.jpg
ZEAKR.jpg JPEG 400x600 400x600+0+0 8-bit DirectClass 49.9KB 0.000u 0:00.000

or

$ identify -verbose ZEAKR.jpg
Image: ZEAKR.jpg
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Class: DirectClass
  Geometry: 400x600+0+0
  Resolution: 72x72
  Print size: 5.55556x8.33333
  Units: Undefined
  Type: TrueColor
  Endianess: Undefined
  Colorspace: RGB
  Depth: 8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
  Channel statistics:
    Red:
      min: 0 (0)
      max: 255 (1)
      mean: 37.8679 (0.148501)
      standard deviation: 83.5317 (0.327575)
      kurtosis: 1.46576
      skewness: 1.83875
    Green:
      min: 0 (0)
      max: 255 (1)
      mean: 60.6554 (0.237864)
      standard deviation: 54.9167 (0.21536)
      kurtosis: 1.74308
      skewness: 1.84745
    Blue:
      min: 0 (0)
      max: 255 (1)
      mean: 67.6817 (0.265418)
      standard deviation: 28.1072 (0.110224)
      kurtosis: 0.599932
      skewness: -0.97633
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 55.4017 (0.217261)
      standard deviation: 59.9539 (0.235113)
      kurtosis: 2.34592
      skewness: 1.64301
  Rendering intent: Undefined
  Interlace: None
  Background color: white
  Border color: rgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Compose: Over
  Page geometry: 400x600+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: JPEG
  Quality: 96
  Orientation: Undefined
  Properties:
    date:create: 2012-06-23T11:22:15-05:00
    date:modify: 2012-06-23T11:22:15-05:00
    jpeg:colorspace: 2
    jpeg:sampling-factor: 1x1,1x1,1x1
    signature: 2beab0779fc657fb62e8609b600d90d1e502f614794e497299ffaa28d145408e
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 49.9KBB
  Number pixels: 240KB
  Pixels per second: 24MB
  User time: 0.000u
  Elapsed time: 0:01.009
  Version: ImageMagick 6.6.9-7 2012-04-30 Q16 http://www.imagemagick.org


Ubuntu 17.04 HDMI loses connection after login

I was experiencing a similar issue on 17.04 with an external LG monitor. As soon as I logged in, my LG monitor would display "No Signal" and enter a power-save mode.

What I found was that the monitor identifier had changed within the Displays setting. Unsure as to why, but the monitor, which used to display a detailed identifier (something along the lines of "LG ... 34""), had reverted to using a generic identifier ("GSM 34"") and was set to "OFF".  I fixed the issue by enabling that external display within the display settings menu.


4.4.0-143-generic upgrade 16.04 VMware no longer working

Here I found better way how to "update" vmware to work with my linux.
It seems that one parameter was removed from get_user_pages, so just remove 0 from parameters and everything will be ok.

Do following under root user:

# cd /usr/lib/vmware/modules/source
# cp vmnet.tar vmnet.tar.bak
# cp vmmon.tar vmmon.tar.bak
# tar xf vmnet.tar
# tar xf vmmon.tar
# vi vmnet-only/userif.c

find:
   retval = get_user_pages(current, current->mm, addr,
                           1, 1, 0, &page, NULL);

change to:
   retval = get_user_pages(current, current->mm, addr,
                           1, 1, &page, NULL);

# vi vmmon-only/linux/hostif.c

find:
   retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,
                           numPages, 0, 0, ppages, NULL);

change to:
   retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,
                           numPages, 0, ppages, NULL);

# rm vmnet.tar ; tar cf vmnet.tar vmnet-only
# rm vmmon.tar ; tar cf vmmon.tar vmmon-only
# vmware-modconfig --console --install-all

Enjoy!


How do I get the newest lowlatency-kernel on 18.04 LTS?

You need to install linux-lowlatency-hwe-18.04, as linux-lowlatency will always install the original version, 4.15, in this case.

apt-cache show linux-lowlatency-hwe-18.04 | grep Depends
Depends: linux-image-lowlatency-hwe-18.04 (= 4.18.0.18.68), linux-headers-lowlatency-hwe-18.04 (= 4.18.0.18.68)


If you are using unity, then go under settings and then display and move the slider called "scale for menu and title bars" to where everything is visible, and text should follow in size. Comment if it doesn't, it worked for me.


evdev can't distinguish certain keys on Tivo Slide Pro

It turns out the special TiVo Slide driver was not being used for this new model of remote because the USB ID was not updated in the driver source. Specifically this line from hid-ids.h should read:

#define USB_DEVICE_ID_TIVO_SLIDE        0x1203

(While that works for the new TiVo Slide Pro, it breaks the older TiVo Slide.)


You need to configure your network correctly, basically. And you need to bind on the IP address of the external network interface (eth0 for example), not the local address on the local interface (lo). If you have a router, then your public address (the one assigned to your router) is not the address of your computer. You will have to bind locally, and tell the router to open up the port you wish to use, and forward all traffic through it, to your computer. You may be able to do that with UPnP/STUN, depending on your router, or you may need to manually configure it.


How to enable netplan on ubuntu server upgraded from 16.04 to 18.04

If you are upgrading to 18.04 and want to use netplan instead of ifupdown, then you should do the following:

make sure you have a way to access your server if the network goes down
make sure the package netplan.io is installed (it should be on 18.04).
create a netplan yaml according to your config.  There are many examples to choose from.
sudo netplan apply
sudo apt purge ifupdown
Reboot
You should now be "migrated", and networkctl, ip addr, etc, should show your interfaces.

Note, there will still be cruft in /etc/network/.  You can remove/archive:

/etc/network/interfaces
/etc/network/interfaces.d/

The rest are "hook" directories, that other packages put files in that try to react to the network state of the system.  These files should be left alone.

If you have any files that you have put in there, these same facilities are better done by integrating into systemd unit files, or by using networkd-dispatcher.  See more on the netplan FAQ.


BUG - Official Tutorial for Creating a bootable USB stick for Windows does not work - something flawed in Rufus? Tutorial is incomplete

Rufus author here. I am testing Ubuntu bootable media creation regularly (last test was 2 days ago) and I have never encountered this error, nor have I had reports of anything similar happening to the many people that use Rufus to create Ubuntu bootable media.
Can I please ask you to create an issue at the official Rufus issue tracker here and post the complete Rufus log of how you created your media?
If the vmlinuz file failed to copy, it should be apparent there.
And once again, I have to point out that, if you are encountering issues with Rufus, you should use its official issue tracker if you do care about having said issue investigated and possibly fixed. Posting on superuser or askubuntu is not an effective way get problems that are related to the use of a third party application sorted. Thank you.


The print screen key does not open the screen shot tool in Kubuntu 16.10

Kubuntu 16.10 replaces the old screen shot tool KSnapshot with Spectacle but does not change the keyboard setting accordingly. Under System Settings -> Shortcuts -> Custom Shortcuts the folder "Screenshots" must be developed to show an entry "Start Screenshot Tool". The trigger for this entry must be set to be the print screen key. A dialog will prompt warning that the key is already assigned; it is assigned to KSnapshot; therefore ignore the warning.


How to capture a particular line from terminal output?

To get the output of your first command to another command you can use pipe |.
To cut specific line on output you can use cut command.
On this specific example you can use the following command:

ip route | head -1 | cut -c12-24
the output will be the ip.

To use it on a script you can use:

#!/bin/bash
ip route | head -1 | cut -c12-24 > output.txt
variable=$(cat output.txt).
adb connect $variable:5555

To use the commands more specific and on other cases you can look for:

man cut

Remarks:

pipe | taking the first command output and use it on the next command.
cut command helps to filter the output you need.
man its like a guide page on the command.
variable its a temporary variable name to use, you can use any name you want to.
$variable is executing the alias that has been saved under the "nickname" name.

hope that will help you out.


Use Unity on Console and Unity 2D on FreeNX?

The solution is here:

Why do I get Unity instead of Classic when using NX?

[This question should redirect to that one]


How much space does Ubuntu automatically take when installing alongside Windows>

During the installation process, you get to decide how big the new partition should be, no automatic formatting is done.

There are no swap partitions any more, in recent releases they have been replace by swap files that grow and shrink in size dynamically.

According to their System requirements, you will need 5 GB of disk space minimum.


Juju bootstrap error tried all solutions with no success! Now what?

maas-oauth: '${GxeBxx3dYaPwVWKdGp:B2sQ2hukrmg5xMB2ej:nUwbL8eWDR2jVYfnFc9F3gDRHb4DQYSk}'

Try not including the shell quote bits, the guide intends you to replace all of ${maas-api-key} with the real value, not leave the dollar and curly braces in,


Ubuntu 16.04 & 2016 Razer Blade 14" Display Issues

I got linux mint 18(beta) with cinnamon to work on my razer blade 2016.
It works fine except for suspend. I can watch youtube/twitch for more than 3 hours without changing any settings.

AFAIK, people have not figured out a perfect soln for the suspend. Personally, I set my laptop to do nothing when lid closed. As for the nvidia driver, since I use linux for work, I am happy with the integrated graphics card. Also, from what I know, even for those who kinda get their nvidia card to work, there is some tearing and lagging when they watch videos.

I think we need to just wait for a perfect out-of-the-box soln.

Currently I am waiting for the new 4.7 kernel update since I think they fixed a bunch in 4.6

Great, 11 hours ago they just announced the official release of linux mint 18. I will try it.


You should upgrade to Linux kernel 4.3 or 4.4 which has support for Intel skylake and nvidia open source drivers.

After this for nvidia you can try the below steps.

Based on this link nvidia-361 is the driver for Nvidia GTX 960

First uninstall the currently installed NVIDIA drivers. Boot the computer, when the GRUB menu appears ...

Highlight the Ubuntu menu entry and press the E key. Add nouveau.modeset=0 to the end of the linux line. Press F10 to boot the Ubuntu operating system.

When the login screen appears press Ctrl+Alt+F1. Enter your user name and the password, then execute :

sudo apt-get purge nvidia*
sudo reboot

Now install the latest official stable NVIDIA drivers. Boot the computer, when the GRUB menu appears ...

Highlight the Ubuntu menu entry and press the E key. Add nouveau.modeset=0 to the end of the linux line. Press F10 to boot the Ubuntu operating system.

When the login screen appears press Ctrl+Alt+F1. Enter your user name and the password, then execute :

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

Note : Maybe it is explicitly necessary to select the NVIDIA adapter in BIOS. When you want to use drivers 361, adding the PPA is not necessary. In this case the terminal commands you have to perform are these :

sudo apt-get update
sudo apt-get install nvidia-361
sudo reboot

In case you have installed the nvidia driver from their site then uninstall it as per that instructions.Uninstall that driver by running, as root, sh ./NVIDIA-Linux-x86_64-361.28.run and follow the on screen instructions

Note : The solution I have provide has been tested on Ubuntu 14.04 LTS and Ubuntu 15.10 for two GPUs.


If you have MAAS 1.7 and juju already installed, you can go ahead and install Landscape and try out the OpenStack Autopilot:

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

This guide includes instructions on how to install MAAS too, which you seem to already have. Just make sure you have the right versions.

Hope this helps.


How to disable internet access by default for a specific user account, but sometimes allow access with a password?

Here is a method:

1) Following How to disable internet for a user on a system, first do this:

sudo iptables -A OUTPUT -m owner --uid-owner {USERNAME} -j REJECT

2) Then make it permanent after each reboot, following this method:

apt-get install iptables-persistent
iptables-save > /etc/iptables/rules.v4

(The last line required this for me: sudo su -)

3) Then if you want to grant access to internet from your child's account, open a terminal and do:

su dad  # enter password
sudo iptables -D OUTPUT -m owner --uid-owner {USERNAME} -j REJECT  # re-enter password

After a reboot, it will be blocked by default again.

Another solution for 3) if root has a password: create a file unblockinternet.sh containing:

su -c "iptables -D OUTPUT -m owner --uid-owner {USERNAME} -j REJECT"

and then launch this script to unblock internet.


Can't install Chrome. How can I fix this?

So we're going to use the command line. First, open a Terminal with Ctrl + Alt + T, or search the Dash (click the Ubuntu logo) for Terminal. It looks like this:

Then type the following command into it and press enter:

sudo apt-get remove google-chrome-stable:i386

you can copy and paste by right clicking or using Ctrl + Shift + C in the terminal.

When you press enter, it will ask for your password. When you type it, nothing will show up (not even asterisks) but it is still letting you type it. Press enter when you have typed it, and the command will run, with an output similar to this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED
  google-chrome-stable
0 to upgrade, 0 to newly install, 1 to remove and 0 not to upgrade.
After this operation, 111 mB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 339555 files and directories currently installed.)
Removing google-chrome-stable (2.8-4) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for install-info (5.2.0.dfsg.1-2) ...

When it finishes (the last line will look like username@computername:~$), you can open the Software Centre and try to install it again. You can also close the terminal.


Delete an accidental extra installation of Ubuntu 11.10

If you dont have separate partition for /boot, I would recommend that you boot into the new Ubuntu install i.e the one installed later and delete the partition for older one and run sudo update-grub afterwards. You can then reclaim that disk space by creating a new partition in it.

If you do otherwise i.e boot into the older install of Ubuntu and delete the partition for new Ubuntu installation, you may get into the situation where Grub in MBR is trying to access "boot" directory in the partition you just deleted and therefore system will not boot. In this case you will need to re-install Grub. If you really want to follow this path, you will first need to download Grub Rescue disk and after you have deleted the partition for newer Ubuntu installation and ran update-grub, boot your system from the rescue disk and re-install Grub from there. You can find many excellent tutorials for this using Google but if you dont have any thing important in the old installation of Ubuntu, I will suggest that you stick to first approach.

UPDATE:
To answer the updated question, I believe you just need to run "sudo update-grub" from Ubuntu and your problem will be solved.


Any change in your system before it stopped working? Please post a better pic of your log (with those lines related with sddm).

As is recommended in this post, you could try startx or move /etc/X11/xorg.conf to a backup file, if the issue is caused by a misconfiguration of the configuration file.


Is it possible to bring these chip temperatures down?

sensors reads information from the kernel and sometimes it seems a bit off. To confirm you do have a problem read the information directly from the kernel yourself with this command:

$ paste <(cat /sys/class/thermal/thermal_zone*/type) <(cat /sys/class/thermal/thermal_zone*/temp) | column -s $'\t' -t
INT3400 Thermal  20000
SEN1             54000
SEN2             51000
SEN3             58000
SEN4             61000
pch_skylake      -44500
B0D4             49000
x86_pkg_temp     51000

There are three implied decimal places so the actual temperature of X86_pkg_temp is 51.000 Celsius. As you can tell from the pch_skylake sensor a temperature of -44.5 is out to lunch. I've noticed this one sensor is often out of wack.

Hint: Copy and paste the terminal command after the $ sign into your terminal and press Enter instead of laboriously typing it in.


Hide program title from ubuntu unity menubar

Simply: No
The name in both the Unity Launcher and Dash is determined by the line in the corresponding .desktop file, e.g.:

Name=Bluefish Editor

This line is in the categorie: "Required" as you can read here , which means you cannot have a "nameless" .desktop file which is considered to be a correct one.

Unity also simply does not allow a "nameless" representation. In fact, looking up an application in Dash is based on the presence of its name. A "nameless" application would therefore clash with the concept of Dash.

I can imagine it would be(-come) a setting option in "Appearance" as far as it concerns the Launcher.


Does ubuntu 17.10 support the AMD Ryzen APUs?

No, but you can try installing unstable kernel and drivers.

Look here: What is needed to use Raven Ridge Ryzen 5 2400G?


Ubuntu 20.04 GUI on HP DL380 G7 crash on login

Simply put, I don't believe it's compatible with the G7, looking at the approved hardware for Ubuntu, the last version was Trusty Tahr.
https://certification.ubuntu.com/hardware/201403-14898


Setting up a home network to support server applications

The setup you are describing is often referred to as a thin client configuration. You may find the Linux Terminal Server Project (LSTP) a good place to start.


How can I make my PC hibernate when idle?

I'd imagine since its a desktop it sleeps instead of hibernates, it looks like laptop users have the opposite problem,

Sleep Instead of Hibernate When Idle

So for your case we would change the value for "sleep_type_ac" to hibernate when following the article. Hope this does the trick.

Simplified steps:

Open a terminal, and run gconf-editor or a short cut to run programs hit Alt+f2 and type gconf-editor this will open up the configuration editor
Find /apps/gnome-power-manager/actions/ by using the + icons and folders on the left sidebar, so first find "apps" then "gnome-power-manager" within the "apps" folder, and finally "actions" within that.
Within "actions"  look for sleep_type_battery and sleep_type_ac in the main window. Which in your case the value would be set to suspend double click suspend and change it to hibernate for which one you want to set to hibernate.


Using positional parametrs in bash functions

Think of functions like mini-scripts within a script.  They are ignored by the script until called upon. So, positional parameters are ignored until passed to the function.

They are limited though as to what they can do.  I know that they cannot support if then statements within the function as they are ignored.  And there are some other rules, but you can exit your script from within a function.  If you have checking for errors with parameters those should be performed before the function is called.

You are wanting to pass positional parameters ($1, $2, $3 etc...) into your script.  However, you are expecting the positional parameter to be passed to the function.  Without specifying the parameter when you call the function, the function is not receiving the parameter.  You need to give it the parameter.

Take your script:

#!/bin/bash
function hello () {
echo "Hello $1"
}
hello

Simply by adding a $1 to the line that just says hello by itself will make it so that the parameter is passed to the function.

#!/bin/bash
function hello () {
echo "Hello $1"
}
hello $1

Now calling the script with a parameter will produce the desired output:

$ ./myscript Terrance
Hello Terrance

If you want to add a quick check to it so that it doesn't take blank input after the script, add the following check into your script before the call:

#!/bin/bash
function hello () {
    echo "Hello $1"
}
if [[ $1 != "" ]]; then
    hello $1
    exit
else
    echo "Please input a name.  Example: $0 Terrance"
fi

My example script above does a check of != which means not equal to then the two "" means blank.  So, if parameter 1 is not equal to blank then is true then it runs the function call with the parameter then exits the script after the function is called.  Else it gives my error message.  The positional parameter of $0 is the parameter of the command you just called.

Examples of my script being called:

$ ./myscript
Please input a name.  Example: ./myscript Terrance

$ ./myscript Terrance
Hello Terrance

As you keep scripting you start to learn more tricks and proper commands and how they are used.  Keep on scripting!!

Hope this helps!


Installing OpenStack with Landscape Autopilot fails to parse http

OP posted:

It just wanted the IP not the full URL. Problem solved by entering 10.14.4.1 instead of 10.14.4.1/MAAS


OMG!Ubuntu! recently published an article which contained information about installing Unity v5.0 in 11.10.

In order to upgrade to Unity v5.0, you need to add the Unity team's PPA:

sudo add-apt-repository ppa:unity-team/staging

Note that this is a testing PPA and consider yourself sufficiently warned against doing this.

And then, do an update and upgrade and your Unity version will be bumped up to version 5.0.

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

If you need help downgrading from Unity 5.0, take a look at the following questions:

Error while purging  PPA from Unity 5.0 testing repository
How do I reinstall Unity?

If you are wanting to try out Unity versions that are not held in a PPA, you can only do it by compiling from the source.

How do I build Unity from source?


Randomly Got a green streak on my moniter, Can I fix it?

The green streak does not show when you take a screenshot. I think you have a problem with your monitor. Can you borrow another monitor to test Ubuntu with it?


Item properties is showing SIZE in bytes with commas

Nautilus now follows the local settings of your user, that means that it will use a comma for you, but a point to another user that is using Spanish as his language.

You can't really change it easily. You can change how numbers are formatted for your user, but this will affect all programs. Or you can path and compile nautilus source to get the older behaviour, but it looks like too much work for this little effect.


How to run a command separated in several variables in Bash?

Put the options in an array, and expand it as "${options[@]}"

Ex.

$ cmd=ls
$ options=(-a -l -d)
$ f="foo"

then

$ result=$("$cmd" "${options[@]}" "$f")

giving

$ echo "$result"
drwxrwxr-x 2 user user 4096 Apr 20 08:07 foo


No access to 3rd and 4th levels on Macbook with Danish KB layout

You need to set this up yourself. Go to [ System -> Preferences -> Keyboard ].

Under [ Layouts ], make sure that Danish/Denmark Macintosh is the selected one, and select Apple Macbook under [ Keyboard Model ]. Then click [ Options... ]. The list presented to you should contain an entry regarding what button(s) to use as 3rd level modifier keys.

Generally, many applications will expect the alt key to function as an alt key, so I would recommend not using that as a modifier in Ubuntu.


In Ubuntu 16.04 not start rpcbind on boot

It's bug systemd config rpcbind unit in Ubuntu 16.
https://bugs.launchpad.net/ubuntu/+source/rpcbind/+bug/1558196

Solution:

systemctl add-wants multi-user.target rpcbind.service


To clarify what has happened:

(It is important to know that your hard disk is divided up into "volumes", aka "Partitions". Right now, you probably just have one partition, which is dedicated to your Windows OS. Your goal is a full Ubuntu installation, which would reduce the size of the Windows partition so it doesn't take up your entire hard disk, and add two more partitions for Ubuntu.)

You have installed Ubuntu using Wubi, a program that installs Ubuntu "within" Windows. When you reboot, which you should at this point, you will see the option to boot Ubuntu, which has been installed to a virtual filesystem within the Windows partition. See What's the difference between Wubi and a regular "alongside Windows" installation?

If you run in to serious, unfixable problems with this, you should uninstall the Wubi version of Ubuntu by booting Windows and uninstalling the Ubuntu program from "Add/Remove Programs" (keep in mind that, while this appears to be treating Ubuntu as if it were a Windows program, it is more complicated than that.) Then, boot from your USB thumb drive and do a full installation of Ubuntu. If your computer doesn't boot from the USB key automatically, you may have to change the BIOS settings by entering into setup upon boot, or bring up a one-time boot menu if your computer has it and use that to boot from the USB thumb drive.


Grub commandline has multiple identical options

This site has the following to say about the issue:

Two new RAID-related options appeared in the kernel options with Ubuntu 14.04 -- nomdmonddf and nomdmonisw. They appear to be underdocumented, and basically only relate to Ubuntu. AFAICT they relate to the plan to change from using dmraid to mdadm to assemble RAID devices; but I've been using mdadm for years.

The "nom nom nom" duplication seems to be caused by:

/etc/default/grub.d/dmraid2mdadm.cfg containing:

GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT nomdmonddf nomdmonisw"
which unilaterally appends them to the config if the mdadm package is installed, even if they are already there ( :-( ); and

dpkg-reconfigure grub-pc, which picks up those arguments and puts them into /etc/default/grub, so that they're baked in for another round of adding them

update-grub also adding them onto the command line written into /boot/grub/grub.cfg even if they're already there in the text coming from /etc/default/grub.

[...]

There are some Ubuntu bugs #1291434 and #1318351 about this, so it might eventually be implemented better. Making the "ensure these parameters are present" idempotent -- so it only adds them once -- would seem like a good start!


Smart scopes is a technology that provides functionality to choose the best set of scopes to present to the user depending on the search term, whether the scope is locally installed or remotely available on Canonical servers.

The "smartness" is achieved by consulting Canonical's Smart Scopes Server with every search query made from the Home view of the Dash.

This technology will be available from Ubuntu 13.10 onwards, and it can be tested already in the Ubuntu "Saucy Salamander" development images, which will eventually become the 13.10 release.

How it all works

The journey starts when the user opens the Dash and types something to search for. The search query will be submitted to both local scopes in the user machine and to remote scopes in the Smart Scopes Server. You can think of scopes as dedicated search engines (e.g. the videos scope will search for videos), whose results can be combined and prioritized before they're presented to the user.

This is where the Smart Scopes Service kicks in: a remote service used by the Home Scope to determine the best matches for Scopes to trigger for a search term. It is also responsible for returning results of any remote scopes for that search term, as well as accepting anonymous metrics generated during that search.

Efficient

In order to provide a richer variety of results, a great number of scopes will be installed on the local machine. Each one of these will be activated only if the Smart Scopes Service deems it necessary, and all scopes will be unloaded after a period of inactivity.

This, combined with the lion share of the work being done on the remote server provides for a very efficient and modularized process, giving the user a fast experience in getting content despite of all the processing happening behind the scenes.

Smart!

The Smart Scopes Server will constantly learn about the results being clicked on the Dash according to the search terms, and adapts the returned results and their ranking based on the metrics it receives. The more the service is used and the more the Ubuntu user base grows, the more accurate the results will be.


Google Chrome crashes the whole system on Ubuntu 14.04, 64 bit

Unfortunately, Chrome is really heavy on resources. If you open too many tabs on heavy scripted websites (like social medias, web apps, or flash websites) and if you have a lot of chrome extensions running (especially Adblock, unfortunately), your Chrome is prone to crashes.

If you want to know what is using most of your memory or CPU in Chrome, try the Chrome Task Manager (Shift+Esc).


My screen goes over and over again black

This sounds like a brightness and lock setting. You can search for brightness and lock in the unity search and change the time it takes for the screen to turn off to never if you do not want it to turn off at all.


You can load the new aliases without reboot using source command

source /etc/bash.bashrc

  bash source

  . (source or dot operator)

  Read and execute commands from the filename argument in the current
  shell context.

  Syntax
        . filename [arguments]

  source filename [arguments]

  source is a synonym for dot/period '.' in bash, but not in POSIX sh,
  so for maximum compatibility use the period.

  When a script is run using source it runs within the existing shell,
  any variables created or modified by the script will remain available
  after the script completes. In contrast if the script is run just as
  filename, then a separate subshell (with a completely separate set of
  variables) would be spawned to run the script.


ZFS RAIDZ Pool appears empty after upgrade to 13.10

I believe I figured out the a fix...

It seems whatever is mounting the zfs filesystems isn't kicking off as we would normally expect.

I did the following steps to finally resolve the issue

sudo zpool export RAIDSTORAGE  ## use your pool name here
sudo zfs mount -a

If it's not mounted then, you can try doing the following again.

sudo zpool import RAIDSTORAGE ## use your pool name here

If you reboot and find that you're still not getting your zfs mounts back, I'd try the following...

sudo apt-get install zfs-mountall

which downgraded a package to zfs-mountall from mountall, but for me, the filesystem seems to be coming back up on reboots now.


Find file with time range fileA and fileB

Assuming you have an input like this:

time="time:2015-02-15-18:22:02"

Then you can convert it to a Unix timestamp (seconds since epoch) and save it in variable timestamp with:

time=$(date -d$(<<<"$time" sed 's/time:\(.*\)-/\1T/') +%s)

I use sed here to get rid of the time: prefix and change the colon between date and time to T (ISO 8601), date is then used to convert the timestamp to seconds since epoch.

Depending on what this timestamp represents you can then use find to output the log's filename:

if the filename already contains the timestamp, you can use snort.log.$time directly
if it's the file's modification time:

find . -type f -name "*snort.log.*" -newermt @$(($time-1)) ! -newermt @$time

This will find every log file with a modification time between time - 1 second and time.
if you need to find the oldest log file from after the given timestamp, you can use sort and head:

find . -type f -name "*snort.log.*" -newermt @$(($time-1)) -print0 | sort -z | head -zn1

if you need to find the log file that (in any way) contains the given timestamp, use grep:

grep -l $time *

If you have a lot of long log files maybe combine this with find and/or parallel to make it faster, e.g.:

find . -type f -name "*snort.log.*" -newermt @$(($time-1)) -exec grep -l $time {} +


Debugging installation of RTL8812BU wifi dongel

Do this in terminal
sudo dkms uninstall rtl88x2bu/5.2.4.4
sudo dkms remove rtl88x2bu/5.2.4.4 --all
sudo dkms uninstall rtl88x2bu/5.3.1
sudo dkms remove rtl88x2bu/5.3.1 --all
git clone https://github.com/cilynx/rtl88x2bu.git
cd rtl88x2bu

VER=$(sed -n 's/\PACKAGE_VERSION="\(.*\)"/\1/p' dkms.conf)
sudo rsync -rvhP ./ /usr/src/rtl88x2bu-${VER}
sudo dkms add -m rtl88x2bu -v ${VER}
sudo dkms build -m rtl88x2bu -v ${VER}
sudo dkms install -m rtl88x2bu -v ${VER}
sudo modprobe 88x2bu

Reboot


How to configure netbeans 8.0.2 for C++ in ubuntu 14.04?

All you need (including compilers) comes in that NetBeans IDE package.

You should probably read this guide which will show you how to create a new project and run code: C/C++ Projects Quick Start Tutorial

In NetBeans IDE press F1 for more documentation.


You can always uninstall Apache with sudo apt-get remove apache2 - though it's likely that it's been re-added to update-rc.d - You can remove it with sudo update-rc.d -f apache2 remove This will remove it from start up.


That device is covered by rt2800usb in newer Ubuntu versions. Check:

modinfo rt2800usb | grep 5370

You should see this:

alias:          usb:vF201p5370d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v148Fp5370d*dc*dsc*dp*ic*isc*ip*in*

If you do, load the module and see if the wireless comes to life:

sudo modprobe rt2800usb

Get the module to load automagically on boot:

sudo -i
echo rt2800usb  >>  /etc/modules
exit

If your Ubuntu version is older, I suggest you upgrade. It will probably be easier than compiling from Ralink's source code.


An EFI-mode GRUB should be able to chainload the OS X boot loader, but the GRUB prober might not know where to find it. It's traditionally stored as /System/Library/CoreServices/boot.efi on the OS X root partition; but since Yosemite, it's typically stored on the emergency-boot disk instead, since the root filesystem now uses an LVM setup by default, which the firmware can't read. In any event, you may need to write a custom GRUB entry to get this to boot. See here for some basic information, although that doesn't give complete instructions for what you want.

If your Ubuntu installation is in BIOS/CSM/legacy mode, it may be harder, since GRUB can't redirect to an EFI-mode boot. GRUB has the ability to boot the OS X kernel directly, but that can be tricky to set up and may lose you some features in OS X. This is definitely fringe/bleeding-edge stuff, so I don't recommend you try it. If you care to do so, you can probably find instructions somewhere on the Internet, but I don't have any URLs handy.

Many Mac users prefer to use something other than GRUB as the default boot loader, relegating GRUB to secondary status or not using it at all. The traditional tool for doing this is rEFIt, but it's been abandoned for five years now. It still works, but if you use Yosemite or some other relatively recent options, you may have to jump through some extra hoops. I created a fork of rEFIt called rEFInd. It's actively maintained and will boot any of your OSes. You can try it out on a CD-R or USB flash drive before installing it to your hard disk, if you like. (The downloads page includes links to images for both types of media. rEFInd can boot Linux kernels directly, thus bypassing GRUB; or it can chainload to either an EFI-mode or a BIOS-mode GRUB. It can also chainload to the OS X boot loader and to both EFI-mode and BIOS-mode Windows boot loaders.


I'm presuming you are talking about the web-interface here. I'm also presuming that you haven't set up Ubuntu One on the Desktop. Please let me know if this is not the answer you're looking for.

You can't, at the moment, move files into folders from the Web-Interface. Go to your desktop and move the file there instead.

To set up Ubuntu One on your dektop, go to the Me Menu and select Ubuntu One:

A web browser will open and ask you to sign in.
Select Add this Computer
Back in the preferences dialogue, select the Devices* tab and click the Connect button.

You should now be able to move the files around in, for example, the Ubuntu One directory in your Home directory.

Do allow some time for synchronisation. You can check the status in the Ubuntu One Preferences dialogue.

You may also be interested in the  Ubuntu One page in the Ubuntu Wiki. It explains how to set up Ubuntu One in detail.


Why do I see a message SQUASHFS ERROR:UNABLE TO READ DATA AND PAGE WHILE INSTALLING UBUNTU

Your ISO was either corrupted, or your write to install media was flawed. Other reasons for it are the install media is faulty etc, but in my experience it's the write to install media most at fault.

Did you verify your ISO after download and before write to media?

https://tutorials.ubuntu.com/tutorial/tutorial-how-to-verify-ubuntu#0

Assuming you trust your installation media, the write is the most common faulty flaw in my experience, so I write it again (if it fails again, using another box or to different media).  Either way first step is the validate your ISO following the tutorial.

FYI:  For faulty installation media, you'll see messages like the following in logs, these are the result of what I'm describing:

Jun 26 10:37:24 ubuntu kernel: [  363.074612] SQUASHFS error: zlib decompression failed, data probably corrupt
Jun 26 10:37:24 ubuntu kernel: [  363.074615] SQUASHFS error: squashfs_read_data failed to read block 0x76d9b3d5

If you file a bug report with these messages, you'll either get a response telling you what I've said here, or your report will be marked a duplicate of https://bugs.launchpad.net/ubuntu/+bug/1874662  (which you can read for other wording)


Flash Magic error: "Unable to communicate.(in use)Ensure no other applications are using the COM Port. Try raising or lowering the baud rate"

You need to add your userid to the dialout group. An ls -l /dev/ttyUSB0 will show that group members have rw- access.
Read man adduser, and do
sudo adduser $USER dialout

Once that is done, either use newgrp dialout (Read man newgrp) to create a process with the new group, or logout and login again to endow all your processes with the new group.


Ubuntu 18.04 Won't Wake From Sleep/Suspend/Lid Closed

I had the same problem on an old Thinkpad SL510: suspend would leave the machine with a blank screen (but the fan was still on, so it was not a proper suspend) and only force-reboot would work.

Running PM_DEBUG=true pm-suspend produced a log without anything suspicious (all sleep.d scripts reporting "success").

Uninstalling package "tlp" (which also uninstalled "tlp-rdw") fixed the problem.


How can I download different applications itunes, etc.?

You're trying to run a Windows installer, but Ubuntu is not Windows. Ubuntu is trying to extract compressed files from the exe-file, perceiving it to be a self-extracting zip-file, which it is not.

The first thing you should do, is to find out why you want to use Itunes. Is it possible that there are other players that are better suited to your needs?

I don't think Itunes can be used on other platforms than OS X and Windows. If you really have to use it, then you'll need to install Wine or you can install Windows in virtualbox or something and run Itunes on that.


Compiler errors during install of rstan in R

I had the same problem. This fixed it for me:

devtools::install_url("http://cran.r-project.org/src/contrib/Archive/BH/BH_1.55.0-3.tar.gz")
devtools::install_url("https://github.com/stan-dev/rstan/releases/download/v2.6.0/rstan_2.6.0.tar.gz",dependencies = FALSE)
library(rstan)
set_cppo("fast")

From the STAN User's Group.


The error message you got is pretty self-explanatory:

No such file or directory: AH02291: Cannot access directory '/var/log/apache2/'

Make sure the directory /var/log/apache2/ exists, and if it does not, create it and launch Apache again.

While this directory should be made on installation, sometimes the package manager does a stupid and doesn't create it.  So you can recreate it fairly easily with sudo mkdir /var/log/apache2/ and it should then work.


Microphone records audio only when it's called by one process

You might need to install the pulseaudio utilities to manually configure them

sudo apt-get install paman padevchooser paprefs pavucontrol pavumeter

Once that's done, fire up pavucontrol and take a look at the recording tab for details. It's possible you might have muted it on accident.


I want to install Autodesk eagle but get getting following error

There is some graphics incompatibility of EAGLE and Ubuntu 20.04 LTS.
As a workaround run it always with:
env LIBGL_ALWAYS_SOFTWARE=1 ./eagle


Autostart a Python script in an LX terminal

Write a shell script that initiates your Python script and add that SHELL script in start-up program list for starting it automatically every time you reboot.
Shell Script: Execute a python program from within a shell script.
One more helpful Link : How to run the Python program in the background in Ubuntu machine?

To run it every time on reboot : How to run a shell script at startup.


Enumerate files and directories with command 'ls'

Or simply do:

ls -b |nl -s '. ' -w 1
1. a\ file\ with\ nonewline
2. a\ file\ with\nnewline
3. a\ file\ with\ space
4. afile

from man nl:

-s, --number-separator=STRING
              add STRING after (possible) line number
-w, --number-width=NUMBER
              use NUMBER columns for line numbers


How do I backup system to a different partition on the same drive?

Warning: Any time you deal with partitions, you should be very careful, since data might get destroyed.

Try dd.

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

dd if=/dev/sda1 of=/dev/sdb1 bs=4096 conv=notrunc,noerror,sync

To clone a partition

OR

dd if=/dev/sda of=/dev/sdb bs=4096 conv=notrunc,noerror,sync

To clone an entire hard disk

For more info see dd Man Page 1 & Man Page 2


Ubuntu 12.04 - repeated booting problems

The error is related to the X server. It seems that your configuration was corrupted by your installation of the Android SDK.
Try the following installation command instead:

sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl \
zlib1g-dev libc6-dev lib32ncurses5-dev lib32z1 x11proto-core-dev libx11-dev \
lib32readline-gplv2-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 \
tofrodos python-markdown libxml2-utils xsltproc

Note: some issues remained after that, related to linking of /usr/lib/i386-linux-gnu/libGL.so. Try using locate to libGL.so to find your local version of the library, and then creating a symbolic soft link with ln -s YOURLIB TARGETLIB.


How do I get boot to work correctly after deleting Ubuntu partitions?

Try Boot-Repir:  https://help.ubuntu.com/community/Boot-Repair
Try the "recommended" (default) button first. Advanced options explained on the website if the default settings won't work.

Good Luck!


This may not be perfect but it kind of works:

for i in $(alias | sed 's/alias //g;s/=.*$//g'); do history | grep $i; done

This should list all the commands listed in history that are listed as an alias for something else. If you have colors set up for grep, this should show the alias in red so you should be able to see if a command is listed but is not the full alias.

For the other way around, to list all commands from history that aliases are set to execute, you can run this instead:

for i in $(alias | sed 's/^.*=//g'); do history | egrep "$i"; done


I just tried this:

shell> sudo rfkill list all

The output was something like this:

0: sony-wifi: Wireless LAN
Soft blocked: yes
Hard blocked: no
1: sony-bluetooth: Bluetooth
Soft blocked: no
Hard blocked: no
2: phy0: Wireless LAN
Soft blocked: yes
Hard blocked: yes
4: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no

Then I have run this command:

shell> sudo rfkill unblock wifi

and all is fine now :)
Have fun :)
I hope it will help you :)


If you mean Login or event sound then here's what you can do -

Procedure 1:

Install dconf editor. goto org->gnome->desktop->sound

change the sound theme "freedesktop" to "ubuntu"

If not worked then;

Procedure 2:

gksudo nautilus (press alt+f2)

go to /usr/share/sounds/ubuntu/stereo

copy the sound files

Paste them to

 /usr/share/sounds

Install "Gnome Alsa Mixer". Use the sound controls in it to set Volume to max Value.


Online folder ordering different than my PC?

Apparently Ubuntu's version of Nautilus is intended to sort case-insensitive, contrary to most linux application defaults. A google search brought up a thread that I believe holds your solution:
https://bbs.archlinux.org/viewtopic.php?id=34699

  I have since done a lot of digging around... and found the real source of the problem.  Nautilus (and ls) uses the computer's LOCALE settings to determine how to sort file/directory listings, in particular, the LC_COLLATE variable. By default, and for whatever reason, Arch overrides the preferred language settings by inserting its own LC_COLLATE variable in /etc/profile:
  export LC_COLLATE="C"
  Simply commenting this one line and restarting the computer will set LC_COLLATE back to the encoding specified by LOCALE in /etc/rc.conf.  In my case, en_CA.utf8.
  My files and directories are now sorted alphanumerically case-insensitive

In your case, I think you want LC_COLLATE="C" instead.

I also found this relevant askubuntu post:
Nautilus sorts the Name-column "mysteriously". How can I change the collating sequence?


how to pass argument "all" to column util-linux

This bit in the man page states:

OPTIONS
       The argument columns for --table-* options is comma separated list of
       the column names as defined by --table-columns or it's column number
       in order as specified by input. It's possible to mix names and
       numbers.

to create a comma separated list of names and numbers. The man page does not list any shortcuts. You could try asking for a feature request on the github page.

And provides an example in the form of 2 options:

sed 's/#.*//' /etc/fstab | column --table --table-columns
SOURCE,TARGET,TYPE,OPTIONS,PASS,FREQ --table-right PASS,FREQ

You will need to write them all out as a list of numbers or list of names.

Mind that "util-linux" is not installed in Ubuntu by default. We use "BSD mainutils". Ours has less options.


I can't install any apps from the Software Center

I have not this message error but by the way:

Do you have access to a console?
Could you install synaptic package manager?
Then install apps from synaptic?
Do you tried installing some app from apt-get like

apt-get install application_you_want

I hope someone of this can give you some idea


Cannot Remap CapsLock after Swapping with Ctrl

If you don't mind a solution for X only...

The technique I was recommended is to put the following in a script:

#!/bin/sh
xmodmap - << !
remove Lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L
!

You will have to run it once when you log in.

If you run it twice, it will reverse the behaviour, i.e. go back to normal again!


Pidgin status icon in 13.04 / Raring Ringtail

Starting 13.04, applications will have to integrate into the indicators and can no longer have their own status icons in systray in Unity. (This may change in future.)

  The Unity systray whitelist has been removed, so you can no longer whitelist applications to allow them to use the notification area in Ubuntu 13.04 Raring Ringtail. However, Java and Wine applications have been hard-coded as the only software still able to use the notification area so this change only affects some old applications that don't come with AppIndicator support. And since Qt applications systray icons are automatically converted to appindicators thanks to sni-qt, this change shouldn't affect too many applications.

Source: http://www.webupd8.org/2013/04/ubuntu-1304-raring-ringtail-final-beta.html


delete file from /etc/profile.d directory

You have to remount the Filesystem when you are in the recovery mode.

mount -o remount,rw /

This will remount the root-Filesystem "read-write" and you can proceed to change what you have to change.


why do I see unattended upgrades warning when installing a module?

You should run gconf-cleaner & bleach bit for cleaning

Also .ucf-dist should be removed
sudo rm /etc/apt/apt.conf.d/50unattended-upgrades.ucf-dist


Running Redhat/Oracle Linux only application on Ubuntu

You can install Oracle Developer Studio for any platform by using the tar file.

But be aware that Oracle says :

  When you install from a tar file you cannot get support or patches
  for the product from Oracle.

You may have a better experience installing CentOS or the (free as in beer) Red Hat Developer Edition to a VM or a new partition.

That said, support and patches (similar to Oracle Linux) do not appear to be free, so the tar version may be fine.


Check inside your BIOS if the SMART functionality is enable. Depending on your hardware it's on different menus but generally you can find it where your hard drives are defined or in advanced features.

If this is not enough you can afterwards enable it with hdparm.

Check if you can use it with :

sudo hdparm -I /dev/sda

/dev/sda being the hard drive you want to check

this command will show you what's enabled or not

To enable SMART if not enabled you can do this command :

sudo smartctl --smart=on /dev/sda

When you ends with error it may means two things :

You simply can't do it
you need to specify the BUS used

For the second part you must give use more details (the hdparm -I output for instance, the hard drive model, the computer or motherboard model, etc etc)

The easiest and 100% sure working method is by changing the value inside the BIOS.

Best regards.


Installing FTP and adding user to FTP account

Don't Need to Use the above command , If You using a Local User , then Create a Account just using useradd usernamehere , and Create a Password for user too, Then Change the configuration file to local_user YES , Connect from the Client to check and it will Work , You local User files will Stored Under /home/username , The local user Will be Redirect to the home directory of local user , If you Create a Anonymous FTP login its will Redirect to /var/ftp/pub that's the different , If you Don't Need to Browse all Folder except the home Directory Enable Chroot_local_enable YES , Then Your Local User can access Only His Home Directory


install ubuntu on a pc with windows 8(had XP before upgrading to 8) directly making it a dual boot?

This all depends on what you use your computer for... gaming, office work, etc.  While XP is one of the better Windows versions it can be rather old when running newer games but will dual boot quite happily with Ubuntu...  Windows 8 on the other hand will run newer games ok but somehow has a lot of quirks running older one's that XP can handle...  Then there's an Ubuntu only installation which will run mostly everything with the new WINE installed so it can run windows software, but not everything will run...

Let us know what you'll be doing on your computer so we can advise...

Here's a link just-in-case: http://www.everydaylinuxuser.com/2013/09/install-ubuntu-linux-alongside-windows.html


Usually you can't capture network interfaces as normal user, you need administrative rights to access the network layer.
You can try running wireshark as "root" and check if the interfaces are shown.

P.S.: You should use the root account only for testing purpose. Pay attention to the messagebox that will show up when you run wireshark as root.


boot stuck on "checking battery state [ok]"

Some reported it as corrupted .Xauthority file/ .Xauthority file owned by root. Removing it does the trick.

Press Ctrl+Alt+F2 when you are stuck.
Log in using your username and password.
Execute: sudo mv /var/lib/lightdm/.Xauthority /var/lib/lightdm/.Xauthority-bak
Now reboot: sudo reboot


I was bug in WG which was not routing packets propertly.
My collegue from L3 department wrote hot fix, this issue was reported as bug.
PostUp = MYDEFROUTE=`ip ro sh | grep default | awk '{print $3}'| head -n1`; for peer in ip.addresses.here; do ip ro add $peer/32 via $MYDEFROUTE; done
PostDown = for peer in ip.addresses; do ip ro del $peer/32; done


Thunderbird Chat - Additional Chat Protocols

I'm using Trillian with Ubuntu 20.04, and it is working very well for me. Download the deb or rpm from https://www.trillian.im/get/linux/6.1/linux.html


Search through a certain manpage-section in all man pages

The -S option selects a section of the manual, the manual being the whole collection of man pages. The manual section can be 1 (Executables), 2 (System calls) etc. Not the section of a single man page as such. So for example

man -K -S 3 resolv.conf

will return the man page for res_init(3), a C library call that belongs into the section 3, Library calls, but not the man page for dig(1), which belongs to section 1 (executables).

Since this is a brute text search anyways, I would probably make an ad hoc search script using zcat and sed, or maybe a simple perl script.

EDIT: here is an example script, created as bash function.

function mfind { find /usr/share/man/ -iname '*.gz' -exec zcat {} \; | perl -ne '/.SH NAME/ and $n=<STDIN>;/.SH '$2'/ and $c=1;$c and /'$1'/ and $n and print "$n" and $n=""' ; }

Usage:

mfind expression mansection

for example

mfind utmp FILES

Bugs: does not consider /etc/manpath.config, uses /usr/share/man instead. No further options available.


Why is there "seccomp" events related to Google Chrome in syslog?

It's just the kernel logging audit events of seccomp from Chrome's sandbox.

From Wikipedia:

  seccomp (short for secure computing mode) is a simple sandboxing
  mechanism for the Linux kernel. It was added in Linux kernel 2.6.12 in
  March 8, 2005.

  It allows a process to make a one-way transition into a "secure" state
  where it cannot make any system calls except exit(), sigreturn(),
  read() and write() to already-open file descriptors. Should it attempt
  any other system calls, the kernel will terminate the process with
  SIGKILL.

  In this sense, it does not virtualize the system's resources but
  isolates the process from them entirely.

  Google is exploring using seccomp for sandboxing its Chrome web
  browser.

  As of Chrome version 20, seccomp is used to sandbox Adobe Flash
  Player. As of Chrome version 23, seccomp is used to sandbox the
  renderers.

See also:

Chrome 20 on Linux and Flash sandboxing
Introducing Chrome's next-generation Linux sandbox
A safer playground for your Linux and Chrome OS renderers


I found it!  It's an application called "Yad".  As this is in the repositories, it has been checked by the good people at canonical and can probably be trusted.


How do I fix warning: command substitution: ignored null byte in input?

This warning appears to be a new feature in Bash-4.4 - see for example Command substitution with null bytes generates warning.
One option would be to strip off or convert the null byte in your pipeline e.g.
DBUS_SESSION=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$DBUS_PID/environ | tr '\0' '\n' | sed -e s/DBUS_SESSION_BUS_ADDRESS=//)

(note that I switched to the modern $(. . .) form of command substitution, in place of backticks).
Alternatively, you could use the bash shell's builtin read command, which can deal with null delimiters directly e.g.
IFS== read -d '' _ DBUS_SESSION < <(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$DBUS_PID/environ)

(split the null-delimited grep output into two tokens separated by the = character; assign the first to junk variable _ and the second to DBUS_SESSION).
[I couldn't really test these as I don't have a suitably recent version of bash]


Write function in one line into ~/.bashrc

There is a ; needed at the end of the function:

list(){ ls -a ; }

should work.

The syntax of a function definition for bash is specified as

name () { list ; }

Note that it includes a ; that is not part of the list.

That the ; is required in this place is kind of a syntax anomaly. It is not bash specific, it's the same for ksh, but it the ; is not required in zsh.


How to reset Keyboard Shortcuts on Ubuntu 17.10

You can set this shortcut from GNOME Tweaks (sudo apt-get install gnome-tweak-tool). It is reintroduction of well known bug 1218322 .

See this answer for screenshots.


Ubuntu partition showing "unallocated space" after shrinking windows 10 partition with AOMEI partition assistant

I had the exact same problem and solved the problem in the following way.

Create a live USB with an Ubuntu version, e.g. Ubuntu 20.04, and run Ubuntu on that USB (see https://linuxhint.com/run_ubuntu_usb_stick/ for details).

Open a terminal and look at the current partition table:
sudo parted /dev/sda unit s print //this printed the current partition table

In case your partition is still missing, you can rescue it by using parted, but you need to know the Start and End Sector of your missing partition. Therefore install TestDisk:
sudo apt update
sudo apt install testdisk

If this is not working, make sure that in Software & Updates -> Ubuntu Software the Community-maintained free and open-source software (universe) option is ticked and try it again.

Run TestDisk:
sudo testdisk

Chose Create, then the hard disk where your partition is missing, chose the partition table which is automatically detected and select Analyze. It will the print a list of partition which should include your lost partition. Write down the Start and End Sector of your recovered partitions. (visit https://www.tecmint.com/install-testdisk-data-recovery-tool-in-linux/ for more details)

Then use parted to rescue the lost partition by using the Start and End Sector information. Repeat the process if you have several lost partitions (e.g. root and swap).
sudo parted
unit s
rescue
Start? //Here I entered in start section
End? //Here I entered in end section

Then your partition(s) should be recovered and you can use GParted to allocate the freed space to your partition (visit https://www.howtogeek.com/114503/how-to-resize-your-ubuntu-partitions/ for more details). Keep working on the live USB, as a partition in use can't be modified in any way.


change folder icons in ubuntu-mono-dark theme

Sure, from the theme you installed, copy these 55 icons into the Humanity theme:

folder-copy
folder-remote-symbolic
folder-ubuntu
folder_download
folder-pictures-symbolic
folder-system
gnome-folder
folder-home
folder-move
folder-music
folder-music-symbolic
folder-visiting
folder_open
folder_tar
folder-drag-accept
folder-documents-symbolic
folder-symbolic
folder-remote-ssh
folder-publicshare-symbolic
folder-downloads
folder-remote
stock_folder
folder-remote-smb
folder-download-symbolic
folder_images
folder-open
folder
folders-publicshare
stock_folder-properties
folder-templates-symbolic
folders-music
stock_folder-copy
folder-publicshare
folder-saved-search
folders-downloads
folder-documents
stock_folder-move
stock_folder_properties
folder-videos-symbolic
folder-remote-nfs
folder-pictures
folder-remote-ftp
folder-video
folder-templates
folder_new
folder-new
folder_pictures
folder-recent
folders-documents
folder-images
folder_home
folder-saved-search-symbolic
add-folder-to-archive
folder-videos
folder-download


In Synaptic, go to the Edit menu and select Fix Broken Packages. Do this twice. Then click the Reload icon, and if any errors appear, you need to fix those, to help solve your problem.


Why doesn't the ubiquity installer offer me to install ubuntu alongside other linux distros?

Likely because there are too many partition on the HDD. The installer does offer the "alongside" option, for example, if there are only two primary partitions. I suspect you may have three or four, in which case, the installer offers either wiping everything, or manual partitioning.


What applications can be used for viewing .exr files?

Only viewer per se that I know of working for exr files out of the box is exrdisplay, which is part of the package openexr-viewers (you can install it with sudo apt install openexr-viewers). Can't imagine why they put an "s" at the end of the name. Looks like just one viewer to me. If Gwenview can be made to show exr images it is probably through a plugin. It has an import facility under the plugins menu.

More generally, for images I like Viewnior.


NMI watchdog: BUG: soft lockup - CPU#2 stuck for 23s! [plymouthd:305]

I also have the same laptop: Dell Inspiron 7559. I managed to boot by adding nouveau.modeset=0 to GRUB's linux line.

When you are in the GRUB menu, press E to enter the GRUB editor. Add nouveau.modeset=0 to the end of the line that starts with linux. After you've added it, press F10 to boot. Your system should start. After that, go to System Settings > Software & Updates > Additional Drivers and then select the NVIDIA driver. Right now I'm using NVIDIA binary driver- version 367.57 from nvidia-367 (proprietary, tested).

However I also have problems. Firstly, the NVIDIA card consumes a lot of power. My battery life is 2 hours with Linux (because it only uses NVIDIA GTX 960). With Windows I get 6 hours if I use it mildly. If I do prime-select intel, and try to log off, it gets stuck and I have to reboot it multiple times to make it boot. Sometimes it never boots back so I have to boot in recovery and switch back to NVIDIA by prime-select nvidia. I have installed all the Dell graphics card drivers and nothing changed - still doesn't boot with Intel selected. However once I managed to boot with Intel and it gave me 6:30 hours of battery life. Something is weird.


How to partition my 320 gb hd while installing?

This is very use-case-specific. i.e. In order to be able to answer this, one needs to know how this system is going to be used.

I can give some examples from my own usage scenarios, though

Use case: Linux desktop, single boot

Swap => same size as system memory
/ => 20GB
Unused partition => 20GB
/home => Remainder

Use case: Linux desktop, dual- or multi-boot

Swap => same size as system memory
/ => 20GB
/ (for second OS) => 20GB
/windows => 100GB
/home => Remainder

Use case: Linux web server

Swap => Same size as system memory. optional
/ => Remainder

Use case: Linux database server

Swap => Same size as system memory. optional
/ => 20GB
database data partition  /data or /var/lib/mysql (for example) => remainder

For Linux desktops, I always reserve a second OS partition that I use to upgrade or test out new OSes. I can install the new OS on that partition and leave my main OS intact. If I like the new OS, I can switch to that as my main OS and mount my /home partition there. Boom, instant upgrade.

For multi-boot, the premise is similar. Note that Windows is much more disk-intensive than a typical Linux install. You really need to give modern Windows systems at least 100GB.

Server systems are highly variable. The partitioning really depends on how the server will be used, how much data it will store, how it is deployed, what backend infrastructure it runs on (e.g. AWS, VMWare, real machines per server, etc)

Finally, swap space on a modern Linux installation is optional. Some scenarios benefit greatly from it; some do not. For Linux desktops, I always include a swap partition. Not so much on my servers -- I just add more memory to those if I find that memory is becoming a resource constraint on them.


How to use "at" command in shell script?

I suppose you're talking about this software, however it does provide only very limited command-line options. If you want to record audio from command-line or in a script you better stick to command-line programs – I'm essentially using this approach here. For this to work you might need to install some packages, run sudo apt install pulseaudio-utils lame to be sure.

#!/bin/bash
sink="alsa_output.pci-0000_00_1b.0.analog-stereo"
echo 'f=$(date +%F_%R)_rec.mp3;timeout "'$2'" parec -d "'$sink'".monitor|lame -r -V0 - $f'|
at "$1"

You need to adjust the value of sink to your system, pacmd list-sinks|grep name: shows it enclosed in <> (don't copy those!). After that make the script executable with chmod +x SCRIPTNAME and run it as e.g. /path/to/SCRIPTNAME 10pm 30m to record for 30 minutes starting at 10pm. The recording will be saved in the directory where you run the script as e.g. 2017-12-17_10:00_rec.mp3 for a recording that started at this date and time. If you want to change that, replace $(date +%F_%R)_rec.mp3 in the script.

Example run

$ ./test.sh 10:00 10m
warning: commands will be executed using /bin/sh
job 1 at Sun Dec 17 10:00:00 2017
$ atq
1      Sun Dec 17 10:00:00 2017 a dessert
$ atrm 1
$ atq
$

As you can see, you can use atq to display and atrm to remove a pending job.

Time and duration format

As for the time format see man at, especially:

  At (…) accepts times of the form
         HH:MM to run a job at a specific time of day.  (If that time is already past, the next day is  assumed.)   You
         may  also  specify  midnight, noon, or teatime (4pm) and you can have a time-of-day suffixed with AM or PM for
         running in the morning or the evening.  You can also say what day the job will be run, by giving a date in the
         form month-name day with an optional year, or giving a date of the form MMDD[CC]YY, MM/DD/[CC]YY, DD.MM.[CC]YY
         or [CC]YY-MM-DD.  The specification of a date must follow the specification of the time of day.  You can  also
         give times like now + count time-units, where the time-units can be minutes, hours, days, or weeks and you can
         tell at to run the job today by suffixing the time with today and to run the job  tomorrow  by  suffixing  the
         time with tomorrow.

As for the duration format see man timeout, especially:

  DURATION is a floating point number with an optional suffix: 's' for seconds (the default), 'm'  for  minutes,
         'h' for hours or 'd' for days.


Notepadqq is broken and reinstall doesn't help

Program often store configurations in your local ~/.config file, which are not deleted even though the program itself is purged.

As a test, while notepadqq is not running, you can either rename or delete the configuration file for notepadqq and then restart the program, which will cause it to return to a default configuration.

In a terminal window:

cd ~/.config
mv <filename> <filename>.bak
exit

where <filename> is the name of the file or directory containing the configuration files for notepadqq


How to remove the Mail icon indicator applet?

You can remove the message indicator by removing the indicator-messages  package by clicking on that link and clicking uninstall. Or by executing the following command in a terminal:

sudo apt-get remove indicator-messages

Then log out and back in.


Cant write to internal HDD drive in Dolphin. But it works after remounting

Ok, I solved the problem. Its not a problem related to Dolphin.
Apparently I couldnt write even after re-mounting. So when I used mount -o rw /dev/sda3 /media/salu/dcommand it gave me the following error message:

Metadata kept in Windows cache, refused to mount.
Failed to mount '/dev/sda5': Operation not permitted
The NTFS partition is in an unsafe state. Please resume and shutdown
Windows fully (no hibernation or fast restarting), or mount the volume
read-only with the 'ro' mount option.

Note: (/media/"username"/"folder name") path is different for everyone)

The solution to this problem is given in the link below:

Unable to mount Windows (NTFS) filesystem due to hibernation

A short summary of what I did (summarized from the link):

Open Windows 10 and disable "fast startup"

Open Control Panel in the small icons view and click on Power
Options.
Click on Choose what the power buttons do.
Click on Change settings that are currently unavailable.
Uncheck "Turn on fast startup (recommended)".

Also disable hibernation in Windows 10

Open an elevated Command Prompt (right click on the shortcut, click on “Run as Administrator”), and input:

powercfg /h off

Shutdown Windows and boot back in Ubuntu. You should be able to write in your drive now.

Check out the details and the full explanation of the solution in the link


Login screen upside down after upgrading to 17.10

I found the correct answer for this problem.  You need to add a xrandr command to the /etc/gdm3/Init/Default file.  In my case, I added xrandr --output eDP-1-1 --rotate normal just above the exit 0 line at the bottom.  Of course that output parameter is specific to my hardware, but if anyone else is suffering from this, just run xrandr --listmonitors to isolate what the proper value for --output should be for you.


After installing Ubuntu from USB, GRUB2 can't be installed!

your best bet to install grub2 is Boot-Repair tool.

  Boot-Repair is a simple tool to repair frequent boot issues you may
  encounter in Ubuntu like when you can't boot Ubuntu after installing
  Windows or another Linux distribution, or when you can't boot Windows
  after installing Ubuntu, or when GRUB is not displayed anymore, some
  upgrade breaks GRUB, etc.

How to install?

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install -y boot-repair

How to run?

boot-repair

How to use?

more info here.


How do I change the background of the side pane?

Add the following to your ~/.gtkrc-2.0 file (create one if it doesn't exist):

style "nautilus-sidepane"
{
    GtkTreeView::even_row_color   = "#F2F1F0"
}

widget_class "*NautilusSidePane*" style "nautilus-sidepane"

Then log out and back in (or restart Nautilus with nautilus -q, or change to another theme and back to the old one).


Qualcomm Atheros - Slow/Not connecting on Ubuntu, but works in Win 10

Alright what you could do is try adding a line to your config

sudo su
echo "options ath9k nohwcrypt=1" >> /etc/modprobe.d/ath9k.conf

Then reboot your pc to see if this helped.
If this did not fix your speed issue I have another trick you could use.

Force disable the 802.11n protocol.
While the protocol is supposed to provide better speed with newer routers.
Most modern day routers actually do not use this protocol which can cause issues.

Open the terminal and use the following command:

sudo rmmod iwlwif
sudo modprobe iwlwifi 11n_disable=1

Now try reconnecting to the net if this did not fix the issue then oh well but if it did then to make the change permanent issue these commands.

sudo su
echo "options iwlwifi 11n_disable=1" >> /etc/modprobe.d/iwlwifi.conf

Hopefully this will have fixed your issue and if not I have one last thing you could do and that is to disable ipv6 while I am not sure your provider has ipv6 support sometimes this can cause issue with certain routers and ISP's to test if this is the issue

sudo su
echo "#disable ipv6" >> /etc/sysctl.conf
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.lo.disable_ipv6 = 1" >> /etc/sysctl.conf

For any of the above just sudo gedit 'the filename and location' such as

sudo gedit /etc/modprobe.d/ath9k.conf

Then fine the line which was added and remove it.

The second solution I provided a way to test to see if it helps before making it permanent so you wont need to do any manual edits to undo it unless you choose to do the step that makes the change permanent.

If nothing I provided helped please comment get back to me etc.


It entirely up to you how you configure your system, based on your needs. However, there are good reasons for having separate configuration files for CLI and Apache, not least because a web server is typically an externally facing service. For example:

Disabling some extensions to minimise security risks.
Configuring lower memory limits to limit the potential for denial of service attacks.

Note that you can also configure your PHP installation by adding files to /etc/php5/conf.d. This is a good way to keep your customisations in their own file and avoid conflicts in your php.ini file(s) if they get updated by a new version of the packages. The latter point is also an issue if you choose to use symlinks for php.ini. Note that the conf.d directories for cli and apache are symlinks.


How to remove bad entry in home directory

So I got a Kali USB stick, shut her down, pulled other discs, and booted into Kali.

# lsblk
# e2fsck -f -C 0 /dev/sda1
# mount /dev/sda1 /mnt
# cd /mnt/home/ljohnson/
# rm -rf 2z9TnVLzmf

rm ran for at least 45 minutes but less than two hours but 2z9TnVLzmf is gone.

Now the partition is %36

# df -hT | grep /dev/
/dev/sda1      ext4       63G   21G   39G  36% /
/dev/sdc1      xfs       2.8T  1.5T  1.3T  53% /pvr
/dev/sdb1      xfs       1.9T 1010G  853G  55% /pvs
/dev/sde1      xfs       4.6T  2.9T  1.8T  62% /pvu
/dev/sda3      xfs       395G  101G  294G  26% /pvt


VMware Workstation is not working in Kubuntu 15.04

Here is a link to the solution of the above problem:-

3.19 kernels and up

Since 3.19 kernel the vmnet module will fail to build. Therefore we need to patch it .Commands are given below :-

curl http://pastie.org/pastes/9934018/download -o /tmp/vmnet-3.19.patch

Extract the vmnet module sources:

cd /usr/lib/vmware/modules/source
tar -xf vmnet.tar

Apply the patch:

patch -p0 -i /tmp/vmnet-3.19.patch

Recreate the archive:

tar -cf vmnet.tar vmnet-only

Remove leftover:

rm -r *-only

Rebuild modules:

vmware-modconfig --console --install-all

Now, VMware Workstation is running smoothly.


Windows 7 not booting after installing Ubuntu 14.04.03

Okay, finally got it to work this morning.

This time I installed both to the SSD again, making extra sure to direct Ubuntu to the Windows EFI partition during installation.

The only two things I really did differently this time was formatting the HDD in GPT and running chkdsk three times on both the SSD and HDD, so thank you very much to oldfred for those suggestions.

Worked perfectly.


Pretty simple installation explanations, but in case you've missed it:
Tutorial
It's for 12.10 but should work the same.
From what I've read elementary is still in heavy development and while I use some elements on a xfce install, I cannot really talk about the whole shell.
Good luck,


A simple man -k umask should have led you to reading man pam_umask, whish says, in part:

DESCRIPTION
pam_umask is a PAM module to set the file mode creation mask of the
current environment. The umask affects the default permissions assigned
to newly created files.

It also says,

The PAM module tries to get the umask value from the following places
   in the following order:

   ·   umask= argument

   ·   umask= entry in the user's GECOS field

   ·   UMASK= entry from /etc/default/login

   ·   UMASK entry from /etc/login.defs (influenced by USERGROUPS_ENAB in
       /etc/login.defs)


Need a udev rule to create a symbolic link to a usb memory stick when it is plugged in

This works:

ACTION=="add", ENV{ID_BUS}=="usb", ENV{ID_FS_LABEL}=="58??????", RUN+="/bin/rm /media/ubuntu/USB", RUN+="/bin/ln -s /media/ubuntu/$env{ID_FS_LABEL} /media/ubuntu/USB"
ACTION=="remove", ENV{ID_BUS}=="usb", ENV{ID_FS_LABEL}=="58??????", RUN+="/bin/rm /media/ubuntu/USB"

Apparently we have to use the complete pathname for any commands we want to run.


Kernel panic - Not syncing: Attempted to kill init! exitcode=0x00000009

The issue I was experiencing seemed to be a temporary one.  A few days since posting a new kernel version has been made available for my system (3.13.0-58.97).  After updating to this latest version the kernel panic has stopped and the system behaves as expected.  Somewhat silly but for anyone else with this issue you can simply revert to an older kernel until a newer patch is made available.


How to know where is the driver for a device ?

usually drivers come in the form of kernel modules. these are stored under /lib/modules/<kernel-version>. you can find out what your <kernel-version> is using:

uname -r

as an example, you can find the modules directory like so:

echo "Modules directory: /lib/modules/$(uname -r)"

and then cd to it with cd /lib/modules/$(uname -r). the modules are separated into their respective folders, however some modules are built into the kernel itself, and I'm guessing generic drivers such as mice drivers and keyboard ones would be built in.

I'm not 100% sure this answers your question as it seems you may want to find a mouse driver which doesn't "exist" as such if you're looking for it as a physical file, but I hope it helps.


Lauchpad Bug #1251281

seems to be related with this issue - user208193, please add yourself as "Affects to me" if you agree.


Use this manual (section 'Connecting using CIFS') to mount remote repository:
https://help.ubuntu.com/community/Samba/SambaClientGuide

sudo mount -t cifs //IP_ADDRESS/git/repo.git ~/git/mnt/repo.git -o username=samba_user,noexec

Then,

git clone ~/git/mnt/repo.git/


As you noticed, Ubuntu 12.04 LTS ships with python3 3.2.3. If you need Python 3, then I suggest to upgrade to Ubuntu 14.04 LTS which includes python3 3.4.1.

If you cannot do that, consider something like virtualenv.


Oh.., after multiple tries I got it working myself and it has taken upto now. The links are very nice tutorials and I could fix the issues I had this way.

  Also I am not understanding whether mysql-server or mysql-client need to be installed along with mysql-cluster else mysql-cluster alone is enough for running mysqld on SQL nodes.

A: I am not sure if mysql-cluster works along mysql-server and mysql-client which are already installed from apt but I am sure that those or any extra package are NOT required  for mysql-cluster on Ubuntu as it itself has all the packages. So I can run mysqld from cluster extracted package and nothing required for this to install additionally for SQL nodes.

  ./bin/mysqld_safe --user=mysql --defaults-file=/etc/my.cnf &

A: No need to run mysqld manually and instead can use /etc/init.d/mysql.server start copying from /usr/local/mysql/support-files/mysql.serverto start mysqld/SQL node.

  Starting MySQL
   * Couldn't find MySQL manager (/usr/bin/mysqlmanager) or server (/usr/bin/mysqld_safe)

A: The above was the error encountered while trying to start mysql.server and that was because I had mysql-server and mysql-client already installed. Those should be completely removed(I'm not sure if can run cluster successfully along with them) and I did. Those were not completely removed(probably I have to use apt --purge remove). Check with dpkg --get-selections | grep mysql, if you find deinstall then those are not completely uninstalled, which should be, else one will have to face above error. Executing below command completely removed them and I could start mysql.server with no errors.

aptitude purge $(dpkg --get-selections | grep deinstall | sed s/deinstall//) #To completely remove all deinstall package
pkill -9 mysqld
/etc/init.d/mysql.server

  ............ * Manager of pid-file quit without updating file.

A: I faced the above error many times in my testing while trying to start mysql.server. I could avoid this by simply granting permission on data to mysql user like chown -R mysql:mysql /usr/local/mysql/data, this mistake was because I was trying extracting mysql-cluster newly number of times and thus the error as the user mysql could not create pid file under data directory for no permission and error log under /var/lib/mysql-cluster on sql/data node helped me trace this.

Should be very specific in assigning to /usr/local/mysql/data, if you just do chown -R mysql:mysql /usr/local/mysql and keep quiet, it won't work and same error is thrown!

After granting permission , check mysqld is working and running by issuing /usr/local/mysql/bin/mysql -uroot -p. Even after entering password you cannot connect and throws error, then mysql root password is not set or you forgot. Use below command to reset mysql root password, and then try connecting again:

/usr/local/mysql/bin/mysqladmin -uroot password your-new-password-here

Neither I am satisfied with the answer nor I am willing to accept and award myself as I have many more to do in this clustering. I am willing to update my question with more queries and await to award points to other who is going to answer. UPDATED QUESTION!

Thank you!

Update

We thought of using MySQL Cluster for production web servers where apache-tomcat serving some static and jsp pages but because of slow joins, no support for foreign keys and so on... issues which are crucial in our environment and works fine in Innodb engine than NDB, I am ending not using mysql cluster and looking back to replication again though it has sync issues. Thank you!


How to get terminal back after I suspend a computer over SSH?

Enter SSH escape codes! From man ssh:

ESCAPE CHARACTERS
 When a pseudo-terminal has been requested, ssh supports a number of
 functions through the use of an escape character.

 A single tilde character can be sent as ~~ or by following the tilde by a
 character other than those described below.  The escape character must
 always follow a newline to be interpreted as special.  The escape
 character can be changed in configuration files using the EscapeChar
 configuration directive or on the command line by the -e option.

 The supported escapes (assuming the default ‘~’) are:

 ~.      Disconnect.

 ~^Z     Background ssh.

 ~&      Background ssh at logout when waiting for forwarded connection /
         X11 sessions to terminate.

So: press Enter~..


Need to restart network interfaces and kill wpa_supplicant, how to fix?

I had the same problem. It turns out that Network manager is a little overzealous in switching between access points (AP's) when more than one are present. You have two options

Use iwlist to find out how many AP's are there:

root@debian:/home/nofrills# iwlist wlan0 scan

Scan completed :
  Cell 01 - Address: 00:1E:58:A1:41:87
            ESSID:"iiserk_wireless"
            Mode:Managed
            Frequency:2.462 GHz (Channel 11)
            Quality:4/5  Signal level:-64 dBm  Noise level:-92 dBm
            IE: IEEE 802.11i/WPA2 Version 1
                Group Cipher : TKIP
                Pairwise Ciphers (2) : TKIP CCMP
                Authentication Suites (1) : 802.1x
               Preauthentication Supported
            Encryption key:on
            Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                      12 Mb/s; 24 Mb/s; 36 Mb/s; 9 Mb/s; 18 Mb/s
                      48 Mb/s; 54 Mb/s

  Cell 02 - Address: 00:1E:58:A1:54:7B
            ESSID:"iiserk_wireless"
            #More such details

Then note the Address of the cell with the highest Quality. That is the AP nearest to you. Then click on Network manager applet, select "Edit Connections" and go to the wifi network listed. There will be a text box titled "BSSID". Paste the Cell address there.
Otherwise, you can ditch network manager altogether and use wpa_supplicant (Network manager uses it under the hood anyway). Just create a configuration file and edit your /etc/network/interfaces this way:

auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet dhcp
    pre-up wpa_supplicant -B -Dwext -i wlan0 -c/etc/wpa_supplicant.conf
    post-down killall -q wpa_supplicant

Option 1 is not very useful unless you spend most of your time at workplace in roughly the same location. Option 2 is what I am using now, and it works pretty well. But wifi does not get automatically reconnected after suspend/resume, so you need to run /etc/init.d/networking/restart manually.

If you like doing things neatly, as an alternative to the generic killall command, you can use the WPA specific tool wpa_client:

wpa_cli -i wlan0 terminate


Gnome 3.18 Activities overview and application list very slow with Ubuntu 15.10

I was experiencing the same issue. What worked for me was:

1) Activities > Settings > Search

2) Turn off all the stuff that you don't need to search

In my case, I was able to mitigate the problem quite a lot because I only use the search to launch applications quickly, hence I turned off most of the stuff. I imagine that searching for files, documents and photos causes the most slowdown. I hope this works for you too.


Shrinking down ext4 partition not working, Oracle VM (W8 host / Ubuntu 13.04 guest)

Are you trying to shrink the / logical volume or the block device (virtual disk) that EVEServer PV is based on?

If it is a dynamically allocated virtual disk, you don't need to worry about the physical size of the VDI too much.

VBoxManage modifyhd --compact is used to shrink the VDI image - which removes blocks that only contains zeros (zero out virtual HDD required beforehand). It will shrink a dynamically allocated image, reduce the physical size of the VDI.

You need to use the --resize option to change the capacity of an existing VDI image. However, this works with dynamically allocated disk ONLY, and it is capable to expand ONLY, not shrink.

See => VBoxManage modifyhd


Only Guest User login is Available in my new Dell Vostro Laptop

You can user recovery password procedure to gain admin
1. Use this link to gain access to shell
2. Get list of existing users and find the admin username (and change his password using the above) or add new admin user. You can find details in this link on how to get list of users and adding  a new username.


What does the "Basic Ubuntu Server" package contain in software selection during installation?

In the spirit of teaching a man to fish...

You can find a list of tasks and their proper names with the command:

tasksel --list-tasks

This will tell you that the "Basic Ubuntu Server" task is named "server".  With this name, you can generate a list of the related packages:

tasksel --task-packages server

For example, on Ubuntu "Quantal" 12.10:

steven@lat:~$ tasksel --task-packages server | sort
acpid
apport
apport-symptoms
bc
byobu
consolekit
curl
ethtool
fonts-ubuntu-font-family-console
landscape-common
libck-connector0
libcurl3
libevent-2.0-5
libgc1c2
libgpm2
libiw30
libnl-3-200
libnl-genl-3-200
libpam-ck-connector
libpcsclite1
libpolkit-agent-1-0
libpolkit-backend-1-0
libpython2.7
libwhoopsie0
patch
policykit-1
python
python2.7
python2.7-minimal
python3-apport
python3-problem-report
python-apt
python-chardet
python-debian
python-gdbm
python-gnupginterface
python-minimal
python-newt
python-openssl
python-pam
python-pkg-resources
python-serial
python-six
python-twisted-bin
python-twisted-core
python-zope.interface
screen
tmux
update-notifier-common
vim
vim-runtime
w3m
whoopsie
wireless-tools
wpasupplicant
xz-utils
steven@lat:~$


Lubuntu boots into Terminal. Xorg cant connect to Zlib

Consider to remove wrongly installed local version of libz and reinstall normal one from repository:

sudo rm /usr/local/lib/libz.so.1
sudo apt install --reinstall zlib1g

Note: do not install system-wide libraries to /usr/local/lib next time!


How do I commit changes to a text file on button press?

If you want to store configuration like this, what I recommend you do is to use the Python ConfigParser module. Please note you should ensure you store config files in ~/.config/<your-app-name>. You can store config like this:

import ConfigParser
import xdg.BaseDirectory

# set the configdir to ~/.config/ushare
configdir = os.path.join(xdg.BaseDirectory.xdg_config_home, "ushare")

# check if the dir exists and if not, create it
if not os.path.exists(configdir):
    os.makedirs(configdir)

# create configparser object
config = ConfigParser.RawConfigParser()
cfile = os.path.join(configdir, "ushare.conf")

# add your config items - see the ConfigParser docs for how to do this

# later in your app add this when the user presses the button to save the config:

with open(cfile, 'wb') as configfile:
    config.write(configfile)

Please note: I didn't actually run this code and just wrote it here, but it should work fine.


Kubuntu 18.04 can't set default web browser

Not ideal but I used the with the following command: option on Default Applications dialog in Kubuntu 18.04. For Firefox I would assume this would work: /usr/bin/firefox %s. I prefer Google Chrome so I used: /usr/bin/google-chrome %s


Glade Ubuntu - Transparent Button on a background image

For fixed buttons position, it's better to use GtkFixed or GtkLayout (with scroll)
For buttons transparency,  for me it's works as it should. If not try:

Border Relief: None for flat button
Uncheck Focus on Click for avoid any focus highlight

Example:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<interface>
  <requires lib="gtk+" version="3.10"/>
  <object class="GtkWindow" id="window1">
    <property name="can_focus">False</property>
    <child>
      <object class="GtkLayout" id="layout1">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <child>
          <object class="GtkButton" id="button1">
            <property name="label" translatable="yes">button</property>
            <property name="width_request">59</property>
            <property name="height_request">30</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
            <property name="opacity">0</property>
          </object>
          <packing>
            <property name="x">87</property>
            <property name="y">64</property>
          </packing>
        </child>
      </object>
    </child>
  </object>
</interface>

For 1st time, I thought you mean Desktop Background. So, I just leave it may be helpful for others.

I'm not sure which version of PyGTK is used by Quickly in (Ubuntu 13.04). Better to use 0.1 opacity to test. Glade does not provide the option to set keep_below property.

PyGTK 3

Add:

    <property name="opacity">0.0</property>
    <property name="decorated">False</property>

To

builder_example.glade

<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <!-- interface-requires gtk+ 3.0 -->
  <object class="GtkWindow" id="window1">
    <property name="can_focus">False</property>
    <!-- <property name="keep_below">True</property> -->
    <property name="opacity">0.0</property>
    <property name="decorated">False</property>
    <!-- <property name="position">gtk.WIN_POS_CENTER_ALWAYS</property> -->
    <signal name="delete-event" handler="onDeleteWindow" swapped="no"/>
    <child>
      <object class="GtkButton" id="button1">
        <property name="label" translatable="yes">button</property>
        <property name="use_action_appearance">False</property>
        <property name="visible">True</property>
        <property name="can_focus">True</property>
        <property name="receives_default">True</property>
        <property name="use_action_appearance">False</property>
        <signal name="pressed" handler="onButtonPressed" swapped="no"/>
      </object>
    </child>
  </object>
</interface>

I have commented these, as they raised errors (I'm not sure if there is other way in Glade)

    <!-- <property name="keep_below">True</property> -->
    <!-- <property name="position">gtk.WIN_POS_CENTER_ALWAYS</property> -->

So, I add them to .py file to be applied dynamically:

window.set_keep_below(True)
window.set_position(Gtk.WindowPosition.CENTER_ALWAYS)

builder_example.py

from gi.repository import Gtk

class Handler:
    def onDeleteWindow(self, *args):
        Gtk.main_quit(*args)

    def onButtonPressed(self, button):
        print("Hello World!")

builder = Gtk.Builder()
builder.add_from_file("builder_example.glade")
builder.connect_signals(Handler())

window = builder.get_object("window1")
window.set_keep_below(True)
window.set_position(Gtk.WindowPosition.CENTER_ALWAYS)
window.show_all()

Gtk.main()

PyGTK 2

Add:

        self.window.set_keep_below(True)
        self.window.set_opacity(0.0)
        self.window.set_decorated(False)
        self.window.set_position(gtk.WIN_POS_CENTER_ALWAYS)

to helloworld.py

#!/usr/bin/env python

# example helloworld.py

import pygtk
pygtk.require('2.0')
import gtk

class HelloWorld:

    # This is a callback function. The data arguments are ignored
    # in this example. More on callbacks below.
    def hello(self, widget, data=None):
        print "Hello World"

    def delete_event(self, widget, event, data=None):
        # If you return FALSE in the "delete_event" signal handler,
        # GTK will emit the "destroy" signal. Returning TRUE means
        # you don't want the window to be destroyed.
        # This is useful for popping up 'are you sure you want to quit?'
        # type dialogs.
        print "delete event occurred"

        # Change FALSE to TRUE and the main window will not be destroyed
        # with a "delete_event".
        return False

    def destroy(self, widget, data=None):
        print "destroy signal occurred"
        gtk.main_quit()

    def __init__(self):
        # create a new window
        self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)

        # Add these
        self.window.set_keep_below(True)
        self.window.set_opacity(0.0)
        self.window.set_decorated(False)
        self.window.set_position(gtk.WIN_POS_CENTER_ALWAYS)

        # When the window is given the "delete_event" signal (this is given
        # by the window manager, usually by the "close" option, or on the
        # titlebar), we ask it to call the delete_event () function
        # as defined above. The data passed to the callback
        # function is NULL and is ignored in the callback function.
        self.window.connect("delete_event", self.delete_event)

        # Here we connect the "destroy" event to a signal handler.
        # This event occurs when we call gtk_widget_destroy() on the window,
        # or if we return FALSE in the "delete_event" callback.
        self.window.connect("destroy", self.destroy)

        # Sets the border width of the window.
        self.window.set_border_width(10)

        # Creates a new button with the label "Hello World".
        self.button = gtk.Button("Hello World")

        # When the button receives the "clicked" signal, it will call the
        # function hello() passing it None as its argument.  The hello()
        # function is defined above.
        self.button.connect("clicked", self.hello, None)

        # This will cause the window to be destroyed by calling
        # gtk_widget_destroy(window) when "clicked".  Again, the destroy
        # signal could come from here, or the window manager.
        self.button.connect_object("clicked", gtk.Widget.destroy, self.window)

        # This packs the button into the window (a GTK container).
        self.window.add(self.button)

        # The final step is to display this newly created widget.
        self.button.show()

        # and the window
        self.window.show()

    def main(self):
        # All PyGTK applications must have a gtk.main(). Control ends here
        # and waits for an event to occur (like a key press or mouse event).
        gtk.main()

# If the program is run directly or passed as an argument to the python
# interpreter then create a HelloWorld instance and show it
if __name__ == "__main__":
    hello = HelloWorld()
    hello.main()

References:

Python GTK+ 3 Tutorial: 20. Glade and Gtk.Builder
PyGTK 2.0 Tutorial: Chapter 2. Getting Started
PyGTK 2.0 Reference Manual: gtk.Window - The gtk Class Reference


Many website doesn't load in Ubuntu 16.04

It's a known bug:

https://bugs.chromium.org/p/chromium/issues/detail?id=664177

The bug has been squashed upstream, and they say that "the updated package should be released soon".
This bug was fixed in the package chromium-browser - 53.0.2785.143-0ubuntu0.14.04.1.1145" (source: https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1641380)


This was a hardware problem. I had the scanner attached via a USB switch to easily share it between different computers. It did not work with a USB3 port (limited cable length as per the USB spec), but as soon as I moved it to the USB2 port, everything worked.


best Linux distro to install on an usb Flash (full installation)

I have Bodhi Linux 2.4.0 installed on an 8gb flash drive which runs quite well indeed and use it for a backup Os just-in-case their is a problem with the main one...  It's small, fast, stable and quite basic meaning you can put your own programs right on there...