Fully working workaround

A very easy and fully working workaround would be to head to Settings - Keyboard Shortcuts". Disable the existing keybinding for "Launch Terminal" under "Launchers", and add a custom shortcut at the end of the list that executes gnome-terminal or perhaps gnome-terminal.wrapper.

Debugging the issue

What you observe points to some misconfiguring in your particular system. While the workaround will be fully satisfactory, you may be interested to investigate:

1. Checking dconf setting for default terminal

The factory-installed keybinding "Launch terminal" launches the default terminal. Check which executable is defined as your default terminal

gsettings get org.gnome.desktop.default-applications.terminal exec

On a default Ubuntu installation, you will get 'x-terminal-emulator'. If it is different for you, then change it to default with the command

gsettings reset org.gnome.desktop.default-applications.terminal

gsettings reset org.gnome.desktop.default-applications.terminal exec-arg

Verify if that key now points to x-terminal-emulator. If not, then set that key explicitly because then apparently that is not the default for your system:

gsettings set org.gnome.desktop.default-applications.terminal exec 'x-terminal-emulator'
gsettings set org.gnome.desktop.default-applications.terminal exec-arg '-e'

If nothing was different on your system in this step, them move to 2.

2. Check system default terminal emulator

Trace back to what x-terminal-emulator refers. On a standard Ubuntu installation, the default keybinding in Ubuntu to open a terminal executes x-terminal-emulator. This is actually a link to /etc/alternatives/x-terminal-emulator. The latter in turn links to /usr/bin/gnome-terminal.wrapper. For you, x-terminal-emulator may link to something else.

Trace it as following:

Find out where x-terminal-emulator resides

which x-terminal-emulator
Identify the nature of the file:

file $(which x-terminal-emulator)

Then, in a similar way, investigate the linked files. Somewhere in your install, the chain may be different. Most likely would be that etc/alternatives/x-terminal-emulator for you points to another terminal (i.e. x-term). If that is the case, the cleanest way to correct it would be to reconfigure your alternatives:

sudo update-alternatives --config x-terminal-emulator

Type the selection number corresponding to /usr/bin/gnome-terminal.wrapper. This will remove the existing etc/alternatives/x-terminal-emulator and replace it by a symlink to gnome-terminal.wrapper.


Set font/font size/font scaling for single application window

Appropriate scaling for high DPI screens unfortunately is not standard. Ubuntu relies on GTK3 libraries. Any GTK3 application will adopt the system default settings and accordingly adapt properly to your high resolution display.

The application you refer to, Mendeley, uses the QT toolkit instead. Also that library had good HiDPI support, but it uses its own mechanisms and settings, independent from Ubuntu Desktop. You already discovered that QT5 applications can be scaled using environment variables. To reduce the size of fonts for this class of applications, install the application qt5ct. This is a settings panel that allows you to change, among others, the font size in QT5 applications.

This will work only for QT5 applications, not for applications that still use QT4 or any other toolkit. In some cases, no proper adjustment for high res displays is possible except from scaling the entire screen up using xrandr, which makes for a blurry appearance and blurry fonts.


How do I install a driver for an Atheros AR9285?

I fixed it. Edit the following file

/etc/modprobe.d/blacklist.conf

and add this

blacklist acer_wmi

Then reboot and your wifi should work ;)


Blinking Cursor when trying to run live Ubuntu 13.10 on USB

Depending on the BIOS of your computer, you can set the USB stick as a boot device. In some BIOS' they prefer to refer to the thumbdrive as a USB Removable Floppy Disk or USB Zip Disk.

GENERIC PHOENIX BIOS (May vary)

Go to "Advanced BIOS Features".
Go to the "1st Boot device" and set it to "USB-ZIP". Sometimes the device is listed as a USB hard drive under the hard drives menu.
Reboot

If you don't see the USB device as an option in the boot device order screen then it is probably not supported with your current BIOS version. If your PC's BIOS does not seem to support this, check if there is a BIOS update available.


Startx will start your default window manager. It looks like JWM is the only one, so it will start it automatically by default


Is upgrading from 11.04 with GNOME3 to 11.10 safe?

I know it's always better for me to back up what I want to keep and install instead of upgrade. I've never had an upgrade go very smoothly. I think most people would tell you to do a fresh install.


Ubuntu 18.04.1 LTS only one resolution available

A while ago I ran into a problem with some similaries to yours.
So the solution I used might help you. Source: Can't set a higher screen resolution in a external display in a Dell Mini 10v laptop.
In the terminal I did the following to add a new resolution of 1920 x 1200:

cvt 1920 1200

Assuming output is: "1920x1200_60.00"  193.25  1920 2056 2256 2592  1200 1203 1209 1245 -hsync +vsync
Replace that output in the two lines below with your output of cvt:

xrandr --newmode "1920x1200_60.00"  193.25  1920 2056 2256 2592  1200 1203 1209 1245 -hsync +vsync
xrandr --addmode VGA-1 1920x1200_60.00

In case this would help you, you could add a file .xprofile to your home directory with both xandr lines.


Remap side touch button on Microsoft Sculpt Comfort Mouse

I just bought one myself and found that the following workes perfectly for me.

