Package php7.2-mbstring unmet dependencies in Ubuntu 18.04

You are missing some necessary channels from sources.list. Do sudo gedit /etc/apt/sources.list and make it look like this:

deb http://archive.ubuntu.com/ubuntu bionic main multiverse restricted universe
deb http://archive.ubuntu.com/ubuntu bionic-security main multiverse restricted universe
deb http://archive.ubuntu.com/ubuntu bionic-updates main multiverse restricted universe

Save and exit.
Then update your repository:

sudo apt update

Then install php-mbstring:

sudo apt install php7.2-mbstring


Wifi,Blutooth,Web Cam is not been detected by Ubuntu 12.10 lts

Try upgrading the kernel. Just run

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

Generally drivers are included in the kernel so you need to upgrade the kernel. Try using Ubuntu 13.10. I also had some problems with my laptop even after upgrading the kernel of 12.04 . But 13.04 solved everything . So you should try 13.10 .


Gnome panel and menu bar can't be clicked..!

Your gnome settings are corrupted some how. Instead of spending time debugging them all, your quickest solution is to create a new user and move over your document files. The other option is to try and reset the options for gnome:

From a terminal which you can get to by going Applications > Accessories > Terminal, copy and paste the following:

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

This will remove all of your gnome settings and set them to the default settings. These files are normally hidden files and you don't normally see them in your home folder from nautilus (nautilus is the file manager that is shown when you go to Places > Home).

Log off and back on to apply the changes.


