No module named 'lsb_release' after install Python 3.6.3 from source

Solution:

sudo ln -s /usr/share/pyshared/lsb_release.py /usr/local/lib/python3.6/site-packages/lsb_release.py

Explain:

We can see in /usr/bin/lsb_release

#!/usr/bin/python3 -Es

# lsb_release command for Debian
# (C) 2005-10 Chris Lawrence <lawrencc@debian.org>
#    This package is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; version 2 dated June, 1991.
#    This package is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#    You should have received a copy of the GNU General Public License
#    along with this package; if not, write to the Free Software
#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
#    02110-1301 USA
from optparse import OptionParser
import sys
import os
import re

import lsb_release

The key step is import lsb_release, but the problem is Python 3.6 doesn't have this module.

So, you must have overrided python3 from python3.5 to python3.6. That's why your lsb_release is broken.

To verify it, we can see in python3.6:

➜  ~ python3.6
Python 3.6.4 (default, Feb  6 2018, 16:57:12)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import lsb_release
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'lsb_release'

then in python3.5:

➜  ~ python3.5
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import lsb_release
>>> lsb_release.__file__
'/usr/lib/python3/dist-packages/lsb_release.py'

where is this file:

➜  ~ ll /usr/lib/python3/dist-packages/lsb_release.py
lrwxrwxrwx 1 root root 38 Jul   7  2016 /usr/lib/python3/dist-packages/lsb_release.py -> ../../../share/pyshared/lsb_release.py

So, this module lsb_release exist in python3.5 but not exist in python3.6. And We find it eventually!

Now let's fix it through add a link to the original lsb_release.py file!

It works for me!


Passing unrecognized usb devices to virtualbox

In order to use your USB device on the guest system, all you should need is the USB vendor ID and product ID.  Plug your device in, and try the lsusb command, which shows "vendor ID:product ID" as hexidecimal numbers.  By doing lsusb when the device is plugged in and when it's not, you should be able to figure out which entry in the lsusb table belongs to your device.

Once you know the vendor ID and product ID, head over to VirtualBox and create a USB filter for it according to the VirtualBox manual.  Once you do that, the device should be visible to the guest OS.


My comment made on the bug report was (shortly before this ask ubuntu question was created) has been confirmed valid

I fear this is the consequence of an announced google chrome/chromium
change, and cannot be corrected (in fact more API functionality is being
removed in the not too distant future) and this is just the start of the
changes announced with
https://developers.google.com/web/updates/2020/12/chrome-88-deps-rems)

Or as Olivier Tilloy (osomon) ; a Ubuntu developer reported