Open dconf-editor (sudo apt-get install dconf-editor if it isn't already installed).
Navigate to org -> gnome -> desktop -> wm -> keybindings.
Change the value of switch-to-workspace-down to

['<Control><Alt>Down', '<Primary><Super>Tab', '<Control><Super>Tab']

and the value of switch-to-workspace-up to

['<Control><Alt>Up', '<Primary><Super>BackSpace', '<Control><Super>Backspace']


Using $HOSTNAME, for example:

$ echo $HOSTNAME
Castle2012

may help, as may $SESSION, for example:

$ echo $SESSION
ubuntu

and $_system_version, for example:

$ echo $_system_version
14.04


You can access the grub menu the following way:
You use Escape key after UEFI screen but before grub normally shows.
Or if BIOS you press an hold shift key from BIOS screen until grub menu loads
If windows is booting first I suspect that grub may not have been install properly.


What are requirements for Ubuntu Studio?

The formal requirements seem to meet what you have. However, you would not regret adding more memory to that machine, as "It is highly recommended that you have 2GB or more memory though so that the system will perform much better." Your system will accept more memory, I checked.

If you are not able to add memory, then consider using 32-bit (i386) Xubuntu and picking apps from the Studio suite one at a time.

There's also an Ubuntu Forums section specifically for Studio.


You can use wmctrl -lG to get a list of all open windows, in a table with the format:

<window ID> <desktop ID> <x-coordinate> <y-coordinate> <width> <height> <client machine> <window title>

An example output could look like this:

$ wmctrl -lG
0x02a00002  0 -2020 -1180 1920 1080 MyHostName XdndCollectionWindowImp
0x02a00005  0 0    24   61   1056 MyHostName unity-launcher
0x02a00008  0 0    0    1920 24   MyHostName unity-panel
0x02a0000b  0 -1241 -728 1141 628  MyHostName unity-dash
0x02a0000c  0 -420 -300 320  200  MyHostName Hud
0x03a0000a  0 0    0    1920 1080 MyHostName Desktop
0x0400001d  0 61   24   1859 1056 MyHostName application development - A tool to get window dimensions - Ask Ubuntu - Mozilla Firefox
0x04200084  0 61   52   999  745  MyHostName Untitled Document 1 - gedit


Mounting Samba share whenever it's available, unmounting when it's not

Mounting Samba shares with CIFS:

Edit your /etc/fstab file to automatically mount your Samba shares:

//<server>/<share> <mount point> cifs rw,_netdev,user=<username>,password=<password>,uid=<uid>,gid=<gid> 0 0

Notice the _netdev option:

CIFS doesn't know about this option and will throw a warning about it, but you should leave it in.

This option ensures that the drives won't get mounted if you have no network or if you are on the wrong network.

It also makes sure your shares get mounted/unmounted when you switch networks. That's because Debian's if* scripts are triggered when your network configuration changes, and they watch all the filesystems with the _netdev option and do the right thing automagically.

Source

you can check man mount for more information about _netdev

To install the CIFS tools

sudo apt-get install cifs-utils


how to mount extended partition in ubuntu for all users

First thing to do is to make an fstab entry for the drive(s)

Then create a new group, add the users to the group, and then recursively modify permissions on the drive to according to your needs.


How to create a desktop entry for an application located in the user space?

Since you told us that QGis needs the path ~/bin/qgis/lib in the library path, change the Desktop file as follows:

 TryExec=$HOME/bin/qgis/bin/qgis
 Exec=env LD_LIBRARY_PATH=$HOME/bin/qgis/lib $HOME/bin/qgis/bin/qgis %F


Control ("Ctrl") + Super (the "Windows" key) + "D".

This minimizes all currently-open windows, allowing you to see the desktop... Press the key combination again to restore all of the windows.


You have to:

Launch Plasma Discover
Find and install the corresponding Plasma Addon (for example something like Foreign Currencies).
Add the Widget to Plasma.


It seems you don't have the right version of python installed. You probably want 2.7 for pip.

sudo apt-get install python-minimal

this should give you recommended version. But if that version above 2.76 do this:

wget  https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
./configure
make
make install

Then i would also install build-essential.

sudo apt-get install build-essential

Then to switch python versions

sudo update-alternatives --config python

After this install pip

sudo apt-get install python-pip


Xubuntu Wireless Driver Trouble (Unclaimed network, iwlwifi, Intel AX200)

I managed to fix it: I ran apt-get --reinstall install linux-firmware. The reinstall seems to have fixed whatever the underlying issue was. To quote this answer:

Don't try to manually install from an archive provided by Intel.
Always try to find a package that provides the driver if possible.

I still get an ominous "system problem detected" GUI message on boot, but I'll let that sit for now.


When you ran the make command it built the binary, but it didn't install it.  There doesn't appear to be an install option for your program, so you need to reference the executable by referring to it with ./pgn2ltx when you are in the directory where you built the software.

The other solution is to copy the compiled executable into /home/$USER/bin (creating the folder first if it doesn't exist), and then add that directory to your $PATH with export PATH="/home/$USER/bin:$PATH" either directly on the command line yourself, or as part of your ~/.bashrc file so the changes are persistent.  From there, then, the executable will be recognized as a valid program when you try and execute the software with just pgn2ltx on the command line directly.


Referring to this question you could install two indicators in your panel:

What Application Indicators are available?

First one is the Gnome Classic Menu Indicator. It will bring back th Gnome Menu, which gives tree access to your installed programs. Open a terminal and type:

sudo apt-get install classicmenu-indicator

Second one gives you an indicator to access the places called bookmarks from your filebrowser and is called simply Places Inidicator

Download the latest version:

https://github.com/shamil/indicator-places/archive/master.zip

Extract the files

Run indicator-places.py


Dell M4600 with nVidia Quadro 2000M hangs on boot when external monitor is connected

The reason this problem could be occurring is because the GRUB resolution is different/higher than your monitor's resolution.

You can edit your GRUB resolution in this way:

sudo gedit /etc/default/grub

Edit line 25 and set it to 640x480px.

sudo update-grub

Now restart and see if GRUB works. If it still does not show up try pressing Shift when your GRUB loads.


list files and folders of the root partion

First standard cleanup & update.
sudo apt-get update
sudo apt-get upgrade
apt-get autoremove
sudo apt-get autoclean

Autoclean cleans up the downloaded archives (.gz or .tar) files used to install things. Autoremove cleans libraries that are no longer needed.
Then we can start search for large folders with du.
Size of apt caches (often an issue)
sudo du -sh /var/cache/apt/archives

find ~/.cache/ -depth -type f -atime +365

Delete all old cache entries, you can change to any number of days.
find ~/.cache/ -type f -atime +365 -delete

I also delete the older logs if no issues.
find /var/log/ -type f -atime +10  -name *.gz* -print -exec rm {} \;

houseclean journalctl over 10 days
journalctl --vacuum-time=10d

Then if not typical cache we can search.
cd / or cd /home
sudo du -hc --max-depth=1

Or and then for largest folder change from / to that folder - /var as an example and keep drilling down:
sudo du -hx --max-depth=1 / 2> /dev/null
sudo du -hx --max-depth=1 /var 2> /dev/null

I once forgot to mount my backup and it put the entire thing into /. I just barely had room, so system did not crash but root was almost full.
You also can check for large folders & files:
sudo du -h --max-depth=1 / | grep '[0-9]G\>'   # folders larger than 1GB
sudo find / -name '*' -size +1G    # files larger than 1GB

or install ncdu and drill down from / (q to quit):
sudo ncdu /


How do I install Brave Browser if my key is expired and won't update?

If you are using ubuntu 16.04 or higher you can install brave using snap store.
Open your terminal and type sudo snap install brave then enter.


Ubuntu SSH X11 Forwarded Client Very Slow

XMing doesn't support the X11 security protocol, causing it to default to trusted forwarding. It's possible SLES has ForwardX11Trusted enabled, while Ubuntu doesn't. That option allows the remote X client to make trusted calls on the local X server, which is a security risk if you don't trust the server, but can provide a substantial performance boost if you do.

You can use ssh -Y to connect with trusted X11 forwarding or set the ForwardX11Trusted option in your ssh client config.


Are there any good books for new Ubuntu users?

I've read lots of good books about Ubuntu and Linux in the past few months. This is the first great book.

— Arsgeek.com review of Beginning Ubuntu Linux, Second Edition

Keir Thomas walks you through the whole Ubuntu experience from beginning to end, comforting you with a calm voice when you might be feeling a bit lost ... He has done a great and thorough job.

— Free Software Magazine review of Beginning Ubuntu Linux, Second Edition

Winner of a Linux Journal Editor's Choice 2006 award (first edition)!

Beginning Ubuntu Linux, Second Edition updates the best-selling and award-winning first edition. It's the perfect guide for those switching to the world's favorite Linux. The new edition has been thoroughly updated to cover technology introduced in the 6.10 release.

In the 680+ fully illustrated pages, you'll learn how to install Linux, set up your hardware and software, customize the desktop experience, browse the Web and send/receive e-mail, play back audio and video, edit digital images, use the OpenOffice.org office suite, and more.

Additionally, you'll discover how to perform vital maintenance tasks, such as securing your computer against hackers, updating online, optimizing your system, installing and managing software, backing up, accessing your computer remotely, scheduling tasks, and more.

A whole third of the book is dedicated to Linux internals, including managing system processes and working at the command line. Two appendixes pre a glossary of Linux terms and an index of commands that can be used to control Ubuntu.

Beginning Ubuntu Linux, Second Edition is a complete, comprehensive, and unbiased guide to getting the most from Ubuntu.
DVD-ROM

Beginning Ubuntu Linux, Second Edition features a unique DVD-ROM companion disk containing the full Ubuntu installation that you can install on your computer. A full installation guide is pred in the book. Also included on the DVD-ROM are the Ubuntu sister projects, such as Kubuntu, Xubuntu, Edubuntu, and others. Both the long-term support and recent 6.10 releases of all projects are pred.
In Detail Part 1: Introducing the World of Linux

Opening the book are several chapters pring a brief but complete history of Linux. You'll learn about the key figures in the Linux movement and discover why the politics behind free software are so important.
Part 2: Installing Ubuntu

Here you'll find a fully illustrated guide to both installing Ubuntu on your computer and initially preparing the computer for Ubuntu. Detailed screenshots guide you through every step. In addition, there's a problem-solving chapter pring solutions for the most common issues.
Part 3: The No-Nonsense Getting Started Guide

The six chapters of Part 3 take you from zero to hero in as little time as possible. You'll learn what's what on the Ubuntu desktop and how to customize Ubuntu to suit your workflow. You'll be introduced to Linux replacements for your favorite Windows programs, and you'll be introduced to the Linux file system, so you can start working straightaway.
Part 4: The Shell and Beyond

The five chapters in Part 4 introduce the heart of Linux: the command line. You'll be introduced to the BASH shell, and a full rundown of the Linux filesystem is pred. You'll learn how to work with text files. The closing chapters of this section teach pro-level tricks you can use at the command line to work more efficiently.
Part 5: Multimedia

Here you'll learn how to set up Ubuntu to work with common audio and video files that you might have used under Windows or Macintosh. Then you'll be introduced to Ubuntu's audio and video playback software. Additionally, a complete guide to image editing and digital image management is pred.
Part 6: Office Tasks

The seven chapters in this section pre a comprehensive guide to the OpenOffice.org office suite. You'll learn how to undertake common tasks using the word processor, spreadsheet, presentations package, and database applications. Additionally, a complete guide to using Ubuntu's e-mail and personal information manager is pred.
Part 7: Keeping your System Running

The six chapters in this part of the book pick up from Part 4 and expand on various system management/command-line skills. You'll learn how to perform vital maintenance tasks, such as managing users, or installing and removing software. It's in this part of the book that you'll really learn your Linux stripes!


Well, I screwed up my installation of Ubuntu again

Happens to the best of us.

  Basically, I altered the xorg configuration file

Still not a problem even if you make a mistake.

What you do need to do is to always make a backup before you mess around. That way you can always replace the modified file with the one you altered. Anything related to grub, boot, xorg: better to have 1 extra backup that wastes a few kB discspace than not have one.

Now for a method:

If the system  does not boot but you can reach grub it is possible to boot to rescue mode. It is a bit complicated and there is 1 very easy method:

Boot up with the live dvd you used to install, select try ubuntu, open a terminal and remove the file you want removed.  (if you need more direction alter your question please to include what it is you need to know).


Pulse Audio Bluetooth card profile not displaying on Ubuntu 12.10

To enable bluetooth from pulseaudio we need to make sure we have the follwing package installed:

pulseaudio-module-bluetooth

Then we also need to load the module-bluetooth-discover to make use of a Bluetooth audio device from pulseaudio.

pacmd load-module module-bluetooth-discover

This can also be done from our default.pa to be loaded on starting the pulseaudio sound server.


unity tweak tool not working in ubuntu 15.04

You should be able to get it by installing the following package(s):

unity-webapps-service
and perhaps unity-webapps-common

You can install them with sudo apt-get install <PACKAGE-NAME>.


How do I change the background at boot time for Ubuntu 12.04?

I use Grub Customizer to change the background image.

To install, open a terminal and enter the following commands.

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

Run Grub Customizer. Go to Appearance Settings > background image.

You should choose an image that will be available at boot time. So, I strongly recommend that you place the image of your choice in /usr/share/images/ or /usr/share/backgrounds (you have, of course, already done that).


Upgrading to Ubuntu 13.04 with live USB on dual boot system

Ensure that your network connection is up and you reach ubuntu repos.

According to How do I upgrade from 12.10 to 13.04?:

  Insert the live CD or boot from the live CD to start installing it will give a option of upgrading to 13.04 if we have a functional Internet connection only. It will automatically detect installed applications and install the updated version of your applications also.

Without network you can't upgrade since Offline upgrade has been deprecated (https://wiki.ubuntu.com/RaringRingtail/ReleaseNotes):

  Offline upgrade options via alternate CDs are no longer offered for Ubuntu Desktop and Ubuntu Server.


How can I configure the public and cluster network with the juju ceph charm

Currently Juju has a very simple networking model, which assumes only a "private" (inside the cloud environment) and "public" (externally accessible) networks.

A more sophisticated networking model with support for user-configurable multiple networks is being developed right now, but until it's ready (most likely for the 14.10 release), you should be able to do it manually, after Juju deploys Ceph.

You can even pull the ceph charm's source, tweak it and deploy it from a local repository. Check out Juju documentation on using charms - https://jujucharms.com/docs/stable/charms.


There are a few ways to do this.  This answer is one I personally prefer.  It is a quick-and-dirty answer.  But from your question, I gather that's all you are looking for.

1 Create the script that does the thing you want in a loop.  For example:

while [ 1 ]; do
    echo `date` >> /some/file/somewhere
    sleep 1
done

2 Create a second script checks to see if the first script is running.  If not, run it:

VAR=`ps -ef |grep "name_of_script_1" |wc -l`
#VAR returns 1 if not running (because grep returns itself),
#    2 if it is running.
if [ "${VAR}" -eq "1" ]; then
    /run/script/1 &
fi

3 Run the second script in the cron on some interval, like every 5 mins.

*/5 * * * * root /run/script/2

So, every 5 mins, script2 checks to see if script 1 is running. If it's not running, it starts it up and tosses it into the background.

There are lots of articles on the internet to help with specific elements (running something in the cron, while/if syntax, putting program into background, etc.  But this should get you close to what you are looking for.


Open terminal and run:

suo add-apt-repository ppa:bingmann/ppa
sudo apt-get update
sudo apt-get install cryptote

Note: Before update,open software & Updates then Other software tab,uncheck the repos creating error or remove the entry added to /etc/apt/sources.list


Assuming you already have a Makefile:

$ CFLAGS="-std=c99" make

Adding following to your Makefile will also work:

  CFLAGS=-std=c99

Or, if using configure:

$ CFLAGS="-std=c99" ./configure


You can use ifuse to mount your ipod.

Install it using sudo apt-get install ifuse.

From man ifuse

ifuse - Mount filesystem of an iPhone, iPod Touch, iPad or Apple TV.

This  mounts  the  root filesystem of the first attached device on this
   computer in the directory /media/iPhone.


Android device not recognized in eclipse

A quick search on the web reveals that you have to activate debugging on the phone first.


How to migrate ubuntu 15.10 to an other disk

If there is not already any data on the SSD at all, then it is pretty easy:  boot the existing install in rescue mode ( choose from the grub boot menu ), and then at the rescue menu, choose the root shell option, then run lsblk to see what disks are what.  Identify which one is the existing USB, and which one is your new SSD, and assuming the USB is /dev/sda, and the SSD is /dev/sdb ( adjust the parameters otherwise ), run dd if=/dev/sda of=/dev/sdb to copy everything on the USB to the SSD.  You should then be able to shutdown, remove the usb, and boot the SSD and fire up gparted to move/resize your partitions to take advantage of the additional space.  Don't try to boot with both disks connected at the same time, as they will have the same UUIDs and this will confuse the system.

If you have data on the SSD already, then it is slightly more complicated.  First, create a partition on the SSD to hold your root fs.  You don't need to format it.  Then boot into rescue mode as above, only instead of copying the entire disk, you need to copy only your root partition.  Assuming /dev/sda1 is the existing root, and /dev/sdb3 is the partition on the SSD you want to copy to, run e2image -arp /dev/sda1 /dev/sdb3 to copy the filesystem ( unlike dd, e2image is smart enough to copy only the used parts of the filesystem, and skip the free space, speeding up the process ).  After that, run resize2fs /dev/sdb3 to expand the filesystem to use the additional space in the new partition.  If /dev/sdb4 is your new swap partition, format it with mkswap -U uuidgoeshere /dev/sdb4.  Use the UUID of the old swap partition.  Finally, install grub on the SSD so it can boot: grub-install /dev/sdb.  After that, shut down, remove the usb stick, and boot from the ssd.


Unable to use nvidia gpu with optimus on ubuntu 16.04

Bumblebee does not work well on Ubuntu 16. You should use prime.

sudo apt-get install nvidia-378 nvidia-prime

Prior to doing this you should purge bumbleebe and whatever else you installed.


Not a a complete answer, but this may help understand what's going on.

From http://man7.org/linux/man-pages/man7/capabilities.7.html:

  Capability bounding set prior to Linux 2.6.25

  In kernels before 2.6.25, the capability bounding set is a system-
  wide attribute that affects all threads on the system.  The bounding
  set is accessible via the file /proc/sys/kernel/cap-bound.

  ...

  Capability bounding set from Linux 2.6.25 onward

  From Linux 2.6.25, the capability bounding set is a per-thread
  attribute.  (There is no longer a system-wide capability bounding
  set.)

  ...

  Removing capabilities from the bounding set is supported only if file
  capabilities are compiled into the kernel.  In kernels before Linux
  2.6.33, file capabilities were an optional feature configurable via
  the CONFIG_SECURITY_FILE_CAPABILITIES option.  Since Linux 2.6.33,
  the configuration option has been removed and file capabilities are
  always part of the kernel.  When file capabilities are compiled into
  the kernel, the init process (the ancestor of all processes) begins
  with a full bounding set.  If file capabilities are not compiled into
  the kernel, then init begins with a full bounding set minus
  CAP_SETPCAP, because this capability has a different meaning when
  there are no file capabilities.

  Removing a capability from the bounding set does not remove it from
  the thread's inherited set.  However it does prevent the capability
  from being added back into the thread's inherited set in the future.


Here's how I solved it, instead of running "sudo bash" or in your case running "sudo -c" (which either makes your script pause when changing user or simply doesn't work) I run three small scripts.

(Don't forget to make each of the scripts executable with "chmod +x script_name.sh")

First script is my install.sh:

sudo cp third_script.sh /tmp         # Copy third_script to tmp for easier access
sudo chmod 0755 /tmp/third_script.sh # This needs to be executable by lightdm
sudo bash second_script.sh           # Runs next file
sudo rm /tmp/third_script.sh         # Now we can remove the third script

Then in second_script.sh I add lightdm to xhost and run the third script file as the lightdm-user:

#!/bin/bash
echo "$USER"                         # To see if root is running the script
xhost +SI:localuser:lightdm
su lightdm -s /tmp/third_script.sh

And the third_script is where the magic happens:

#!/bin/bash
echo "$USER"                         # To see if lightdm is running the script
gsettings set com.canonical.unity-greeter background '/background.png'
gsettings set com.canonical.unity-greeter draw-grid false

This works for me! Let me know if there is any easier way.


Terminator does not looks like the same as Gnome terminal even used system-theme color

When you followed the instructions, you ran into the window shown below.  Please note the "Use colors from System Theme" checkbox, which should bring you back to defaults, or choose a color scheme you like from the built-in schemes, or choose custom colors for the text and background.

You could check the Preferences menu of Gnome-terminal to check what color schemes it is using, and set those into Terminator...

Update 2019-05-06

The problem here in Ubuntu 18.04 using the Ambience theme, is that Terminal and Terminator do not use the same set of "system themes".  So to make Terminator appear like Terminal, we need to define a custom background and foreground color for Terminator.

In Terminator, access the Preferences->Profiles->Colors screen.
Uncheck "Use colors from system theme"
Select "Custom" from built-in schemes
Select "white" as the text color
Choose custom as the backgroup color, and use the color number #300A24

Terminator does not immediately change the color of the existing terminal.  Open a new tab...


How to list snaps with their confinement?

Hard to find online. Looks like is not an official way to do it yet.

Some developers have shared how to do it with a shell script in the snapcraft forum.

You can take a look here:
https://forum.snapcraft.io/t/reliable-way-of-detecting-snap-confinement-mode/8896

Otherwise, I've found it is actually shown in the "snap list" response in the notes column. As in here:

Just to know about defaults, Snap man page states about the installation command:

"The install command installs the named snaps in the system.
With no further options, the snaps are installed tracking the stable channel, with strict security confinement."


Mouse keys wont work after installing ubuntu 16.04

Please check out...

How can I remap keyboard keys?

For your answer.


How do I install the new beta driver for Nvidia?

Why no just open the ADDITIONAL DRIVERS in the PREFERENCES panel and select the POST_RELEASE version of the driver?


list of default packages for Ubuntu 12.10?

First, try

sudo apt-get install ubuntu-desktop

restart and see if that works. Otherwise install these:

sudo apt-get install account-plugin-windows-live aisleriot alarm-clock-applet apt-transport-https apturl autopoint brasero brasero-cdrkit chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg compiz compiz-gnome curl deja-dup-backend-gvfs devhelp devhelp-common emacs24 evolution-data-server flashplugin-installer gconf-service gconf-service-backend gconf2 gir1.2-gconf-2.0 gir1.2-gdata-0.0 gir1.2-muffin-3.0 gir1.2-rb-3.0 gir1.2-totem-1.0 gir1.2-totem-plparser-1.0 git gksu gnome-contacts gnome-shell gnome-terminal gnome-terminal-data gnome-user-share gstreamer0.10-gconf gstreamer0.10-plugins-bad gstreamer1.0-plugins-bad gvfs-backends ibus ibus-pinyin ibus-table inkscape kerneloops-daemon libbonoboui2-0 libbrasero-media3-1 libcmis-0.3-3 libcurl3 libcurl3-gnutls libdevhelp-3-1 libfolks-eds25 libgconf2-4 libgdata13 libgksu2-0 libgnome2-0 libgnome2-bin libgnome2-common libgnomeui-0 libgnomevfs2-0 libgnomevfs2-common libgnomevfs2-extra libgssapi3-heimdal libheimntlm0-heimdal libhx509-5-heimdal libkrb5-26-heimdal libldap-2.4-2 libmuffin0 liboauth0 libquvi7 libraptor2-0 librasqal3 librdf0 libreoffice-base-core libreoffice-calc libreoffice-core libreoffice-draw libreoffice-gnome libreoffice-gtk libreoffice-help-en-gb libreoffice-help-en-us libreoffice-help-es libreoffice-impress libreoffice-math libreoffice-ogltrans libreoffice-pdfimport libreoffice-presentation-minimizer libreoffice-writer librhythmbox-core6 libslv2-9 libsmbclient libtotem-plparser17 libtotem0 libwind0-heimdal lightdm-remote-session-uccsconfigure muffin-common mythes-en-us nautilus-share network-manager-gnome octave octave-miscellaneous python-cupshelpers python-gconf python-pycurl python-smbc python3-uno rhythmbox rhythmbox-mozilla rhythmbox-plugin-cdrecorder rhythmbox-plugin-magnatune rhythmbox-plugin-zeitgeist rhythmbox-plugins rhythmbox-ubuntuone samba-common-bin seahorse smbclient software-center system-config-printer-common system-config-printer-gnome system-config-printer-udev totem totem-mozilla totem-plugins ubuntu-desktop ubuntuone-client-gnome unity unity-chromium-extension unity-lens-photos unity-scope-musicstores unity-tweak-tool vim-gnome virtualbox virtualbox-dkms virtualbox-qt vlc vlc-nox vlc-plugin-notify vlc-plugin-pulse webaccounts-chromium-extension whoopsie

(You might want to not install some of these, for example I use virtualbox and the wildcard you used also caught it. Of course, you could remove it and others you don't use once your system is OK.)

Edit:

You should specify

sudo apt-get remove wine.*

The pattern apt-get expects is a regex, when you write wine* you are telling it to match:

the string "win";
the string "wine";
the string "winee";
the string "wineee";
etc.

That is because * (asterisk) appended to a character means the character should repeat zero or more times. The dot in wine.* means any non-vertical-space character, in particular wine.* tries to match:

the string "wine"
any string which contains the word "wine" followed by one character or more.

Nonetheless for better results you should do

wine_packages=$(apt-cache --names-only search 'wine.*' | awk '{ print $1 }')
sudo apt-get remove $wine_packages

Of course, there are still some packages which aren't Wine related there... The best is just to uninstall them one at a time and running sudo apt-get autoremove.


There's no real way of doing this with gnome-open itself, as it is impossible to pass geometry options to the program that will open your designated file.

The only feasible way to specify window geometry would be to set it beforehand in various profiles for your favourite programs by using devilspie, so that when you run

gnome-open ~/my.pdf

devilspie will load your profile for say evince, and set the window geometry as the window appears. If you are using compiz, see this question for how to specify window settings, as devilspie might not work with all window managers.

Devilspie can be installed from the repositories, and I discuss it in much more detail in this other question. In brief, the configuration file for the target program must be in ~/.devilspie and end in .ds. Below is an example of one tailored for gedit, labelled gedit.ds:

; gedit geometry

(if (is (window_class) "Gedit") (geometry "662x742+0+27"))

You will need to specify your own desired geometry that is appropriate for your screen, and put devilspie in startup applications. You can run killall devilspie and then devilspie & so that any configuration changes to files in ~/devilspie are re-read.


A dependency occurs when one package depends on another. You might think it would make for an easier-to-manage system if no package depended on any others, but you’d face a few problems, not the least of which would be dramatically increased disk usage.

Packages on your Linux system depend on other packages. Just about every package with an application, for example, depends on the system C libraries, since these libraries provide common facilities that just about every program uses. Network applications typically depend on low-level networking libraries. These dependencies really work in your favor, since a security bug fix in the network libraries can update all applications that make use of the updated libraries.

Furthermore, sharing software means that each package has less code to maintain and thus improved quality. Code sharing has been in the computer lexicon since the 1960s.

Although quite a few packages depend on system-level libraries, some packages depend on applications defined in other packages. The Emacs text editor package, for example, depends on the Perl scripting language, specifically, the perl command. Database client programs usually depend on the database server applications.

An application may depend on a capability provided by another package. It may also depend on the capability that a specific version of another package provides.

Most package dependencies assume some level of compatibility and require a version at or above a given version number.

Source:FP


What is changed in fonts configuration from 10.10 to 11.04?

set this (/etc/fonts/conf.d/):

10-antialias.conf -> ../conf.avail/10-antialias.conf

10-hinting.conf -> ../conf.avail/10-hinting.conf

10-hinting-medium.conf -> /etc/fonts/conf.avail/10-hinting-medium.conf**
run and close firefox
change setting to full hinting:

10-antialias.conf -> ../conf.avail/10-antialias.conf

10-hinting.conf -> ../conf.avail/10-hinting.conf

10-hinting-full.conf -> /etc/fonts/conf.avail/10-hinting-full.conf**
run firefox


For the first part, to connect to two networks at the same time I would set up static routes. Assuming that the networks are on different subnets, you're basically telling the system, "If you need to connect to a machine with an address of 192.168.2.X, use eth0. If you need to connect to a machine with an address of 192.168.3.X, use eth1. And here is the gateway you should use."

So in /etc/network/interfaces add these lines (with your own network information of course):

auto eth0
iface eth0 inet static
      address 192.168.2.2
      netmask 255.255.255.0
      up route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.1

auto eth1
iface eth1 inet static
      address 192.168.3.2
      netmask 255.255.255.0
      up route add -net 192.168.3.0 netmask 255.255.255.0 gw 192.168.3.1

As far as what logic is required for the system to identify and handle a message in a certain way, I believe that would rely on the certain software you are using to process the messages.


Ubuntu not booting as a result of choosing the third option in wubi

The third Wubi option is to help you boot the DVD/USB. This is e.g. if you don't have the ability to override your BIOS boot options. Most modern computers can do this with e.g. pressing F12 when the computer starts, or F2 to enter BIOS and modify the boot device order.
But in any case, when you use Wubi in this way, it's the same as booting the live environment.

Once you see the Ubuntu Desktop there will be an icon (top left on the Unity launcher) that is Install Ubuntu. If you click that you can install a normal dual boot. Note this is not a Wubi install, but a normal install that partitions your hard drive and installs the Grub bootloader to the drive MBR. If you don't install, then no changes are made. i.e. if you boot to the live environment and then shut down, nothing changes. The Windows boot manager entry is still there, but Ubuntu hasn't been installed, either with Wubi or normally. You still need that USB to boot.

The Wubi boot helper as it's called, added an entry in the Windows Boot Manager. This remains until you go to the Control Panel, Add or remove programs, and double click on Ubuntu to uninstall it.

PS. The Wubi boot helper is seldom used, tested, and poorly documented. I've used it with a CD a while ago, but not a USB. There may be some inaccuracies in the above, but most of it should be correct.


press CTRL + ALT + T to open a terminal window and type the following to run the network manager:

nm-applet &


You can use AptonCD .

It helps you create a CDs/DVDs of your installed packages for later use.

You can also easily choose which packages you want to be backed up in the disk

Sources

Debianadmin

Addictivetips


How to change png file parameter IHDR width using imageshack

Transforming your image via the command line can be done fairly easily by using ImageMagick, the gold standard application for image manipulation:

sudo apt-get install imagemagick

The syntax below converted your image nicely to your requirements:

convert original.png -gravity west -background white -extent 384x42 altered.png

Below is the original image with the altered image underneath it. I have set the background for the altered image using -background skyblue, substituting for -background white to make the padding a little easier to see on Ask Ubuntu:

ImageMagick is pretty cool :).

References:

ImageMagick: Extent, Direct Image Size Adjustment


The package name is xfce4-notifyd and it will only remove notify-osd (as they cannot co-exist) and the ubuntu-desktop metapackage. Latter one won't harm your system, but it has some downsides, see: What are the downsides of removing ubuntu-desktop metapackage?

That said: I don't know if xfce4-notifyd does what you want, but trying it won't hurt your system, as you can always go back by re-installing the ubuntu-desktop metapackage.


If this is dealing with the grub bootloader, then just delete the partition that windows 8 is on and use an ubuntu livecd and run "sudo update-grub /dev/[what is the name of the disk, something like sda probably] to remove the windows 8 boot entry


How to change the Cinnamon system theme from the command line?

Open the terminal (Ctrl-Alt-T) and select the three lines on the top bar:

Then select Preferences - you can change the theme here:

Hope that helps?


GUI development with Glade/FreeBasic - missing gtkwidget.bi

Did you install all of the dependancies with glade, freebasic and geany?  If not then try and go to you software center and install al packages / dependancies that come with these pieces of software

If you try using this:

sudo aptitude install build-essential libc6-dev libncurses-dev libgpmg1-dev libx11-dev libxpm-dev libxrandr-dev libglitz-glx1-dev

just looked on internet for you and theres that ^ piece of code and also this link here :

FreeBasic installation video for Ubuntu


Installing Ubuntu on a corrupt Dell Mini with Windows 7 without optical disk drive.

Yes, you can install from USB stick. Ubuntu installation will overwrite the bootmgr and make your computer just as fine (even better probably, since it's Ubuntu ;)) - given that this is the only problem with it.

Anyways. There are many ways to get Ubuntu on a USB stick, many of which are easy to find with google - or on the Ubuntu site it self.

I assume you are going to do this from another machine, probably a Windows machine? There is a great guide on the Ubuntu website explaining this: http://www.ubuntu.com/download/help/create-a-usb-stick-on-windows

To run Ubuntu from a USB stick, the first thing you need to do is insert a USB stick
with at least 2GB of free space into your PC.

The easiest way to put Ubuntu onto your stick is to use
the USB installer provided at pendrivelinux.com.
You’ll need to download and install and follow the instructions.

It is really as easy as that. When you are done making your USB stick, you just have to boot from the USB stick and follow the installation of Ubuntu.

If you are not on Windows, the same link has information about doing this from Ubuntu or Mac OS too.


Is there a way to create multiple directories at once with mkdir?

You can use lists to create directories and it can get pretty wild.

Some examples to get people thinking about it:

mkdir sa{1..50}
mkdir -p sa{1..50}/sax{1..50}
mkdir {a-z}12345
mkdir {1,2,3}
mkdir test{01..10}
mkdir -p `date '+%y%m%d'`/{1,2,3}
mkdir -p $USER/{1,2,3}

50 directories from sa1 through sa50
same but each of the directories will hold 50 times sax1 through sax50 (-p will create parent directories if they do not exist.
26 directories from a12345 through z12345
comma separated list makes dirs 1, 2 and 3.
10 directories from test01 through test10.
same as 4 but with the current date as a directory and 1,2,3 in it.
same as 4 but with the current user as a directory and 1,2,3 in it.

So, if I understood it correctly and you want to create some directories, and within them new directories, then you could do this:

mkdir -p sa{1..10}/{1,2,3}

and get sa1, sa2,...,sa10 and within each dirs 1, 2 and 3.


If your settings and files are not saved when you reboot, you do not have persistence enabled.

You can either make a new Flash drive. This may be easiest as there are graphical tools to do this for you ("install" the iso to the flash drive and enable persistence).

See: https://wiki.ubuntu.com/LiveUsbPendrivePersistent#Live_USB_creator_.28GUI-based.29

Alternately you can manually enable persistence. You can do this either by making a file or partition named "casper-rw". I think making a file would be easiest.

First, mount the flash drive at say /mnt

sudo mount /dev/sda1 /mnt

then make a file, change the count to increase the size:

dd if=/dev/zero of=/mnt/casper-rw bs=1M count=128

mkfs.ext4 /mnt/casper-rw

Then reboot, at the boot screen add the work "persistent" to the boot options.

See https://help.ubuntu.com/community/LiveCD/Persistence#Using_a_Loopback_File for details.


Can be done with the help of netconsole.
Found it here.


The Software app sometimes gets false positives in the Updates tab for packages that have already been updated automatically, but the Software app hasn't been refreshed to know about it yet. If you clicked the green Restart & Update button and nothing happened, then ignore the update button and the update notification will go away by itself. This unexpected behavior in the Software app does not have any effect on updating software from the terminal which still functions properly in the usual way.


cannot uninstall fcitx without causing a login loop

I was having the same issue after uninstalling fcitx from Ubuntu 14.04.

I am giving you the main steps as I remember them.

A) Fix the boot loop first:

at login screen type Ctrl+Alt+F1 (or F2 .. F6)
you will enter a terminal in full black screen. From there you install fcitx AGAIN by

sudo apt-get install fcitx

Go back to the normal login screen and now log in into your account

B) Uninstall fcitx cleanly:

Refer to this manual with Google translator.
Open terminal again and you only need following commands:

sudo dpkg -l so*

sudo apt-get purge sogoupinyin

sudo apt-get purge fcitx

sudo apt-get autoremove

Restart your computer.


any ubuntu touch for sony xperia t2 ultra(D5303)?

A list of supported devices are available at https://wiki.ubuntu.com/Touch/Devices.

Your device, Xperia T2, is not explicitly mentioned but however, Xperia T (mint) is on the list. You may notice that most of the features are Work in Progress as of now.

As for your second question, try contacting the maintainer of the image for Xperia T.


I can't install Ubuntu 18.04 alongside Windows 10

I run both Ubuntu and Windows 10.

After installing Windows 10, ensure you have an un-allocated partition where the Ubuntu will be installed.

Once you run the Ubuntu setup, it will appear as an option.


Lubuntu 19.10 does not list geany / gnome-system-monitor / openssh-server packages using Muon

According to your edited question, apt sees candidates for these three program packages. Please try to install them with the following command lines

sudo apt update
sudo apt install geany gnome-system-monitor openssh-server

and let us know the result.

I think it will work, so good luck :-)


How to get Synergy to Autostart at login on Ubuntu 16.04

You should be able to do it by copying the synergy.desktop file into your ~/.config/autostart/ folder by running the following command:

cp /usr/share/applications/synergy.desktop ~/.config/autostart/

then all you should have to do is to set the permissions on the file:

chmod 664 ~/.config/autostart/synergy.desktop

EDIT:  I know this was written a while ago, but you can also just copy the file to the xdg/autostart so that it starts before logging in, probably best to not copy it into both locations so it doesn't start more than once:

sudo cp /usr/share/applications/synergy.desktop /etc/xdg/autostart/
sudo chmod 644 /etc/xdg/autostart/synergy.desktop

Now when you reboot your host it should autostart synergy.

Hope this helps!


How can I remove a string of text from a files name?

I guess this answer to another question could help :)

Specific to the question:

rename s/".svg"/""/g *

General:

rename s/"**TO-BE-REPLACED**"/"**REPLACEMENT**"/g *


Boot problem in ubuntu precise pangolin 12.04

Same problem.
Solution: Reinstall / and when updating first time uncheck everything related to wireless drivers, xorg & Compiz.
Worked for me.

DELL Inspiron
4gb (Pae Kernel)
ATI
BROADCOM
Good Luck


Installing other OS on Asus VivoTab TF810C

That tablet comes with a 32-bit Intel Atom processor so you can not use 64-bit operating systems. Try a 32-bit version: Ubuntu Budgie  or Ubuntu MATE


I think you should boot to windows, and go to the recycle bin. If your files are there, you can restore the recycle bin.

May be you accidentally delete the files.

Regards,
Bobby


Native screen recording issue (Shift+Ctrl+Alt+R)

The questioner, Duck Dude, added this answer to the question:

  Not a bug: native screencast lasts for a maximum of 30s


Cannot access my web content that i just copied to /op/lampp/htdocs directory?

This is due to a permission problem.  To avoid this error change permission as shown.

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

sudo chmod -R 0777 /opt/lampp/htdocs/mywebfile


With many applications, there are multiple ways to download/install them.  One way is through apt-get and another is by downloading and untaring the .tar file.  Note, that apt-get has nothing to do with the .tar file.

Unable to locate package zopectl

Typically, that error indicates the package you are trying to install cannot be found in any of your defined repositories.  Have you done a sudo apt-get update?  Run that command and then try again.

If you cannot get the apt-get install to work, you should be able to install this application by untar-ing the .tar file (which you say you have already downloaded).  In terminal, change to your home directory (cd ~) and try this:

tar -xvf nameOfTarFile.tar

Note that if the file you downloaded is a tar.gz file, you'll need to set one more flag to get that to work:

tar -zxvf nameOfTarFile.tar


Wrongly installed google chrome 32-bit version, what can I do now?

First you have to remove chrome 32-bit already installed, for that go to Ubuntu Software Center and search for chrome. When you find it select it, and you can see Remove option.

By clicking remove you can remove the unwanted version, now you can install needed 64-bit version.

Easy way to install Chrome 64-bit version .deb, open with Ubuntu Software Center and click install.


How shall I install and invoke IDLE for Python3?

IDLE 3 is an Integrated Development Environment for Python 3.x. IDLE 3 is written using Tkinter and therefore quite platform-independent. To install idle3 in all currently supported versions of Ubuntu open the terminal and type:
sudo apt install idle3

Then the command python3 -m idlelib will work open IDLE 3 successfully.
To install IDLE for both Python 2.x and Python 3.x open the terminal and type:
sudo apt install idle idle3


Clear Dash Searchbox after search and Start a Program

Just press Esc, or Delete (Del), or Backspace (←) when you open Dash again. Esc key will empty the content of the input field in any circumstances, even if the text is not selected. It doesn't take more than a second.


installing cuda toolkit 6.5 on ubuntu 19.1

It took me several days and trying different methods including a docker image (which didn't work) to figure out how can I solve it:

install the latest compatible driver from ubuntu->software & update->Additional Drivers-> Using NVIDIA binary driver (for my case the latest compatible was 340.107). Make sure nvidia-smi works successfully.
install gcc-4.7 and g++-4.7 by adding the following lines to /etc/apt/sources.list and then running sudo apt update && sudo apt install g++-4.7 gcc-4.7

deb http://dk.archive.ubuntu.com/ubuntu/ xenial main
deb http://dk.archive.ubuntu.com/ubuntu/ xenial universe

the above lines coud be removed from /etc/apt/sources.list after that
if you have previously installed a newer version of gcc and g++, remove gcc and g++ which are symbolic links from your $PATH and create new sybolic links to newly installed gcc-4.7 and g++-4.7 (e.g sudo ln -s /usr/bin/gcc-4.7 /usr/bin/gcc)
install required libraries by: apt-get install libglu1-mesa libxi-dev libxmu-dev libglu1-mesa-dev
Download cuda_6.5.14_linux_64.run from NVIDIA website and extract it by: ./cuda_6.5.14_linux_64.run --tar mxvf
copy InstallUtils.pm file from the extracted package and copy it to your perl-base location (for mine it was /usr/lib/x86_64-linux-gnu/perl-base)
set your perl library path (e.g export PERL5LIB=/usr/lib/x86_64-linux-gnu/perl-base)
then install the cude toolkit from the extracted package (sudo sh cuda-linux64-rel-6.5.14-18749181.run)
after installation and setting the PATH and LD_LIBRARY_PATH you sould be able to compile and run cuda samples.

a simple example you can find in cuda-samples/0_Simple/simplePrintf and compile it by running make command. Following was the output that I got:

GPU Device 0: "Quadro FX 5800" with compute capability 1.3

Device 0: "Quadro FX 5800" with Compute 1.3 capability
cuPrintf() is called. Output:

[1, 0]:     Value is:10
[1, 1]:     Value is:10
[1, 2]:     Value is:10
[1, 3]:     Value is:10
[1, 4]:     Value is:10
[1, 5]:     Value is:10
[1, 6]:     Value is:10
[1, 7]:     Value is:10
[3, 0]:     Value is:10
[3, 1]:     Value is:10
[3, 2]:     Value is:10
[3, 3]:     Value is:10
[3, 4]:     Value is:10
[3, 5]:     Value is:10
[3, 6]:     Value is:10
[3, 7]:     Value is:10
[2, 0]:     Value is:10
[2, 1]:     Value is:10
[2, 2]:     Value is:10
[2, 3]:     Value is:10
[2, 4]:     Value is:10
[2, 5]:     Value is:10
[2, 6]:     Value is:10
[2, 7]:     Value is:10
[0, 0]:     Value is:10
[0, 1]:     Value is:10
[0, 2]:     Value is:10
[0, 3]:     Value is:10
[0, 4]:     Value is:10
[0, 5]:     Value is:10
[0, 6]:     Value is:10
[0, 7]:     Value is:10


I want to backup my entire Ubuntu system

DD will work, however there are probably better tools, like rsync.

Still if you want to use DD, you'll need to do:

sudo dd if=/dev/sda1 of=/path/to/backup/drive & dd if=/dev/sda2 of=/path/to/backup/drive &

(and so on)


How do I install Ubuntu on a Compaq Presario v2000?

Maybe try another flavour of Ubuntu that is more suited for low specs computers?

I think that Lubuntu would be the best option, because Ubuntu 12.04 will be extremely slow on the laptop you described. Lubuntu uses LXDE, a lightweight desktop environment that won't need as much memory as Unity.

I know this is not exactly the answer you are looking for, but your problem might actually disappear in Lubuntu's install process.

Official Lubuntu website

Did you try checking your install CD for errors?
If you can't fix that and you really want to get Ubuntu 12.04 with Unity, you might want to try the alternate install CD.


If elena and maria are two different users, with two different user-ids, you can execute the following command and allow read/write access to /home/elana only toelana (and root):

sudo chmod 700 /home/elana

Explain:

  sudo - execute command as root
  chmod 700 /home/elana- change mode of the directory to read/write/execute by owner only

Now, other users (including maria) won't be able to access /home/elana (unless they can get root access - e.g. using sudo)


I dug out in wrong place. After experiments with locale i suddenly detected - this error appear before resolving a host.
Helped  this: -e "ssh -p 2222".

rsync -rv -e "ssh -p 2222" --progress --delete-before --ignore-existing --dry-run andrew@192.168.0.101:/media/Maindata/Книги/ /media/Maindata/Книги/

It's successfully resolve remote source.


cannot uninstall/install any software because of intellij Idea

There's an outdated, half-installed package on your system that can't be fully installed because its data was corrupted. Please remove it and try again:

sudo apt-get remove -f intellij-community-idea


How to know the file system of my USB memory from the terminal?

Run mount | grep ^/. You'll get something like this:

/dev/sda1 on / type ext4 (rw,errors=remount-ro)

As you can see, the file system is ext4 in my case.


Change java version from 1.8.0_161 to 1.8.0_151 Ubuntu 16.04

I had an issue as follows:

>Checking build tools versions...
>************************************************************
>You asked for an OpenJDK based build but your version is
>java version "1.8.0_161" Java(TM) SE Runtime Environment (build 1.8.0_161-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode).
>************************************************************
>build/core/main.mk:175: error: stop.
>09:36:38 ckati failed with: exit status 1
>build/core/main.mk:21: recipe for target 'run_soong_ui' failed
>make: *** [run_soong_ui] Error 1

>#### make failed to build some targets (01:40 (mm:ss)) ####

The issue is solved for me by removing Oracle path from  $EXPORT.


First you have to configure TOR
For this :
We can find the configuration file at /etc/tor/torrc. It’s owned by root, so we’ll have to sudo to edit it:

$ sudo nano /etc/tor/torrc

We’ll uncomment the options we need, and set them to the appropriate values, ending up with something like this:

ORPort 9001
DirPort 9030
ExitPolicy reject *:*
Nickname trustytohr
RelayBandwidthRate 1 MB
RelayBandwidthBurst 2 MB
AccountingStart month 1 00:00
AccountingMax 100 GB
DisableDebuggerAttachment 0**

The most important settings are probably ORPort, DirPort and ExitPolicy

after this restart TOR and run arm


I have an HP Pavilion 13 x360 and I have the same issues as you have. Currently, there is no official 'tablet mode' support nor is there even proper touch UI support in Ubuntu/Unity. Unity 8 is supposed to bring those features.

Until then, stick with Chrome and maybe check out this thread:
Switch into tablet mode (in Gnome)

(albeit in gnome)


How do I setup a timer based notification?

Since I couldn't use dbus-send I wrote a python script instead. The pynotify module internally uses the dbus API. For extra kicks I added a fortune cookie in the message. Works like a charm:

#!/usr/bin/env python
"""python 2.7 script that creates a notification using pynotify. It shows the current time and a small fortune cookie"""
try:
  import pynotify
  import time
  import subprocess
  if pynotify.init("Wakeup service"):
    subprocess.Popen(["paplay", "/usr/share/sounds/ubuntu/stereo/message.ogg"])

    # You can get more stock icons from here: http://stackoverflow.com/questions/3894763/what-icons-are-available-to-use-when-displaying-a-notification-with-libnotify
    timeStr = time.strftime("%I:%M %p %d %b")
    cookie = subprocess.check_output(["/usr/games/fortune", "-s"])
    n = pynotify.Notification(timeStr, cookie, "/usr/share/app-install/icons/ktimer.png")
    n.set_timeout(1)
    n.show()
  else:
    print "problem initializing the pynotify module"
except Exception as exc:
  print "Exception", exc

I then scheduled this using cron. The crontab entry looks like:

0,30 * * * * DISPLAY=:0 ./local/bin/notify_new.py

Update:Added a method to play a sound using pulse audio


How do I manage installed software on Ubuntu 16.04?

I wrote a simple python script that can show you manually installed packages.

Python should be installed, which you can verify by typing python --version into a terminal.

Create a new file somewhere in your home folder, call it checkpack.py or whatever you want, as long as it ends in .py.

Paste this into it and save it:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import subprocess

proc=subprocess.Popen('cat /var/log/apt/history.log | grep Install:', shell=True, stdout=subprocess.PIPE, )
output=proc.communicate()[0]

pck=[]
manpck=[]

# Break the output into a list of items called lsts
lsts = output.split(")")

# Filter lines to skip empty ones, and remove strings that
#  start with "Install: " or ", ", then remove those parts.
#  Place the list into a new list called pck.
for el in lsts:
    if el.startswith("Install: "):
        pck.append(el[9:])

    if el.startswith(", "):
        pck.append(el[2:])

# Place list of packages that were not dependencies into manpck.
for el in pck:
    if not el.endswith("automatic"):
        manpck.append(el)

# Print the list of manually installed packages.
for el in manpck:
    print(el)

Now open a terminal into the folder where that file is, and run python ./checkpack.py or, replace checkpack with whatever you named the file.

This will display all packages that were installed manually, and leave out the ones that were installed as dependencies.  They are in order from oldest on top, to newest on the bottom.

It will look like this (you can scroll up to see older packages):

This should help you out a bit by being able to see what you've installed recently.

NOTE! Keep in mind, this is showing the log of when you installed packages. So if you uninstall a package, this script will still show that you installed it once upon a time.  If you installed a package 3 times, it will show up 3 times.  I just wanted you to be aware that this does not show CURRENTLY installed packages, but it shows packages that have been installed at some point in the past.

To see if a specific package is still installed, you can run apt show <packagename>.  If the resulting text contains a line that reads: APT-Manual-Installed: yes, then that means it is currently installed.

Hope this helps a bit.


Yesterday I was facing the same problem and found the answer in this thread.

So, you have to install the missing 32-bit libraries in the following way:

sudo apt-get install package-name:i386

For me the required packages were:

libopenal1:i386
libportaudio2:i386
libglu1-mesa:i386
libvorbisfile3:i386
libgtk2.0-0:i386

I installed them step by step and checked the still missing libraries after each package by entering following commands in the Trine 2 install directory (the first one is enough only once):

export LD_LIBRARY_PATH=./lib/lib32
ldd bin/trine2_linux_32bit | grep "not found"
ldd bin/trine2_linux_launcher_32bit | grep "not found"

If further not found libraries remain after installing these five packages, please check the above thread how to find out the package name of a library.


Upgrade lost all added word to spell checker dictionary all applications

Regardless of spell checking tool (libreoffice uses hunspell) the new words are added in standard.dic by libreoffice.

In 14.04 this file is in $HOME/.config/libreoffice/4/user/wordbook/standard.dic

I am guessing that in 12.04 since libreoffice was at version 3.x so the file might be in $HOME/.config/libreoffice/3/user/wordbook/standard.dic

Or if not there you can search for standard.dic in your home. From terminal: cd && find . -name standard.dic

Its possible that the format of the file changed between 3.x and 4.x versions, or when moving to 4.x the profile did not correctly copy over standard.dic. In that case you should be able to find the words in 3.x standard.dic and copy them over to 4.x version in the location mentioned above.


Abiword opens a blank template on startup after upgrade

It is a bug related to an Abiword collaboration plugin in telepathy (empathy). Source: https://bugs.launchpad.net/ubuntu/+source/abiword/+bug/1432271A workaround is to delete the file /usr/share/dbus-1/services/org.freedesktop.Telepathy.Client.AbiCollab.service:

sudo rm /usr/share/dbus-1/services/org.freedesktop.Telepathy.Client.AbiCollab.service


Try:

gnome-session-quit

For more options:

gnome-session-quit --help

According to the manual, the following options are supported:

   --logout
          Prompt the user to confirm logout. This is the default behavior.

   --power-off
          Prompt the user to confirm system power off.

   --reboot
          Prompt the user to confirm system reboot.

   --force
          Ignore any inhibitors.

   --no-prompt
          End the session without user interaction. This only  works  with
          --logout.

Or looking at dbus-monitor, this is the command:

dbus-send --print-reply --dest="org.gnome.Shell" /org/gnome/SessionManager/EndSessionDialog org.gnome.SessionManager.EndSessionDialog.Open uint32:2 uint32:0 uint32:60 array:objpath:/org/gnome/SessionManager/EndSessionDialog


You will have to move partitions around, so that your unallocated space is adjacent to the partition you want to merge it with.

After booting from a Live CD/USB, use gparted to:

Move that little green partition to the left of the Unallocated space.

Now that /dev/sda9 is right next to the Unallocated space, you can merge the two.

Be sure to run resize2fs (man resize2fs) to let the filesystem know about the extra space.


How to add gksudo or what to use instead in Ubuntu 13.04?

Yes, there is NO gksudo available for Ubuntu 13.04. It has been removed.
So, you can use 'sudo' instead. Just type: sudo -i gedit /etc/something.conf. You will be asked for your password.

If you are not comfortable with it, use this sudo apt-get install gksu to install gksu, and you can use the gksudo command.


After installing 17.04 I get a end-of-life warning on SSH connections

The welcome messages are generated by the files residing in /etc/update-motd.d/.

From man update-motd:

  Executable scripts in /etc/update-motd.d/* are executed by pam_motd(8)
  as the root user at each login, and this information
         is  concatenated  in  /var/run/motd.

So if you don't want the outputs of those scripts upon login via ssh just remove the execute flag on them:

sudo chmod -x /etc/update-motd.d/*

Now if you want to show something you want upon login, you have two options:

Make a script, put it in /etc/update-motd.d/, make it executable, also make sure it outputs on STDOUT.
ssh has a Banner option. You can put the text in a file and set it in the Banner option so that the content of the file is shown upon login via ssh. Note that this is applicable to only ssh.

Banner /etc/foobar

From man 5 sshd_config:

 Banner  The contents of the specified file are sent to the remote user
         before authentication is allowed.  If the argument is “none” then
         no banner is displayed.  This option is only available for
         protocol version 2.  By default, no banner is displayed.


Xournal is a good interactive option to write on top of existing PDF. It supports digital pen or you can paste/import your signature.

sudo apt-get install xournal


how can I configure a specific usb mouse model as left-handed?

Tutorial

Open up a terminal, and create a folder within your /etc/X11/ directory called xorg.conf.d and navigate to it:

sudo mkdir /etc/X11/xorg.conf.d
cd /etc/X11/xorg.conf.d/

Within this folder, make a file called 00-mouse-remap.conf, so bust open a text editor:

sudo gedit 00-mouse-remap.conf

The X Server should scan this directory for custom X11 scripts to load up at boot time. So the next step is to copy a config setting similar to this into the 00-mouse-remap.conf file you have just opened (customise to your will):

Section "InputClass"
    Identifier "Microsoft Bluetooth Mouse 5000 button remap"
    MatchProduct "Microsoft Bluetooth Notebook Mouse 5000"
    MatchIsPointer  "on"
    MatchDevicePath "/dev/input/event*"
    Driver          "evdev"
    Option          "SendCoreEvents" "true"
    Option          "Buttons" "8"
    Option          "ButtonMapping" "3 2 1 4 5 0 7 0"
EndSection

Since this is mapped for a specific product, you should have separate configurations for your left and right handed mice. :P

You can find the name of your device by entering in to terminal:

xinput list

You will then need to edit a gnome configuration entry, so run (in terminal or type it into a run session using ALT+F2):

gconf-editor

(In case you have upgraded to a version that uses dconf, that is, 11.10 and everything later, run dconf-editor instead)

And navigate to this entry, and uncheck the box next to the entry that says active:

apps > gnome_settings_daemon > plugins > mouse

(In case of dconf, is org > gnome > settings_daemon > plugins > mouse)

Just be aware, that this disables the Gnome mouse pointer settings for when you modify your pointer settings within the GUI. So if you want to use the Mouse Settings GUI, you'll have to reactivate this - although, it could take over your new lefty settings. ^^

Examples

For example, my xinput list is:

⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Acer T230H                                id=8    [slave  pointer  (2)]
⎜   ↳ Logitech USB Gaming Mouse                 id=9    [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Power Button                              id=7    [slave  keyboard (3)]
    ↳ Apple, Inc Apple Keyboard                 id=10   [slave  keyboard (3)]
    ↳ Apple, Inc Apple Keyboard                 id=11   [slave  keyboard (3)]

So I would configure my 00-mouse-remap.conf to look like so:

Section "InputClass"
    Identifier "Logitech USB Gaming Mouse button remap"
    MatchProduct "Logitech USB Gaming Mouse"
    MatchIsPointer  "on"
    MatchDevicePath "/dev/input/event*"
    Driver          "evdev"
    Option          "SendCoreEvents" "true"
    Option          "Buttons" "8"
    Option          "ButtonMapping" "3 2 1 4 5 0 7 0"
EndSection

References:

Ubuntu Forums Post by walkeraj


I finally found the appropriate file and thought of documenting the solution here just in case someone else has the same (or similar) problem.

In my personal case, when in Ubuntu, the file:

/boot/grub/grub.cfg

would only allow me to modify the entries listed under "Ubuntu Advanced Options."

However, in CentOS (remember the problem first arose when I installed CentOS in a new SSD) the file:

/boot/efi/EFI/centos/grub.cfg

contains the lines for the entry "Ubuntu 16.04."

The only thing that now makes me wonder whether this is an ideal fix or not is that in grub.cfg there's a note that says not to modify the file because it's automatically generated from "/etc/default/grub." The changes in the above directories fixed the problem, though, and thus far I haven't experienced any problem upon booting.

I will leave a few days before accepting this answer in case someone has a better answer or explanation for that "don't edit this file" note at the beginning of grub.cfg.


As per our discussion with @robgrune , his DNS lookups for smtp server is pointing to a different IP address than what global DNS records show.

Finding the correct A record via mxtoolbox for the smtp server and replacing the smtp address with this IP address fixed the issue as a workaround.

However this will cause 'certificate validation errors' if smtp settings include use of encryption. Ideal solution would be to use VPN, then certificate validation failures would not happen and user could be sure that his/her traffic is not intercepted by anyone.


Is there an automated way to batch create a set of users?

Puppet. Just. Use. Puppet. Instructions on install puppet are available here, and you can also use puppet without a puppetmaster.

user { "dave":

  ensure  => present,
  uid  => '507',
  gid  => 'admin',
  shell  => '/bin/zsh',
  home  => '/home/dave',
  managehome => true,
  password => 'password',
}

Put something like that in your puppet manifest, and you're good to go. More details on page two of this PDF.


Backup all my files on external hard disk on Ubuntu using the tty-terminal

The easiest way to copy all of your standard Ubuntu data files from the disk is to login to TTY1 and:

Do a ls /dev/?d?
Insert an external disk, and do another ls /dev/?d?
Subtract the output from step 1 from the output from step 2 and you should be left with the device name of the external HDD.  This should take the form of XdYN where X is s or h depending on your hardware, Y is a letter and N is a number (probably 1)
Type:

mkdir /media/$USER/external

Ensure you substitute XdYN for the correct letters from step 3 in the following command:

mount /dev/XdYN /media/$USER/external

Copy-paste the following leaving out any data you don't want:

cd /media/$USER/external
mkdir bin
mkdir Desktop
mkdir Documents
mkdir Downloads
mkdir Music
mkdir Pictures
mkdir Public
mkdir Templates
mkdir Videos

cd /
cp --recursive --preserve=time /home/$USER/bin /media/$USER/external/bin
cp --recursive --preserve=time /home/$USER/Desktop /media/$USER/external/Desktop
cp --recursive --preserve=time /home/$USER/Documents /media/$USER/external/Documents
cp --recursive --preserve=time /home/$USER/Downloads /media/$USER/external/Downloads
cp --recursive --preserve=time /home/$USER/Music /media/$USER/external/Music
cp --recursive --preserve=time /home/$USER/Pictures /media/$USER/external/Pictures
cp --recursive --preserve=time /home/$USER/Public /media/$USER/external/Public
cp --recursive --preserve=time /home/$USER/Templates /media/$USER/external/Templates
cp --recursive --preserve=time /home/$USER/Videos /media/$USER/external/Videos

E.g. If you don't want to copy your video files, do not copy-paste the lines including Videos above.

That's it!

You've got a back-up of all your important files on an external disk!


12.04 Running Slow on Acer Aspire 5738ZG

I followed these tips and also checked if there were processes that were keeping my machine slow.

Hope this will help!


There is a configuration option for /etc/preload.conf called mapprefix that defaults to this:

# mapprefix:
#
# A list of path prefixes that controll which mapped file are to
# be considered by preload and which not.  The list items are
# separated by semicolons.  Matching will be stopped as soon as
# the first item is matched.  For each item, if item appears at
# the beginning of the path of the file, then a match occurs, and
# the file is accepted.  If on the other hand, the item has a
# exclamation mark as its first character, then the rest of the
# item is considered, and if a match happens, the file is rejected.
# For example a value of !/lib/modules;/ means that every file other
# than those in /lib/modules should be accepted.  In this case, the
# trailing item can be removed, since if no match occurs, the file is
# accepted.  It's advised to make sure /dev is rejected, since
# preload doesn't special-handle device files internally.
#
# Note that /lib matches all of /lib, /lib64, and even /libexec if
# there was one.  If one really meant /lib only, they should use
# /lib/ instead.
#
# default: (empty list, accept all)
mapprefix = /usr/;/lib;/var/cache/;!/

This means that by default files in /usr, /lib and /var/cache are eligible, but other files won't be preloaded. You could modify it to include the path on disk where your program you want cached exists, such as:

mapprefix = /usr/;/lib;/var/cache/;/home/someone/.winexxx/;!/

Where /home/someone/.winexxx is the WINE_PREFIX for the given PlayOnLinux program.

Another option would be to use the gopreload command and run that program manually, something like this:

gopreload WINE_PREFIX=~/.winexxx wine ~/.winexxx/drive_c/foo.exe

Although for that a.) you would need to compile/install gopreload manually and b.) you should need to ensure you're running the correct wine program with the prefix and other settings PlayOnLinux would use. You can likely get those by looking at a shortcut or .desktop file if you can get PlayOnLinux to create one for you.

However, there is another problem which is what preload considers code versus data and how it preloads things. I have a feeling that most of what is being executed by wine will end up being seen as data and not preloaded. You'll want to check the preload log files to see what it's actually doing if you go that route.

A poor man's solution could be to create a boot-script that simply reads these files from disk thus "priming" the cache to contain them,  something like:

ionice -c 3 vmtouch '/home/someone/.winexxx/drive_c/Program Files (x86)/Microsoft Office'

This would run ionice so that it happens in the background / idle not to slow down other functionality and then vmtouch to map the data for the program into RAM.


How to update Gnome environment after gpasswd

If you just need the terminal to reflect the updated group membership, it should be sufficient to use su to "switch" to the same user e.g.

$ id -Gn
steeldriver adm dialout sudo staff sambashare
$
$ sudo gpasswd --add steeldriver lpadmin
Adding user steeldriver to group lpadmin
$
$ id -Gn
steeldriver adm dialout sudo staff sambashare

(still shows the old groups), but then

$ su - steeldriver
Password:
$ id -Gn
steeldriver adm dialout sudo staff lpadmin sambashare

If you need the changes to be reflected throughout the desktop environment then yes, you will need to log out and in to a new session.


This will help you

https://pypi.python.org/pypi/nested.tar.archives.extractor/1.1

1.Ensure you have either python 2.6 or python 2.7 installed.

2.Extract the downloaded file "nested.tar.archives.extractor-1.1 [python 2.x].tar.gz"

3.Copy the file "extractnested.py" to one of the folders in your PATH environment variable
    (Note: For linux users, as you might know, to allow execution of extractnested.py as a bash script, you need to grant it permissions - $ chmod ugo+rx extractnested.py)

Now you can extract any tar archive from the terminal -

extractnested.py path [path ...]

where path is the path of the tar archive you want to extract.


Where does the System Information information come from on login?

The command is

landscape-sysinfo

it is run from /etc/update-motd.d/50-landscape-sysinfo when you have installed the package landscape-common.

As of Ubuntu 12.04 (perhaps earlier), update-motd is run at login time by the PAM module pam_motd.so.  Originally, update-motd was a cron job.

landscape-sysinfo is a part of the package landscape-common, so if it's missing you can install it by the command:

sudo apt update && sudo apt install landscape-common


You should mount partitions, not the drive itself. Please try with the following commands (and let it find the file system automatically), for example

sudo mount /dev/sda5 /mnt

But this partition might be your root partition, which is already mounted. I think you want to mount a partition on the drive b, /dev/sdb. The problem is that the drive is not recognized as a mass storage device (not seen by lsblk).

You can try in another USB port of the same computer, in another computer and with another operating system (another linux distro or Windows or MacOS). If still no luck, I think your USB flash drive is damaged. See this link and links from it for more details.

Pendrive lifetime


Why my USB Modem won't displayed as /dev/ttyUSB0?

I suggest trying this answer to a different question. The model is very similar to yours.

How to configure TATA Photon+ EC1261 HUAWEI

You can check the numbers from the lsusb output match (12d1 and 1446) to be sure that it's the same hardware inside the dongle.

You can ignore the bit in that answer about Network Manager, hopefully just doing the usb modeswitch bit will poke the modem into showing it's tty device.


Rhythmbox last.fm unsupported format error

This is clearly a bug, you can report it here: Bugs : “rhythmbox” package : Ubuntu.


As long as you are using and Arch Linux derivative I suggest you check out the Arch wiki.  The USB flash installation page is really helpful for creating bootable USB drives (it works for any ISO files).  I follow the "Using dd" section. The command you use would be something to the effect of

sudo dd bs=4M if=/path/to/archbang.iso of=/dev/sdX && sync

X is whatever your flash drive letter is from running `lsblk

for me lsblk outputs

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      3:0    0 465.8G  0 disk
├─sda1   3:1    0   100M  0 part /boot/efi
├─sda2   3:2    0 410.9G  0 part /
└─sda3   3:3    0   6.9G  0 part [SWAP]
sdb      8:16   1   1.9G  0 disk
├─sdb1   8:17   1   657M  0 part /media/user/ARCH_201508
└─sdb2   8:18   1    31M  0 part

So my flash drive is /dev/sdb


Multiple displays: screen wrapped ubuntu 14.04.01


How to install Ubuntu server with UEFI and RAID1 + LVM

Ok, I found the solution and can answer my own questions.

1) can I use LVM over RAID1 on a UEFI machine ?

Yes, definitely. And it will be able to boot even if one of the two disks fails.

2) How to do this ?

The're seem to be a bug in the installer, so just using the installer results in a failure to boot (grub shell).

Here is a working procedure:

1) manually create the following partitions on each of the two disks:
- a 512MB partition with type UEFI a the beginning of the disk
- a partition of type RAID after that

2) create your RAID 1 array with the two RAID partitions, then create your LVM volume group with that array, and your logical volumes (I created one for root, one for home and one for swap).

3) let the install go on, and reboot. FAILURE ! You should get a grub shell.

4) it might be possible to boot from the grub shell, but I choosed to boot from a rescue usb disk. In rescue mode, I opened a shell on my target root fs (that is the one on the root lvm logical volume).

5) get the UUID of this target root partition with 'blkid'. Note it down or take picture with your phone, you'll need it next step.

6) mount the EFI system partition ('mount /boot/efi') and edit the grub.cfg file: vi /boot/efi/EFI/ubuntu/grub.cfg
Here, replace the erroneous UUID with the one you got at point 5.
Save.

7) to be able to boot from the second disk, copy the EFI partition to this second disk:
dd if=/dev/sda1 of=/dev/sdb1 (change sda or sdb with whatever suits your configuration).

8) Reboot. In your UEFI setting screen, set the two EFI partitions as bootable, and set a boot order.

You're done. You can test, unplug one or the other of the disks, it should work !


Implement openldap server in mirror mode

here is the answer that works in my scenario:
copy the  /usr/share/slapd/slapd.conf and add these configs:
first-server:
include         /etc/ldap/schema/core.schema
include         /etc/ldap/schema/cosine.schema
include         /etc/ldap/schema/nis.schema
include         /etc/ldap/schema/inetorgperson.schema

moduleload      back_mdb
moduleload      accesslog.la
moduleload      syncprov.la

overlay syncprov
syncprov-checkpoint 100 10
syncprov-sessionlog 100

serverID    1

syncrepl      rid=001
        provider=ldap://<second-server>
        bindmethod=simple
        binddn="cn=admin,dc=part,dc=local"
        credentials=123
        searchbase="dc=part,dc=local"
        scope=sub
        schemachecking=on
        type=refreshAndPersist
        retry="60 +"
mirrormode on

seconds server:
as like as the above, just edit the serverID.
and voila...


How can I remotely shutdown Ubuntu using Google Home?

OK. After some time I got it working.

I achieved turning off Ubuntu by using IFTTT, Dropbox and inotifywait (inotifywait is a tool that can run scripts or commands when some file or folder changes).

It looks something like this:
I ask Google Home to turn off PC -> Google Home asks IFTTT to change file in Dropbox -> inotifywait sees the change in the file and make PC power-off.

Step by step:

Go to https://www.dropbox.com and register if you don't have account.
Go to https://www.dropbox.com/install
Download package for ubuntu, install this package by double clicking.
Open Dropbox in apps menu, go through the process of connecting your account.
Now you should have a "Dropbox" folder in your "Home" folder.
Create folder "RemoteTurnOff" in "Dropbox" folder.
Inside "RemoteTurnOff" folder create file "fileToWatch.txt"
You can do this by going to your apps, open "Text Editor" now choose 3 dots menu, press "Save as" and find and choose RemoteTurnOff folder. Don't forget to change file name to "fileToWatch.txt"
Inside "RemoteTurnOff" folder create file "script.sh"
You can do this by going to your apps, open "Text Editor".
Paste this code to editor:

#!/bin/sh
### BEGIN INIT INFO
# Provides:          filenotifier
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Something
# Description:       Something else
### END INIT INFO
cd /home/YOUR_USER_NAME/Dropbox/RemoteTurnOff
inotifywait -e close_write,moved_to,create -m . |
while read -r directory events filename; do
  if [ "$filename" = "fileToWatch.txt" ]; then
    systemctl poweroff
  fi
done

Important: Change YOUR_USER_NAME to your user name.
If you don't know your user name: open Terminal and type

whoami

Now press on 3 dots menu in text editor, press "Save as" and find and choose RemoteTurnOff folder. Don't forget to change file name to "script.sh"

Right click on script.sh -> Properties -> Permissions -> click on "Allow executing file as program" (it should be checked).

To be sure it's executable do this:
Right click on empty space inside RemoteTurnOff folder.
Choose "Open In Terminal"
Run this command:

sudo chmod +x script.sh

You can now test if script works.
Open RemoteTurnOff folder, right click on empty space, choose "Open in Terminal",
type:

  ./script.sh

Don't close the terminal, open "fileToWatch.txt" in editor, type some text, save the changes. Your computer should shutdown.
If it did shutdown then everything's OK - continue.

Lets make the script run in background on startup.
Open terminal, past command:

  cd /etc

past command

sudo nano rc.local

You should now be in text editor mode.
Paste this text to editor:

#!/bin/sh -e
sh '/home/YOUR_USER_NAME/Dropbox/RemoteTurnOff/script.sh' &
exit 0

You need to change YOUR_USER_NAME to your name (use whoami command in another terminal window to get the name, if you don't know it).
Don't forget "&" sign at the end of second line!

Press Ctrl+O to save it. Press Enter to confirm name.
It should look like this: pic

Press Ctrl+X to exit text editor mode in terminal.

Now run this command to make rc.local executable:

sudo chmod +x rc.local

Now the script should start at startup in background. Test it: reboot, than go to Dropbox -> RemoteTurnOff open "fileToWatch.txt", paste some text and save. The PC should reboot.
All hard work is done. Next we'll connect Dropbox to Google Home.

Go to https://ifttt.com/
Register (it's better to use google account for registration)
Go to https://ifttt.com/services/google_assistant/settings
Connect to your Google Home. Make sure the status is active.
Go to https://ifttt.com/services/dropbox/settings
Connect your Dropbox. Make sure the status is active.
On IFTTT site lets create new applet. Click on "My applets" and then on "Create applet".
Press on "+ this", search for "assistant", click on "Google Assistant"
Choose "Say a simple phrase".
On next screen fill in phrase you will use to talk to google home.
In my case it looks something like this:
pic
Then press on "Create trigger"
Press on "+ that"
Search for "Dropbox", choose "Dropbox".
On next screen choose third option: "Append to a text file"
Fill info:

file name -> "fileToWatch.txt"

content -> "#" (it can be any symbol)

dropbox folder path -> "RemoteTurnOff/"

pic

Click on "Create action".
It's better to disable notification - it gets annoying.

Now tell your google home to "turn Off computer".

I may have forgotten some steps. Please tell me if it didn't work, I'll help you and fix instruction.
Tested on Ubuntu 18.04 LTS.
I didn't create question just to answer it. I didn't knew the answer when I created the question.

To turn PC on using Google Home you don't need to do anything in ubuntu: there is a lot of instructions how to do it using WOL and android. Just type "turn on PC with google home" in google search.


Open terminal and type

  sudo dpkg --configure -a

If it doesn't help then do this

  sudo apt autoremove <packagename>

If this doesn't help then you
Need an internet connection.Type in terminal

  sudo apt-get autoclean

remove sources.list file.and create new sources.list...

sudo rm /etc/apt/sources.list

Then, type in

sudo software-properties-gtk

This will open software-properties-gtk and a newsources.list will be created automatically.

Then change the server to US or to any other server of your choice. You must enable repositories from the new dialog in order to create new sources.list.

Tick all the boxes then click on Revert then click close.

Need to restore default repositories

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

(it is good practice to backup this file before installing to recover if such things happen)

Now install anything!


Wireless Drivers for Broadcom BCM 4321 (14e4:4329) will not stay connected to a wireless network

I have this solved in 2019!

Remove all drivers.
Install only:

sudo apt-get install firmware-b43-installer b4cutter

Run:

nano /etc/modprobe.d/blacklist.conf

Put # before the following:

# replaced by b43 and ssb.
#blacklist bcm43xx

Reboot.
IT WORKS!

I also replaced grub with refind btw.
MacBookAir 2.1.


How to specify format with snap run youtube-dl?

If you want to download a video with, for example, the format code 136, you run
youtube-dl -f 136 https://www.youtube.com/watch?v=g0TwYwqiQ9E


Process command Issue (PSBeginner Issue)

If a normal kill does not work you might kill it with signal KILL

kill -9 <PID>

so in your case

kill -9 4618

More on kill can be found in the related man page


Taking an action after connecting a USB-to-Ethernet adapter

UDEV triggering a systemd service is the way to do this.
you can match your usb adapter by usb id , its too late when you can see a mac address.
this post has the instructions
https://unix.stackexchange.com/questions/229987/udev-rule-to-match-any-usb-storage-device


Ubuntu One always hashing something that is not there

Ok. First, please reproduce this one more time, file a bug, and attach the complete logfile from where you got the above excerpt; syncdaemon shouldn't go loopy if a file disappears while it's being hashed. You can make the bug private if you don't want everybody seeing that file (or you can email me the logfile if you'd rather).

Then, edit /etc/default/xdg/ubuntuone/syncdaemon.conf, find the bit that looks like

ignore.default = \A#.*\Z
                 \A.*~\Z
                 \A.*\.py[oc]\Z
                 \A.*\.sw[nopx]\Z
                 \A.*\.swpx\Z
                 \A\..*\.tmp\Z

and add a (similarly indented) line with the pattern \.xhb~\.. That should make syncdaemon completely ignore the file. If that works (if it's not that pattern, it's one similar to it), file a second bug asking for this to be included in that setting by default. Please let me know the bug numbers of both.


Command Line disc burning: growisofs fails to write DVD

I found the same thing happened to me when I tried your command.

Nevertheless, I believe you will find that the following command will work:

growisofs -dvd-compat -Z /dev/dvdrw=ImageToBurn.iso

In Ubuntu, /dev/dvdrw should be equivalent to /dev/sr0, which is a block device. /dev/sg1 is a character mode device for the generic SCSI interface, and that must not be the way growisofs interacts with the dvd device (a seek is normally an operation on a block device).


Dell Latitude E7450 cant write disk encryption password A7 password

Upgrading to Ubuntu 15.10 made it possible to enter the password without a reboot first to go into console mode.


How do disable user list on login screen? (Prompt for username and password) Ubuntu 15.10

Create a folder in the /etc/lightdm/ folder called lightdm.conf.d:
sudo mkdir -p /etc/lightdm/lightdm.conf.d

Next, create a file and call it 10-ubuntu.conf:
sudo gedit /etc/lightdm/lightdm.conf.d/10-ubuntu.conf

and add the following lines to it:
[SeatDefaults]
user-session=ubuntu
greeter-show-manual-login=true
greeter-hide-users=true
allow-guest=false

For 16.04 or newer:
[Seat:*]
user-session=ubuntu
greeter-show-manual-login=true
greeter-hide-users=true
allow-guest=false

Change the line user-session= to whatever desktop you are using, like if you are using Xubuntu, change it to user-session=xubuntu.
After these lines are added, reboot host, and you should see login instead of the user list:

https://wiki.ubuntu.com/LightDM shows information about LightDM and that the file user.conf can be ignored if accountservice is running on the host.
Hope this helps!


14.04 always asks for password for a network drive (sftp)

Do you connect to the server using your bookmarks?
In this case the issue can be resolved by adding the user name to the URL in the "Edit Bookmarks" dialog of nautilus (sftp://user@host.com instead of sftp://host.com)


Are you already using the Nvidia binary driver? If not, follow this guide to get it installed. This guide about Nvidia and multi-monitors is a bit old but should still be useful. Once you have the Nvidia binary driver installed, you should be able to find an Nvidia configuration utility that will allow you to setup the monitors in a span.

I must warn you, however, that this is not likely to be easy to setup. Linux, binary GPU drivers, and multi-monitors are often a pain. Throw in dual GPUs and you've got the makings of high blood-pressure disorder.


How can i make VM to fully cover the screen in KVM?

Start the VM using -std-vga flag and set the fullscreen resolution in your VM


Server install of kvm and openstack without broadband

I would just install the packages I wanted before moving in that circumstance. This might be useful if you can download packages elsewhere, save them to a flash drive, then copy to your Big Pile o' Files.

Lucky for you, someone has already figured it out:
https://help.ubuntu.com/community/AptGet/Offline/Repository/

And another thread for reference:
How can I install software or packages without Internet (offline)?


How can I mount a Windows folder and enforce its NTFS permissions?

Thanks for all the help, everyone! I found the answer at this link, the best answer post: https://community.spiceworks.com/topic/484483-mounting-windows-shares-on-lubuntu

PBIS was not required to join to the domain or get authentication, it worked without it.


According to what brought in How Effective is ASLR on Linux Systems?, programs must be compiled as Position Independent Executable (PIE) to gain ASLR benefits.

For the GCC compiler, the -fPIE switch should be used to compile programs which use ASLR:

gcc -fPIE -o ./test.o  test.c^


How can I have my system ignore touch screen as input, but still give me the x,y coordinate position of the touch?

I've found an alternative solution. I read the touchscreen output with Arduino with this library. Then the reading is sent back the computer via serial port in real-time. The library can also detect whether the panel is touched or not, which is very helpful.


Are there benchmarks available for Openbox vs Metacity resource usage?

About metacity, I love it very much because of the Ambiance theme. But if compared to openbox, I have to admit that it is quite heavy. Openbox uses only 6.6MB of RAM with 0% CPU on my laptop. So, if you are going for speed, give openbox a try.


Are guvcview settings only picked up by that app?

Guvcview stores all options into a configuration file stored in the user home directory under .config/guvcview2/video0. The file is opened at start and it is rewritten at exit. By removing the file the default values will be loaded, and a new file will be written at exit.

The documentation for guvcview doesn't mention anything about systemwide configurations, so to make your configurations available to other apps, you can install "V4l2-ctl" using sudo apt-get install v4l-utils and create a startup script that uses v4l2-ctl commands to set your desired parameters. For instance:
v4l2-ctl --set-ctrl brightness=200
v4l2-ctl --set-ctrl auto_gain=0


how to install firefox 26 on ubuntu without internet connection

Version 26.0 is available for download from the Firefox website  - go to someone who has internet, download there then copy to a USB flash drive or CD-R. Then, put that media on your system copy the files from that archive file, by clicking on it with your file manager which should call the Archive Manager app to open the file.

Copy them into a folder you name firefox-new in your home directory.

Then delete the contents of your existing Firefox files in /usr/lib/firefox and move the new version in there.


Meizu MX4 how to make full resolution pictures with camera app?

On my Meizu MX4 pictures are of size 5120x2880 ≈ 15 Mpix - there is a known bug related to the camera and size of the pictures in Ubuntu for phones.

You might want to change the channel to rc-proposed and check if that helps a bit. Otherwise we need to wait until this bug would be fixed.


Can I totally discard optimus functionality and use the original website driver?

If your BIOS has option to disable optimus functionality only then you can use the nvidia driver.

else there is no way you can turnoff intel and work with nvidia because the images generated by the nvidia GPU are transported & displayed through intel card.

You can try with primus. It work with bumblebee but improves performance at large. Because it doesn't use virtualgl (which was intended for remote connection and involves compression etc).

primus details blog

In conjuction you can use nvidia-experimental driver which is told to be double the performance for new graphics card.

How to install guide for bumblebee/primus