If the /home on the root partition contains files and data you want to keep, then yes. If not, then you can simply wipe it away. I recommend doing this from an Ubuntu installation disk (or administration mode if you know how to use that - you don't want to be logged into the GUI for this one on your live box).

If you are using the live CD environment, you will need to mount your root partition - open a terminal and type

mkdir -p /mnt/filesystem
mount /dev/sda1 /mnt/filesystem

Modify /dev/sda1 to reflect your actual root filesystem. Then in the terminal you will need to cd /mnt/filesystem as the following instructions about editing the /etc/fstab file apply to the one stored on your actual Ubuntu installation's root partition, not the one in the liveCD environment.

You'll need to edit the /etc/fstab file to tell it to mount your home directory disk partition to /home. On my machine, my home directory is on /dev/sda6, which uses the ext4 filesystem. So the line in my /etc/fstab file looks like this:

/dev/sda6    /home       ext4       defaults      1  2

This tells the kernel to mount that partition in /home as ext4 (replace if you use a different filesystem), with default options (usually OK), and the 1 and 2 indicate it is to be backed up by dump (if you use that - safe to ignore otherwise) and will be checked if the system detects filesystem corruption (you probably want this).


I don't have an AAC file at hand, but I believe that kid3 does it.
Install it using the software center or get the latest version here: http://kid3.sourceforge.net/


LibreOffice (Writer, Calc, Impress) not appearing in launcher

I do have this problem sometimes. A solution which works is to press Alt + F2 and type xkill. The mouse pointer will change to an "x".

Then press the super (windows) button on the keyboard to show the launcher and click on the launcher. Launcher will be killed and relaunched automatically.


Openoffice Installation and the results?

Check the Installation Guide and the Installation FAQs.


Ubuntu 16.04 Snapd error: Download snap "ubuntu-core" from channel "stable"

It looks like snapd is not connected to the server.
Try to see if snapd is running properly. You can even try restarting snapd.

systemctl restart snapd

What device are you running it on? I experienced a similar issue in which the image was not compatible with the latest snap updates.


Based on the output of ./configure --help, there's no config option to enable every input/video/audio/interface etc pp plugin in a single step.

But you could restrict the output of ./configure --help to those options that are disabled by default: ./configure --help |grep disabled. This will return something like

--cache-file=FILE   cache test results in FILE [disabled]
--enable-non-utf8       support legacy non-UTF-8 systems (default disabled)
--enable-debug          build with run-time assertions (default disabled)
--enable-gprof          profile with gprof (default disabled)
--enable-cprof          profile with cprof (default disabled)
--enable-coverage       build for test coverage (default disabled)
--enable-run-as-root    allow running VLC as root (default disabled)
--enable-pvr            support PVR V4L2 cards (default disabled)
--enable-vcdx           navigate VCD with libvcdinfo (default disabled)
--enable-realrtsp       Real RTSP module (default disabled)
--enable-wma-fixed      libwma-fixed module (default disabled)
--enable-shine          shine mp3 encoding module (default disabled)
--enable-omxil          openmax il codec module (default disabled)
--enable-iomx           iomx codec module (default disabled)
--enable-merge-ffmpeg   merge FFmpeg-based plugins (default disabled)
--enable-switcher       Stream-out switcher plugin (default disabled)
--enable-faad           faad codec (default disabled)
--enable-real           Real video decoder module (default disabled)
--enable-tremor         Tremor decoder support (default disabled)
--enable-egl            OpenGL support through EGL (default disabled)
--enable-android-surface   Android Surface video output module (default disabled)
--enable-ios-vout    iOS video output module (default disabled)
--enable-directfb       DirectFB support (default disabled)
--enable-aa             aalib output (default disabled)
--enable-audioqueue     AudioQueue audio module (default disabled)
--enable-opensles       Android OpenSL ES audio module (default disabled)
--enable-hildon         Hildon touchscreen UI (default disabled)
--disable-ncurses       ncurses interface support (default disabled)
--enable-xosd           xosd interface support (default disabled)
--enable-fbosd          fbosd interface support (default disabled)
--enable-lirc           lirc support (default disabled)
--enable-update-check   update checking system (default disabled)
--enable-growl          growl notification plugin (default disabled)
--enable-media-library  media library (default disabled)

This list may be a good starting point to decide what to enable. Just enabling every option without checking the consequences won't be wise, the build will likely fail due to missing libs. Additionally, you should double-check if that list does cover all important options; i didn't check the full output of  ./configure --help en detail.


What are the different Unity Web-apps that are available?

These are the different unity-webapps that can be installed in 12.10

By default 12.10 comes with all the webapps. In case if you want to install manually, then use the command

sudo apt-get install unity-webapps-*

Note: Currently these apps will work on Firefox/Chromium browser

Amazon Cloud Reader

Package name: unity-webapps-amazoncloudreader
Angry Birds

Package name: unity-webapps-angrybirds
BBC News

Package name: unity-webapps-bbcnews
Cut The Rope

Package name: unity-webapps-cuttherope
Facebook

Package name: unity-webapps-facebookapps
Facebook Messenger

Package name: unity-webapps-facebookmessenger
GMail

Package name: unity-webapps-gmail
Google Reader

Package name: unity-webapps-googlecalendar
Google docs

Package name: unity-webapps-googledocs
Google +

Package name: unity-webapps-googleplus
Grooveshark

Package name: unity-webapps-grooveshark
Hulu Player

Package name: unity-webapps-hulu-player
last.fm

Package name: unity-webapps-lastfm-radio
Launchpad

Package name: unity-webapps-launchpad
Libre FM

Package name: unity-webapps-librefm
Linkedin

Package name: unity-webapps-linkedin
Live Mail

Package name: unity-webapps-livemail
Mail ru

Package name: unity-webapps-mail-ru
News blur

Package name: unity-webapps-newsblur
Pandora

Package name: unity-webapps-pandora-com
QQ Mail

Package name: unity-webapps-qq-mail
Reddit

Package name: unity-webapps-reddit
Tumblr

Package name: unity-webapps-tumblr
Twitter

Package name: unity-webapps-twitter
VKcom

Package name: unity-webapps-vkcom
Wordpress

Package name: unity-webapps-wordpress-com
Yahoo Mail

Package name: unity-webapps-yahoomail
Yahoo News

Package name: unity-webapps-yahoonews
Yandex Music

Package name: unity-webapps-yandex-music
Yandex News

Package name: unity-webapps-yandexnews
YouTube

Package name: unity-webapps-youtube


In the XFCE settings, when you select to change the folder, you cannot select any images. Select the folder where your image is, press Open and THEN select it from the menu.


How do I change the language of the console permanently?

Run the following command to save it in your ~/.bashrc file so that every time you open an interactive non-login terminal your locale will be set accordgly:

echo 'export LANG=C' >>~/.bashrc

Note than the C locale uses ASCII character set, if you want Unicode then use a locale that supports it e.g.:

echo 'export LANG=en_US.UTF-8' >>~/.bashrc

To make changes available from the running session, source the ~/.bashrc file:

source ~/.bashrc


Looks as if you have the gma500.
https://wiki.ubuntu.com/HardwareSupportComponentsVideoCardsPoulsbo#Live_.28Desktop.29_CD

The problem with 12.04 is that the default kernel included on the desktop CD (all variants) is 3.3.2. This kernel works, but requires some custom boot parameters. Without these parameters you will either get a black screen or distortion.
Switch to a console - Ctrl-Alt-F1
Restart X with 'sudo service lightdm restart'
That should bring you back to a functional graphical desktop, so that you can proceed testing or installing.

https://wiki.ubuntu.com/HardwareSupportComponentsVideoCardsPoulsbo#Post_installation


How do I increase the font size for a specific application in Ubuntu 18.04 running Gnome?

Create a script call ue (Unity Editor). Place within it:

#!/bin/bash
xrandr --dpi 144
unity-editor "$@"    # Or whatever the program is you want to run

Mark the script as executable using:

chmod a+x ue

Call the script using

./ue

Or replace ./ with the directory name if not in the current directory
Or leave off ./ if you have placed ue in your $PATH like ~/bin or /usr/local/bin

Adjust 144 to 192 if you want it double magnification. Smaller if you want less magnification.

Your screen may blink when script starts up but that is normal.

TL;DR

The default DPI (Dots Per Inch) is 96. When set to 100 font size increased by 4% which might not be noticeable. To confirm initial DPI use one of these commands:

$ xdpyinfo | grep dots
  resolution:    96x96 dots per inch

$ grep DPI /var/log/Xorg.0.log
[     9.555] (--) NVIDIA(0): DPI set to (43, 44); computed from "UseEdidDpi" X config
[     9.761] (==) modeset(G0): DPI set to (96, 96)

In the above script you can reset xrandr back to default DPI of 96 by adding the following line to the bottom:

xrandr --dpi 96

I've never encountered a need to do this, but you might.


Find the maximum of the lengths of all filenames in a directory

A script rather than a function. This prints the number of characters in the longest filename, which is what I understood you wanted:

#!/bin/bash

# include hidden files
shopt -s dotglob
# if the first argument is a directory
if [ -d "$1" ]; then
    # move to that directory
    cd "$1"
    # set a variable to 0
    long=0
    # loop over all the files
    for i in *; do
        # print the filename - remove this line after testing
        echo "$i"
            # if the length of the current filename is longer
            # than the value of the variable long, assign the
            # length of the current filename to long
            (( (${#i} > $long) )) && long=${#i}
    done
        # print the value of long
        echo $long
    # if the first argument wasn't a directory, print an error
    else
        printf "%s\n" "Not a directory"
fi

This makes use of the dotglob setting, which causes globbing with * to include hidden files. To see the effect of it, run these commands in your home directory:

ls -d *
shopt -s dotglob
ls -d *

To turn off shopt settings, use -u for example shopt -u dotglob.

We need to check the argument is a directory, so we use if and the test command (in its [ form) which has a test for directories, -d:

if [ -d "$1" ]; then

this means, if the first argument passed to the script is the name of a directory that exists, then do the following. $1 is the first argument, and we enclose it in double quotes to stop the shell from performing further expansions on the value of the variable.

We need to go into the directory, because we need to get the length of the filename, not the whole path (absolute or relative). We don't want this:

$ for i in ~/*; do [ -d "$i" ] && echo "$i"; done
/home/zanna/custom
/home/zanna/Desktop
/home/zanna/Documents
/home/zanna/Downloads
...

because if we count the length of $i we will get the length of the full path. We could do some text processing antics (and maybe some cleverer tricks I don't know) to get rid of the path, but parsing filenames is generally unreliable and if we change directory we can easily get the shell to count characters for us using ${#var} to give the length of var (I believe that this counts characters and not bytes). Note that scripts run in a child shell, not in the current shell, so if a script changes directory, the working directory of the shell that calls the script isn't affected.

My script uses for to loop over the files in the directory. The line that does the work is

(( (${#i} > $long) )) && long=${#i}

This means, if the length of the current value of i is greater than the current value of long, then assign the length of i to long. Since we first set long to 0, the first filename will always be longer than long (because it's as short as possible). Thereafter, only the length of longer filenames will be able to replace the value of long. Since we know ${#i} and long will only contain integers, we don't need to protect them with double quotes. (( creates an arithmetic context in Bash so we can use > with its mathematical meaning (thanks to muru for pointing that out to me elsewhere).


I used a desktop session of a second user and it worked flawlessly,it would appear it's not possible over SSH.


In 8.04, vim-perl became a transitional package for vim-gtk which has all the languages. Find more information here.


Why do I have an issue installing Lubuntu 17.04 with encryption?

Use 14.04 Lubuntu instead of 17.04, then update.


As far as I know you don't need fingerprint-gui in 18.04.

You need to install these packages to get it working:

sudo apt install -y fprintd libpam-fprintd

and then  update your PAM configuration.

sudo pam-auth-update

Then you need to open Settings - Users, enable Fingerprint Login.

P.S. (if you use gnome-keyring)

Gnome-keyring is still cannot be unlocked with the fingerprint, you will need to enter your password at login or in the gnome-keyring propmt window to unlock it.


Initialize start-up applications in certain workspaces?

Yes , thats possible using gdevilspie ( GUI of devilspie) :

Open Terminal and type the following coommand :

sudo apt-get install gdevilspie

Now open gdevilspie with (Alt + F2, gdevilspie, Enter).

Click start daemon and automatically on login .

Example here is Skype ( you should set it to run on startup ) :

devilspie Here

Now restart daemon and try .


ACPI not running custom script on power button press

As the post that @tuknutx mentions says, acpid no longer handles  power button events. They're now handled by systemd's logind . I was quite surprised by this because I had assumed that Ubuntu wasn't using systemd components this release.


How do I confirm my VPN connection is working and make it start automatically on 12.04 server via commandline?

I've mostly solved this except for making the VPN start when the computer does, but here is my solution.

I originally was using the link above, but after a week of learning and mucking about, I have my own solution using the link above as a starting point (thanks Eliah for reminding me)

So, following the link above, I installed pptp-linux and then I edited /etc/ppp/peers/vpnconfigname to this:

sudo nano /etc/ppp/peers/vpnconfigname
pty "pptp vpndomain --nolaunchpppd"
noproxyarp
ipparam vpnname
remotename vpnname
name vpnuser
require-mppe-128
nobsdcomp
nodeflate
defaultroute
replacedefaultroute
persist
lock
noauth
passive
multilink
refuse-eap
refuse-chap
refuse-mschap

then in this /etc/ppp/chap-secrets:

sudo nano /etc/ppp/chap-secrets
# Secrets for authentication using CHAP
# client        server  secret                  IP addresses
vpnusername        *    vpnpassword            *

Finally to make it run on boot edit /etc/rc.local:

sudo nano /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

pon vpnconfigname
exit 0

Now start it with sudo pon vpnconfigname (whatever the file is called at /etc/ppp/peers/ ) stop it with sudo poff vpnconfigname
If you need debug, add it to the config file before launching.
Once it's on, you can use ifconfig and route to check if it's connected, then I use tracepath and w3m ipchicken.com to check if I'm going through the vpn or not.

Cheers!


You can set it from the Recovery Menu when you boot your system up.  Here is some good step by step instructions on getting your system into Recovery Mode so that you can fix the user settings.  The biggest part is to get the root partition mounted in Read / Write so you can make changes to the user account.

http://www.sysads.co.uk/2014/05/reset-lost-root-password-ubuntu-14-04/

After you have the system booted to Recovery Mode doing the root that they show, type in the following to add your user back to sudo

usermod -a -G sudo username

where you will replace username with your own username.

Reboot your system, and you should have sudo capabilities back on your account.


Wireless keeps disconnecting in Ubuntu 12.04.03

This is a bug on the driver that hasn't been fixed in Precise. There are some workarounds in the web, but the results aren't consistent (some works for somebody, others not).

Replace the drivers
Configure the driver

For now, click the "Yes, it affects me" button and wait for a fix.


Ubuntu desktop 16.10 - No network inside terminal

I got it resolved,

I removed all the interfaces from /etc/network/interfaces so that
they won't conflict with the interfaces that are defined in the
NetworkManager service.
I modified /etc/resolvconf/resolv.conf.d/base and added Google's nameservers
(8.8.4.4 and 8.8.8.8) and then rebooted.

Now everything works fine.


Ubuntu crashes - where can I look for the cause?

Rule out drive issues by check Smart status of the drive(s) as outlined on this page

Run memtest86 to rule out memory errors as described here. If you have an EFI system you'll want V5 or later which support EFI boot. The latest version is available here


Delay mounts after encrypted home folder is ready

The accepted answer doesn't work since non-root users are not able to use the --bind option.
What I used instead was bindfs. It allows non-root users to create bound mounts.
First install bindfs: sudo apt install bindfs. Then, open /etc/fuse.conf and uncomment the line user_allow_other.
Then, in your startup script (which runs after you log in), use the following commands to mount:
bindfs /home/user/Desktop   /home/user/AeroFS/Desktop
bindfs /home/user/Documents /home/user/AeroFS/Documents
bindfs /home/user/Music     /home/user/AeroFS/Music
bindfs /home/user/Pictures  /home/user/AeroFS/Pictures


Wireless internet not working: unclaimed

Your ethernet IS claimed, has a driver and an IP address. Is it your wireless you need help with? Assuming it is, open a terminal and do:

sudo apt-get install linux-firmware-nonfree
sudo modprobe -r b43
sudo modprobe b43

Detach the ethernet and your wireless should now be working.


To use a library in a program you are writing (in C/C++ at least), you need not only the compiled library (the .so - shared object file) but also a header file, which describes the functions and data structures used by the library.

Header files are not usually installed by default. They are usually found in a package called libwhatever-dev, in this case libv8-dev which needs to be installed.

You then need the line:

#include <v8.h>

to include the V8 headers. When compiling, you'll also need to tell g++ to link with the v8 library (-lv8). V8 is a fairly complex beast, and it would probably be wise to find a working example or tutorial to see how they compile it.

Finally, a note on terminology: a script normally refers to code which is executed directly from the readable text form by an interpreter (such as python), whereas this has to be first compiled before it can be run.


After upgrading from 13.04 to 13.10, holding Super no longer brings up the help overlay. Is it possible that a setting got switched somewhere?

I have the same problem on a laptop with a resolution of 1366×768.
Here is the related Launchpad bug report: https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1243233.

After testing this issue with an external monitor with a higher resolution, I found that the problem is probably that, in Ubuntu 13.10, the shortcuts overlay became too big to fit in screens with a vertical resolution of 768 or less (the overlay appears in screens with a higher resolution).

Also, if you disable workspaces (in the appearance settings), the shortcuts overlay should start working (because it becomes smaller).

So, you're probably using a laptop, or a monitor with a low resolution (but, nevertheless, it's a bug that needs to be fixed).


Prefer A (IPv4) DNS lookups before AAAA(IPv6) lookups

It's the standard to prioritize IPv6 over IPv4 to allow next-generation IP take over :)
You can change this by editing the precedence blocks in /etc/gai.conf (gai stands for getaddrinfo, the standard system call for resolving host names). Just comment out the line as described in the file:

#  For sites which prefer IPv4 connections change the last line to
#precedence ::ffff:0:0/96  100

A detailed explanation on gai.conf can be found in the man page.


You will have to recreate the USB drive I am afraid. When you reinstall, make sure you select the computers hard drive as the install destination.


How do I update an Intel motherboard BIOS using Ubuntu?

Go to the Intel download site then download the

  Recovery BIOS Update [RQ0017P.BIO]

setting Display F7 to Update BIOS.
1. Download and save the Recovery BIOS (.BIO) file to a temporary directory.
2. Copy the .BIO to a USB thumb drive.
3. Plug the thumb drive into a USB port of the target computer.
4. Shut down the target computer.
5. Enable the F7 prompt display:
    a. Power the computer on.
    b. Enter the BIOS Setup by pressing F2 during boot.
    c. Go to the Advanced > Boot Configuration menu.
    d. Enable Display F7 to Update BIOS
    e. Press F10 to save and exit.
6. During boot, when the F7 prompt is displayed, press F7 to enter the BIOS Flash Update tool.
7. Select the USB thumb drive and press Enter.
8. Select the .BIO file and press Enter
9. Confirm you want to update the BIOS by pressing Enter.
10. Wait 2-5 minutes for the update to complete.
11. Remove the thumb drive.
12. Restart the computer.


How to set up XFCE4 XKB plugin to remember settings over reboots?

As the best previous answer appears to be commented afterwards by the user as not working anymore, I will give here an updated perfected version of a quite successful workaround. Sorry not to be able to provide a more scientific less empirical approach, I am not an advanced user, just had the luck to get what I want in this case and want to share this, maybe as a temporary patchwork. So, bare with me.
I use Xubuntu, maybe some instructions are limited to that.

My solution is this (my case is English-US as default, second French, third Romanian standard - replace accordingly):

Go to Setting Manager > Keyboard > Layout, and set the languages in the preferred order (delete them and add them in order to achieve this). Go to the properties of the xkb plugin and make the same settings in the same order with the same default language.
Open the file
$HOME/.config/xfce4/xfconf/xfce-perchannel-xml/keyboard-layout.xml
Edit it to look similar to this.
Open the file
$HOME/.config/xfce4/panel/xkb-plugin-##.rc
(replace ## with appropriate number).
Edit it to look similar to this.
Open the file
/etc/default/keyboard
(as root)

Edit it accordingly:

XKBMODEL="pc105"
XKBLAYOUT="us,fr,ro"
XKBVARIANT=",,std"
XKBOPTIONS="grp:alt_shift_toggle"

Maybe not all these are necessary to make it work, but just in case...


Well, apparently the bookmark file used by Nautilus, ~/.config/gtk-3.0/bookmarks, was overwritten with an error log which resulted in the gibberish directories in the sidebar. Removing the bookmarks file then restarting to recreate it solved the problem.


resolv.conf auto reset by dnsmasq after install libvirt-bin

Not dnsmasq but some other package was overwriting /etc/resolv.conf. See /usr/share/doc/resolvconf/README.gz in the resolvconf package for an incomplete list of packages that overwrites /etc/resolv.conf.

As of Ubuntu 12.04 the resolvconf package is part of the base system and resolvconf mediates access to /etc/resolv.conf. See resolvconf(8).


Can I use the terminal to move images to specific directories using the images 'tag'?

You could use exiftool, to get meta information from jpg, png files. To install exiftool, run:

$ sudo apt-get install libimage-exiftool-perl

Usage: exiftool -s example.jpg

It seems the most complete info is stored as TagsList. It even supports hierarchical tags saved by Shotwell e.g., nature/sky. The tags can be also found in Subject, Keywords, LastKeywordXMP fields. Subject, Keywords do not preserve the tag hierarchy—you can use them if you don't want to create nested directories for nested tags.

Here's python3 script that moves image files specified on the command line to the corresponding tag directories (by creating hardlinks and removing original filename) e.g., if example.jpg has the tags list: nature, nature/clouds, nature/mountain, nature/sky then the result directory tree looks like:

.
└── nature
    ├── clouds
    │   └── example.jpg
    ├── example.jpg
    ├── mountain
    │   └── example.jpg
    └── sky
        └── example.jpg

Note: always backup your data before running potentially destructive commands (bugs happen):

#!/usr/bin/env python3
"""Move image files to their tag directories by creating hardlinks.

Usage: move-to-tag-dirs <image>...
"""
import json
import os
import sys
from subprocess import Popen, PIPE

TAGNAMES = ['TagsList', 'Keywords', 'Subject']
__version__ = '0.3.1'

def move_to_dirs(filename, dirs):
    """Move *filename* to *dirs* by creating hardlinks.

    Create destination directories if they don't exist.
    """
    for dirname in dirs:
        os.makedirs(dirname, exist_ok=True)
        dest_filename = os.path.join(dirname, os.path.basename(filename))
        os.link(filename, dest_filename)  # create hardlink
    if dirs:  # created at least one new link
        os.unlink(filename)  # remove old

if len(sys.argv) < 2:
    sys.exit(__doc__)  # print usage

command = ['exiftool', '-json'] + ['-' + t for t in TAGNAMES] + sys.argv[1:]
try:
    process = Popen(command, stdout=PIPE, stderr=PIPE, universal_newlines=True)
except OSError as e:
    sys.exit("error: can't start exiftool: " + str(e))
else:
    output, errors = process.communicate()
    if process.returncode != 0:
        sys.exit("error: can't read tags info: exiftool exit code: %d: %s" % (
            process.returncode, errors))

for metadata in json.loads(output):
    # get first available tags list
    dirs = next(filter(None, map(metadata.get, TAGNAMES)), [])
    if isinstance(dirs, str):  # single tag
        dirs = [dirs]
    try:
        move_to_dirs(metadata['SourceFile'], dirs)
    except OSError as e:
        print("warning: failed to move %s to %s: %s" % (
            metadata['SourceFile'], dirs, e), file=sys.stderr)

Save it to a file named move-to-tag-dirs somewhere in $PATH. Make sure the file has executable permissions:

$ chmod +x move-to-tag-dirs

Related: How to run a .py program directly?

Then to move all images to the corresponding tag directories, run:

$ move-to-tag-dirs *.jpg *.png

If you get 'Argument list too long' error then run:

$ find . -maxdepth 1 -name \*.jpg -o -name \*.png -exec move-to-tag-dirs {} +

See Solving “mv: Argument list too long”?

If you ignore error handling, support for hierarchical tags, support for unusual characters in file names, tags, etc then the script could be simplified significantly (perhaps, a simple one-off shell script would be enough in this case).


Ubuntu 18.04 flavors are the last supported releases for x86 (32-bit i686) computers.
your system isn't let you install newer specs OS that has amd64 architecture in i386 compatible hardware due to their addressing capability.
You should try for 18.04 i386 version of Lubuntu for less specs. even computers having 1 GB RAM can run lubuntu smoothly too.


Running Ubuntu 13.04 and Windows 8 at the same time

Short answer is no, you cannot run two operating systems at the same time, because you have no way to boot both of them simaltaneously, even if you did overcome that hiccup they would both be fighting to control your hardware. I'm not saying it isn't possible, I'm just saying until windows and ubuntu are written to support such a feature (which is unlikely) you can't do it. That said, the technology already sort of exists, windows 8 has a new feature called fast-boot which means that every computer in the world running windows 8 never turns off completely, unless the administrator disables fast-boot, windows 8 is setup to maintain partial hardware control even when you boot into another operating system like ubuntu, which is known to cause some issues.

You might consider running windows and ubuntu in Virtual machines? That way can switch between them anytime and run them at the same time. I recommend VMware Player because it has the best graphics card emulation out of all the products I've tried, however if you want more features, then try virtual box. If you aren't familair with virtual machines, you can think of them as a program you install that pretends to be a computer, you can install operating systems into it attach virtual and real hardware to it (limitations apply), and use it like a real computer.

You could also try coLinux, or andlinux which are modified versions of linux designed to run within windows, however they only support 32bit windows, and there are limitations to what you can do, also the linux softare will not have access to your graphics capabilities, and some other hardware.

sincerely, tapthoseshoesandwish


How do I add custom items to the context menu in Dolphin in KDE 5?

KDE Service Menus

In KDE-speak a "servicemenu" is a special entry that appears in a
context menu (or other context-based interface) for a file (or for
directory), depending on the type of files that are selected.

Service Menus with Dolphin:

https://develop.kde.org/docs/dolphin/service-menus/
https://www.kubuntuforums.net/showthread.php?25740-Service-Menus-with-Dolphin

--> KF5 Service Menus: https://www.kubuntuforums.net/showthread.php?25740-Service-Menus-with-Dolphin&p=367207&viewfull=1#post367207

Service Menus Missing: https://forum.kde.org/viewtopic.php?f=223&t=128621
Paths
KDE Frameworks 5 is looking services from:
kf5-config --path services

Executing:
$ kf5-config --path services
/home/user26687/.local/share/kservices5/:/usr/share/kservices5/

That is:
User servicemenus are:
$HOME/.local/share/kservices5/ServiceMenus/

System servicemenus are at
/usr/share/kservices5/ServiceMenus/

Desktop files
Servicemenus are defined using .desktop files. Desktop Entry Specification: https://standards.freedesktop.org/desktop-entry-spec/latest/

Image: Sample of the Desktop Entry Specification keys/codes
An example - simple servicemenu with file path:
Making: $HOME/.local/share/kservices5/ServiceMenus/myFirstServiceMenu.desktop
If the directory doesn't exist the user can make it !
[Desktop Entry]
Type=Service
Icon=smiley-shape
X-KDE-ServiceTypes=KonqPopupMenu/Plugin
MimeType=all/allfiles;
Actions=helloWorld;
Encoding=UTF-8

[Desktop Action helloWorld]
Name=Hello with path information
Icon=smiley-shape
Exec=kdialog --msgbox "Path is %f"

Image: a servicemenu at the right place.
Closing all Dolphin windows and starting a new one. When right clicking a file:


Print screen short-cut not working (Ubuntu 14.04 LTS)

Try this shortcut key:
Alt + Print Screen


Can I make Ubuntu 18.04 switch between multiple windows of the program by just clicking the icon?

You can do

gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'cycle-windows'


Remove Shield is a great extension for this.

For shell extensions to work, you need to install Gnome shell extensions: sudo apt install gnome-shell-extensions chrome-gnome-shell, log out, and log in again. Then visit the extension webpage and click the slider to "on".

(Once you have that shell extension, check out the large library of further extensions.)

I have installed this in freshly Installed Ubuntu 19.10 and tested.


Ubuntu-SDK Installation On Saucy Salamander 13.10 does not show ubuntu project templates

You can check if there are some packages you didn´t install:

sudo apt-get -f update
sudo apt-get -f upgrade
sudo apt-get -f dist-upgrade

I'm personally interested in start using the SDK.


Why does the GUI of TeXstudio disappear?

TeXstudio is written in C++/Qt, I had recently the same graphical issue with Skype and VirtualBox on my Ubuntu 14.04, and both sowftware GUIs use QT. I was able to resolve the issue by applying this :  https://askubuntu.com/a/694328/472685 . I hope it helps you :)


I use xrandr to scale the game.
After the game is up I have a custom key linked to this command;

xrandr --output VGA-0 --mode 1360x768 --scale 0.59x0.78 --panning 800x600

When you need to return to the normal size screen;

xrandr --output VGA-0 --mode 1360x768 --scale 1x1 --panning 1360x768

VGA-0 is the name of my display, use xrandr from terminal to find the name of your display.  Old games are a real challenge when they never made the game window to resize.


Bluetooth isn't working in Dell Vostro 3560 with BCM43142 wireless adapter

From Revision #2 of the question:

  After some fiddling around with different drivers from different sources I managed to get bluetooth working. Not flawlessly but at least I can pair a device.
  Bluetooth started working after installation of this package bt-bcm43142-onereic_0.0+20111116somerville2_amd64.deb.

  Originally I found this package on the disk with Ubuntu which came with the Laptop.
  What this package does, it installs a firmware loader and a firmware itself. This firmware needs to get bluetooth working.

  Still bluetooth sometimes doesn't work even with this package. But manual loading the firmware helps.

brcm_patchram_plus_usb --patchram /lib/firmware/BCM43142A0_001.001.011.0028.0036.hcd hci0

  Also I found it strange that this package writes all different ids into /sys/bus/usb/drivers/btusb/new_id because only one from the list matches my device ID

  Content of bcm43142.conf:

install btusb /sbin/modprobe --ignore-install btusb && echo '0a5c 21d3' > /sys/bus/usb/drivers/btusb/new_id && echo '0a5c 21d7' > /sys/bus/usb/drivers/btusb/new_id && echo '0a5c 21e1' > /sys/bus/usb/drivers/btusb/new_id && echo '0a5c 21e3' > /sys/bus/usb/drivers/btusb/new_id && hciconfig hci0 up && /usr/bin/brcm_patchram_plus_usb --patchram /lib/firmware/BCM43142A0_001.001.011.0028.0036.hcd hci0 &

  Output of lsusb:

...
Bus 002 Device 003: ID 0a5c:21d7 Broadcom Corp.

  In conclusion: bluetooth works not nearly as good as in Windows. Once I even got a complete crash of the system because of the btusb module. Luckily WiFi works perfectly.


USB-stick Error "Can’t mount file" "The path is not mounted."

Now I managed to copy a file to the stick after I formatted it to a fat32 file system instead of ext4.


Networking - Shared to other Computers - How to find a client's IP address?

There's a couple things you can do. Assuming you've got single ethernet connection going from laptop to raspberry, then arp-scan will suffice. First , figure out what's the name of your ethernet interface. In my case that's eth3. Thus, here's an example:

bash-4.3$ sudo arp-scan -I eth3 --localnet
[sudo] password for xieerqi:
Interface: eth3, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.8.1 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)
10.42.0.40  b8:27:eb:96:38:91   (Unknown)

1 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.8.1: 256 hosts scanned in 1.459 seconds (175.46 hosts/sec). 1 responded

In the output you can see that my Raspberry  has 10.42.0.40 ip address.

The arp-scan is very simple approach and doesn't require too much sweat. Alternative methods can be used too. Here's a few of them:

Knowing the network's first 3 octets (for example via ip addr show eth3 command in my case), you could write a simple script that pings range of hosts.  ( See below for python script that does that ).
fping is alternative to standard ping command, that does allow host range to be probed
You can use nmap to perform host discovery in variety of methods. In particular, this command: nmap -e eth3 -sn 10.42.0.0/24 would work the best - it instructs nmap to only perform host discovery with -sn option ( which underneath the hood sends ARP requests to broadcast MAC address), on interface specified by -e  option. The 10.42.0.0/24 is CIDR notation for network. Quite simple.
Wireshark can also be used to capture packets on your Ethernet interface. Of course , your Raspberry has to send out some packets in the first place for them to be captured, so it might not work if you don't have a "talkative" raspberry. You can , however, start capture, filter by UDP protocol, unplug and plug back in Raspberry. You should see the DHCP request and response going to it

Devices build their arp  table over time when hosts appear/disappear from network, so you could also use arp -a command.
If you're using standard Ubuntu and didn't install any alternative DHCP servers, you can check dnsmasq leases file for which IP was assigned to your devices. For instance:

bash-4.3$ cat /var/lib/misc/dnsmasq.leases
1479095355 b8:27:eb:96:38:91 10.42.0.40 localhost *

See my related question here:DHCP lease for raspberry pi not found

nmap and Wireshark approaches will be quite useful if you have ethernet switch with several devices attached to it.

Since I've mentioned scripting with ping, here's one:

from subprocess import *
network = '10.42.0.'
for num in range(255):
    i = str(num)
    dn = open('/dev/null','w')
    try:
        print('checking ' + network + i)
        check_call(['ping', '-c','1', '-W',
                    '1','-q',network + i],stdout=dn)
    except CalledProcessError:
        pass
        #print('10.42.0.' + i + ' is down')
    else:
        print('>>> ' + network + i + ' is up')

This will ping range of 256 addresses of my network ( 10.42.0.x ) , and indicate which of the hosts is up. The ping times out after 1 second, therefore it will take 256 seconds to scan everything. If you only have one raspberry you can edit the script to quit if an ip responds to ping, thus speeding up the process. You could also create a certain number of threads. arp-scan however still remains faster alternative.


Command-line perl regex replacement: replacement string contains utf8

You have to tell perl that the script body contains UTF8 chars:

$ perl -w -C -p -e 's/(\p{Devanagari})\./$1।/g' test.txt
ಕದಂ.ಬ
कदम्बà¥¤

$ perl -Mutf8 -w -C -p -e 's/(\p{Devanagari})\./$1।/g' test.txt
ಕದಂ.ಬ
कदम्ब।


Black Screen trying to install Ubuntu 13.10 alongside Windows

Dual booting with windows can be tricky.

Here is a guide to show you the basics of partitioning and prepping before install.

Ubuntu Windows 8 Dual-Boot


How to open "System > Administrator" -menu?

There's no "System" menu in modern versions of Ubuntu.

Just open the Dash (using Ubuntu button on the Launcher or Win key on your keyboard) and start typing program's name that you want to launch.


How to traverse all packages using python-apt

You need to use apt.cache and apt.package. Adapting the example given for apt.package:

#!/usr/bin/env python2

import apt
cache = apt.Cache()
Games = [pkg for pkg in cache if pkg.section.endswith("/games")]
print("\n".join(map(lambda x: x.name, Games[1:10])))

cache is like a dictionary object, with package names (+ an optional architecture label) as the keys. You get use the cache.keys() method to obtain all the keys.

Some example output:

funnyboat
berusky2
torcs:i386
glaurung:i386
jigzo-data
balazar3-common
val-and-rick
openyahtzee:i386
mupen64plus-ui-console


How to make portrait mode display permanent on 15.10

Add following to startup application :
/bin/bash -c "sleep 15&&xrandr -o left"

The reason adding 15 second of break to prevent xrandr command performed too early, which cause desktop to break while the desktop is still loading. @Jacob Vlijm explain why this is necessary.

Apply change to LightDM
Open your favourite text editor, I'll use gedit for example. With root privileges, because we're gonna modify system directory.
gksudo gedit /etc/lightdm/lightdm.conf

Add following entries to opened gedit.
[SeatDefaults]
display-setup-script=xrandr -o left

Save the file then.
WARNING: Haven't tested, because it's not something I want to (have to un-)do on my machine. If the X failed to start, use recovery mode to remove the file.


i had the same problem with my 2006 samsung tv.
Try to change the resolution .
You can try openning the nvidia control panel go to the gpu section last item (that shows your samsung tv name) and paly with the stretching :-) it should work.


Catalyst on Ubuntu 13.04 hybrid graphics supporting dual screen?

There is a temporary solution http://ubuntuforums.org/showthread.php?t=2149791


If you remove one or the other OS, you can grow the remaining partition using tools such as parted, or several other options that you can find on the web.

-OR- you can just partition the second partition as a secondary drive.


This is almost impossible. The hard disk has a new FS (Linux's ext4) and the data has probably been overwritten by Ubuntu's data.

If it's really important data you should shut down the computer ASAP as every time you write data the chance on recovery decreases.

You could try a few recovery tools (try them while using Ubuntu live on a USB drive to prevent writing to the disk) but I don't think they'll work because you're using a different FS now.

Your best bet would be to bring the hard disk to a data recocery company but this can be really expensive.

So next time be careful what you're doing when partitioning and always make backups.


I hate answering my own questions, but it seems the Boot-Repair tool has fixed it.


How do I change the unity launcher icon back to the default?

The icon file changed is: /usr/share/unity/6/launcher_bfb.png

I can suggest two ways in which you can restore this:

Manually, by copying and pasting this file:
http://ubuntuone.com/1NYCV5AwIKqAWMoXtk7YNY
Automatically, by re-installing unity


The same happened on an XP-Pen Star 03: working perfectly out of the box in Ubuntu 18.04 but not in a fresh install of 20.04. The input was recognised in v20.04 multiple times in xinput (as TABLET 1060N) and the tablet light worked when moving the pen or touching buttons, but no movement on the screen, and installing the original drivers downloaded from XP-Pen didn't help either.
I tried a simplified version of this approach: https://blog.simos.info/how-to-setup-the-huion-430p-drawing-tablet-on-ubuntu-20-04/ and it worked.
In essence, edit this file /usr/share/X11/xorg.conf.d/70-wacom.conf (e.g. sudo gedit /usr/share/X11/xorg.conf.d/70-wacom.conf) and add the name of your device, as identified using xinput. Unlike in the link above, I simply added the name of my device as 'or' in one of the existing sections, e.g., from:
Section "InputClass"
    Identifier "Wacom serial class"
    MatchProduct "Serial Wacom Tablet"
    Driver "wacom"
EndSection

to
Section "InputClass"
    Identifier "Wacom serial class"
    MatchProduct "Serial Wacom Tablet|TABLET 1060N"
    Driver "wacom"
EndSection

Log out and in again, and voilà.


What's called Gnome Classic is build with same GUI backend of Gnome Shell.

It seems to me what you are looking for is called now Gnome Fallback or Gnome Flashback which is still using metacity. To install it:

sudo apt-get install gnome-session-flashback


is denyhost central database stored locally?

DenyHosts by default uses /var/log/auth.log to monitor login attempts.
once an ip is blocked it gets added to a few files:

/etc/hosts.deny
/var/lib/denyhosts/hosts
/var/lib/denyhosts/hosts-root
/var/lib/denyhosts/hosts-valid
/var/lib/denyhosts/hosts-restricted
/var/lib/denyhosts/user-hosts

note: if your going to make changes to any of these files (i.e. to remove banned ip) then you should shut off the service first.

$ sudo service denyhosts stop


Graphical Diff viewer that supports LXDE (Lubuntu)

I decided to go another quick google search as my first one didn't give me any decent results. I found another question about graphical diff viewers that mentioned diffuse. No extra libraries were needed for installation. One caveat - apparently, it doesn't support directory comparison but I have yet to try it out so maybe the newest version does?


How can I record audio while it is playing?

Use Audacity
Remove any headphones/mic plugged in
Use recording source as default ( if not working, try trial and error )
Click the " Record " button ( a maroon dot )
You can see the GUI listing variations if audio is recording
Start and stop at desired points
Save as Audacity project
Delete unwanted part of the audio
Use File > Save other > Export as mp3 to your desired location


To revert the step #4 (which is the most probable that caused the issue), you only need to:

sudo apt-get remove nvidia-319 nvidia-settings-319 nvidia-prime

Obviously you shouldn't do everything told without double checking what it is being done.


JFFS2 is not designed for using it on regular block devices such as those implemented via USB storage or your hard drive controller - it's designed for embedded devices and when you have direct MTD access to the flash chips.

It isn't possible to use it on a block device except with some fairly advanced hacks, such as this one that details using a kernel trick called "block2mtd" to emulate an MTD interface on top of a block device.  This is so impractical as to be an intellectual curiosity only, don't do it in the real world.

If you want a log structured file system on a USB drive, get one that's implemented in hardware - any Flash hard drive or USB stick which implements wear-leveling is essentially a log-structured file system at a low level upon which a regular file system is implemented at a higher level.  While a mainstay of SSDs, this is still relatively uncommon for a USB stick with some exceptions, such as my "Sandisk Extreme" branded stick.

Or you may want to try experimenting with NILFS.  But, it's much slower than traditional file systems at some tasks.  You may be surprised to find good old ext4 to be faster than you thought.


Is there a way to run MS-DOS alongside/within Ubuntu?

You can try either DOSBox or DOSEMU. Both are available from the repositories - use Ubuntu Software Center or synaptic (if installed) to get them. DOSBox is specifically intended to run games, but I've also used DOSEMU to run DOS games successfully.


remove amd drivers installed with Automated installer

The installer should have created an uninstaller script, so try to call it like this:

sudo sh /usr/share/ati/fglrx-uninstall.sh

Or check the /usr/share/ati or radeon for any uninstaller script.

When you finish, don't forget to install or reinstall the open-source drivers:

sudo apt-get install xserver-xorg-video-ati xserver-xorg-video-radeon


Open System Settings and navigate to Brightness and Lock.

The relevant part to your question is Turn screen off when inactive for: Options include 1 Minute, 2 Minutes, 3 Minutes, 5 Minutes, 10 Minutes, 30 Minutes, 1 Hour and Never.


Use liveCD or liveUSB Ubuntu.

Open terminal from liveCD, and

determine which disk and on which partition Ubuntu is installed

sudo fdisk -l

For work we need the / -section (root). mount it with a command

sudo mount /dev/sdaX /mnt

where sdaX - number partition Ubuntu

continue to use the answer A TPM error (7) occurred attempting to read a pcr value changing the command

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

on

echo "blacklist tpm_tis" | sudo tee -a /mnt/etc/modprobe.d/tpm_tis.conf


Where are the logs for my user-data script? cloud-init

Output of your program is available on the console log.  You can get that either from the aws console, or by calling the GetConsoleOutput via the api (or with a tool such as euca-get-console-output or ec2-get-console-output).

Additionally, you can tell cloud-init to log the output of those commands by providing user-data that tells it to.

#cloud-config
output: {all: '| tee -a /var/log/cloud-init-output.log'}

You can provide multi-part input to give both '#!' scripts and cloud-config as shown above.  See https://help.ubuntu.com/community/CloudInit for an example of how to do that.


The error you received is a "dummy error" and should be ignored.

Run the following command to verify:

cat /etc/apt/sources.list | grep micro

you should see an output that says something like this:

deb [arch=amd64] https://packages.microsoft.com/ubuntu/16.04/mssql-server-preview xenial main
# deb-src [arch=amd64] https://packages.microsoft.com/ubuntu/16.04/mssql-server-preview xenial main

If you see the output, proceed to the next step in your original microsoft instructions (step 3). You are done with step 2 and you can safely ignore the error.

EDIT

Run the following command to add apt support for https:

sudo apt install apt-transport-https

Then run the following command:

sudo apt update

Then proceed with the microsoft instructions.

If you still get a 404 error. There is something wrong with your network or DNS configuration and you should ask this as a separate question as it is not related to your original error.

EDIT 2

In the error, you show a different URL than the URL you used with curl.

Use the command sudo nano /etc/apt/sources.list to edit the file and make sure that the line near the end of the file reads exactly as follows:

deb [arch=amd64] https://packages.microsoft.com/ubuntu/16.04/mssql-server-preview xenial main

Edit the file as needed. The easiest thing to do is copy and paste instead of typing to avoid typing errors. Use CTRL+SHIFT+V to paste into the terminal.

When you are done, press CTRL+o to save the changes and then press CTRL+x to exit nano.


How do I install grub for UEFI in legacy mode?

First, one question is why you want to switch to EFI-mode booting. Based on your gdisk output, it looks like you've got a single-OS installation, so you don't seem to need to coexist with something else. If you can boot in BIOS/CSM/legacy mode already, why switch? As the saying goes, "if it ain't broke, don't fix it." (OTOH, I see no BIOS Boot Partition, so maybe you can't currently boot in BIOS mode....)

Supposing you have a reason to boot in EFI mode, though, let's start at the beginning....

YUMI is not the only tool for creating a bootable USB flash drive. You can also do it with dd, UNetbootin, Startup Disk Creator, Rufus, and other tools. All of the tools I've named are capable of creating an EFI-bootable USB flash drive, with the caveat that EFI implementations differ, so what works on one might not work on another. Some tools also have options that can affect how well a created disk will work, either in general or on a specific EFI. Thus, creating your installation disk with another tool should enable you to boot it in EFI mode (assuming, of course, that your computer uses an EFI rather than a traditional BIOS). That said, if you've already installed, re-creating your boot medium and re-installing is overkill....

If you have no other bootable OS on the computer, one solution is to install an EFI boot loader as EFI/BOOT/bootx64.efi on the EFI System Partition (ESP; your /dev/sda1). This is easily done if you're installing by hand, but if you're using a tool like grub-install, you'll have to move files around manually after the fact. Specifically, the EFI version of grub-install will put GRUB in EFI/ubuntu/grubx64.efi (perhaps with shimx64.efi in the same directory). You'll have to copy files to the right location to get them to launch when you boot the computer. If Secure Boot is inactive, copy EFI/ubuntu/grubx64.efi to EFI/BOOT/bootx64.efi. You might also need to copy EFI/ubuntu/grub.cfg to EFI/BOOT/grub.cfg, too. If Secure Boot is active, it gets more complex; you must copy shimx64.efi to EFI/BOOT/bootx64.efi and copy grubx64.efi to EFI/BOOT/grubx64.efi. (Note that all these filenames are relative to the ESP's root, so if you were to mount partitions as shown in your /etc/fstab, you must add /boot/efi/ to the start of each path.) With a boot loader installed to EFI/BOOT/bootx64.efi and nothing else referenced in the NVRAM entries, your computer should boot from that "fallback" filename.

Another option is to prepare an Ubuntu installer using one of the tools I mentioned earlier, then boot it in EFI mode. With that done, you should be able to run Boot Repair in EFI mode, so it should be able to set up GRUB in that mode. In fact, even in BIOS mode, Boot Repair should be able to copy EFI files as described in the previous paragraph. (I'm not sure how well this works in practice, though; Boot Repair might just try to do a BIOS-mode repair and not attempt to set up an EFI fallback boot loader.)

Yet another option is to use my rEFInd boot manager to get the process started. You can download the CD-R or USB flash drive version of rEFInd and boot from it. rEFInd should detect your Linux kernel(s) and enable you to boot. If this works, you'll be booted in EFI mode, and you can then install the rEFInd PPA or Debian package to use it permanently (without the USB drive); or you can install GRUB via grub-install and it should set things up correctly. (Note that you'll need the EFI GRUB package, grub-efi, installed for grub-install to set up the EFI version of GRUB.) Whether you install rEFInd or GRUB in this way, it will be able to set up an EFI NVRAM entry, since the boot from the rEFInd USB drive will be into EFI mode, thus enabling the OS to add EFI NVRAM variables.


Linux systems don't mount hard drives, they mount filesystems that live inside partitions or logical volumes on those drives.

In the case of ext2/ext3/ext4 filesystems, you can change the UUID using the tune2fs command. From man tune2fs:

-U UUID
       Set the universally unique identifier (UUID) of  the  filesystem
       to UUID.  The format of the UUID is a series of hex digits sepa‐
       rated          by          hyphens,          like          this:
       "c1b9d5a2-f162-11cf-9ece-0020afc76f16".   The UUID parameter may
       also be one of the following:

             clear  clear the filesystem UUID

             random generate a new randomly-generated UUID

             time   generate a new time-based UUID

       The UUID may be used by  mount(8),  fsck(8),  and  /etc/fstab(5)
       (and possibly others) by specifying UUID=uuid instead of a block
       special device name like /dev/hda1.

There may be equivalent commands for other filesystems.

However, based on your fdisk output, it looks like /dev/sdb is a bare unformatted disk that simply has no recognizable partition(s) or filesystem(s) defined on it.


How to compile code without having the needed library 'installed' in your system?

You'll have to install the libraries manually yourself. Download the zipfile from the link in your question, unzip it and follow the instructions. Usually, there is a config script included and you can tell it to set up the library so that it is installed in a directory you have access to. Normally, this is done like so:

./configure --prefix=~/lib

That will install in a directory called lib which is in your $HOME. You will then have to tell your compiler to include that directory when searching for libraries. Something like:

LD_LIBRARY_PATH="~/lib:$LD_LIBRARY_PATH" g++ foo.c


Edit the following file as root: /etc/apache2/envvars

using the command:

sudo nano /etc/apache2/envvars

change the user and group to yourself if there is only one user and you will never have permissions problems again.

I.E., if you are only logging in and running the server as user 'big_dog':

export APACHE_RUN_USER=big_dog
export APACHE_RUN_GROUP=big_dog

Heck, for that matter you could change that user to the current user I'm sure somehow. Then, install user_dir you all have webs only you can have full control of (unless you modify this).

Restart the server (if unsure, just reboot or goole) and you are good to go.


How to install the browser Pale Moon under Bionic Beaver 18.04 LTS?

The browser Pale Moon as yet does not exist in the Bionic Beaver repositories but there is a dependable PPA available that has the nod of approval of the Pale Moon developers.
Add the PPA and install Pale Moon with the following one liner:
echo "deb http://download.opensuse.org/repositories/home:\
/stevenpusser/x$(lsb_release -sir | paste -sd_)/ /" | sudo tee /etc/apt/sources.list.d/home:stevenpusser.list && \
wget -nv \
https://download.opensuse.org/repositories/home:stevenpusser/xUbuntu_18.04/Release.key \
-O Release.key && \
sudo apt-key add - < Release.key && \
sudo apt-get update && sudo apt-get install palemoon

Then take this new kid on the block (comparatively!) for a test run:

Notes:

Blessing for the PPA from the Developers There was a period of instability with the Pale Moon packages from this PPA but resolved as of version 27.1
Download Pale Moon for Linux Installer A linux 'installer' is available as well, untested by me.
Download Pale Moon for Linux release binaries Another choice is to download pre-compiled binaries and load these into your $PATH, untested by me.


My power/battery indicator applet is a red exclamation point

Looks like the "You need to reboot to ensure installation of up-to-date software. Click here." hint that shows up after a software update if you should reboot. Click it. You need to reboot. Save stuff first.


Wrong kernel version returned by uname Ubuntu 16.04.1 LT

You can fix this by

sudo apt install linux-generic

That will install the correct kernel.


How does the size of the persistent file in a live version affect performance?

Persistence is the space on your USB stick used to store information, so that the information is still there after a reboot.  The size won't affect performance.  Having more space will allow you to have more information, including files, available between boots.


Will Modprobe automatically switch loadable kernel modules?

A better solution  is to install Bumblebee. It is a project aiming to provide switching between discreet and on-board cards on demand.


Why do I have to enter my keyring password for a WiFi password?

From the network manager (wifi symbol in the top right).
Click on edit connection.
Select your wifi network (Eduroam in your case).
Go to the general tab.
Select "All users may connect to this network".


In the case of nova-network running on the controller node, instances use that node as its gateway to  the outside world.  The public interface is configured on compute nodes and floating (public) IPs are configured directly on the compute nodes.  So, instance bound public traffic would go to an public interface on the compute node rather than the controller.

A better networking model to use is FlatDHCP + multi_host.   See this blog post that describes it in detail and describes why its a better choice.

To summarize here: nova-network runs on every compute host. The physical flat_interface (specified in config, usually eth1) gets a bridge built upon it which is assigned an IP address on the private instance network.  Using this bridge, nova-network serves DHCP, DNS and a gateway to all instances hosted on that compute node.  The physical flat_interface (eth1) should be linked to a switch connecting the flat_interface's of other compute nodes.  This enables inter-instance traffic on the internal, private network (eg, 10.0.0.0/24).

Each compute node also has a public_interface specified in config (eth0 by default).  This is expected to be connected to the public facing network, say 192.168.25.0/24.  As a user, you can allocate an address and associate it to a running instance. The addresses are allocated from a pool that you configure when you initially setup nova's networking. Using EC2, eg:

adam@amebix:~/nova$ euca-allocate-address
ADDRESS 192.168.25.241
adam@amebix:~/nova$ euca-associate-address 192.168.25.241 -i i-00000126
ADDRESS 192.168.25.241  i-00000126

On the compute node, 192.168.25.241 is added to the public_interface as a secondary virtual IP address and the compute nodes iptables rules are configured to route traffic to this address to the appropriate instance.   However, the default security groups do not allow any inbound traffic to make it through.  You'd need to authorize ports in the security group(s) that instance is assigned to (via euca-authorize).  This translates to nova-network opening ports in the iptables rule set corresponding to that instance.


Problem in upgrading : linux-header package 3.2.0.56 generic -pae : unmet dependencies

Try with following command:

sudo apt-get install --fix-broken && sudo apt-get autoremove && sudo apt-get update

Then update again.

If it is doesn't succeed then follow this answer.


MAAS 1.9.1 PXE boot looking for Xenial image but i have trusty

In the maas ui..go the settings>deploy options and change the Default Ubuntu release used for commissioning.


How to set up good video support on radeon 3850

90% of the time this type of problem is resolved by doing a purge and reinstall of the driver stack, because either the mesa GLX driver or the kernel driver is messed up.  https://wiki.ubuntu.com/X/Troubleshooting/FglrxInteferesWithRadeonDriver

As far as open source drivers, xserver-xorg-video-ati in Lucid supports 2D but not 3D acceleration for this hardware, so depending on your definition of 'good' it likely isn't going to suffice for you.

3D support is coming in Maverick, although there's still a lot that's incomplete.  See http://www.x.org/wiki/RadeonFeature for a detailed breakdown of the 3D support with this driver.  (Your card fits under the R600 column.)

Note that with the open driver and AGP hardware, sometimes you have to tweak AGPMode either in BIOS or (for -ati) in the xorg.conf.  (See 'man xorg.conf' or 'man radeon').


Tray is not natively supported by Gnome 3. The easiest solution is to disable the JD tray altogether: click on the "Setting" top bar item, scroll down the left side panel to "Tray Icon" and uncheck it.


Make the root the only one able to change the passwords of all other users

There is an option for that:

passwd -n MIN <login-name>

will disallow  from changing the password for MIN days.

From man passwd

 -n, --mindays MIN_DAYS
       Set the minimum number of days between password changes to MIN_DAYS. A
       value of zero for this field indicates that the user may change his/her
       password at any time.

Put it on 9999 and you are set for 27 years.

Though not documented it seems -1 works as a value too. As this is often a method to disable something permanently I would assume it will do the same here. Example using -1:

~$ sudo passwd -n -1 rinzwind
passwd: password expiry information changed.
~$ passwd rinzwind
Changing password for rinzwind.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
Password unchanged
Enter new UNIX password:
Retype new UNIX password:
Password unchanged
Enter new UNIX password:

Password is asked but never changed.

  For security purpose, I want only the root to change passwords for all the other users.

You deciding what the passwords are is going to create a security risk. Let us assume you pick a random password with numbers, letters, at least a special character, maybe a capital. Like Gsi^771H. Those passwords are very very very hard to remember and your users are going to write them down. On a paper, in a text file or even worse and save them in gmail as a concept.

The best passwords are sentences a user can remember and those can be very long. A password like "lastyeariwenttolondonformyholiday" is far superior over anything you can enforce even though it lacks numbers, capital letters or special characters. That user will remember it since it is related to something he did and it will be very hard to brute force. Only thing he has to do is visit London for his holiday every year from now on ;)

Educate your users and let them pick their own password. If you need to make sure their password is good explain to them you want to set it together with them. You can however create rules on password: if you set a rule that the password needs to be 15 characters and tell them that this is the case so they pick a sentences instead of random letters they will understand and hopefully agree.

Or ...


Folders don't have a filesize.  If you have a ton of folders, that's why your column is blank.

Only files will have filesizes shown.  That's the problem you're running into (per your comments) - tons of folders, very few files, in the directory listings you're looking at in PCManFM.


OpenConnect: Force all connections throught VPN (if IPv6 unavailable)

Default Route

You'll need to change your default route.

If you type route in a terminal, you'll see where packets will be sent, based upon their destination address.  By default, your VPN will only set up a route to route traffic on a specific subnet over the VPN.  You can set this gateway to be your default gateway, if that's what you want to do:

sudo route add default gw 192.168.1.254 eth0

Be sure to change the 192.168.1.254 with whatever IP your gateway is for your VPN.

OpenConnect Routing

OpenConnect, by default, forces you to set up your own routes.  You can change this behavior by installing vpnc vpnc-scripts and adding the following to your openconnect command:

--script=/etc/vpnc/vpnc-script

Note:

I prefer using OpenConnect vs AnyConnect.


In Ubuntu 17.10, how can I add entries to the right click context menu, like "open in terminal"?

I had a similar problem: after upgrade to 17.10 application windows did not show the context menu when right clicking in the title bar. I solved this with Gnome Tweak Tool:

Under Windows > Action on title bar > Secondary-click set it to Menu.


Brightness doesn't change on Sony laptop

LCD Brightness Control

Once you have installed the proprietary Nvidia drivers as suggested above, you may notice that your brightness control keys do not work properly. This is fixable by editing one's xorg.conf file. Open a terminal window and type the following:

sudo nano /etc/X11/xorg.conf

This will open your X server configuration (after prompting for your password). You should see a section titled "Device" that looks as follows:

Section "Device"
        Identifier      "Default Device"
        Driver  "nvidia"
        Option  "NoLogo"        "True"
EndSection

Append a line so it appears like this:

Section "Device"
        Identifier      "Default Device"
        Driver  "nvidia"
        Option  "NoLogo"        "True"
        Option "RegistryDwords" "EnableBrightnessControl=1"
EndSection

You will need to restart your graphical server (or reboot) for this change to take effect.


Can't do anything with my iPad (3rd gen) using 13.04

This question and it's answer talk about transferring video files between an iPad and Ubuntu via USB.

The process should be the same with audio, document and image files you will have to use a general file browser app from iTunes such as iFiles or FileBrowser. Both can handle various file formats.

Additionally iFiles has an in-built file server which can be accessed over the network.
FileBrowser can access network shares.

There are many file manager applications in iTunes which can provide similar services.

Note that I have no relation with either of the software mentioned above, it just happens to own both


Permission denied running sha256sum. How do I check the iso files?

permission denied means you do not own the file.

2 methods of getting rid of that notification:

change the owner with `sudo chown $USER:$USER ubuntu-18.04.2-desktop-amd64.iso ubuntu-18.04.2-live-server-amd64.iso
use sudo sha256sum -c SHA256SUMS | grep OK

In both cases you need to provide the admin password. If you account is not an admin you will need to ask that user.

When I run:
sha256sum -c SHA256SUMS 2>&1 | grep OK

there is no output.

What did you expect? you tell it to discard error messages so you do not get any.


Edit Newly Added Lock Time in Ubuntu 20.04

The simplest way to work with most gsettings values is with the dconf-editor GUI. This makes it possible to more easily set, reset, and discover the various settings that are available to you.
If you do not already have it installed, open a terminal and type:
sudo apt install dconf-editor

When you open the application, you can then use the search button to locate all of the power-saving options available, notes on how they work, and the ability to set/reset the values


Trying to find ubuntu-8.10-umpc-i386.img

It took some searching but try the following:

mirrors.mit.edu
solar-one.mit.edu
solar-two.mit.edu

which worked well on my system. Google tends to index ftp sites poorly and this is usually where the old gems are hiding :)


dpkg: error processing package qgis-providers (--configure):

I ran into the same issue on updating QGIS.
There is already a bug report in Github for it.
You have to remove older versions of libproj manually, as described in the answers to the bug reort:
 # remove offending lib while keeping package dependency installed (wow, ugly):
 rm -f /lib/x86_64-linux-gnu/libproj.so.15
 ln -s /lib/x86_64-linux-gnu/libproj.so.19 /lib/x86_64-linux-gnu/libproj.so.15

Folder names might be different for you, so look them up manually.
See also this similar GisStackExchange topic.


2 external displays on Thinkpad t430s with HD4000 graphics

First, I would like to note that the answer I am about to provide is based on answers I gave for the questions here and here.

Second, take note of the information found on Intel's site. It suggests that it can work, but everything I have read thus far leads me to believe that three monitors will not work in the real world. That being said, Let's dive in and explore the possibilities.

There are 2 basic approaches you can take. The first is to utilize randr which will allow you to create one large virtual display in which you can position your monitors. The second is to utilize xinerama which will allow you to have 3 separate X screens which will function as one large display. I will cover both here and you can decide which is more appropriate for your needs.

RandR - Resize and Rotate

The issue with XRandR is 2 fold in multi-monitor setups. It creates a large virtual display and each monitor gets a piece of it. If the total resolution is too high (2048 X 2048) it might not work... Framebuffer issues and such. You should be able to increase the fb size in xorg.conf but it comes at a performance loss iirc. Also, if the monitors are of different resolutions, there could potentially be areas that are either black, or windows fall off of your displays.

You can dynamically enable your multi-monitor setup by using XRandR

xrandr --output foo --rightof bar
xrandr --output baz --rightof foo

There is also a gui frontend for this called arandr which is in the 12.04 repos. I haven't tested it, but some have found it useful.

Or you could enable it statically in /etc/X11/xorg.conf.d/10-monitor.conf:

Section "Monitor"
  Identifier     "Monitor0"
EndSection

Section "Monitor"
  Identifier     "Monitor1"
  Option         "RightOf" "Monitor0"
EndSection

Section "Monitor"
  Identifier     "Monitor2"
  Option         "RightOf" "Monitor1"
EndSection

This method implies an randr setup. Again, there are some notable drawbacks if using xrandr with monitors of different resolutions. Windows may be improperly placed, there may be black areas on one screen, etc..

Xinerama

To enable xinerama you need to modify /etc/X11/xorg.conf:

Section "ServerFlags"
  Option    "Xinerama" "true"
EndSection

It might be as simple as that as X is pretty good about automagically configuring things based on hardware detection. But, if simply turning the xinerama extension on does not provide the functionality you desire, you may opt to fully configure X to use xinerama. There are a few ways to configure X. You could have multiple files in etc/X11/xorg.conf.d, some for your monitors, some for the devices, etc. I will cover having a single xorg.conf file that contains all the settings using a modified version of my current setup.

Section "ServerLayout"
    Identifier     "TriHead"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
    Screen      2  "Screen1" RightOf "Screen1"
    Option         "Xinerama" "1"                # Enable xinerama on the whole
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"                      # Be sure to write the correct driver here
    VendorName     "NVIDIA Corporation"          # Should be "intel"
    BoardName      "Nvidia GT 240"
    BusID          "PCI:1:0:0"                   # Use lscpi | grep VGA to get the BusID
    Screen          0                            # Note the Screen numbers
EndSection

Section "Device"
    Identifier     "Device1"                     # A device for each screen
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Nvidia GT 240"
    BusID          "PCI:1:0:0"
    Screen          1
EndSection

Section "Device"
    Identifier     "Device2"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Nvidia 8600 GT"
    BusID          "PCI:1:0:0"
    Screen          2
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Gateway HX2000"
    HorizSync       31.0 - 83.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "DELL 1907FPV"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor2"
    VendorName     "Unknown"
    ModelName      "DELL 1907FPV"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
EndSection

Section "Screen"
    Identifier     "Screen2"
    Device         "Device2"
    Monitor        "Monitor2"
    DefaultDepth    24
EndSection

Obviously you will need to modify this to suit your hardware, but the basic skeleton is there for you.

Do note that I have recently read that Intel might have issues with xinerama. You may find that it is just not a possibility. Please test the answer I have given and continue to explore additional possibilities as you may find additional information elsewhere.


How to make changes in xdg-user-dirs.dirs have effect in files lens?

I've modified paths in  ~/.config/xdg-user-dirs.dirs and music lens finds songs w/o problems.
have you tried to open banshee, update collection with the new path and look back at the lens?


Desktop distorted after installing Nvidia drivers

Ok, so apparently the new driver doesn't detect your monitor. Please take note of the version of the driver.. Then..

Revert the changes:
sudo apt-get purge nvidia-current
Then remove unneeded depends (make sure ubuntu-desktop doesn't show up in this list)
sudo apt-get autoremove

Then remove the ppa:

cd /etc/apt/sources.list.d

ls #to see what's in the directory

Remove any entries that have the form: ubuntu-x-swat-x-updates*

sudo rm /etc/apt/sources.list.d/ubuntu-x-swat-x-updates-*

Then update and reinstall the original version

sudo apt-get update && sudo apt-get install nvidia-current

Then run the nvidia-settings util and take note of the version. It should be different than above.

Then reboot for the reverted driver to take effect.

Also, this TV is supposed to be 1920x1080p correct? If so, when you run the nvidia-settings utility and click to change the resolution (may be on auto), is there 1920x1080p there? Then click apply? Also, there may be a setting for scaling or stretch.

Did you try clicking the Ubuntu icon and selecting "Ubuntu 2d" on login? Does it make any difference?


apostrophe as dead key prints apostrophe before special character

It is not Ubuntu problem. I am working on Fedora and have exact same problem.

Chromium is at fault this time.
And unfortunately there is no fix for this at the moment.
All we can do is follow open ticket on chromium issue board : https://code.google.com/p/chromium/issues/detail?id=375670
 or use alternative input mothod (like, Alt key)


When already connected with eth0, Network manager still tries to connect wifi

Please click the Network Manager icon and uncheck 'Enable Wireless.' Please check here:


Problems with wifi range on laptop. Wifi card: realtek rtl8723be

sudo modprobe -r rtl8723be
sudo modprobe rtl8723be ant_sel=1
iwlist scan | egrep -i 'ssid|level'
sudo modprobe -r rtl8723be
sudo modprobe rtl8723be ant_sel=2
iwlist scan | egrep -i 'ssid|level'

Once you find what setting is best, then
echo "options rtl8723be ant_sel=X" | sudo tee /etc/modprobe.d/rtl8723be-ant.conf
Replace X with whatever setting worked better


How do I use Java 6 when java 7 is installed?

To change your default version of Java, you can run

sudo update-alternatives --config java

A prompt will come up, showing all versions of Java you have installed. Input the list number for the version you want to be the default.

If you want to run one program with a non-default Java version, you need to run the command

/path/to/java-install/java -jar /path/to/program.jar

This obviously only works with .jar files, so it might be best to have two scripts that can switch the default version.


Why is Seahorse messing up my Samba sharing?

This appears to be a seahorse bug see here https://bugs.launchpad.net/ubuntu/+source/seahorse/+bug/908440


twitch.tv video full screen opens on different monitor?

I don't have an answer, but I do have a workaround. Hit the "pop out video" button on twitch, then hit F11 (or go view>fullscreen) to make firefox fullscreen on whatever monitor you like.


How do I change the "label" reported by lsblk?

Since the label is a property of the filesystem there are individual ways to set the label for different file systems.

for ext2/ext3/ext4 filesystems you use:

e2label /dev/XXX <label>

for btrfs:

btrfs filesystem label /dev/XXX <label>

for reiserfs:

reiserfstune -l <label> /dev/XXX

for jfs:

jfs_tune -L <label> /dev/XXX

for xfs:

xfs_admin -L <label> /dev/XXX

for fat/vfat (using dosfstools):

fatlabel /dev/XXX <label>

OR (using mtools):

mlabel -i /dev/XXX ::<label>

for exfat:

exfatlabel /dev/XXX <label>

for ntfs:

ntfslabel /dev/XXX <label>

for swap:

swaplabel -L <label> /dev/XXX

source: https://wiki.archlinux.org/index.php/persistent_block_device_naming#by-label


FGLRX driver causing login-loop Radeon HD 6470m Ubuntu 14.04

Now I've upgraded to 16.04. And since the fglrx options in "Additional Drivers" are gone I guess they are trying to tell me that the Radeon HD 6470m is incompatible with the fglrx drivers given out and that must be the answer to the login loop.

Over time the open source drivers are getting better and I don't feel like I need the fglrx drivers anymore.


How to batch rename JPEG files to image date, adding a count that resets for each day?

To rename your entire image library of JPEG photos to the YYYY-MM-DD-XXX.jpg format, counting up and starting from -001 each new day, use this command with exiftool:

exiftool -fileOrder DateTimeOriginal -recurse -extension jpg -extension jpeg -ignoreMinorErrors '-FileName<CreateDate' -d %Y-%m-%d%%-.3nc.%%e ~/Pictures/

To explain the command fully, here's how it works.

exiftool starts the script.
-fileOrder DateTimeOriginal forces exiftool to process the images in the same order they were taken. This is critical to preserve the image numbering within a day in the original chronological order.
-recurse recursively processes subdirectories, which is helpful if you use Shotwell to import because photos are placed in directories organized by date.
-extension jpg -extension jpeg will make sure only JPEG files are processed. (Note these aren't case-specific and jpg=JPG so we catch everything)
-ignoreMinorErrors Ignore any errors which don't affect our desired result (usually problems reading unrelated tags which aren't necessary for this operation).
'-FileName<CreateDate' Puts the photo created date in the file name.
-d %Y-%m-%d%%-.3nc.%%e Here -d sets the desired output date format. We'll use hyphenated four-digit year then two-digit month and day (%Y-%m-%d) followed by a three-digit number starting with 001 (%%-.3nc), preserving the original file extension (.%%e).
~/Pictures/ is the last item, it's just the directory that exiftool should process with the command.

A note about errors, the -ignoreMinorErrors helps but still you may see the message "Warning: Bad PreviewIFD directory" which is safe to ignore or "Warning: No writable tags set from /path/to/problem/image.jpg". The second one I couldn't resolve but I only saw it for a few images, so I manually renamed them in Nautilus as a workaround.

This command could still be improved but it is tested and working on a large (40GB, 13000 images) photo library and it's quick and produces no errors, only failing to rename the occasional image that is missing a tag that most any modern camera will create.


How to disable auto suspend temporary (reset idle time)

Introspecting the Mutter.IdleMonitor shows us there is a method ResetIdletime:
gdbus introspect --session --dest org.gnome.Shell --object-path /org/gnome/Mutter/IdleMonitor/Core
...
   interface org.gnome.Mutter.IdleMonitor {
     methods:
    GetIdletime(out t idletime);
    AddIdleWatch(in  t interval, out u id);
    AddUserActiveWatch(out u id);
    RemoveWatch(in  u id);
    ResetIdletime();

Unfortunately, the gnome developers decided to keep its use to themselves, see meta-idle-monitor-dbus.c:
 handle_reset_idletime (...) ...
  if (!g_getenv ("MUTTER_DEBUG_RESET_IDLETIME"))
  ...
   "This method is for testing purposes only. MUTTER_DEBUG_RESET_IDLETIME
    must be set to use it");

Perhaps you could find out how to set this debug variable in your gnome environment.

One other possibility is to use systemd's inhibit mechanism. This allows you to prefix a command with a request to inhibit various actions, such as shutdown, sleep, and idle, whilst it runs.
$ systemd-inhibit --mode=block --what=sleep --why='for me'  sleep 100 &
$ systemd-inhibit --list
   ...
    Who: sleep 100 (UID 1000/meuh, PID 3262/systemd-inhibit)
   What: sleep
    Why: for me
   Mode: block

Use this to call your shell script, and you can still interrupt it.
See man systemd-inhibit.


How to add "Open terminal here" to Nautilus' context menu?

You have to install the nautilus-open-terminal package from the universe repositories for Ubuntu versions up to Ubuntu 15.04:

sudo apt-get install nautilus-open-terminal

If you want to install it with apturl, use this URL: apt://nautilus-open-terminal

Then:

nautilus -q

In order to restart Nautilus

In Ubuntu 15.10, the functionality is already included in nautilus!


Change keyboard shortcut to open Ubuntu 16.04 file manager through command line?

The code is similar to this: How to set custom keyboard shortcuts from terminal?
Except that it fixes the bug when there is no custom keys. Maybe someone with priviledge can mix the answers, and delete this one.

Python part:

#!/usr/bin/env python3

import subprocess
import sys

# defining keys & strings to be used
key = "org.gnome.settings-daemon.plugins.media-keys custom-keybindings"
subkey1 = key.replace(" ", ".")[:-1]+":"
item_s = "/"+key.replace(" ", "/").replace(".", "/")+"/"
firstname = "custom"
# get the current list of custom shortcuts
get = lambda cmd: subprocess.check_output(["/bin/bash", "-c", cmd]).decode("utf-8")
# No custom keys
if   get("gsettings get "+key) == "@as []\n":
    n = 0
    current = list()
    new = item_s+firstname+str(n)+"/"
# Found custom keys
else:
    current = eval(get("gsettings get "+key))
    # make sure the additional keybinding mention is no duplicate
    n = 1
    while True:
        new = item_s+firstname+str(n)+"/"
        if new in current:
            n = n+1
        else:
            break
# add the new keybinding to the list
current.append(new)
# create the shortcut, set the name, command and shortcut key
cmd0 = 'gsettings set '+key+' "'+str(current)+'"'
cmd1 = 'gsettings set '+subkey1+new+" name '"+sys.argv[1]+"'"
cmd2 = 'gsettings set '+subkey1+new+" command '"+sys.argv[2]+"'"
cmd3 = 'gsettings set '+subkey1+new+" binding '"+sys.argv[3]+"'"

for cmd in [cmd0, cmd1, cmd2, cmd3]:
    subprocess.call(["/bin/bash", "-c", cmd])

Call the script above in command line:

python3 /path/to/script.py 'home folder' 'nautilus /home/user' '<Super>e'


Why can other users see the files in my home folder?

A Public folder exists in your Home directory (/home/user) for sharing files with other users. If an other user wants to get access to this Public folder, the execute bit for the world should be set on the Home directory.

If you do not need to allow others to access your home folder (other humans or users like www-data for a webserver), you'll be fine with chmod o-rwx "$HOME" (remove read/write/execute from "other", equivalent to chmod 750 "$HOME" since the default permission is 750). Otherwise, you should change the umask setting too to prevent newly created files from getting read permissions for the world by default.

For a system-wide configuration, edit /etc/profile; per-user settings can be configured in ~/.profile. I prefer the same policy for all users, so I'd edit the /etc/profile file and append the line:

umask 027

You need to re-login to apply these changes, unless you're in a shell. In that case, you can run umask 027 in the shell.

Now to fix the existing permissions, you need to remove the read/write/execute permissions from other:

chmod -R o-rwx ~

Now if you decide to share the ~/Public folder to everyone, run the next commands:

chmod o+x ~ - allow everyone to descend in the directory (x), but not get a directory listing (r should not be added)
find ~/Public -type f -exec chmod o+r {} \; - allow everyone to read the files in ~/Public
find ~/Public -type d -exec chmod o+rx {} \; - allow everyone to descend into directories and list their contents

If you are use GNU coreutils (e.g. on Ubuntu, not on a embedded system having only busybox), then the previous two commands using find and chmod can be replaced by this single command that recursively makes folders and files readable (and additionally adds the execute (descend) bit for directories only):

chmod -R o+rX ~/Public


How to install Virtual Box's Extension Pack via default repository in Ubuntu 17.10?

When you run this command :

sudo apt install virtualbox-ext-pack

During installation , the virtualbox-ext-pack is downloaded from http://download.virtualbox.org/ with wget tools.

But as you said, you use proxy for apt and also you can't access the http://download.virtualbox.org/ site, without proxy (because of curl: (6) Could not resolve host: download.virtualbox.org output, in your comments).

So you should set a proxy on your terminal (not just for apt) with this commands:

export http_proxy='http://proxyserveraddress:port'
export https_proxy='https://proxyserveraddress:port'

After set proxy in terminal, your problem should be solved.


how to limit resources to a shared ubuntu 10.04

This is a nice tutorial for adding users to a group If you give that groups rights to the folder than that should solve your first problem and your fourth problem.

I would solve the rights for stating and stopping Apache and Tomcat by giving limited sudo rights for specific commands. This can be done using sudo visudo to edit the /etc/sudoers file. A nice tutorial can be found here.

I'm not sure about your fifth question but I'm guessing one of the above solutions apply's


Uninstall evolution without uninstalling gnome-shell

The answer is you can not because gnome-shell explicitly declares evolution-data-server as a Dependency,
apt-cache depends gnome-shell | grep evolution-data-server


It is possible. If I would do it like that, I would use whatever distribution I know best. If this is Ubuntu with you, I would use Ubuntu server as a base.

I would suggest though to use one PC as server (in a home environment I would opt for power efficient components, my guess would be the xeon cpu uses rather a lot power) and the raspberry pi with openELEC as client.

Why? A server makes noise, the hard drives and fans are loud, you don't want them near your living room. And secondly, most pc equipment doesn't support cec (thats what enables your pi/kodi being controlled via HDMI with the TVs remote.)

If you still want to do your idea, use Ubuntu server, samba for file sharing, cups for printing, rtorrent in a screen for torrents, kodi with a basic graphical environment for playing videos and a USB CEC adapter for control through the TV remote.


To change time zone from terminal, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo dpkg-reconfigure tzdata

Once open, just follow the screens to change the time zone.


Whenever I am trying to install skype or google talk

I think it's maybe because they don't exist in the Software Centre in the first place.
But what you could do is instead install them with the terminal. If it's .deb packets you have downloaded you could just type dpkg -i <packagename>.deb to install it.
You have to of course stand in the same directory as your downloaded file (probably /home/yourusername/Downloads/).

dpkg is the Debian package manager tool that is used to install .deb packages. The flag -i means install. If you want to remove/uninstall a package you can use the flag -r (dpkg -r).


What mail server does Ubuntu have installed by default?

The default install does not include a mail-server.

The supported mailserver for Ubuntu Server is postfix.


Is there a way to drag and drop program shortcuts to the desktop in Ubuntu 19.04

In Ubuntu 19.04, like in previous Ubuntu versions, it is not possible to drag applications from the dash or the application menu to the desktop.

Desktop files from Ubuntu 19.04 onwards are handled by a Gnome Shell extension, and not anymore by files. You can still copy or create .desktop files on the desktop as before. The right-click menu has an option "allow launching" to turn that .desktop file into a launcher.


Does apt-get install package from ppa first and then official repository?

By default apt-get searches all available package sources and installs the package with the highest version number.

apt-cache policy nodejs

shows you all packages for nodejs with their versions from your package sources and tells you which one it would install ("Candidate").

There are some weays to change this behaviour, see for example How to prevent updating of a specific package?


You can also use these keyboard shortcuts to zoom in and out.

Ctrl + + to increase the size (zoom in)
Ctrl + - to decrease the size (zoom out)
Ctrl + 0 to revert to normal size


How do I get sound in Trine on 12.04 64-Bit?

Preloading did solve my problem:

env LD_PRELOAD=/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_conf_pulse.so  ./trine-launcher

but alsa then played back using the wrong soundcard. Messing around in the sound settings fixed that issue. I don't know why everything else played back fine even if I apparently had the wrong output selected in the sound settings?


How can I run arbitrary commands as part of a deb package install?

Even if it's not really recommended to remove silently a package in /usr/local you could do it in a debian/bamliquidatorbatch.preinst script:

#!/bin/sh
set -e

if [ -d "/usr/local/lib/python2.7/dist-packages/bamliquidatorbatch" ]; then
    pip uninstall -y BamLiquidatorBatch;
fi

Note that bamliquidatorbatch should be the exact name of your debian binary package (to match debian/bamliquidatorbatch.preinst).


PART 1: run the following commands in a terminal to install unity-greeter.

sudo apt-get update
sudo apt-get install unity-greeter

Reboot your machine.

If it doesn't use the correct lock screen (display manager), please leave a comment to let me know as you may need additional commands to switch to the correct one.

PART 2: to enable the unity-greeter, run each of the following commands in a terminal

sudo mkdir -p /etc/lightdm/lightdm.conf.d/
sudo rm -R /etc/lightdm/lightdm.conf.d/*
echo '[Seat:*]' | sudo tee /etc/lightdm/lightdm.conf.d/50-unity-greeter.conf
echo 'greeter-session=unity-greeter' | sudo tee -a /etc/lightdm/lightdm.conf.d/50-unity-greeter.conf

At this point, save any unsaved work as the next few following commands will log you out and close all open applications:

sudo apt-get update
sudo apt-get install ubuntu-artwork
sudo service lightdm restart

Again, if you do not see the correct login screen before you log in, leave another comment and I will post a fix for that, thanks.


Which package provides the Postgresql init scipt?

/etc/init.d/postgresql is provided by postgresql-common, according to the packages index.


Open terminal and type:sudo vi /usr/share/themes/name/gtk-3.0/apps/xfce.css. You will find something like this:

.xfce4-panel .button {
    border-image: none;
    background-color: #454545;
    border-color: transparent;
    border-radius: 0;
    border-width: 0 1px 0 1px;
    color: @dark_fg_color;
    text-shadow: none;

Change 'background-color: #454545;' to 'background-color: transparent;'
then logout and login and that's it

Ps, name is the theme name.


Delete C:/ Windows partition and install Ubuntu?

It's possible, but not advised, if you think you'll need to run Windows.

For example you may not find a printer driver for Linux and will need to reboot to Windows to print. There is very likely some reason you will want your Windows install back at some point.

Better to move your data to your C:/drive and delete one of those data partitions. Then you'll need to manually make multiple partitions where you deleted the one.

Typically Ubuntu (and all Linux) needs at least two or three partitions, at a minimum I mount / on one partition, /home on another, and use a third for swap.

Suggestion:

1 -- Read this page thoroughly until you understand it, it's the page about installing Ubuntu in its own partition.

If you decide to go ahead and install Ubuntu in its own partition you will have a good idea of what to expect based on the link above.

Make sure you understand the part about Master Boot Record and Boot Manager. Not understanding MBR vs. Grub2 will cause a lot of potential headaches that can be avoided by using the Wubi install in the next link. If you want to be unable to boot your computer, messing with boot partitions without a full understanding is a sure ticket!

To install Ubuntu in your Windows partition, please review this page about Wubi.

2 -- Have a backup of Windows and know how to restore it

3 -- Look at this question (which your in a way duplicates) and make the final decision if you want Wubi or if you are ready to mess with repartitioning. You can test out Wubi now, then later when you are confident you really want to dump Windows, and you understand partitioning better you can try a repartition. You can also attempt to shrink your Windows C:/ partition to keep it and make space for Linux.

If you install the right packages in Linux you can see your NTFS drives, so a basic Linux install can easily live on 50-100Gb.

Summary: I suggest you install Ubuntu in the Windows partition first (Wubi link). Booting a "live file system" off a USB stick or CD gets annoyingly slow after a while. Until you really know what you are doing don't delete partitions. It's easy to cause a problem where you can't boot and don't know how to fix it.

I am sure you understand, formatting C:/Windows will delete your Windows installation. Think of the least harmful approach while you are still getting to know Linux.


Install Ubuntu or Kubuntu on a External USB Drive

See "Installing Ubuntu 7.04 to a USB Hard Drive" - http://www.pendrivelinux.com/installing-ubuntu-to-a-usb-hard-drive/


Is the root.disk backed up from before the corruption? If not it won't work. It it is (a good copy), then you need to change the UUID to boot. So the first time, hit C to get to a Grub command prompt and enter:

search -s -f -n /ubuntu/disks/root.disk
probe --set=diskuuid -u $root
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
linux /vmlinuz root=UUID=$diskuuid loop=/ubuntu/disks/root.disk ro quiet splash
initrd /initrd.img
boot

This will boot the Wubi install (provided it's good, as I mentioned). Then you just need to update the grub.cfg to get it working normally:

sudo update-grub


Why is the second linux system I install unable to access the Internet?

Yes, you can. When you are going through the install options, just be sure to choose "Install alongside Ubuntu" when asked how you want to install. Ubuntu should ask how you want to partition. If you aren't particularly experienced with Linux, I recommend just sticking with the default options. Ubuntu should do the rest from then on, and you can choose to boot whichever version you want at startup.