This is an unfortunate consequence of a decision by Google to restrict
access to the sync API to Chrome only (which explains why in comment
#3 you're seeing that chrome 89 on linux works fine).
There's a lengthy discussion with details here:
https://groups.google.com/a/chromium.org/g/chromium-packagers/c/SG6jnsP4pWM/m/Y73W4CecCQAJ.
I am quoting the part that's relevant for end users:
« What does this mean for my users?
Users of products that are incorrectly using these APIs will notice
that they won't be able to log into their Google Accounts in those
products anymore.
For users who accessed Google features (like Chrome Sync) through a
3rd-party Chromium-based browser, their data will continue to be
available in their Google Account, and data that they have stored
locally will continue to be available locally.
As always, users can view and manage their data through Google Chrome,
Chrome OS, and/or on the My Google Activity page, and they can also
download their data from the Google Takeout page, and/or delete it
from this page. »
I'm afraid (and sorry) there's nothing that can be done from a
packaging perspective to mitigate this regression. Reverting the snap
in the stable channel wouldn't help, because it's not a version
problem. The official announcement states that starting March 15
attempts to log in will fail anyway.
I suppose that users that can't do without the profile sync feature
will need to move on to using the official chrome package distributed
by Google, instead of chromium (which is probably what Google wants,
really).

before closing the bug report with "Won't fix"   (so Blame Google)


Help to avoid swapping on 4Gb venerable laptop?

You can erase the swap by running

swapoff -a
swappon -a

This will deactivate and activate swapping again.
You can as well try to lower the 'swapiness' which means, the system will prefer to keep the swap file smaller instead of caching as much as possible.
It is an older thread, but check this one out:
https://askubuntu.com/questions/103915/how-do-i-configure-swappiness


Did you check the folder at /usr/share/applications folder to see if your application was installed.

Also check /var/log/apt/history.log to see what it says and post here so we can have more information because right now i can't really see what happened...


try looking for broken packages using synaptic package manager. It can be found at 'Custom Filters'.

sudo apt-get install synaptic


Is Firefox 6 performance worse in Ubuntu than upstream?

See here for an explanation of the term "elf-hack". It's basically a compile-time linker optimisation.

In the last blog post from that link, JavaScript performance on the dromaeo benchmark is shown to be 0.6% better when firefox is compiled with the elf-hack.

So no, you won't notice any difference in regular use. Improvements in gcc will probably allow use of the 'elf-hack' in 11.10+ anyway.


Open the GRUB config file:

sudo gedit /etc/default/grub

Next, change

GRUB_CMDLINE_LINUX_DEFAULT="......."

to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Finally, run update-grub

sudo update-grub


Something is using your 'apt-get'/'apt'. Run these commands and you should be good to go:

sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
sudo dpkg --configure -a


It is fine not to have a bashrc file (apparently you mean a personal ~/.bashrc file).

The effects of not having the default bashrc file can be examined by reading what the default .bashrc file changes in your shell environment. There is nothing critical in the .bashrc file; bash will simply use (conservative) defaults when it is being run (for example, no aliases, no completion, no color ls).

If the shell is not interactive, the default .bashrc file is not parsed (there is a command at the start that checks whether the shell is interactive; if not, it merely exits).

If the system-wide /etc/bash.bashrc is missing, it is still not critical to the system. The most important element from /etc/bash.bashrc is to enable the command-not-found feature; when you type a command that is not found, it gives suggestions as to what packages you can install to get the said command.


Newbie question. KDE tries to load the main taskbar, after which disappears, after which cannot draw on the screen

First to clarify: KDE or GNOME/Unity (default for ubuntu) are desktops and Window managers are X server or Wayland. I presume you just installed second desktop and not Window manager. Generally if you want ubuntu with KDE you can try Kubuntu distro (not just package) - it offeres more stability that multi-desktop version. Olso removing KDE won't remove drivers which are apparently working for GNOME (login screen and default desktop) but seem to have some problems with KDE. I have been using Kubuntu on ViryualBox and it never behaved like this so I guess this problem is specyfic for multi-desktop configuration. If you have been messing with Window managers you should make sure you are running X server (normally default) and not Weyland. Weyland is experimental and still in early development and while testing it, I've got some invisible elements (apart from tons of other bugs). As for Linux being understucteble it is IF configuration  is done right unless you install some packege that removes bin/sh (real situation).


Redefined ctrl key: can I obtain multiple strokes by holding?

Use xset to enable the auto-repeat feature.

Run xset without parameters to see the usage:

To turn auto-repeat off or on:
-r [keycode]        r off
 r [keycode]        r on
 r rate [delay [rate]]


That's probably because the wireless interface hasn't been recognized.

Go to Wicd Network Manager (if you can't find it type Wicd in Application Launcher) > Preferences (arrow right top corner) > General Settings tab.

On Wireless Interface write the name of your interface (usually wlan0 but it can be something else. To find out what it is, run iwconfig in terminal).

Reboot.
Rescan, NOT from Wicd Network Manager, but from System Tray (righ click on icon).
Wait.

If your wireless interface still hasn't been recognized perhaps it's just switched off. If you have a laptop check if there isn't a physical button to turn it on.

If the answer was useful, click the up arrow "^"


Retrieving files from broken wubi installation

Use this tool: ext2read

Download, extract, run, open up the \ubuntu\disks\root.disk file, and copy your data.


How to replace GRUB with Windows NT Bootloader?

You can use EasyBCD as shown in: Is it possible to boot Ubuntu using the Windows bootloader? But installing GRUB to a partition instead of the MBR is strongly discouraged as GRUB will tell you.

If you're using 2 or more hard drives and can set up the boot device order in the BIOS and/or choose the boot device at boot via F8 oer F12, I recommend installing every OS on a separate hard drive and the corresponding bootloader only to the corresponding MBR.

As I can imagine from your answer, it's not only GRUBs fault. Please use Linux tools like parted or GParted for partition management. Same thing applies to other tasks as well. I'm not saying it is bad software, but most Windows-centric solutions in a mixed Windows-Linux environment are not aware of other OS, which in return causes more problems. On the other side when you install via Live CD, you mostly have the tools at hand, that you need to fix the issues if something goes wrong.

Replacing a Ubuntu GRUB installation by a Debian GRUB installation, after resizing a Windows partition with a third party tool, trying various other workarounds, fixing the MBR with the Windows Rescue tools, doing other stuff that breaks Windows and putting the blame on "GRUB" can just be described as FUD and is the wrong way to go.


Mate 16.04.1 and western digital mybookworld NAS not talking

Your mount debugs have your answer: the very first command only tries to mount some nfs v4 share. The last command fails mounting using v4, then falls back to v3.

In your fstab, try adding nfsvers=3. fstab entry should look like:

10.1.0.3:/nfs/Public /media/public nfs nolock,rw,hard,intr,nfsvers=3 0 0

Also, you may want to consider using autofs handling network shares. As root:

apt-get install autofs4
cat <<EOF >/etc/auto.master
+dir:/etc/auto.master.d/
+auto.master
EOF
mkdir /etc/auto.master.d
cat <<EOF >/etc/auto.master.d/nfs
localname -rw nfs.server.ip:/path/to/share
EOF
cat <<EOF >/etc/auto.master.d/nfs.autofs
/media/localname/ /etc/auto.master.d/nfs --ghost --timeout 43200
EOF
service autofs restart
ls -l /media/localname/*/ #would force mounting NFS share
ls -l /media/localname/ #should show your remote share

Such is preferred dealing with NFS shares, as these may go away, come back, ... Autofs is a nice way to cope with these.


Ok so here is the fix I found for the nuc. Sound over HDMI works no problem after this:

sudo add-apt-repository ppa:ubuntu-audio-dev/alsa-daily
sudo apt-get update
sudo apt-get install oem-audio-hda-daily-dkms

Thank you for your help!


I have just installed the 32 bits version but happened exactly like you, start Ubuntu in recovery mode from grub, there start session in low graphics mode (I don't remember the name exactly) and install the graphic drivers, that solved my problem for now, if not, do it from a terminal, from recovery mode too, it may work to you.

Curiously, I think Ubuntu works behind that screen, because I wrote the sudo shutdown now in a terminal, without being able to see it, and worked. Of course, I knew all the steps from memory, if not, it would have been impossible.


14.04 server update without upgradeing to 14.10

Quoted from "man apt-get":

dist-upgrade

dist-upgrade in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages; apt-get has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary. The dist-upgrade command may therefore remove some packages. The /etc/apt/sources.list file contains a list of locations from which to retrieve desired package files. See also apt_preferences(5) for a mechanism for overriding the general settings for individual packages.

So no, you won't upgrade to 14.10 by using it.

OTOH, from my experience, most times when packages are kept back like that the reason is that their dependencies are not (yet) available in the repository. So if you wait a few hours, you should be able to upgrade using the ususal apt-get upgrade.


./config means you're calling something in the current working directory. In this case config is an executable. You have to specify the path for executables if they're outside your $PATH variable and that's why config isn't enough.

../config would be used if the config executable were in the parent of the current working directory.


Where are PEM files stored for validating SSL certificates?

So if you have installed ca-certificates you can easily find out where the files are. Open a terminal and enter

> dpkg -L ca-certificates
/.
/etc
/etc/ssl
/etc/ssl/certs
/etc/ca-certificates
/etc/ca-certificates/update.d
/usr
/usr/sbin
/usr/sbin/update-ca-certificates
/usr/share
/usr/share/ca-certificates
/usr/share/ca-certificates/spi-inc.org
…

So you'll see that all certificates are in /usr/share/ca-certificates. However the default location for certificates is /etc/ssl/certs. You might find additional certificates there.


Problem with Broadcom BCM4312 on Ubuntu 13.10 Desktop

Use either a wired or bluetooth tethered connection to get wifi temporarily up and running, then run:

$ sudo apt-get update

Then open 'Software and Updates'  and select the proprietary Broadcom driver.


Out of the box, Natty does have issues with the Sandy Bridge architecture as discussed here on Phoronix.

In summary, performance is not great - as compared against Windows 7.  In terms of general Natty support - no real issues are reported.

Fedora 15 is using the latest Mesa development code.  If you use this together with the latest kernel, Phoronix are reporting that Sandy Bridge (and similar recent variants) are on a par - or even exceed Windows 7.

Thus, if you want to experiment - try installing the latest Kernel from here together with the latest bleeding edge drivers from this PPA.

Otherwise, stick with the standard Natty - things will get better in 11.10.


How can I install Ubuntu on a new computer without any OS and without a cd drive?

The Android app DriveDroid may be used to install Ubuntu to a computer using a smart phone
No OS, USB, CD, DVD or friend required.
The following is a quote of instructions given me by Kryštof Píštěk. You can thank him by upvoting his answer here https://askubuntu.com/a/925596/43926

Open the app and choose the + on the lower bar
Choose to download an image and to download Ubuntu and go through any additional steps
Go to the image list and choose the new Ubuntu option
If asked for emulation mode, choose read-only USB
Connect phone to PC if you haven't already and boot from the USB (depends on PC manufacturer)
(optional) When Ubuntu boots, choose to try Ubuntu, mount the Windows partition and move any files you want to rescue to the flash drive (if possible). If the partition is corrupted, look up a way to recover partitions in Linux
If you chose to skip 6, choose to Install ubuntu and follow the instructions on screen. If you followed 6, open the Install Ubuntu app on desktop and follow instructions on screen Note: While installing Ubuntu, you may want to remove the physical USB (so that you don't accidentally install on it)
Reboot, unplug your phone when asked to and enjoy!

The app DriveDroid is available on Google Play with searching or this link: https://play.google.com/store/apps/details?id=com.softwarebakery.drivedroid


Ubuntu 20.04 how to get rid of the white/grey screen of death

Sounds like a graphics error, try to enter without graphics mode. In grub edit the boot command of ubuntu nd the work nomodeset after the word splash.
With that set you can now debug the problem.


Pulseaudio playing surround through headset

In System -> Preferences -> Sound

Select Hardware
Select your device
Choose the profile you want (like Analog stereo output)
Select output
Check your device


Go to ~/.local/share/Trash and change the directory 'files' to another name (e.g '.files'). Then enter the renamed directory (e.g ~/.local/share/Trash/.files), select all the files, and delete them.


For a list of md5sums:

find /path/to/dir/ -type f -exec md5sum {} \;

And for an overall md5 checksum:

find /path/to/dir/ -type f -exec md5sum {} \; | md5sum

Example output:

b2d5d3a5e102aae48eb6ff36c602ac75  -

Notice, at a folder with huge size, it can take very long.


Can't get the wireless adapter to work, any workarounds?

I believe this is an Realtek RTL8192CU type device. You should be able to download Linux drivers for it from their driver download page.


Modern and Current method of setting floating IP's for HAProxy on AWS

So I have finally set this up with HAProxy servers on my AWS account.

Basically, you have two servers running HAProxy with almost the same config. And you give a secondary IP to the main server while tying a new, different elastic IP to the secondary private IP.

You'll have to set up the instance to work with multiple IPs, which is explained here https://askubuntu.com/a/995329/57016

You'll also need the awscli, which you can install with the following

apt-get install python-pip python-dev build-essential
pip install awscli --upgrade --user
export PATH=~/.local/bin:$PATH
aws configure

Now you can use a command like this one to pull the secondary IP address from the whatever instance it's tied to to your current one

aws ec2 assign-private-ip-addresses --allow-reassignment --network-interface-id <your eni ID> --private-ip-addresses 172.31.0.0

I have yet to figure out how to check if the HAProxy server running on the opposite server yet as to auto-pull the secondary private IP, but that is definitely a solid place to start.


CUPS is the main printing system
HPLIP and Foomatic are two batches of drivers that CUPS uses.
HPLIP comes with a fancy set of frontend tools to interface and configure the printer. In the backend they're just setting CUPS settings but they can be useful.

If more than one is available for your printer, I'd start with the HPLIP. It's well supported for your printer. The Foomatic driver probably works well too.


How to preview files using Gloobus-Preview?

It appears a solution was just posted over at Web Upd8. Gloobus-Preview now has a new package called gloobus-sushi meant for this purpose.

In summary, you'll need to run the following commands:

sudo add-apt-repository ppa:gloobus-dev/gloobus-preview
sudo apt-get update
sudo apt-get install gloobus-preview gloobus-sushi libgdk-pixbuf2.0-dev


How Linux Host can access guest's sharing network on Virtualbox?

Have you try to change default gw?

E.g.

Your host vboxnet0 have ip address 192.168.0.1.

Your Windows(guest) have ip address 192.168.0.2.

Try to set default gateway on the host(Ubuntu) to 192.168.0.2.

# route add default gw 192.168.0.2


Is the Lubuntu recommended email software Trojita, Sylpheed, or something else?

The Lubuntu Manual is designed for 18.10 installs, and not much documentation is focused towards the LTS releases.

The manual in general is a work in progress, but I created a task for it in our Phabricator instance.

Thanks!


E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages

This post may solve your issue. To summarise,

Open the /var/log/dist-upgrade/apt.log log file in a text editor.
Locate any "broken" packages and remove them with sudo apt-get remove <package>.

Note: in newer versions, the log is located in /var/log/apt/term.log instead.


how to auto load FEH and play jpg from usb flash drive?

i dont know why it matters, but adding sleep 15 works!
so the final code in feh.sh is

#!/bin/bash

sleep 15
xset s off
xset -dpms
xset s noblank
feh --quiet --fullscreen --borderless --hide-pointer --randomize --slideshow-delay 30 /media/usb/


10.04 > 10.10 upgrade and the splash screen hangs

As a workaround you can try booting up without Plymouth (the splash screen) by editing grub on boot up. To do so:

Hold Shift on startup to access the GRUB menu.
Press any key (besides Enter) to stop the timer. Then select the menu entry (normally the newest) by using the arrow keys.
Press e at the desired item to go into edit mode.
Go to the second from last line (by using the arrow keys). It should say something like: linux /boot/vmlinux-2.6.31-9 root=UUID=904b4c85-9857 ro quiet splash (it will not be exactly the same).
Remove the quiet splash options from the line, so it ends in ro.
Press Ctrl+x to boot. Hopefully it will work!


You have downloaded the wrong installer. The one you got is for a different architecture ( IBM zSystem ).

You should download the installer from here.


just run following command in terminal one by one:

sudo apt-get update
sudo update-pciids
sudo apt-get install linux-firmware-nonfree
sudo reboot

cuted from Installing Broadcom Wireless Drivers


How can i create a NTFS partition on this new HDD?

You can't create that big partitions on an msdos (MBR) disk.

You need to create a new GPT partition table to be able to create a 6TB partition.

You can do it in gparted (menu "Device").


I'm the author of StackApplet, so hopefully I can help shed some light on what's going on here.

First of all, the version in the Software Center is currently broken. This is because Stack Exchange recently shut down version 1.x of their public API (which StackApplet used). Right before this happened, I updated the source code and release StackApplet 1.5.2, which I have tested and can confirm works on Ubuntu 14.04.

Secondly, the new version is available in a PPA, but not the one you included in your question. You need to add the following PPA to your system:

 ppa:stackapplet-dev/stackapplet

After installation, you can confirm that you have the correct version installed by using:

dpkg -s stackapplet | grep Version

After this is complete, you should be able to run the application directly from the dash.

Edit: you may also be missing the python-appindicator package. You can make sure it is installed by running the following command in a terminal:

sudo apt-get install python-appindicator


I'd put both your export definitions and the alias commands to your .bashrc.


Deleted single file, after reboot it's back

I disabled this calendar in gnome-calendar app and the file stopped being recreated. Thus I assume it was created by this application every time it started.

Thank you all for your help.


Ubuntu 17.04 Software & Updater Failed to download repository information

You get that error when the line is incorrectly typed or the server does not answer in an expected way. In your case, I'm almost sure you typed the address incorrectly.

Look in /etc/apt and inspect either the big sources.list or files in sources.list.d.  Note these have a SLASH after "ubuntu/". All of mine do, eg:

deb http://us.archive.ubuntu.com/ubuntu/ artful main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ artful restricted multiverse main universe

Also, be aware that ppa servers come and go rapidly.


"Outage" is referring to the days left until Landscape thinks RAM or CPU is exhausted (which is likely invalid given a small sample size).  If you want to see license information, click on View Licenses under the main account page, titled Standalone along the top of the page.

Hope that helps you.


Hard Drive doesn't show up in "Computer", but does in BIOS and Disk Utility

I assume that you have installed Ubuntu on 320GB HD which you have already used for WinXP.

The problem may occur if you have selected "Erase and Use the entire disk" option while installing Ubuntu which might have formatted your partition.

If not, please check whether you see any disk drives under "Devices" option to the left, while viewing the "Home" folder. By double clicking on the devices, it will mount automatically and you can see the files that are in Windows Xp.

Please provide some more details to give you the correct answer.


This should do it:

awk -F, -vOFS=, '(NR==FNR){a[$1]=$0; next}
                   {
                      if(a[$1]){print $0,a[$1]}
                      else{print $0,"no match"}
                   }' file2.csv file1.csv

Explanation

awk -F, -vOFS=, : run awk, setting the input (-F) and output (-vOFS=,) field separators to ,.
(NR==FNR){a[$1]=$0; next} : NR and FNR are special variables which mean the current line number and the current line number of the current file respectively. When passing more than one file name, the two will be equal only while the first file is being read. So, this means "while reading the first file, save each line in an array whose key is the first field and move to the next line".
if(a[$1]){print $0,a[$1]} : we are now in the second file. If the current line's 1st field was also in the 1st file, print the current line and the line from the first file.
else{print $0,"no match"} : if the 1st field wasn't in the first file, print the current line and "no match"

Note that I am passing file2.csv as the first file and file1.csv as the second. This is because one of the two files needs to be stored in memory so it is better to store the smallest of the two.


If we talking about missing libreplace.so.0 library - then it came from libwbclient0 (see search results on packages.ubuntu.com).

So you need to reinstall the package:

sudo apt-get install --reinstall libwbclient0


Different nameservers for different networks

Add two connection profiles: (eg. repeat twice.)

Setup a new interface with the settings you need:

(right-click) on Network icon (up/down arrows)
select Edit Connections
first select tab for 'Wired' or 'Wireless', then click on 'Add'
enter the name for this new connection (eg. 'home' / 'office')
select 'IPv4 settings'
method: 'Manual'
DNS Servers: (add 192.168.1.1 for 'home')
click 'Save'

Note: You may need to manually assign a IP address, mask, etc..


CompizConfig Manager missing Burn and Explode effects

Make sure you have the compiz-fusion-plugins-extra installed. A lot of the Animations were moved to the plugins-extra package.

sudo apt-get install compiz-fusion-plugins-extra


How to get better graphics at Toshiba C660?

I suspect that Toshiba (and other OEMs) don't write any drivers for their laptops, but rather re-distribute whatever Intel, Rbroadcom, Realtek, Nvidia, and others provide them with.

Intel has its GPU driver built into the Linux kernel, so that you don't have to search, install and troubleshoot anything. Unfortunately, the Linux driver compares poorly to its Windows counterpart. It under performs, causes xserver crashes, lacks power management features, etc. To get a better driver, you have to wait for Intel to release one, hopefully sooner rather then later, though honestly, I wouldn't hold my breath just yet.


Secure a particular command with Password before executing it

One possible solution is to isolate a user in order to limit the set of commands that he/she can issue and in order to get more control over the system he/she needs to get the root access. To implement this, first you should make the restricted shell the default shell for that user:

usermod -s /bin/rbash user

And you can create a specific directory for that user to store the symlinks to the executables that you want to grant access to:

mkdir /home/user/programs

Edit the user's .bash_profile file to limit the scope of the commands that the user can run:

PATH=$HOME/programs
export PATH

Create some symlinks (i.e, shortcuts from the Windows perspective):

ls -s /bin/ls /home/user/programs/
ls -s /bin/date /home/user/programs/
ls -s /bin/uname /home/user/programs/

The last step is to prevent the user to actually modify the .bash_profile file's metadata:

chattr +i /home/user/.bash_profile

This attribute makes the file immutable.

If you want to revert this, simply run:

chattr -i /home/user/.bash_profile

Don't forget to add the symlink to /bin/su to enable a user who knows the the root user's password to get root access. (To work, this also requires that password-based logins for the root account be enabled by setting a password for it.)

And don't forget not to add the user in the sudo group, or to remove the user from that group if present. If the user is a member of the sudo group, then the user can get root access via his/her own password!

Or another workaround is to not symlink the /usr/bin/sudo file at all.

Original solution

If anybody has a better idea, I'm glad to hear.


Should I use complete partition for a Wubi Install?

One of the main advantages of wubi is that you do not have to repartition and then can uninstall it with Windows and recover all the file space. It exists just as a file (root.disk) inside the Windows NTFS partition.

If you have a separate partition, it really is better to do a full dual boot install to that partition, even the developer of wubi expects you to do that.
From the developer of wubi:

http://howsoftwareisbuilt.com/2009/03/12/interview-with-agostino-russo-wubi-ubuntu/

Agostino: Wubi actually wasn’t designed to do long-term installations. The main aim was really to let people try out Ubuntu with confidence. Normally, users that start with Wubi tend to upgrade to a full installation to a dedicated partition at the next release cycle.

More info on wubi:

https://wiki.ubuntu.com/WubiGuide

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


How to show a progress bar on screen based on the output of a program?

Use pv(1) in line mode:

COMMAND | pv --line-mode --size 1000 >> output.txt

or shorter

COMMAND | pv -ls 1000 >> output.txt

-s/--size sets the number of expected output units (bytes by default or lines in line mode).

If you want to capture the output and display the progress of multiple commands running in parallel you can do so with a compound statement:

{ COMMAND1 & COMMAND2 & COMMAND3; } | pv -ls 1000 >> output.txt

In that case you need to specify the number of expected output units of all commands in total.

Demo

for i in {1..200}; do sleep 0.1; echo "$i"; done | pv -ls 200 > /dev/null


How do I set up hosting a domain name at home with Apache?

I have done this because as a web developer, I like to work on sites on my home server then upload the site to the final hosting company after it's working.  So, to allow the client to see and approve changes, I got a domain from dynDNS (dyn.com) for $20/year.  There are similar systems for free, and dynDNS used to have a free account, but I don't think they do anymore.  But I chose the dynDNS Pro, because $20/year is pretty cheap, and you get multiple domain names and wildcard domains.

What it Does

This service works by giving you a choice of existing domain names they own, such as yourname.homelinux.net, etc.  For example, you can choose one called somename.homelinux.net, and then you can instantly create a unique site called xxx.somename.homelinux.net without registering it, and in Apache, set up a domain with that name.  That's all it takes to create a new domain.  You can also register other domains.  There may be a more premium service that allows you to use your existing domain name, and have it hosted with them, but I don't need that.

How it Works

They have an app that updates your dynamic IP periodically.  So, you have a constant domain name, but the IP it points to can change.

How to Set Up Apache on Ubuntu

Apache can take a domain name and use it to access a local website in any given directory using Virtual Hosts.  The IP address doesn't matter, and you can have any number of virtual hosts using the same IP address; it's the name that matters, not the address.

This done by making an entry in a configuration file, at /etc/apache2/sites-enabled/000-default.  I'm assuming the default configuration; I think you could have more than one of these files, but I haven't done this.

In order for this to work, you need to have a module enabled called rewrite.load. This module is in /etc/apache2/mods-available, and to use it, you would create a symbolic link in the directory /etc/apache2/mods-enabled (from the mods-enabled directory, enter "ln -s ../mods-available/rewrite.load").

OK, once this is done, then for any domain name you want to resolve on your local system, you create a multi-line entry in the configuration file (000-default).  I like examples better than directions, so here is an example:

Setup of /etc/apache2/sites-enabled/000-default

Assume you have a local website, and you use dynDNS with a name like mycoolsite.homelinux.com.  Further assume that the site's location is in /var/www/mycoolsite (it can be anywhere, including your home directory).  Then, the following entry at the end of your configuration file would make this work (assumes port 80, the conventional web port):

<VirtualHost *:80>
    <Directory /var/www/mycoolsite>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
    DocumentRoot /var/www/mycoolsite/
    ServerName mycoolsite.homelinux.com
</VirtualHost>

Note that this is not the only set of parameters that work.  The Directory section is not needed if you don't need to change anything from the defaults, but I always just include it, and it's been a while since I figured out exactly why.  But it always works, so I leave it be.

This same setup can be used to make a "fake" development site on localhost, if you make an entry in your hosts file on any machine that will access it, assigning a name to the IP (either localhost, or the IP address of the server on the LAN).  You can have a number of these aliases in your hosts file, all with the same IP.

I don't fully understand what you are asking for the second part of your question.  If you want to further elaborate, I'll try to help.  It may be that the method I suggested isn't what you are looking for. If not, I'm sorry.  Let me know if you have questions.


Linux OpenGl not newest version for game?

I figured out the issue, for anyone else who may have similar problems here was the trick: glxinfo reports the x64 version of MESA (at least on my system it did) but the game needs the x86 version of MESA (it is an x86 executable, github issue report to the rescue!) which, interestingly, glxinfo didn't report on and since it is an x64 system I didn't have that installed.

When I installed steam to try the steam version, steam auto-installed the x86 version of mesa as part of installing the steam launcher, and voila, it worked! (don't know why it wasn't listed in game prereqs though). So for anyone else trying to run a x86 game and have tried much of other solutions and couldn't get it to work, make sure you have the x86 version of MESA and other x86 dependencies installed!


Do I need Intel Smart Response when installing Ubuntu?

Update

There are other alternatives, bcache, flashcache, dm-cache, EnhanceIO etc. that allow Ubuntu to use a small SSD and a large HDD in ways similar to Windows. See

What are the advantages/disadvantages of different SSD to HDD cacheing options (dm-cache, flashcashe...)? for differences between these.

I have no experience with these tools. See How do I install and use flashcache/bcache to cache HDD to SSD? and ArchLinux Wiki on Bcache for more on some of these methods. Thanks to Fabby for pointing me to these resources.

Original Answer

You are right. The way Windows 8 uses a small SSD and a large HDD is not available to Ubuntu.

Keeping Ubuntu OS in the SSD and the media in HHD makes sense. The /home folder (or partition) usually keeps all the media, documents, for all the users. It also keeps all the user-specific configuration files. So keeping the /home on the SSD will speed up things as the configuration files will be read quickly.

Step 1

Disable Intel Smart Response in BIOS/UEFI. Disable Secure Boot and Fast  Boot. Enable Legacy Mode in BIOS if available.

Step 2

Boot from a Live DVD/USB of the version of Ubuntu you want to install and choose "Try Ubuntu."  Make sure keyboard, mouse/trackpad, display, sound, Internet connections, webcam and any other things you can think off work in Ubuntu.

Step 3

Install Ubuntu in the SSD. If Legacy Mode in BIOS could not be enabled, see Ubuntu UEFI documentation on how to install. For someone new, it is easier to just have one / ext4 formatted partition with mount point / in the SSD. You can create a second /home partition in the SSD if you want, but that is not essential.

When you get to the point where you have to choose where to install(“Installation Type”),

choose “Something Else”. A new screen will pop out letting you choose where to install Ubuntu, format, make partitions, etc.  Follow carefully the bellow:

Choose and format the smaller disk (SSD) as ext4 and mount point / to install Ubuntu
Choose and format the bigger disk (HDD) ext4 to just store media. Assign it a mount point /bigdrive. Alternately assign mount point /mnt/bigdriveor /media/bigdrive. See Why have both /mnt and /media? for more explanations on these alternates. If you use either of the alternates, modify following steps accordingly.
Create a Swap partition at the end of the HDD and assign it the
Swap format. It does not need any mount-point.
Finish install and reboot.

Step 4

Verify:

Ubuntu boots correctly.
Everything works as they did when you tried Ubuntu from the Live
DVD/USB.
Open Nautilus, the file manager (similar to Windows Explorer) and
navigate to File Systems. Verify the folder bigdrive exists.
If you can't find bigdrive then it did not get mounted at startup.
See
mount two hard drives on start up
how to fix that.
Create a new folder and a new file in it to see you can actually
write in the bigdrive. Delete these.

If you cannot create folders and files in the bigdrive follow these steps to fix the write permission.

Open terminal by pressing Ctrl+Alt+T
and type

gksudo nautilus

If this does not work, see How do I start Nautilus as root?

Enter your password at the prompt.
Within Nautilus, go to File System and find the bigdrive folder
icon.
Right click on and choose Properties.
Go to the Permissions tab.
Make sure the Group and Others can  Create and Delete
Files.

Step 5

Move the big folders in your /home/$USER folder to /bigdrive/$USER.
You can do this in Nautilus using "Create New Folder" (for creating the user folder), "Cut" and "Paste" (for the directories). Let's say these folders
are:

~/bin, ~/Desktop, ~/Documents, ~/Downloads, ~/Music, ~/Pictures, ~/Public, ~/Templates and ~/Videos
Make symbolic links. Open a Terminal by pressing
Ctrl+Alt+T and type each line and
press Enter: (replace "$USER" by your user name)

ln -s /bigdrive/$USER/bin/ bin

ln -s /bigdrive/$USER/Desktop/ Desktop

ln -s /bigdrive/$USER/Documents/ Documents

ln -s /bigdrive/$USER/Downloads/ Downloads

ln -s /bigdrive/$USER/Music/ Music

ln -s /bigdrive/$USER/Pictures/ Pictures

ln -s /bigdrive/$USER/Public/ Public

ln -s /bigdrive/$USER/Templates/ Templates

ln -s /bigdrive/$USER/Videos/ Videos

More details are at Installing Ubuntu on Samsung 5 (SSD+HDD)

Hope this helps


How to entirely backup Ubuntu Server to another Ubuntu Server (broken disk sever 1, for example)

There are plenty of tools you can use to copy filesystems around such as dd or rsync

rsync

Allows for copying over ssh

Copy your home directory to another server via ssh

rsync -a --delete --quiet -e ssh /folder/to/backup remoteuser@remotehost:/location/of/backup

Ful System backup

rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /path/to/backup/folder

And finally rsync as a disk cloning tool

rsync -qaHAXS SOURCE_DIR DESTINATION_DIR

from the man page

-H, --hard-links      preserve hard links
-A, --acls            preserve ACLs (implies -p)
-X, --xattrs          preserve extended attributes
-S, --sparse          handle sparse files efficiently

dd

I don't think you can use dd over ssh so you'll have to use a script to upload the file or just copy over to a usb stick but disk cloning (what I think you're asking about) is what dd was designed for

Clone an entire disk

dd if=/dev/sdX of=/dev/sdY bs=64K conv=noerror,sync status=progress

you might be able to try this workaround for using dd over an ssh tunnel though my advice would be to test it on a couple of vm's first before running it on bare metal as while dd is a powerful tool as uncle ben said 'With great power, comes great responsibility' it's easy to destroy filesystems with dd. Without further adieu... the workaround

ssh server1 'dd if=/some/file' | ssh server2 'dd of=/new/file/path'


I managed to solved above problem by steps below
1- remove cgru (afanasy). nothing was copied specially, except two files.

sudo rm /etc/systemd/system/afrender.service
sudo rm /etc/systemd/system/afserver.service

2- remove render user and group

sudo deluser --group render

3- re-install udev

sudo apt-get install -f udev


Touchpad on Fujiitsu Lifebook AH532 not working correctly

Solved it!

after unpacking the driver to /usr/src/psmouse-alps-dst-1.0/ I edited the make config files in the source and build directories to reflect the location.

They currently say "alps-1.3", which I changed to "alps-dst-1.0" in the config files.

The driver then builds and installs correctly.


Do you know if the services you installed are running, apache and MySQL need to be running for this to work. open a terminal and type:

sudo service apache2 status
sudo /etc/init.d/mysql status


It could be a variety of things. You should edit your question to include more detail specs of the host machine, state what virtualization product you are using, and if the product uses guest drivers state whether you've installed them. The information below may or may not apply to you depending on what product you are using to host the virtual machine.

Depending on how much ram your host has, and what kinds of ram usage the host and guest operating system are under it's possible your VM is getting swapped memory from the host. The virtual machine gives 4gb of memory from the host. However if not enough ram is available on the host that memory could be coming from your swap partition instead which would dramatically decrease performance in the virtual machine. If you have enough ram try disabling your host's swap partition and seeing if the vm's performance increases.
Another thing to consider where the vm is stored. For optimal performance it should be placed on it's own storage device, that has a fast connection interface, and good read/write speeds.
If the virtual machine product you are using has guest drivers installing them will aid performance.
If you have more than 2 cpus available on the host then assigning more may help depending on what virtualization product you are using. For example when I record high quality audio in virtual machines I dedicate all 4 of my cpus to prevent skipping.


Recording from line-in stops working after a while

Given that you've tried two different recording applications, I'd be concerned about a hardware defect.  Another possibility is that a third application starts up at some point and intentionally mutes the line-in channel.

In a terminal, you can use alsamixer to show volume levels for all playback and capture channels.  Be sure to press F5 in order to display all available channels.  Sometimes all the channels won't fit on one screen, so also be sure to keep scrolling to the right in order to go through the entire channel list.


How to upload/download a directory using ftp and on ftp CLI? I am using VSFTPD

The standard FTP server does not have to implement a directory download according to RFC959. Therefore, downloading an entire directory is performed by:

!mkdir szLocalDirectory
!cd szLocalDirectory
prompt
mget szRemoteDirectory/*

and that will download all files from szRemoteDirectory to newly created szLocalDirectory without prompting for confirmation for each file.

For more info, read the entire RFC959.


How should I set up swap encryption on 18.04?

The two main approaches for encrypting swap as of Bionic 18.04 are to use cryptsetup/LUKS or ecrypt* tools.

According to Will Cook of Canonical (techradar.com/news/ubuntu-bionic-beaver-1804-lts-has-landed/6) the ecrypt set of tools were moved from main to universe with the release of 18.04. The reasons for this were that the tools were not receiving the level of development and support from the developers that they once were and so they were slowly losing quality and value. Essentially Canonical doesn't have confidence in these tools over the long term and unless something changes, it is safe to say that they are not to be preferred.

As pointed out, the cryptsetup/LUKS tools are in current documentation, albeit for a different use case. They are also in the main line of the repository, which according to the techradar article linked above, makes them first class citizens in the Ubuntu ecosystem.

LUKS is a kernel based encryption scheme. Generally, things that are moved into the kernel are considered the first choice simply because of the long term and considered support. There are many many user space projects that are replaced by kernel based facilities. At the same time, kernel based facilities tend to be replaced rather than simply dying on the tree. IPChains was an example. It was an early kernel based firewall. It was replaced by IPTables/Netfilter.

Cheers Paul


Ubuntu 64bit is not the bottleneck when installing RAM on a laptop. It will support as much ram as you will give it.

Whether the linked memory is compatible with your Lenovo G50 is off topic on askubuntu (and I do not know the answer to it).


Do you still want to proceed with this installation? [no]

This asks for an answer to the question. If you press Enter at this point, the script will choose the default answer, which is shown in brackets. Sometimes it is written as [YES/no] or [y/N], then the default value is the uppercase one.

To overrule the default, you simply have to type yes or most of the times y is enough, and then press Enter to proceed.


Accessing files in local ftp server files through terminal?

After establishing the connection in GNOME, you can find your FTP files mounted under ~/.gvfs


removing all image metadata using the command line using metaflac

These two commands should remove the cover art.

metaflac --remove --block-type=PICTURE,PADDING --dont-use-padding "/tmp/del/test.flac"
metaflac --remove-tag=COVERART  --dont-use-padding "/tmp/del/test.flac"

Note that  --dont-use-padding tells vorbis not to replace the image data with padding, so the command really is:

--remove
--block-type [what to remove, doesn't work as expected unless you also use the next argument]
--dont-use-padding [tells vorbis not to replace what was removed with padding]

This was very counterintuitive, first, why would vorbis leave padding in place of an image when you remove it? That's some old idea vorbis group had about keeping the size of the file after a removal the same, roughly. And why would you need to tell it to not replace image data with padding when you are already telling it to remove padding, but that's how it works. I think. For some reason, the remove PADDING item does not appear to do that, unless you use --dont-use-padding as well, which seems kind of silly, but that's what my tests showed, I tested pretty heavily and this is what I ended up with that seemed robust and consistent.

This was verified while doing intensive testing on a vorbis tagging/image embedding feature for some software, during this testing, the flac files kept getting bigger and bigger, and I couldn't figure out why, but that's what was going on.

Note that PADDING in vorbis flac files as far as I can tell works roughly the same way Thunderbird email clients have their email 'directory' files, which contain the emails in a single large file. If you delete or move emails from one 'directory' (aka, file), you have to then use the 'Compact Folders' feature to get rid of the space taken up by the moved or deleted emails. Flac files work roughly the same way as far as I can tell, you can keep adding to the COMMENT type items, but it doesn't remove any padding unless you force it to.


rhythmbox crashes due "Failed to import the site module"

This is not a solution but a fix
I added

for p in sys.path:
    print(p)

to /usr/lib/python3.5/_sysconfigdata.py. The path /usr/lib/python3.5/plat-x86_64-linux-gnu was substituted with /usr/lib/python3.5/plat-gnu.

Fixing it

I fixed it by adding the following workaround to the file:

plat_path = "/usr/lib/python3.5/plat-x86_64-linux-gnu"
if(not plat_path in sys.path):
    sys.path.append(plat_path)

I still do not know why this happened.


I don't think that's possible.  In forward-proxy scenarios yes, because the proxy just forwards the request to the resolved destination without decryption and analysis.  But in reverse proxy, since the header is encrypted, the proxy server wouldn't know what to do with the request...unless it can decrypt it and see what the request actually is.  Below is an exerpt from Squid documentation for version 2.5.  I know you asked about version 3.3, but I think the point is still quite valid.

  It is possible to intercept an HTTPS connection to an origin server at
  Squid's https_port. This may be useful in surrogate (aka, http
  accelerator, reverse proxy) environments, but limited to situations
  where Squid can represent the origin server using that origin server
  SSL certificate. In most situations though, intercepting direct HTTPS
  connections will not work and is pointless because Squid cannot do
  anything with the encrypted traffic -- Squid is not a TCP-level proxy.

source:  http://wiki.squid-cache.org/Features/HTTPS

If you can provide some details about your intention with the reverse proxy, and why you want to avoid a MITM config, maybe another solution will present itself.

Lastly,  to specifically answer your question about the best source of documentation...  I find the default squid.conf file to be very helpful.


Sound through headphones is crackling/popping

You could try this:

  Try resetting your pulse configuration.

  Using a Terminal="Applications->Accessories->Terminal"

rm -r ~/.pulse ~/.asound* ~/.pulse-cookie
sudo rm /etc/asound.conf

  Reboot and ignore any 'No such file or directory' errors


I was able to resolve the issue by using aptitude to uninstall libpulse0. This uninstalled a large number of dependencies. I was then unable to login, so I logged in directly to the terminal and re-installed ubuntu-desktop and libpulse0, which fixed all issues.

To any users encountering similar issues regarding dependencies, I would recommend using aptitude, which provides a helpful plan for resolving them.


I am using my main user but not root. However, when I run ls -l in the third and fourth column, I see root. Is that OK?

When you use symbolic link to a file in Windows and work in that file, chmod doesn't work and everything is in root.


Mounting second drive with corrupted sectors, common techniques not working

If filesystem is healthy then Ubuntu should be able to mount the drive.

In current situation i would just run chkdsk /R /F for this disk in Windows environment, for example you could use MiniXP on Hirens boot cd. Then you sohuld be able to mount the disk.

But as this is not Windows forum i should also sugest some Ubuntu tools to fix the filesystem...

First install NTFS-3G by typing this command:

sudo apt-get install ntfs-3g

Next install NTFSProgs in the same way:

sudo apt-get install ntfsprogs

Now with both of those tools at your disposal, you can set about fixing Windows. First locate your Windows partition. In the Terminal type:

sudo fdisk -l

Armed with this information you want to use NTFSProgs to attempt to fix the partition. In your Terminal window type:

sudo ntfsfix /dev/<device name>


Tried gnome-screensaver-command -l and that did not work either. Should have mentioned that as part of list of experiments tried. Installed lightdm and seems to work for now.
Thanks


I deleted my launcher panel when I just wanted to delete a launcher. How do I start making a new panel?

You can reset the panels back to default by writing the following in a terminal:

gconftool --recursive-unset /apps/panel && killall gnome-panel


Dell Inspiron 15R (5520) Optical drive ejects randomly

Sounds like a software issue, but open terminal, and try eject -i on.

This will stop you from being able to open the disk tray via the button.

To renable opening via button, do eject -i off.

Test it to see if this works.


How to install Ubuntu 32-bit on Asus C300 chromebook

To enable dev mode, you enter recovery mode (Escape + F3  + power key); this will trigger a screen with the message "Chrome OS is missing or damaged. Please insert recovery USB stick".

One this screen (the recovery screen), press ctrl + d - and follow the on-screen instructions.

Remember, this will wipe the device, and the Google disclaimer is: "Caution: Modifications you make to the system are not supported by Google, may cause hardware, software or security issues and may void warranty."

See also: http://www.chromium.org/chromium-os/poking-around-your-chrome-os-device


chown: changing ownership of `...': Operation not permitted

You have to be root to change the owner of files/directories.

sudo chown -R www-data /var/www/wordpress

If you're getting an error like Operation not permitted, just type:

sudo !!

at the prompt to execute the last command with root priviledges. This way, you don't have to retype chown -R www-data /var/www/wordpress.


How to increase icon size of xfce4-panel window buttons (panel-tasklist-menu)

If you mean the Window Buttons panel plugin, then what you describe seems to be the behaviour when you have Show button labels enabled in the plugin Properties. This certainly sounds like a bug and you can report it on Xfce's Bugzilla.

You can improve the icon display if you uncheck that option, which will result in a Windows 7-like look of the tasklist (which I find more useful and easy to use). In this config, the icons are scaled appropriately.


You need the unicode hex values for these as they aren't part of the standard Compose Key lineup. To work out what the keys were, I copied and pasted the characters off your question and stuck them in this converter. There are many others like it. It gave me the following:

U+25A1 : WHITE SQUARE
U+25A0 : BLACK SQUARE

To enter these, you follow the standard Unicode entry sequence:

Control + Shift + U, unicode hex (in lower case), Return

□
■


How to access the pixel data that is displayed on screen?

A part of normally working display window can be captured by  scrot -s SCR_IMG.png , clicking and draggging the mouse to surround a desired part of the display by a rectangle. The  SCR_IMG.png  file then contains the captured part.


Well you used the -R (recursive) flag then your system is screwed , the best solution is to reinstall Ubuntu.

Another way to fix it, is to install the same version of Linux on another machine (or VM) then just copy /usr over to the old machine , good luck.


how to change default automount umask on 13.04?

This answer from UbuntuForums is sort of right:

  You'll need to create an fstab entry that uses auto mount, I haven't
  done this in a long time but you could try adding the following to
  /etc/fstab:

  /dev/sdx /path/to/mnt ntfs-3g
  auto,users,uid=1000,gid=100,dmask=022,fmask=133 0 0

  Then umount and try plugging it back in to see if that works. If you
  just want the same permissions for file/directory you could replace
  f/dmask with umask.

The sort of wrong part is that it uses disk indices instead of UUIDs or disklabels.  The point does, however, remain the same.


You can check if the computer receives the mouse click (as a diagnostic check) by running the following commands:

xinput list (note the id corresponding to your mouse)
xinput test <id> (where  is the id of your mouse)

for further info check the comments to the question


The link by Orestis is really great one.

In short the reason of your problems can be 64-bit. Xerox drivers for Phaser 3100MFP are 32-bit and that's why you'll have to install some 32-bit libraries.

First of all, download the driver from Xerox official site. It will have a setup file for installing driver in Ubuntu's database. Unpack and install it. It may need to run with sudo like this:

sudo ./setup

This action can have a problem cause it is needed to have libjpeg62:i386 installed. so run before it:

sudo apt-get install libjpeg62:i386

So now if you'll search for drivers in Printers - it will find appropriate but it won't still work cause there are some 32-bit libraries that are missing.
As for as i know, Ubuntu is using CUPS, so to find out which libraries are needed, run this:

readelf -d  /usr/lib/cups/filter/rastertoprinterbin

The output will be something like this:

Tag        Type                         Name/Value
0x00000001 (NEEDED)                     Shared library: [libcupsimage.so.2]
0x00000001 (NEEDED)                     Shared library: [libstdc++.so.6]
0x00000001 (NEEDED)                     Shared library: [libm.so.6]
0x00000001 (NEEDED)                     Shared library: [libgcc_s.so.1]
0x00000001 (NEEDED)                     Shared library: [libc.so.6]
0x00000001 (NEEDED)                     Shared library: [libcups.so.2]

So the libraries which have type 'needed' are needed to be installed.
For example to resolve lipcupsimage.so.2 you need to install 'libcupsimage2:i386'
 (':i386' - means 32 bit system, don't forget to include it). The command will look like this:

sudo apt-get install libcupsimage:i386

After that it should work fine. I had the same problem with my printer Xerox Phaser 3100MFP - it resolved after i installed only 'libcupsimage'.


Should I as a developer use var/www in conjuction with apache?

Apache is a powerful and flexible web server and there is ample documentation on the web.

To get you started:

1) Yes, the default web root is /var/www

2) You can change Apache's behavior if you wish. From your question , I would activate the home directory option.

sudo  a2enmod userdir

Restart apache

To use a directory in your home, make a directory public_html

mkdir ~/public_html

Put your web pages in ~/public_html

FYI: ~ is short hand for your home directory.

You can browse them with

http://server/~username

or

http://localhost/~username

Where "username" is your log in user name.

That should get you started, do not feel overwhelmed if you do not understand all that code yet, you will learn.

See:

Apache symlinked to home directory - Permission Errors

https://help.ubuntu.com/10.04/serverguide/C/httpd.html


What went wrong with my Mysql to MairiaDB migration fail ubuntu 16.04

As jos suggested removal of mysql-server-core-5.7 is required, and I found complete removal of all mysql turned the trick

sudo apt-get remove --purge mysql*
sudo apt-get autoremove
sudo apt-get autoclean

Then install mariadb, and then it was required to set up the databases and users before the sql backups could be restored.

All in all reasonably done.


Still cannot watch Netflix on Ubuntu 14.04

You probably haven't updated your packages

Open a terminal :

sudo apt-get update

sudo apt-get upgrade

I haven't used Ubuntu "apt-get" in a while but I believe this is what you do.

You should also make sure you don't have any extensions blocking certain things.

Let me know if this works


I solved this problem by removing a bad path from my .bashrc. This problem can be produced by a .bashrc/.bash_profile file that cannot be interpreted correctly.


Before running your command (sudo hostapd -dd /etc/hostapd/hostapd.conf), run follow command

sudo nmcli nm wifi off
sudo rfkill unblock wlan

Or downgrade hostapd to version 1.


Formatting aand setting up Raid on a secondary and tertiary drive

Setting up RAID1 device is quite simple:

create partitions for RAID on 2TB HDDs
assemble md0 device
mount assembled /dev/md0 device

You can find step-by-step instructions here:
How can I add a RAID 1 array in Ubuntu 10.04?.


How can I set up a keyboard shortcut so that Ctrl+Backspace = Del?

In Kubuntu Ctrl+Backspace by default is assigned to the action "Delete Word Backwards" which is used by some applications. You can overwrite this, though.

One solution was to install xautomation  and then create a shortcut for Ctrl+Backspace which runs xte 'key Delete':

Open a terminal (i.e. Konsole) and run sudo apt-get install xautomation.

Open Custom Shortcuts via the search menu.

Click Edit → New → Global Shortcut → Command/URL. Name the new shortcut.

Go to the Trigger tab, click the input button (None) and press Ctrl+Backspace. Then click onto Reassign.

Go to the Action tab and enter xte 'key Delete'.

Click Apply. Ready.

(More about xte which is part of xautomation.)

To assign a new shortcut to "Delete Word Backwards" add a custom combination to that action within Standard Keyboard Shortcuts.


Start Whatsdesk minimized in system tray on startup ubuntu 18.10

Yes, there is a better way to do this, it's still kind of dirty, but at least it works.
Just put the code below in a file without extension and select the script to be run at system start /log in.
You also have to set Whatsdesk to be started at boot.
Then it should just work fine. :)

I was actually insprired by your script, so it's just a kind of extension to your's:

#!/bin/bash
i=0                             #set "counting var" to 0
while true; do                  #do as long as I say
i=$(echo $i + 1)                #add 1 to i
wmctrl -F -c "WhatsDesk"        #close window with exact title "WhatsDesk"
    if [ $? -eq 0 ]; then       #if close window command was successful, do:
    break                       #end "while"
    else
        if (( $i == 40 ))       #if "counting var" = x, do:
        then
        break                   #end "while"
        else
        sleep 0.25              #pause "while" for x seconds
        fi
    fi
done

The -F option forces wmctrl to be case sensitive and it has to be the full name of the window title.
So... as long as you don't have another window with the exact same name, you are fine.
Every 0.25 seconds will be searched for a matching window.
To change that, just change the "0.25" to something else (in seconds).
Also, after 10 seconds, this script does end itself when no matching window was found.
To change that, change the "40" to something else (wanted seconds x (1 / 0.25)) <- replace with your wanted value.

I hope that helps you. (works for me at least ;D) :)


Team Speak Installation Problem: Verifying Archive Integrity... Error

Error in MD5 checksums is usually when the installion file is corrupt or has been edited. I would recommend you to downlaod  it from again from the offical website.


The configure information is deliberately omitted from Ubuntu's binary PHP packages, because it's different for each build of the package anyway. Note that the configure line does not tell you which PHP extensions are enabled and disabled, as they are usually available in separate packages.

See this bug report for more information.

Since you don't say what you want the information for, it's hard to suggest what you should do instead. If you still need advice on that, please ask a new question about whatever it is you're really trying to achieve.


xdg-open: Open various tab at the same time

This is not possible with xdg-open alone because it expects exactly one argument.
But you can write a function to iterate over all given arguments and call
xdg-open separately.

Open your ~/.bashrc file in an editor, e.g.

gedit ~/.bashrc

and then add the following text at the end of the file:

xo ()
{
    for var in "$@"; do
        xdg-open "$var";
    done
}

Save the file and leave the editor. After that either close and re-open the terminal
window or enter

source ~/.bashrc

in the current window for the change to take effect.
From now on you have a new command xo and can issue

xo https://stackoverflow.com https://google.fr

See also my answer to the slightly related question
Shorten or merge multiple lines of &> /dev/null &.


When I try to reset my password using root I couldn't type

As Eliah Kagan said in this comment, it's normal not to see anything when entering a password on a command-line in Ubuntu.

If you still want to see placeholder characters like * as you type, follow next instructions:

Install rlwrap tool by running next command in terminal:

sudo apt-get install rlwrap
Use next command when you want to change your paswword:

rlwrap passwd

Moreover, next you can create an alias for rlwrap passwd (see here how to create a permanent alias):

alias passwd='rlwrap passwd'

From now, in the future you can use passwd as normal and you will see * characters when you type the password as you expect.


I thought it is good to mention the whole setup I have which may contain interesting tricks.

It is possible to make separate directories within tftp root folder:

$ tree -L 2
.
├── anax_bios_flash.img
├── clonezilla_20100623
│   ├── filesystem.squashfs
│   ├── initrd.img
│   ├── parameters.txt
│   └── vmlinuz
├── display_ubuntu
│   ├── adtext.cfg
│   ├── f10.txt
│   ├── f1.txt
│   ├── f2.txt
│   ├── f3.txt
│   ├── f4.txt
│   ├── f5.txt
│   ├── f6.txt
│   ├── f7.txt
│   ├── f8.txt
│   ├── f9.txt
│   ├── menu.cfg
│   ├── po4a.cfg
│   ├── prompt.cfg
│   ├── splash0.png
│   ├── splash1.png
│   ├── splash.png
│   ├── splash.xcf
│   ├── stdmenu.cfg
│   ├── text.cfg
│   └── vesamenu.c32
├── etc
│   └── boot.conf
├── FDSTD.144
├── hello.boot
├── memdisk
├── Notes.txt
├── openbsd_3.9
│   ├── bsd
│   ├── bsd.mp
│   ├── bsd.rd
│   └── pxeboot.0
├── ploplinux_4.0.0
│   ├── boot.msg
│   ├── bzimage
│   ├── initrfs.gz
│   ├── memtest
│   ├── ploplinux
│   ├── plpbt.bin
│   ├── plpinstc.com
│   ├── pluspacks
│   ├── pxelinux.0
│   ├── pxelinux.cfg
│   └── readme.txt
├── pmagic_5.5
│   ├── boot
│   ├── bzImage
│   ├── initramfs
│   └── sample_pxelinux.cfg
├── pmagic_6.7
│   ├── boot
│   ├── bzImage
│   └── initramfs
├── pxechain.com
├── pxelinux.0
├── pxelinux.cfg
│   ├── default
│   └── default.backup
├── slitaz-cooking.iso
├── ubuntu_10.04
│   ├── initrd.gz
│   └── vmlinuz
├── ubuntu_mini.iso
└── unattended_4.9
    ├── bzImage
    ├── default
    ├── initrd
    ├── menu.c32
    └── pxelinux.0

Then change pxelinux.cfg/default, pxelinux.cfg/CLIENT_MAC or pxelinux.cfg/PORTION_OF_CLIENT_IP

For me, I used Ubuntu Netboot as template, So as you can see pxelinux.cfg/default includes display_ubuntu/menu.cfg which by itself includes display_ubuntu/text.cfg which contains the main menu of Ubuntu boot:

Contents of pxelinux.cfg/default

include display_ubuntu/menu.cfg
default display_ubuntu/vesamenu.c32
prompt 0
timeout 0

Contents of display_ubuntu/menu.cfg

menu hshift 7
menu width 65
menu margin 5

menu title GNU/Linux Rescue Collection

include display_ubuntu/stdmenu.cfg
include display_ubuntu/text.cfg

menu begin advanced
    menu title Advanced options
    label mainmenu
        menu label ^Back..
        menu exit
    include display_ubuntu/stdmenu.cfg
    include display_ubuntu/adtext.cfg
menu end

label help
    menu label ^Help
    config display_ubuntu/prompt.cfg

Contents of display_ubuntu/text.cfg

DEFAULT partedmagic_6.7

LABEL test_kernel
    MENU LABEL ^Test Kernel
    KERNEL hello.boot

LABEL partedmagic_6.7
    LINUX pmagic_6.7/bzImage
    INITRD pmagic_6.7/initramfs
    APPEND edd=off load_ramdisk=1 prompt_ramdisk=0 rw vga=normal loglevel=9 max_loop=256

LABEL partedmagic_5.5
    MENU LABEL PartedMagic 5.5
    LINUX pmagic_5.5/bzImage
    APPEND initrd=pmagic_5.5/initramfs edd=off noapic load_ramdisk=1 prompt_ramdisk=0 rw vga=791 loglevel=0 max_loop=256

menu begin pmagic_advanced
        menu title PartedMagic 5.5 Advanced
        label mainmenu
                menu label ^Back..
                menu exit
        include /pmagic_5.5/boot/syslinux.cfg
menu end

LABEL clonezilla_20100623
    MENU LABEL ^CloneZilla 2010.06.23
    KERNEL clonezilla_20100623/vmlinuz
    APPEND initrd=clonezilla_20100623/initrd.img boot=live union=aufs noswap noprompt vga=788 ocs_live_keymap=NONE ocs_lang=en_US.UTF-8 fetch=tftp://192.168.10.123/clonezilla_20100623/filesystem.squashfs

LABEL unattended_4.9
    MENU LABEL Unattended 4.9 for ^XP
    KERNEL unattended_4.9/bzImage
    APPEND initrd=unattended_4.9/initrd z_path=\\192.168.10.123\install_4.9

LABEL slitaz
    MENU LABEL ^Slitaz.iso
    TEXT HELP
Testing boot from iso.
    ENDTEXT
    KERNEL memdisk
    APPEND initrd=slitaz-cooking.iso

LABEL mini_ubutnu
    MENU LABEL Mini-Ubuntu
    KERNEL memdisk
    APPEND initrd=ubuntu_mini.iso

LABEL freedos_std
    MENU LABEL ^FreeDOS STD
    TEXT HELP
Testing boot from Floppy IMG.
    ENDTEXT
    KERNEL memdisk
    APPEND initrd=FDSTD.144

LABEL anax_bios_flash
    MENU LABEL Anax Bios Flash
    KERNEL memdisk
    APPEND initrd=anax_bios_flash.img

LABEL openbsd
    MENU LABEL ^OpenBSD 3.9
    KERNEL openbsd_3.9/pxeboot.0

LABEL plop_4.0.0
    MENU LABEL PlopLinux 4.0.0
    KERNEL ploplinux_4.0.0/bzimage
    APPEND initrd=ploplinux_4.0.0/initrfs.gz vga=1 nfsmount=192.168.10.123:/media/gnu_files/_servers/tftp/ploplinux_4.0.0/ploplinux

LABEL ubuntu_10.04_install
        menu label ^Ubuntu 10.04 net install
        kernel ubuntu_10.04/vmlinuz
        append vga=normal initrd=ubuntu_10.04/initrd.gz -- quiet

LABEL ubuntu_10.04_cli
        menu label Ubuntu 10.04 ^command-line net install
        kernel ubuntu_10.04/vmlinuz
        append tasks=standard pkgsel/language-pack-patterns= pkgsel/install-language-support=false vga=normal initrd=ubuntu_10.04/initrd.gz -- quiet

LABEL pxeserver2
        menu label Switch to 2nd PXE server...
        kernel pxechain.com
        append 192.168.10.254::pxelinux.0

Notes:

hello.boot is a just tiny kernel, I used it for initial PXE tests.
memdisk is used as kernel to load (over PXE):

Raw floppy images: anax_bios_flash.img and FDSTD.144

CD ISO images: slitaz-cooking.iso and ubuntu_mini.iso
pxechain.com used to chain load other PXE server.

pxechain.com is available within syslinux-common package starting from trusty (Thanks to @muru) or syslinux project archive under different filename pxechn.c32.
All listed Linux distributions are loaded by same pxelinux.0 located on tftp root folder. The exception is with OpenBSD (which has BSD kernel), pxelinux.0 loads openbsd_3.9/pxeboot.0, the PXE bootstrap coming with OpenBSD. It has its own configuration at etc/boot.conf. (This method is called chain loading)

Contents of etc/boot.conf

set image openbsd_3.9/bsd

You can use include instead of listing the whole menu in a single file, or may be chain menus to to keep the original advanced menus/options of each distribution.


No OS select menu when starting up my HP laptop

Chances are one of two things has happened (maybe both):

You installed Ubuntu incorrectly, in BIOS/CSM/legacy mode when Windows was installed in EFI/UEFI mode. In almost all cases, it's best to install Ubuntu in the same mode as Windows. Doing otherwise can create symptoms like those you describe. There have been a number of recent questions about this, but my Web search turned up this older one and not the newer ones. It's still valid, though.
Your firmware is broken. Some machines just don't like dual-booting Windows and Ubuntu. There are various workarounds to such problems. The least intrusive is to use bcdedit in Windows or bcfg in an EFI shell; but you may need to rename boot loader filenames. Again, Google is giving me older questions and answers, but two that I believe are still valid is this one and this one.

If you need more help, please post a link to the RESULTS.txt file generated by the Boot Info Script (in the boot-info-script in Ubuntu, IIRC).


Update for the terminal package always fails

The answer came by mistake; I just removed gnome-terminal

sudo apt-get remove gnome-terminal

then the update was successful for gnome-terminal-data

sudo apt-get update

then I reinstalled gnome-terminal

sudo apt-get install gnome-terminal


Open a terminal and type the following commands:

sudo nano /etc/pulse/default.pa

Press CTRL + w and type:

load-module module-suspend-on-idle

then press ENTER. Change the line to say this instead:

# load-module module-suspend-on-idle

This is called "commenting out" the line when you place a # at the beginning of the line the configuration listed on that line will not be used.

Next, press CTRL + o to save the file and press CTRL + x to exit nano.

Finally, run the following command to restart pulseaudio:

sudo service pulseaudio restart


How to make an easy complete full backup, including all configurations?

System Settings > Backup you have many options available, as to which folders to backup, which folders to ignore, where to backup to, including Ubuntu One cloud storage, there's scheduling available, which will regularely do backups for you and many more.


I can strongly recommend FoxitReader as pdf reader. even on windows I use it.

it has the standard features of highlighting, inserting text, underline, arrows, comment, ...


How can I start a LightDM session via SSH?

lightdm-session is designed to be run from inside LightDM only.

You could set up an automatic login and then start LightDM by configuring  automatic login in /etc/lightdm/lightdm.conf, i.e.:

[SeatDefaults]
autologin-user=username

Then start / restart lightdm.


Try downloading the theme from here: http://hplhu.deviantart.com/art/Metro-Theme-v3-for-phpMyAdmin-4-382030120.
This one works perfect for me.
Steps (As on ubuntu):

Download
Extract
move the extracted folder to /usr/share/phpmyadmin/themes
Open phpmyadmin from web browser
select the Metro theme from options

Done! Simple and easy.


Can't find .codeblocks in home directory

In Ubuntu most of a user's configuration files can be found inside ~/.config.

The configuration file for Code::Blocks, default.conf is in ~/.config/codeblocks (i.e., /home/$USER/.config/codeblocks).


You must switch Google Chrome to GTK theme (Settings->Appearance->Themes) for make this works.


The answer appears to be in the error. check the third SLF4J and it tells you to refer to a website (http://www.slf4j.org/codes.html#StaticLoggerBinder).
The website tells us:

This error is reported when the org.slf4j.impl.StaticLoggerBinder class could not be loaded into memory. This happens when no appropriate SLF4J binding could be found on the class path. Placing one (and only one) of slf4j-nop.jar, slf4j-simple.jar, slf4j-log4j12.jar, slf4j-jdk14.jar or logback-classic.jar on the class path should solve the problem.
As of SLF4J version 1.6, in the absence of a binding, SLF4J will default to a no-operation (NOP) logger implementation.
You can download SLF4J bindings from the project download page.

I suggest you go to the website I linked above and try what the website says :) It helpfully gives you a link to the download page.
Hope this helps!
EDIT:
I thought I would add this in here, as I noticed in the original question it asks what this StaticLoggerBinder is.
Effectively, it's used by SLF4J to assist with what kind of logging you do for your project. http://www.slf4j.org/index.html being the main site. You'll see there's a good number of projects that depend on SLF4J.
What is logging? http://docs.oracle.com/javase/6/docs/technotes/guides/logging/index.html.
This has been good reading, so thanks for the question!


Logging in over and over again. How to fix this?

Try these (after reinstalling gnome-session-fallback):

gconftool-2 --type bool --set /apps/nautilus/preferences/show_desktop True
gconftool-2 --type string --set /desktop/gnome/session/required_components/windowmanager /usr/bin/metacity


Installed Ubuntu 14.04 alongwith Windows 7

Open a Terminal and type: sudo update-grub


Firefox screen content frozen, but I can switch tabs

I have encountered exactly this problem many times since upgrading to 15.04 and have finally found a workaround that doesn't involve killing and re-starting firefox (and loosing all my work/settings etc.)

If I restart unity then tabs start responding correctly.  I do this by clicking Alt-F2 then searching for 'unity' and running the command.

Seems like a bug in Firefox or Unity in Ubuntu 15.04


You can install the homerun menu with a kickoff/windows menu appearence.

sudo apt-get update
sudo apt-get install plasma-widget-homerun
sudo apt-get install plasma-widget-homerun-kicker

Homerun 1.20 announcement

http://blogs.kde.org/2014/01/29/homerun-120


How to copy USB flash drive Ubuntu to boot onto internal NVME SSD?

Unfortunately I just found out that I can't do that. The client will not allow it. So that is why I had a hard time to try and copy it and boot it up internally.
I had to ask our personal IT. Still, thank you to the people who answered.


Sounds like the clicking is the drive trying to read, then it fails as denoted by the silence. This would be why it is not recognized by anything (BIOS, OS).

You may need to bring it to a recovery professional. Continuing to try and get it running could be damaging the platters/erasing data. Someone who recovers data professionally, should be able to get your data safely back to you.

EDIT - I also found this: https://help.ubuntu.com/community/DataRecovery


How to forward-search-history with the reverse-i-search command (ctrl+r)?

The sequence C-s is taken from the terminal driver, as you can see from

stty -a | grep '\^S'

To free up the sequence for use by readline, set the stop terminal sequence to some other sequence, as for example

stty stop ^J

or remove it altogether with

stty stop undef

After that C-s would work in the given terminal.

Set it in ~/.bashrc to make it work in every terminal.

The M- sequence means the Alt key, as already noted.


Test this:

Open a terminal,Press Ctrl+Alt+T

Run it:

sudo -i
nano /etc/fstab

In the open file,comment the following line with #

https://www.box.com/dav/ /home/<username>/box  davfs  _netdev,rw,user 0 0

Like this:

#https://www.box.com/dav/ /home/<username>/box  davfs  _netdev,rw,user 0 0

Ctrl + O, save file. Ctrl + X, close nano.

Continue running:

reboot


A text editor or viewer with folding based on indentation

The editor geany, also useful as an IDE, has indentation based folding for python source files.

It should be a way to associate .dsl files with this type of representation


Network Printer "Print Data Error" receives data but does not print Ricoh/Lanier LD520C

If printing from a MAC to a Ricoh/Lanier copier you will need an adobe postscript card installed on the machine. To check if machine has an adobe poscript, print out a configuration page, look for printer language, you should see adobe poscript 3 if not then you will need to purchase one through your copier vendor.


Randomly crop pdf files and output image

You'll need Ghostscript, Poppler utilities, and ImageMagick:

sudo apt install ghostscript poppler-utils imagemagick

Let's go through this step by step (because I need to go through this mental process myself).

Extract a random page from a PDF

pagecount=$(pdfinfo in.pdf | sed -ne 's/^Pages:\s*//p')
page=$(($RANDOM % $pagecount + 1))
gs -q -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -sDEVICE=pdfwrite \
  -dFirstPage="$page" -dLastPage="$page" -sOutputFile="in.$page.pdf" -f in.pdf

Crop a pre-defined section from the same page

gs -q -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -sDEVICE=pdfwrite \
  -c "[/CropBox [50 50 250 250] /PAGES pdfmark" \
  -sOutputFile=out.pdf -f "in.$page.pdf"

Crop a random section from the same page

Select a decimal value for cropsize (in points, 1 point = 1/72 inch) that is less than both width and height.

cropsize=50
bbox=$(gs -q -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -sDEVICE=bbox -f "in.$page.pdf" 2>&1 >&- | sed -ne 's/^%%HiResBoundingBox:\s*//p')

cropbbox=$(python3 - "$cropsize" "$bbox" <<EOF
import sys, random
cropsize = float(sys.argv[1])
llx, lly, urx, ury = map(float, sys.argv[2].split(None, 3))
width = urx - llx
height = ury - lly
if width < cropsize or height < cropsize:
    print('Crop size too small for bounds', llx, lly, urx, ury, file=sys.stderr)
    sys.exit(1)

cropllx = random.uniform(0, width - cropsize) + llx
croplly = random.uniform(0, height - cropsize) + lly
cropurx = cropllx + cropsize
cropury = croplly + cropsize
print(*map(lambda x: format(x, '.6f'), (cropllx, croplly, cropurx, cropury)))
EOF
)

gs -q -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -sDEVICE=pdfwrite \
  -c "[/CropBox [$cropbbox] /PAGES pdfmark" \
  -sOutputFile=cropped.pdf -f "in.$page.pdf"

Convert a cropped PDF to JPEG

Adjust size, -density (DPI for rendering the PDF), and -quality (JPEG compression quality) to your needs.

size=256
convert -define pdf:use-cropbox=true -colorspace sRGB -density 600 cropped.pdf \
-flatten -resize "${size}x${size}^" -crop "${size}x${size}+0+0!" -quality 75% cropped.jpg

Putting it all together: Crop N random sections from an arbitrary amount of PDFs

The result is a bit unwieldy for in-line inclusion. Therefore you need to download crop.sh and crop-calc.py from my Gist into the same directory.

Usage:

bash /path/to/crop.sh [OPTIONS...] <N> <PDF...>

with:

N – the count of random areas to extract per document
PDF... – any number of PDF files
-s|--size PX – size of the resulting images in pixels (default 256)
-c|--cropsize PT – size of the document regions to crop in points (default 50)
-d|--density DPI – pixel density when rendering the document (default 600)1
-q|--quality Q – compression quality of the resulting image, usually in percent (default 75%)
--destext EXT – the file extension (and format) of the resulting images (default jpg)

1 ImageMagick sets a hard limit of 500 mio. pixels which means for a square area the value of cropsize ÷ 72 ⋅ density may not exceed √500 mio.


nvidia-settings not able to save my configuration

The Driver line should look like this:

Driver         "nvidia"

You can just put it right under the identifier. For others with this issue, the xorg.conf file is located at /etc/X11/xorg.conf I think you will need to reboot after making this change.


Does the Replace Windows X with Ubuntu option in the installation setup replace a single partition or the whole drive

On installation whenever the installer finds another OS on the drive we can choose to install "Alongside" in dual- or multi-boot, or we can choose to "Replace..." an existing OS with Ubuntu.
"Replace" in the case of one harddisk
This will repartition the enire drive with standard partitions for Ubuntu. All other partitions including Windows (e.g. C:), and all data partitions (e.g. D:, E:,...) on that drive will be deleted and overwritten.
This also is why we have so many questions from unfortunate people who erroneously assumed that only a single partition will be used.
"Replace" in the case of several harddisks
This is different on a system having more than one physical drive. The installer then lets us choose which drive to use. Still, the drive chosen will be deleted and repartitioned as a whole.

Installer of 14.04. in Virtual Box
"Something else" in the case we need to keep partitions
In case we need to preserve partitions on installation we should therefore choose to "Do something else" to be able to manually edit the partition layout. We then also have to make sure to not format those partitions we still need.
Too late - I only read this after I had removed all my data
In this case not all is lost. It is recommended to stop using this drive to be able to run data recovery tools as shown here:

How do I recover my accidentally lost Windows partitions after installing Ubuntu?


I've witnessed a similar problem from a customer a few weeks ago. It appears that the version of bluez shipped with Ubuntu 10.10 is buggy and can lead to that kind of frustrating behaviour. You may want to upgrade to the latest version of bluez. There is a ppa for that here.


This is most likely a bug report. Please look at Reporting Bugs for information about reporting a bug before going to Launchpad to report this issue. Make sure you check for duplicates first!

You most likely want to file this bug against telepathy-gabble.


Use systemd unit template files

This is a good example for when systemd unit templates can be used. It is possible to have a systemd service to be called with an argument and use that argument in the service definition to e. g. hand it to the program that is run. Here is an example for your case:

Install your unit as

/etc/systemd/system/gmod@.service

Change the file to look like this:

[Unit]
Description=Gmod server (map: %I)
After=network.target
[Service]
Type=simple
ExecStart=/bin/bash /home/server/Documents/Servers/Gmod/run_gmod.sh %i
[Install]
WantedBy=multi-user.target
DefaultInstance=myDefaultMap

(You might need to run systemctl daemon-reload at this point to make systemd read the changed file). After this you will be able to start gmod with an argument like this:

systemctl start gmod@myMapName.service

Systemd will use the template file and replace I% with the argument, and %i with the shell quoted argument, then start it as a service instance named gmod@myMapName.service. You can verify this by running

systemctl status gmod@myMapName

You can also have it automatically starting a default instance at boot time like this:

systemctl enable gmod@

This way you could even start multiple instances of gmod, if the program allows that. For further reading on the topic check the systemd.unit(5) manual page.


How to remove Gimp logos from gimp interface?

You can remove the gimp logo from the toolbox by adding this line to the gimprc file in ~/.gimp2.8

(toolbox-wilber no)

You should be able to add it using this command

echo "(toolbox-wilber no)" >> ~/.gimp-2.8/gimprc

or this (which seems to work...), if you are using a version other than 2.8:

echo "(toolbox-wilber no)" >> ~/.gimp*/gimprc

You can remove this by running:

sed -i "/toolbox-wilb/d" ~/.gimp-2.8/gimprc

There seems to be no way to remove the main central logo.

for other options you can search the rc files located at /etc/gimp/2.0 with

grep -rni "SEARCHTERM" -C 3 /etc/gimp/2.0


Do we have a borderless theme for GNOME 3?

Yes, the new Ubuntu Ambiance and Radiance themes are just like that.

Epiphany 3.0

Gwibber 3.1.5

Note:
All the windows are borderless, but I have not captured the shadows (yet). I will update my answer with better screen-shots a bit later. Also, it is possible that we will get anti-aliased edges and smooth shadows in Compiz.


How to display resource usage gadget on my Unity desctop?

Unity no longer uses the old applet system. Instead, there are indicators.

One such indicator is indicator-multiload, which shows CPU and memory usage. It is included in Ubuntu's repositories and can be installed using your package manager of choice.

On a general note: Unity is not based on Gnome 2, it just uses GTK2-based programs like Gnome 2 did.


Whenever you find yourself missing some tool you don't know where is, one way of finding it could be by using apt-cache search.

apt-cache search 7z

This will show you a short list where one of the entries are:

p7zip - 7z file archiver with high compression ratio

So to solve your primary question you'd run:

apt-get install p7zip

You'll get CMake and autoreconf by installing the cmake and autoconf packages:

apt-get install cmake autoconf


apache2 RewriteEngine subfolder configuration is off / not wroking as expected / not sure how to fix it

Resolved the issue by using this as my .htaccess file

RewriteEngine On

RewriteBase /~admini/me/

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]


Does Evernote update when installed under Wine?

It seems that Evernote auto-update does not work on Wine anymore (at least that's what I can observe in my case, for Evernote 5.8.x - and 5.7.x, as far as I can remember). As you might expect, the solution is to uninstall your current version and install the new one.

It looks pretty straightforward, but sometimes you might stumble upon an issue of not being able to install the newest Evernote version after uninstalling the previous one. The error that occurs is basically saying, that you cannot install Evernote because it's already installed for another user and it's only one copy that is allowed to be installed at the same time.

If so, after uninstalling current Evernote, run:

grep "with upgrade" ~/.wine/drive_c/users/YOUR_USERNAME/Temp/EvernoteSetup.log

You will get a bunch of records like:

[02/14/2015 14:53:41] Located product {????????-????-????-????-????????????} with upgrade code {????????-????-????-????-????????????}.
[02/14/2015 15:02:53] No products with upgrade code {XXXXXXXX-????-????-????-????????????} found.

Try to find the most recent one (notice the date information) and copy the ID/string marked XXXXXXXX above (it would look something like EC4A382C).

Then reverse it (to get e.g. C283A4CE) and find a record in Wine's registry containing that ID/string (you can find Wine's registry in a file /home/YOUR_USERNAME/.wine/system.reg). The record would look like this (notice the C283A4CE string at the end of the path):

[Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UpgradeCodes\\C283A4CE] 1216443328

Then, you just have to delete it (just that line, nothing more) and save the file. Bare in mind to back up system.reg file to restore it if something go wrong.

Although the solution looks kind of complicated, it works for me every time whenever I cannot update Evernote automatically via auto-update feature. :)

Also, you will notice that when trying to download Evernote's installer from official website, you get an information that Evernote is not available for Linux operating system. In such case, change your user-agent information via some user-agent related plugin available for your browser (like User Agent Overrider for Firefox), to pretend that you are on Windows OS.

Marginal notes: You could notice that for the latest versions of Evernote (especially for 5.8.3 and newer) there is a problem with note titles being invisible. There is a quick and easy fix for that - just issue winetricks -q riched20 command (source).


After installing unity ubuntu all settings are broken

Gnome tweaks is missing `top bar' menu option

You must log out,and before login there is settings button below the editText. Choose Ubuntu


Can't get Chrome to start at a specific desktop in Openbox

The problem lies with your window matching rules. You have to set the application name to the window name as reported by xprop. This is the relevant xprop output for a Chrome window:

_OB_APP_TYPE(UTF8_STRING) = "normal"
_OB_APP_TITLE(UTF8_STRING) = "Untitled - Google Chrome"
_OB_APP_GROUP_CLASS(UTF8_STRING) =
_OB_APP_GROUP_NAME(UTF8_STRING) =
_OB_APP_CLASS(UTF8_STRING) = "Google-chrome"
_OB_APP_NAME(UTF8_STRING) = "Google-chrome"
_OB_APP_ROLE(UTF8_STRING) = "browser"

So to match all Google chrome windows you would have to write a rule like this:

<application name="Google-chrome" class="Google-chrome" type="normal">
  <desktop>4</desktop>
  <layer>normal</layer>
  <decor>no</decor>
  <maximized>no</maximized>
</application>

The class and type attributes are optional, but it's always good to be more specific so that other windows don't get falsely matched.

Make sure to insert your new rule in the <applications>..</applications> section and refresh openbox (openbox --reconfigure) to apply the changes.


How can I use the Wacom Cintiq 27QHD express key remote in 16.04?

If you are using Xorg (not Wayalnd) you can use xsetwacom from the command-line.

The linuxwacom project is being migrated to Github and the wiki pages for xsetwacom are available here:

https://github.com/linuxwacom/xf86-input-wacom/wiki/xsetwacom

https://github.com/linuxwacom/xf86-input-wacom/wiki/Tablet-Configuration-1:-xsetwacom-and-xorg.conf#pad


Which version of Banshee in repos with Ubuntu 14.04

According to the version string (2.9.0+really2.6.2-2ubuntu2), this is Banshee 2.6.2.

The reasoning the version string looks like this is probably because version 2.9.0 was uploaded at some point, but because of some regression (or problem, or something else), they had to go back to version 2.6.2. However, any new version they upload has to be greater than the previous version. Therefore, the only (standard) way to have 2.6.2 be "more" than 2.9.0 is to have the version string look like 2.9.0+really2.6.2-2ubuntu2.

Here's the reasoning (From https://launchpad.net/ubuntu/trusty/+source/banshee/+changelog):

banshee (2.9.0+really2.6.1-0ubuntu1) trusty; urgency=low

  * [fbf05ca] Imported Upstream version 2.9.0+really2.6.1:
    Downgrade to 2.6.1 -- 2.9.x is unstable and 3.0 won't arrive in time for
    release
  * [22de440] Revert packaging to 2.6.1-2ubuntu1
  * [7357b73] Merge changes from 2.6.1-5
  * [a7156c0] Filter out libgpod-cil-dev versions built against gtk#3
  * [e7c634d] Update dversionmangle for extracting +really version out
 -- Chow Loong Jin <hyperair@debian.org>   Sun, 09 Feb 2014 23:06:03 +0800


I temporarily solve it by choose 'do nothing' when closing the lid in power settings, and then every time I use 'sudo pm-suspend' to suspend my system. (I find the computer works fine when I suspend by using terminal)

Still don't know the reason for my question.


Google Maps OpenGL 3D makes my system unstable (hangup)

I had the same problem. I am on 12.04 as well. Visiting the URL below will restore your access to Google Maps.

http://maps.google.com/?vector=0

See here for more details:


Does Ubuntu support the ASUS trackpad of a ZenBook-14-UX?

I believe their trackpad is just a fancy way of enabling NumLock, so if it doesn't any extra driver, (is plug-n-play), the trackpad shouldn't be a problem.

However, you may need to install Nvidia drivers.

If you want to make sure it is compatible you should delve into reviews and technical documentation. I would personally check if it's plug n play or if it requires extra software, as soon as it requires extra software, it will be incompatible with other OS.


Samba SMB daemon not starting when using apt

Open a terminal and run the following command:

testparm -s

Do you get the following error:

WARNING: Ignoring invalid value 'share' for parameter 'security'
Error loading services.

If you do edit /etc/samba/smb.conf, find the line "security = share", and delete it. Then rerun systemctl status smbd.service.

It could be another parameter that is the culprit but that is the most common. In all cases testparm should give you a hint to the offending parameter and end with the "Error loading services" error.

EDIT: If you have no smb.conf at /etc/samba but have one at /usr/share/samba then copy that one to the standard location:

sudo cp /usr/share/samba/smb.conf /etc/samba

Run "testparm -s" again to make sure it's happy.


Stuck on detecting file system Ubuntu 16.04 install

I normally excounter this problem if the partition containing the ISO file is in the same drive as the target partition. This is because the installer likes to unmount all mounted partitions in the target drive before proceeding with installation.

My system has two (2) drives. I was able to circumvent this problem by moving the ISO file to the other drive.

Unfortunately for single-drive systems, I have never been able to use the loop mount feature of grub2 to install directly from ISO file. The LiveCD will boot just fine, but won't install on the same drive.


How can I use Yaru's R source icon for R source files in Ubuntu?

When RStudio was installed, it added a file /usr/share/mime/packages/rstudio.xml with entries such as

  <mime-type type="text/x-r-source">
    <sub-class-of type="text/plain"/>
    <comment>R Source File</comment>
    <glob pattern="*.R"/>
    <glob pattern="*.r"/>
  </mime-type>

Now, the icon in question is named text-x-r.png. So, we can get the desired icon by editing the above entry to

  <mime-type type="text/x-r">
    <comment>R Source File</comment>
    <glob pattern="*.R"/>
    <glob pattern="*.r"/>
  </mime-type>

(You can edit it via, for example sudo vim /usr/share/mime/packages/rstudio.xml).

Then you just run the following commands in the terminal:

sudo update-mime-database /usr/share/mime
sudo gtk-update-icon-cache

(and refresh the file explorer if it's open). Then voila!:


How to change the title color of a single window?

It is not currently possible without programming compiz or a compiz plugin.


Have you considered allowing Boot Repair to accomplish the suggested repair rather than attempting to choose the correct options yourself?

Note: Your pastebin shows a number of mis-configured items and indicates "The settings chosen by the user will not act on the boot."


Plasma desktop doesn't start automatically after apt-get upgrade

It seems you were missing the display manager sddm. Install it with the command and restart

sudo apt install sddm

Now, Once logged in OP was unable to find the default panel. Right clicking on the desktop doesn't work. We discussed the problem in chat and it seems the right click action for desktop was misconfigured.

So, OP needed to click on the top-left corner icon and select Configure desktop, and from there go to the Mouse action tab and configure the right click action so that it yields the Standard Menu.

Once done and applied, right clicking on the desktop and selecting Add panel -> Default panel should make the panel with all the standard widget to appear.


Looks like you tried to install Wine from a .deb package, but it's not recommended as you can easily install it using the Ubuntu repository.

To install Wine from the Ubuntu repository use the following command:

sudo apt-get install wine