Sort files by name as if they were dates

Given the filename and directory structure, you can probably just use find and sort:

find backup -type f -iname '*.tar.gz' | sort -r | head -1

This should return the newest file. Dates of the form YYYY-MM-DD/HHMM sorted lexicographically give a sorted order with respect to time as well.

To get this file in a variable, use command substitution:

newest_file=$(find backup -type f -iname '*.tar.gz' | sort -r | head -1)


Maybe nothing on your system has triggered the "busy" cursor. Some changes that landed in 11.04 (such as the way the kernel handles processes) might make it far less likely for you to see the busy cursor. Personally I only see it on rare occasions.


Can I update to a newer version of libreoffice in 16.04?

Not sure about PPA / apt but you could try the .deb from libreoffice website after removing the one you installed with apt.
But since support for 16.04 ends in three month it would possibly be best to upgrade your Ubuntu installation anyways.


How to install curl development dependencies Ubuntu 20.04

Need to install the correct packages.  The error shows the problem in curl.h so
go to http://packages.ubuntu.com and search for curl.h which shows what needs to be installed:
sudo apt-get install libcurl4-gnutls-dev libcurl4-nss-dev libcurl4-openssl-dev


CPU frequency scaling issue - scaling_max_freq wrong

OK, after few days of work, I think I can say this issue is solved ->
Use governor conservative and reset the scaling_max_freq as follow (if it changed):

(to do for each core)

echo conservative > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 2530000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

The issue comes from the governor ondemand. After few seconds in high loads, it, somehow, reset the value of scaling_max_freq to 1520400 which become read-only or at least, can't be modified under "ondemand" governance and the CPU get stuck at the lowest frequency. I can reproduce the behavior.

Unfortunately, cpufreq-utils can't help (eg:/etc/init.d/cpufrequtils) and I can't set these values at boot time (eg: /etc/rc.local 0555'd), I have to apply it through a script with a cron job.

Where should I inform of this bug?


Ubuntu 16.04 systemd service waits for dhclient to finish when using etc/network/interfaces

The answer, it appears, is to use the mysterious allow-hotplug statement in /etc/network/interfaces as I learned from https://askubuntu.com/a/868445/358498:

allow-hotplug wlan0
iface wlan0 inet dhcp
...

systemd no longer waits on network to kick of a service that depends on default.target. Why allow-hotplug makes such a difference is a bit unclear to me, as there is no true "hotplug" event going on in my system. One resource says:

  There's not much documentation on what allow-hotplug actually does. man interfaces (a fairly good man page, BTW) implies that ifup will refuse to bring up an interface unless allow-hotplug is set; but if the network is being started via /etc/init.d/networking start either way, why do different things happen depending on whether allow-hotplug is present? It's all very confusing, but take my word for it, you need allow-hotplug if you're using PCMCIA or Cardbus (or probably USB).


Cannot install some apps due to unmet dependencies

Run this in terminal:

sudo apt-get install -f


Ubuntu won't boot up properly (Toshiba Satellite P50)

Some systems shipping with Windows 8 have trouble booting Ubuntu the way it is currently implemented for UEFI machines.

You could try booting the live USB again and follow my instructions from this Q&A:
UEFI machine doesn't boot Ubuntu through NVRAM bootcatalog. How to fix?

Regarding the customization, if you haven't successfully booted Ubuntu from the hard drive before, these changes were lost during the reboot.

Please post the model of the computer you are using to help analyzing this issue further.


how can i add programs to a startup disk

check rescuecd it was designed such a way as to make it easy to add other software. beware its build on mine beloved Gentoo, so you will have to do loots of compiling (emerging)

more info in rescuecd customization
you may see wether you can use similair method with ubuntuCD from step 4c using apt instead of emerge...


Synchronized combination of for loops' output

You could define two arrays of the same length with the values you want to iterate over first. Then you can iterate over the indexes of one of the arrays and look them up in both:

arr1=(0 1 2 3)
arr2=(a b c d)

for i in ${!arr1[@]}; do
    echo ${arr1[i]}
    echo ${arr2[i]}
done

# Output below:
0
a
1
b
2
c
3
d

Defining arrays works by assigning a list of elements in parentheses, as you see on the first two lines.

The for-loop iterates over ${!arr1[@]}, which returns a list of all ([@]) indexes (!) of the array variable arr1. This can be used here because we assume that both arr1 and arr2 have exactly the same indexes, because they were defined with the same number of elements. In theory, arrays could have different lengths or even have "holes" i.e. unassigned indexes in between, but both is not the case here, so we don't care for it.

Accessing a specific element value of an array at the position defined by the value of the variable $i works by typing ${arr1[i]}.


try to add _netdev and remove noauto to your /etc/fstab entry.
Example:

https://[mylink].stackstorage.com/remote.php/webdav/ /var/stack davfs user,_netdev,rw 0 0

From the Manual Page:

_netdev
          The filesystem resides on a device that requires network access (used to prevent
          the system from attempting to mount these filesystems until the network has been
          enabled on the system).

noauto - The filesystem will NOT be automatically mounted at startup, or when mount passed -a. You must explicitly mount the filesystem.

More info:
https://help.ubuntu.com/community/Fstab
https://wiki.ubuntu.com/MountWindowsSharesPermanently


Run some shell files from another shell file in different location

You'll have to use sudo somewhere. Lets use them in the scripts:

#! /bin/bash
#userA.sh

sudo -u userA bash -c '/path/to/script1.sh; /path/to/script2.sh; ... \
    /path/to/scriptn.sh;

Similarly for userB. Consider creating a .desktop file for both scripts, or making them run on double click. Then consider giving yourself password-less perissions for both scripts:

sudo tee -a /etc/sudoers.d/user-scripts <<EOF
$USER ALL = (ALL) NOPASSWD: /path/to/userA.sh, /path/to/userB.sh
EOF

If you do want to enter the passwords, get them to run in a terminal (depends on how you execute the script), or use pkexec instead of sudo.


xRDP and Ubuntu 16.04.x does not go along quite well.  This is because the default xrdp package available in Ubuntu repository is quite obsolete (the current version is 0.9.11, the one in Ubuntu 16.04x repository is something like 0.6)

xrdp version 0.6 does not work with Unity Desktop.  So you have two options

Option A - use xrdp 0.6 but install alternate desktop environment

You have to install another Desktop interface on top of your Ubuntu machine (can be xfce or mate-desktop). Then you have to create the ~/.xsession file that is used to start the xfce or mate-desktop session while performing a remote connection

More info at http://c-nergy.be/blog/?p=8952

Option B - Use this script to compile from source and connect to Unity

If you feel adventurous, you can use the following script to automate your installation and have the latest xrdp version installed which will allow you to connect to Unity Desktop....Performance are not great on Ubuntu 16.04 but it's still workable....

Please read the instructions and download the script at http://c-nergy.be/blog/?p=11719

Hope this help
Till next Time


how to share my whole tree (host: Windows 7) with my virtual machine (guest: Kubuntu 11.10)?

You should have a read through the documentation on the VMware support page for this but to summarise;

To share files between a host computer and a virtual machine or
between two virtual machines, you use the networking features of
VMware Workstation. If you know how to share files between two
physical computers on a network, you already know how to share files
with a virtual machine.
This section describes four scenarios for sharing files between two
systems, either a host computer and a virtual machine or two virtual
machines, where

Both systems run Windows operating systems, using Windows file    sharing
You are connecting from a Linux system to a Windows system, using smbmount
You are connecting from a Windows system to a Linux system, using    Samba
Both systems run Linux operating systems, using NFS, FTP and Telnet

You can apply the same principles to share files between virtual
machines. Configuration for FreeBSD guests is similar to that for
Linux guests.


Opened file Highlighting in Linux Ubuntu console

One possible way to see it (but often not useful for your objective, see later) is using the fuser command, from the psmisc package.

The command fuser -a * will work as a sort-of ls, and will print a process id if something is keeping a file open. For example:

⌂71% [romano:~/tmp] 1 % fuser -a *
/home/romano/tmp/example.log:
/home/romano/tmp/example.pdf:
/home/romano/tmp/example.tex:

then in another windows/terminal/virtual console/connection do a cat >> example.tex to keep the file open, and:

⌂71% [romano:~/tmp] 1 % fuser -a *
/home/romano/tmp/example.log:
/home/romano/tmp/example.pdf:
/home/romano/tmp/example.tex:  7742

fuser tells you that the process with PID 7742 is keeping the file open.

Nevertheless, a lot of editors do not keep the file open; they read it in memory (remember that unix-like OSs have virtual memory), and then close it. For example, opening the file example.tex with vim has no effect on fuser output.)

So the double-editing avoidance is left to the editor; vim or emacs use a lock file and warn you on opening it twice.

You can also see the comments and answers in this SO Q&A.


How do I install Intellij on Ubuntu 15.04?

After posting earlier I decided to download the latest available Oracle JDK 8u45 and the latest community version of Intelli-J Idea 14
    ideaIC-14.1.3.tar.gz

jdk-8u45-linux-x64.tar.gz

I ran this script from command line as root to install Oracle JDK, the script assumes you downloaded the jdk-8u45-linux-x64.tar.gz to the Downloads directory and you execute the script as root from your home directory:

#!/bin/bash

# author:GeoWade

# Create script variables

ETRCJDK="Downloads/jdk-8u45-linux-x64.tar.gz"

JVMDIRLIB="/usr/lib/jvm/jdk1.8.0"

MOVJDK="jdk1.8.0_45/* /usr/lib/jvm/jdk1.8.0"

INSJAV="update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0/bin/java" 1"

INSJAVC="update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0/bin/javac" 1"

INSJAVAWS="update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.8.0/bin/javaws" 1"

INSJAVJAR="update-alternatives --install "/usr/bin/jar" "jar" "/usr/lib/jvm/jdk1.8.0/bin/jar" 1"

INSJAVDOC="update-alternatives --install "/usr/bin/javadoc" "javadoc" "/usr/lib/jvm/jdk1.8.0/bin/javadoc" 1"

INSJAVAPPVIEW="update-alternatives --install "/usr/bin/appletviewer" "appletviewer" "/usr/lib/jvm/jdk1.8.0/bin/appletviewer" 1"

VRSJAVA="java -version"

TSTJAV="java"
TSTJAVC="javac"
TSTJAVAWS="javaws"
TSTJAVJAR="jar"
TSTJAVDOC="javadoc"

UPD="updatedb"

echo "Extracting jdk-8u45"

tar -xvf $ETRCJDK

echo "Making jdk1.8.0 directory in the jvm directory"

mkdir -p $JVMDIRLIB

echo "jvm/jdk1.8.0 directory is made"

echo "Moving contents of jdk1.8.0_45 to jdk1.8.0"

mv $MOVJDK

echo "contents moved"

echo "installing java"

$INSJAV

echo "installing javac"

$INSJAVC

echo "installing javaws"

$INSJAVAWS

echo "installing jar"

$INSJAVJAR

echo "installing java doc"

$INSJAVDOC

echo "installing appletviewer"

$INSJAVAPPVIEW

echo "Testing java"

$TSTJAV

echo "Testing javac"

$TSTJAVC

echo "Testing javaws"

$TSTJAVAWS

echo "Testing jar"

$TSTJAVJAR

echo "Testing javadoc"

$TSTJAVDOC

echo "This version of the Oracle JDK is:"

$VRSJAVA

$UPD

exit;

To execute the script (titled jdk8u45.sh), I ran the following sequence of commands:

:~$ chmod +x jdk8u45.sh

:~$ sudo bash

:~# ./jdk8u45.sh

:~# exit

Then I extracted the ideaIC-14.1.3.tar.gz, created a directory in the /usr/local directory titled ideaJ, then move the contents of the extracted archive to /usr/local/ideaJ as shown below:

:~$ tar -xvf Downloads/ideaIC-14.1.3.tar.gz

:~$ sudo mkdir -p -m0755 /usr/local/ideaJ

:~$ sudo cp -rf idea-IC-141.1010.3/* /usr/local/ideaJ/

after doing so I change directories to /usr/local/ideaJ/bin and ran the idea.sh script as shown below:

:~$ cd /usr/local/ideaJ/bin

:/usr/local/ideaJ/bin$ ./idea.sh

I photo cataloged the process

In the 14 version of the Idea, with the Oracle JDK 8u45, the parameter is ignored. Your problem is the javaagenttool of /usr/share/java/jayatanaag.jar or however its spelled. I don't even have that jar installed on my system.

You can copy the script into gedit and use it.


The answer depends on what exactly you want to gain from having swap?

Improve performance in general case - then swap will not help. Even 16Gb of memory is more than enough to run any Linux with any typical workload. You swap will not be used at all.
Improve performance when working with extra large files with application that is not designed to handle them - again, swap on a typical disk will not help. It is too slow to allow working on data from swap, even with SSD. Special extra-fast storage devices are used in this case.
Allow for hybernation - if you want hybernation to work, your swap must be larger than the memory, no matter if memory is 16Gb or 512Gb.
Do kernel debugging - some of development tasks require swap, but I can not tell you the details.

Do not mix PC sleep and PC hybernation. Sleep needs no swap, is fast to start, but drains battery a little. Hybernation requires huge swap, is slow to go into and start from, but you can disconnect your battery and put you notebook on the shelf for a year in the meantime. What happens when you close the lid depends on settings, but going straight to hybernation every time is not a good idea.


Installing Ubuntu 16.4, cannot detect hard drive

You need to first reboot your system with Ubuntu 16.04 USB stick in live mode. Then open the disk utility app in your Ubuntu 16.04 and check if your hard disk is visible there or not (you will most probably found it there), if not then try to refresh a couple of time and see if your hard disk is listed. Also, try the following command :

$fdisk -l

This will list all the partitions on your hard disk.
From there select the required partition and try to format and repartition it into a single drive. Try the following command :

$fdisk /dev/sda

then in the command mode use 'p' to list all the partitions and then select the one which you want to format and format it using 'd' followed by the partition number in the command line.
After deleting create a new partition using 'n'.
(view the following link for a detailed process:
https://www.howtogeek.com/106873/how-to-use-fdisk-to-manage-partitions-on-linux/
)

Once you find your hard disk listed, unmount it once and then again mount it and then start the Installation process normally in live mode.

If the above methods are not helping you then it might be a corrupted USB stick or Ubuntu image file, try rebooting the Ubuntu on the stick with "USB universal installer" or some other software and then try installing Ubuntu on your system OR try downloading the Ubuntu image once again.

Also, make sure you have created some unallocated space in your previously installed system to allocate that memory to the Ubuntu OS.

"GParted is a good partitioning tool which could be used for checking your hard disk and partitioning it."
I hope this helps you.


Some programs not found when used with sudo

sudo command has env_keep and env_reset parameters in sudoers file.

You have to either edit your env_keep setting or use sudo -E.


I have the same problem with Seagate SSHD, mine is a little older SSHD drive, the problem seems to be bad firmware from seagate, the MLC or TLC cells used for solid state drive memory seems to get corrupted and the firmware keeps copying to it, giving all kind of SMART drive errors, it should avoid bad cells and use the magnetic disk only but it seems not to be doing this, I have used it as an external drive connected to and USB 3 (because it uses more than 2.5 Watts) port and everything runs well somehow, maybe it avoids flash memory when being used as USB or the SMART errors just don't show error messages when running on USB external port, but as soon as I use it as internal SATA all the errors POP up, even if it works ok, I am using it on an old computer and saving to it not very important media, I wonder how much time it will work, as it's being like this for years already...


Scrolling input is unresponsive in Chrome and Chromium apps

Goto chrome://flags/
Search for: scroll
Try diffenrent options of: Smooth Scrolling, Threaded scrolling, Enable lazy frame loading.


Port selection not possible in Arduino IDE on Ubuntu 20.04

The problem seems to be solved. The snap installation was not successful.
I went through the distro from Arduino, and found a nice file: arduino-linux-setup.sh. I have run install.sh as root, then:
arduino-linux-setup.sh $USER

as regular user and finally ports are visible and can be used.
I could not find any place where this procedure is suggested, not even from the Arduino web site, although they had for sure defined what is in arduino-linux-setup.sh.
I hope this is useful and will help also to solve problems for future distro.


On Mageia 5 I just installed xrandr and ran it and it fix the problem. I don't know if by running it something was configured. But it works.


What you are describing is not so much a cloud server, as a file server. There are many resources about setting up a file server with Ubuntu. Your precise setup will depend on several things.

Some questions on AskUbuntu:

How to make my own Dropbox / Ubuntu One server at home?
How do I use Ubuntu Server as file server?
How to set-up my own cloud server?

Some articles on the web:

http://www.wesg.ca/2009/05/build-a-ubuntu-fileserver-the-planning/
http://www.jonathanmoeller.com/screed/?p=3967
http://www.howtoforge.com/ubuntu-12.10-samba-standalone-server-with-tdbsam-backend
http://www.howtoforge.com/creating-a-home-media-and-file-server-with-ubuntu


Battle.net keeps crashing on Ubuntu 14.04

You need to make sure dbghelp is disabled.

winecfg

then go to the 'libraries' tab and type 'dbghelp' in the 'New override for library:' box.  Click 'Add'.  When you do, a warning will appear, accept the warning and then 'edit' your new override to 'disabled', and then hit 'Apply'.


Unable to open shared libasound library, despite file existing

I had a similar problem on Ubuntu 14.04 64bit (perhaps, it happened after I installed manually a specific version of alsa-base package, because it was somehow required when I tried to build Java Hotspot and JVM from source on that host).

I also checked "strace" output and installed only one symlink /usr/lib/x86_64-linux-gnu/libasound_module_conf_pulse.so that fixed the problem for me. Probably, you installed your symlinks in a wrong place. My exact commands were:

cd /usr/lib/x86_64-linux-gnu/
sudo ln -s alsa-lib/libasound_module_conf_pulse.so libasound_module_conf_pulse.so


I would like an explanation of each package in package list

My thought for SO many packages would be first to create a variable with them:

The following will create the packages variable and assign all packages that dpkg outputs.
packages=$(dpkg --get-selections '*' | grep 'install' | cut -f1)

You can further limit this by adding an additional grep at the end, for example:

packages=$(dpkg --get-selections '*' | grep 'install' | cut -f1| grep 'wine')

will output all wine packages. This is only if you want to only see a specific package.

After this we then use FOR to start parsing all packages in the "packages" variable:

for pack in $packages ; do apt-cache showpkg $pack; done

This will give us a LOT of information for each package found. If you are a fan of aptitude then you can use aptitude to show the information in a more human friendly way:

for pack in $packages ; do aptitude show $pack; done

If you are happy with the output you can further output this into a file:

for pack in $packages ; do aptitude show $pack >> packages.txt; done

A copy/paste version of all of this would be:

APTITUDE Version

packages=$(dpkg --get-selections '*' | grep 'install' | cut -f1)
for pack in $packages ; do aptitude show $pack; done

APT-GET Version

packages=$(dpkg --get-selections '*' | grep 'install' | cut -f1)
for pack in $packages ; do apt-cache showpkg $pack; done

If you do all packages, it will take some time for them to be included in the file as output.


Browser asks for password several times .htaccess using subdomain

Apache got confused with too many requests for passwords from different places.

By only using this code:

<Directory "/var/www/html/folder/">
    AuthUserFile  /home/user/.htpasswd
    AuthName  "Pass"
    AuthType Basic
    require user username
</Directory>

In 000-default.conf solved the problem.

I thought every .conf file needed it's own directions for password. They don't.


What exactly does 'Wipe available diskspace' do?

I think you are correct. It would wipe the available disk space and not system files or personal files. Unless wipe has changed from the days of 9.10 it "should" be fine to use. As a side note, there are other utilities in the repos that work like bleachbit if security is a factor for you.


I was able to solve my own problem. Upon a suggestion from someone else who was helping me trouble shoot, I noticed that the version I was using was actually out of date. The mpv website has a 3rd party PPA listed for ubuntu that I neglected to use. I instead had installed using the standard ubuntu repository without adding the 3rd party PPA.

ppa:mc3man/mpv-tests

Found at: https://mpv.io/installation/

After realizing this is probably causing me to be out of date I added the PPA above, ran sudo apt-get update and then reinstalled mpv. At this point I was able to see the on screen controls.


Driver problem with AMD/ATI Bonaire XT Radeon HD 7790/8770

You may need to install the Open Source Driver.
Open up Additional Drivers by opening up a terminal and trypeing in

  /usr/bin/software-properties-gtk --open-tab=4

and then you need to click on the open source driver and then click apply.

The Open Source Driver worked really well with my ati card.


Ubuntu 14.04 LTS: Will not connect to wifi + wired connections are disabled

When that happened to me last time it was because my computer has buttons to turn off the networks.

On a ThinkPad it can be a special button or shifter key somewhere on the computer.   On my Dell it's the F2 key or FN+F2 key combo depending on which layer is activated.


I found a nice workaround by creating a desktop entry. Create a file in ~/.local/share/applications named extract.desktop with the following contents:

[Desktop Entry]
Name=Extract to folder
Comment=Extract archive to a folder with the same name
Exec=file-roller -h %F
Terminal=false
Type=Application
Icon=file-roller
StartupNotify=true
MimeType=text/plain;

Now in PCManFM, right click the archive > Open With...

From Other, select Extract to folder

Once you do this, when you right click any archive of the same type you will see the Extract to folder option in the menu.

Notes:

You will have to repeat the Open with... action once for each file type
You can right click and extract multiple archives in the same time
The action will appear in the start menu > Other. Clicking it will not do any harm
If you use other archive manager than the default File Roller, you will have to modify the desktop entry Exec and Iconentries. See details about entries here


How to install Ubuntu on a Dell Inspiron 1525 which has no operating system

Why dont you put ubuntu(or Lbuntu lighter version) on the USB instead of the external drive.  That will be the easiest way to get it running. Otherwise I think you will have to manually mount the external drive so that is recognized.


Optimus : Nvidia GPU turned ON whatever prime-select says

In 18.04, prime select no longer uses bbswitch to turn off the nvidia card. It uses a kernel feature 'vgaswitcheroo'. There are quite a few bug reports that it doesn't work.
https://bugs.launchpad.net/ubuntu/+source/nvidia-prime/+bug/1765363

You will also find tips and workarounds that may help you.

bbswitch actually still works fine with 18.04.

Based on someone else's work, I have a solution here:
https://github.com/timrichardson/Prime-Ubuntu-18.04
which uses bbswitch to power off the nvidia card.

It also does no-reboot changes between intel and hybrid mode.

It works really well on a modern Optimus laptop, and reasonably well on a 2011 Optimus laptop.

Update: 18.10 has a revised approach by the Ubuntu dev, which internalises the bbswitch approach (so it's a big change for the better). On my laptop, it powers off the nvidia card correctly and does it without needing a reboot, but there are some other rough edges still and I don't think it is ready for 18.04 backporting just yet, although that is not my call of course.

Second update (late October 2018): In my experience, the backport of the 18.10 work to 18.04.1 is good enough now. You have to use the command line to go from intel to nvidia (prime select nvidia) since the nvidia control panel doesn't launch, but it's fast and reliable on my two Optimus laptops. I have stopped using the code from my repository above.


Ubuntu 19.04 failed to boot: Failed to start MySQL Community Server

I had the same issue after trying to package an app from my laptop to my android phone; I had to run dpkg option from the recovery menu, and it prompted me to make some space, so I deleted the unnecessary files after setting the root partition to write:
mount -o remount,rw /

And it worked after rebooting!


Your wireless wl driver is not installed. You probably tried to install a wrong version that did not build for 14.04.

When wl driver is installed, lspci -knn | grep Net -A2 shows Kernel driver in use: wl

Install the driver this way.


Is GStreamer available for Ubuntu 21.04, and if it is, then how to install it?

You are trying to use partial name of source code package.
Please visit relevant search results on packages.ubuntu.com and choose correct binary package names which suite your needs.
If you know the name of relevant pkg-config/pkgconfig configuration file, then you can use file-search on the same site.
The following installation commands look reasonable:
sudo add-apt-repository universe
sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-bad1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev


How do I prevent initramfs from resuming from a zram device?

You can disable resuming from swap devices by adding RESUME=none to the initramfs configuration.

Put this into a file named /etc/initramfs-tools/conf.d/noresume.conf:

# Disable resume (this system has no swap)
RESUME=none


Printing odd/even pages using system dialogue ubuntu

I'm not sure what program you are using to view and print the PDF file, so I just went with Ubuntu's default PDF viewer, Evince.

You might need to install a "print to file" printer on your system.  I installed cups-pdf, by typing this in a terminal window:

sudo apt install cups-pdf

Then when you open a PDF file, and go to print it, choose the PDF printer option.  The print dialogue window will have the Only print option, under the Page Setup tab, where you can choose odd or even pages.

It will put the resulting file in your home directory under a PDF directory (~/PDF), where you can rename and/or move it later.


The IPv6 NAT module is named nf_nat_ipv6, so it should be sufficient to blacklist that module.

sudo sh -c 'echo blacklist nf_nat_ipv6 >> /etc/modprobe.d/blacklist'


aptitude problem using mariadb repository on Ubuntu 13.10

it's ppas/sources conflicts... I had this multiple times, the thing is you have added a source (ppa) to your system where you withdraw/fetch updates that has packages of the same one as already one in the system and it's trusted (official). For example happened to me linux-headers 3.x.x.9 installed but linux-headers 3.x.x.8 is to be installed, because source you added has newer kernel recommended for your system than your official source. So that's why it happens and the solution is to remove or disable conflicting ppa in /etc/apt/sources.list and you'll get pass through it in no time :-)

How to find conflicting ppa you need to list its packages to see what packages it contains, I use y-ppa-manager by webupd8 for this things, you can do it your own way.

sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt-get update
sudo apt-get install y-ppa-manager

The other solution happened to be solved to avoid the conflict is to remove (untick) the main ubuntu repo in /etc/apt/sources.list for example us.ubuntu.archive saucy main restricted (or whatever distributive you have) then do aptitude update and aptitude install then move (tick) the main repo back in and disable the software repository in the sources.list repository.

Also others who be interested you may follow this thread


Is the whole screen a black screen or just the right window where the 3d view of the earth appears?

How did you install Google Earth? Did you download the original package and install the libgl package with wget http://librarian.launchpad.net/7037027/libGL.so.1 -O libGL.so.1?

If you are using 10.04, you can install Google Earth from the mediabuntu package, maybe this works. Otherwise, if you use 10.10, you can use this guide. This worked for me in 10.10 after I got crashes and black screens while using the original package. Using the original package was a mistake, because the original package never worked for me.


You may have to log out and log back in.

Assuming /etc/libvirt/libvirtd.conf has:

# Set the UNIX domain socket group ownership. This can be used to
# allow a 'trusted' set of users access to management capabilities
# without becoming root.
#
# This is restricted to 'root' by default.
unix_sock_group = "libvirtd"

# Set the UNIX socket permissions for the R/O socket. This is used
# for monitoring VM status only
#
# Default allows any user. If setting group ownership, you may want to
# restrict this too.
unix_sock_ro_perms = "0777"

# Set the UNIX socket permissions for the R/W socket. This is used
# for full management of VMs
#
# Default allows only root. If PolicyKit is enabled on the socket,
# the default will change to allow everyone (eg, 0777)
#
# If not using PolicyKit and setting group ownership for access
# control, then you may want to relax this too.
unix_sock_rw_perms = "0770"

It should work if your user is a member of the libvirtd group.

Check if your user is supposed to be in the group, example user vagrant:

$ cat /etc/group|grep $USER
vagrant:x:1000:
libvirtd:x:116:ubuntu,vagrant

If your user is not in the group, you'll need to add it:

$ sudo usermod -a -G libvirtd $USER

If your user was already in the group in /etc/group, then check the output of groups:

$ groups
vagrant libvirtd

If you don't see libvirtd, you'll need to log out and log back in.


How can I install Microsoft Word & Excel in Ubuntu 14.04?

You can use Wine AppDB for MS Office 2010 (32-Bit) for running MS Office on your Ubuntu . Wine Version 1.5.13 or better is required for greater compatibility.
Although I'd recommend using Libre Office instead of MS as it's already installed and works as fine as MS .


How should I set enviroment variables at GNOME login - not shell?

You should set the environment variables in your ~/.profile. This file is sourced by display managers such as LightDM which start the X server and the rest of the graphical system.

It’s also sourced by Bash (as long as ~/.bash_profile doesn’t exist) – and other POSIX shells – for non-graphical, i.e., network and console logins.

The Ubuntu Wiki has lots of good information on environment
variables.


libreoffice Python Uno support for Python 2.7 on Ubuntu Saucy 13.10

See this answer https://askubuntu.com/a/418550/4397
In a few words: python2 support is dropped in deb packages for LibreOffice since Ubuntu 13.10. You can also recompile libreoffice with this script https://gist.github.com/hbrunn/6f4a007a6ff7f75c0f8b


UNABLE TO INSTALL UPDATES "Not enought disk space"

I had the same problem. I was able to solve it with Ubuntu-Tweak.

Use your terminal and type or copy past.

  sudo add-apt-repository ppa:tualatrix/ppa

This will add the repository you need to get the app.

  sudo apt-get update

This will update the software list.

  sudo apt-get install ubuntu-tweak

This will install the app.

After you install it go to open dash and type "ubuntu tweak".

Once you run it go to janitor tab and select Apps , Personal and System

Then on the items on the right you can click on the boxes of what you want to clean. It will show you how much memory each item is using.

Then click the button clean on the bottom right of the screen.

This worked for me, hope it works for you.


how can I create office documents without particular extension?

It seems you are looking for better compatibility with Microsoft Office. Google Docs is used in the browser. So, this is perfectly compatible between Windows and Ubuntu. Libreoffice has versions for both Windows and Ubuntu, again perfect compatibility.

Office Online preserves Microsoft Office .docx and other document type formatting perfectly. Therefore, I posted this question in order to automate the following steps.

Prepend this: https://view.officeapps.live.com/op/view.aspx?src=
Append the URL of the Word document:
    https://dl.dropboxusercontent.com/u/4992179/My-Document.docx
Final product:
    https://view.officeapps.live.com/op/view.aspx?src=https://dl.dropboxusercontent.com/u/4992179/My-Document.docx

I recommend following the steps at my forum post to keep MS Office formatting consistent in Ubuntu.

At times I receive a .docx file from a colleague that needs editing. I open it in LibreOffice to make my edits of the content (no formatting changes though) and save it. In LibreOffice the formatting will likely be different than if it were opened in MS Office. Then I open it using the Office Online script (posted below). In Office Online the formatting will be preserved, but with the recent edits I just made. Please note that if you open the same document more than once in Office Online, the second time you will need to change the file name by at least one character. The MS Office Online cache prevents it from detecting that it is indeed an updated document.

The script below can integrate into the context menu of any file manager. If you want to use terminal, you can do the following.

Create a bin directory if you haven't yet in your home directory and move the script there.
cd ~/bin
Make the script executable chmod +x MS_Office_Online-Script
Open a new terminal. MS_Office_Online-Script /path/to/document.docx

In general I would try to transition to using LibreOffice instead of MS Office. In fact, I hope this script will enable you to eliminate Windows altogether. ;)

#!/bin/bash

# Name:         Open in Microsoft Office Online
# Author:       (c) 2015 Glutanimate <https://github.com/Glutanimate/>
# Dependencies: dropbox, a web browser (e.g. firefox, chromium...)
# Installation: https://askubuntu.com/q/574252/81372
#
# License:      GNU GPLv3 (http://www.gnu.de/documents/gpl-3.0.en.html)
# Usage:        open_in_microsoft_office_online <file>

# Settings

DbPath="$HOME/Dropbox"
CopyToDb="yes"  # whether to copy file to public dropbox folder
                # in case it's not there already (no/yes)

# Variables

GuiIcon="dropbox"
GuiTitle="Open in Microsoft Office Online"
MsOfficeUrl="https://view.officeapps.live.com/op/view.aspx?src="

File="$1"
Filename="${File##*/}"

# Functions

gui_notify(){
  ## generic notification function
  notify-send -i "$GuiIcon" "$GuiTitle" "$1"
  echo "$1"
}

# Checks

## check if file selected
if [[ ! -f "$File" ]]; then
  gui_notify "Error: No file selected."
  exit 1
fi

## check if Dropbox running
if ! pgrep dropbox > /dev/null 2>&1; then
  gui_notify "Error: Dropbox isn't running."
  exit 1
fi

## check if Dropbox folder set correctly
if [[ ! -d "$DbPath" ]]; then
  gui_notify "Error: Can't find dropbox folder. Please set DbPath in script."
  exit 1
fi

# Main

## get public URL
DbPubUrl="$(dropbox puburl "$File")"

## optional: copy file to public dropbox folder if it isn't there
if [[ "$CopyToDb" = "yes" && "$DbPubUrl" = "Couldn't get public url: Unknown Error" ]]; then
  ## create public Dropbox folder if it doesn't exist
  [[ ! -d "$DbPath/Public" ]] && mkdir "$DbPath/Public"
  ## copy file to public folder, don't overwrite any existing file
  cp -n "$File" "$DbPath/Public/"
  ## wait for sync to complete
  SyncCounter="0"
  while dropbox filestatus "$DbPath/Public/$Filename" | grep syncing; do
    [[ "SyncCounter" = "0" ]] && gui_notify "Syncing file..."
    sleep 5
    ## wait a maximum of 10 minutes for sync to complete
    if [[ "$SyncCounter" -gt "120" ]]; then
      gui_notify "Error: Sync timeout. Exiting."
      exit 1
      break
    fi
    ((SyncCounter++))
  done
  ## get public URL
  DbPubUrl="$(dropbox puburl "$DbPath/Public/$Filename")"
fi

## check if public URL exists and open in Microsoft Office Online
if [[ "$DbPubUrl" != "Couldn't get public url: Unknown Error" ]]; then
  xdg-open "${MsOfficeUrl}${DbPubUrl}" > /dev/null 2>&1 &
  gui_notify "Opening document in Microsoft Office Online..."
else
  gui_notify "Error: Can't generate public Dropbox link from File."
fi

Below is the script that I currently use. It is actually faster than the above script (see the "Wait for sync to complete." comment), but I took out some if statements and simplified it. Dropbox no longer has the Public folder for free accounts and discontinues it for paid ones on September 1, 2017. So, you'll need to use a different website service. You would adjust the URL in the script with your own web URL.

#!/bin/bash

# Name:         Open in Microsoft Office Online
# Author:       jbrock; Much thanks to Glutanimate <https://github.com/Glutanimate/>
# Dependencies: dropbox, a web browser (e.g. firefox, chromium...)
# Installation: http://askubuntu.com/q/574252/81372
# License:      GNU GPLv3 (http://www.gnu.de/documents/gpl-3.0.en.html)
# Usage:        open_in_microsoft_office_online <file>

# Variables
pub_path="$HOME/Dropbox/Public"
file="${1##*/}"

# Copy to Dropbox/Public directory.
cp -n "$1" "$pub_path"

# Wait for sync to complete.
while dropbox filestatus "$pub_path/$file" | grep -q syncing; do true; done

# Open in browser. (Get public URL is broken: 6 Sept. 2016)
exo-open "https://view.officeapps.live.com/op/view.aspx?src=https://dl.dropboxusercontent.com/u/4992179/$file" > /dev/null 2>&1 &

# Remove file from Public folder.
# This last part is optional. You probably want to remove your document from a public directory.
# I use this function with Xfce. I am not sure about other desktop environments.
#sleep 15
#trash () {
#dir="$HOME/.local/share/Trash/files/"
#if ! [ -d "$dir" ]; then
#   mkdir "$dir"
#fi
#mv "$@" "$dir"
#}
#trash "$pub_path/$file"


There is no installer support for 16.04 with ZFS, so you won't be able to create a bootable ZFS-only system just right now using the installer. I'd generally recommend ZFS for multi-drive configurations; a single SSD with ZFS may not be  as performant as ext4.

It is my personal opinion that ZFS is far more robust than btrfs, and it is my preferred choice for large data storage, mainly because of useful features such as compression, snapshots, cloning, send/receive, easy VDEV configuration, flexible raid options and a lot more.

See also:

https://wiki.ubuntu.com/Kernel/Reference/ZFS


How do I reinstall Linux grub without using boot-installer?

You simply cannot have a mix of UEFI and legacy. You can have both UEFI or both legacy but not a mix of both. Please see snippet from Ubuntu documentation here:


What you can try is to click on the power icon on the top right of the screen and select system settings.

You will have the following menu come up and you'll need to scroll down to the Hardware group if you need to.

Under the Hardware group click on the keyboard icon (although obvious I'm adding the photo for users who's systems aren't in English):

From here click on the Shortcuts tab as shown below:

Search through the types for those that use the Super (Windows on most systems) button and click on the shortcut and edit it as explained by the text underneath the window.  You can either make your own shortcut combination or just disable the shortcut. Hope this was helpful.


Make default driver recognize lower screen resolutions 11.10?

The op resolved the issue by installing the unstable drivers from xorg-edgers

  I installed the unstable drivers from xorg-edgers, and this fixed it.


Since Trusty immediately follows Saucy, you should not have any problems upgrading if you upgrade to trusty (first). Even if you want to upgrade to the u-series, do not skip the upgrade step to Trusty, to get your system fully “in sync” again.

But yes, running “mixed distributions” is what people are doing all the time.

In Debian, running a mixed stable/oldstable or stable/testing or stable/testing/unstable or stable/unstable system is supported, but not mixing oldstable with testing for example (skipping one distribution).

In Ubuntu, mixing distributions is normally supported either version X and X+1, or version X=LTS and X+4=LTS+1, since you are allowed to directly upgrade from one LTS to the next one. (On the other hand, since there are 4 full Ubuntu releases between LTS releases, mixing packages like that will be much less likely to succeed due to updated dependencies (libraries, for example) and whole-system changes).

It is much safer to install packages from an older version on a newer system, than to install select packages from a newer version on an older system. Generally, one uses backports (either official or PPA) for that.


Server installation gets stuck on purple screen

After after installing, re-installing, re-installing, etc... spending hours in forums that were completely useless. I finally solved it.

Insert Windows CD
Install Windows
Burn USB containing Ubuntu along with the several instruction manuals I printed online


How to recover files from a given directory using photorec

It is not possible to scan directories for lost files using PhotoRec unless you had mounted a whole hard drive partition as this directory.

For Unix a directory entry is not much more than a file used for mapping inodes. This also is why PhotoRec can not recover the directory structure. It really is only to scan whole drives or partitions to then recover the content of files of a given type (as defined by known headers). Filenames and directory structures can not be recovered.

You may however use TestDisk from the same suite to search for directory entries, and then to recover files within these (see my answer there on how to do that). To use TestDisk we need remnants of the filesystem to be accessible still.


Access Windows 8 partition via virtualbox

Unfortunately there isn't a way to do that.

Now if you don't actually need to boot to your Windows partition for anything but you still want to use your Windows apps on occasion, there are ways to convert windows to a virtual machine. Then you can have Ubuntu solely installed on your machine while spinning up Windows when needed.

First download the VMware Converter and follow the instructions to convert your machine to a vmware image. Then you can convert it to a Virtualbox image.

This will work fine with software like office, but it will not work if you use Windows to play games.


Upgrade from Yakkety Yak (Ubuntu 16.10) when its End of Life

It seems crazy, but it's true that you can't upgrade from a release that's only 15 months old, for the simple reason that upgrade from 16.10 to 17.10 isn't supported, and 17.04 is EOL, so that upgrade isn't offered. I hope the developers see the folly at some stage too, but in the mean time...

Follow the instructions at EOLUpgrades up to the point before you run do-release-upgrade, BUT as muru says, use the normal xx.archive.ubuntu.com rather than old-releases.ubuntu.com. Then, you need to edit the file /usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py - around lines 294/295 there are two lines which read:

if not dist.supported and not self.useDevelopmentRelease:
            continue

Comment those two lines out by adding hashes at the start. Then run do-release-upgrade, which will now upgrade to zesty rather than artful ( so you'll have to do the whole thing again to go to artful. )

Obviously since Zesty is also not supported, if you run into issues with the upgrade you're pretty much on your own... though I'm guessing many have trodden the path between 16.10 and 17.04 in the past so Google may well help...


Curl works, but not pages in a web browser with OpenLiteSpeed

I think that your problem is that OpenLiteSpeed is only listening on localhost address.
Please make sure that is listening for 0.0.0.0, which means all the addresses. In my sample there are processes listening on 127.0.0.1 and processes listening on all the ip's in IPV4 0.0.0.0 and IPV6 :::
carles@fast:~$ sudo netstat -tulpn | grep LISTEN
[sudo] password for carles:
tcp        0      0 127.0.0.1:6942          0.0.0.0:*               LISTEN      45335/java
tcp        0      0 127.0.0.1:41601         0.0.0.0:*               LISTEN      45335/java
tcp        0      0 127.0.0.1:63342         0.0.0.0:*               LISTEN      45335/java
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      827/systemd-resolve
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1143/sshd: /usr/sbi
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      455095/cupsd
tcp        0      0 127.0.0.1:34585         0.0.0.0:*               LISTEN      160123/java
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      2072/master
tcp        0      0 127.0.0.1:43195         0.0.0.0:*               LISTEN      160123/java
tcp6       0      0 :::22                   :::*                    LISTEN      1143/sshd: /usr/sbi
tcp6       0      0 ::1:631                 :::*                    LISTEN      455095/cupsd
tcp6       0      0 :::25                   :::*                    LISTEN      2072/master

If you want to debug if traffic gets from other sites, run tcpdump on the Server and attempt to connect from another machine. You'll see if there is that attempt.
Please check this before and provide an answer to continue debugging.
But whatever your connectivity problem is you can get to the localhost:8088 from your browser using a tunnel.
If you use Ubuntu as your Desktop you can do:
ssh -L LOCAL_PORT:DESTINATION:DESTINATION_PORT [USER@]SSH_SERVER

For example:
ssh -L 8088:123.45.67.89:8080 [USER@]123.45.67.89

Then in your browser you just connect to localhost:8088 and the tunnel will make the magic and your Server will believe that the connection is made local, so you can configure anything from your browser.
Cheers


filebrowser presents various of the features I am searching for. It is more centered on file upload and management, but also supports download.

List of functionalities:

file listings in mosaic or list
delete
move
rename
upload
create new files and directories.
direct single file download
multiple file download as .zip, .tar, .tar.gz, .tar.bz2 or .tar.xz


Unmet dependencies when installing openjdk 7 on arm v7 running ubuntu

Finally figured out the solution by hit and trial. In /etc/apt/sources.list replaced precise with trusty and everything works. Now am able to install the openjdk-7-jdk package.

After changing it, /etc/apt/sources.list looks like this.

deb http://ports.ubuntu.com/ubuntu-ports/ trusty main universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty main universe


Are there others methods to uninstall linux on mac?

hmm sorry but no command line but it'll work go to "disk utility" in your macos
go to partision tab select the linux partition and then click the minus sign and now select the mac partition and drag into the empty space and you are done :)


Trying to create a file to meet three conditions

In Bash shell you can use this command:
ls /sbin | head -n 5 | nl | tr '[:lower:]' '[:upper:]' > list.txt

How this works:

ls /sbin lists the contents of /sbin. See man ls for more options.
The output is then piped to head -n 5, which keeps only the first 5 results. See man head for more options.
The output is then piped to nl, which numbers the output lines. See man nl for more options.
The output is then piped to tr '[:lower:]' '[:upper:]', which converts all lowercase characters to uppercase. See man tr for more options.
Finally, > list.txt is used to redirect the output to a file name list.txt.

The final output should be something similar to this:
$ ls /sbin | head -n 5 | nl | tr '[:lower:]' '[:upper:]'
     1  AA-REMOVE-UNKNOWN
     2  AA-STATUS
     3  AA-TEARDOWN
     4  ACCESSDB
     5  ACPID


I use a tool called Grub Costomizer (from https://launchpad.net/grub-customizer). You can reorder, add and delete grub items. You would need the deleting functionallity. Although your windows 7 will maybe be readded when you update grub, it is easy to redelete it. (i can do it within 5 minutes)


Just use 'sudo' before the commands.  This only assumes root privileges for that command and is the safe way of doing it.  What they are saying is do NOT do somthing that will assume root privileges on a more permanent basis (such using 'su' or 'bash' with sudo)

sharon@sharon is your user name, which will be an administrative user, on the computer sharon.  You've give the computer the same name as your user.  If you want to change the computer name have a look at this question and it's main answer. Most of us use a descriptive name like, office, laptop, or you can follow the geeky convention of giving it a SF name: spock, kirk, picard etc.


how to launch the tor browser from a snap install?

Your problem:
tor is installed but you can find the browser.

My answer:

The name of the browser in repositories used to be torbrowser-launcher that's why tor package doesn't work for you. Because "tor" is not a browser. It is a protocol. At this moment I can't find torbrowser-launcher in snap. Maybe it doesn't exist there. But you can install it with apt:

sudo apt install torbrowser-launcher


If you're unable to access your files, but you think they should be on the disk, use the "Try Ubuntu Without Installing" option when you boot off the Ubuntu CD. From there, it should boot to a usable, though not very speedy, Ubuntu desktop. It's running entirely off the CD.

Use file browser to open the hard drive, and navigate to /home/<your username> on the hard drive. You should see your personal files.

From there, you could for example connect to the Internet and back them up. Or you could insert a USB thumb drive, and copy your files to it. Whatever you do, make sure those files are safe. For example, if you copy your files to a thumb drive, plug the drive into another computer and make sure they are usable and all there.

From there, you can continue to debug your problem, either by resurrecting the previous install, or installing from scratch. And in the future, always back up your files before any major software installation or upgrade. Additionally, keep in mind you can upgrade Ubuntu versions from within Ubuntu -- you don't need the CD.


Having trouble transferring file to a new folder

Check that the file bios.rom is actually in the current working directory ~/Desktop by typing ls.

If you can see the file bios.rom, you just need to put a / at the start of the path to mv to

sudo mv bios.rom /usr/share/higan/GameBoyAdvance.sys

if the directory name has spaces in it like Game Boy Advance.sys, you need to use the \ character to escape them like this:

sudo mv bios.rom /usr/share/higan/Game\ Boy\ Advance.sys

Otherwise mv will get confused...

If the file bios.rom is not in the current working directory, then you have to cd to the directory where it is first, or use the absolute path, for example, if it's in your ~/Downloads directory:

sudo mv ~/Downloads/bios.rom /usr/share/higan/Game\ Boy\ Advance.sys

Explanation of the error

The path usr/share... does not exist under ~/Desktop, which is the current working directory. usr is under /, the root directory. If you type ls where you are now, you can see no usr, but type cd / and then ls you will see it there, under /


DHCP server with multiple interfaces on ubuntu, destroys default gateway

I'm hardly any kind of expert on this subject, but I suspect that because of the broadcast nature of DHCP packets, your local DHCP server is always going to answer locally originating requests regardless of the listening interfaces that you configured.

So I would suggest you try simply setting "reject" statements in your dhclient.conf to reject offers from the local server:

reject 10.0.1.1;
reject 10.0.2.1;

(I'm only guessing that you can use multiple reject statements, man page is unclear.)

I can think of some other things to try also, but I might be wrong in my initial assumption anyway. I always find this a useful tool to diagnose what is happening:

apt-get install dhcpdump
dhcpdump -i eth1

PS: If you want to keep eth0, eth1, eth2 etc. properly separated, consider using VLANs to isolate traffic at layer 2.


Wifi problems on Centrino Wireless-N 1030, replace it?

I do not see the 'fifo queues' problem in your dmesg. Let's try a driver parameter:

sudo -i
echo "options iwlwifi 11n_disable=8"  >>  /etc/modprobe.d/iwlwifi.conf
exit

Reboot and tell us if performance has improved. There may be other things we can try if this doesn't help.

If this is ineffective, please do:

gksudo gedit /etc/modprobe.d/iwlwifi.conf

Use nano or kate or leafpad if you don't have the text editor gedit. Change the last line to read:

options iwlwifi 11n_disable=1

Proofread carefully, save and close the text editor. Reboot and test.

Although your dmesg doesn't show the 'fifo queues' issue, I suggest, as a last resort, that we undertake the suggested fix. Please see this bug report: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1361809 I suggest you install the patched kernel as desribed here: Weak WiFi signal

If this does not fix your issue, then I haven't any other suggestions.


How do I turn off the external microphone?

If you click the sound indicator icon on the top right of the screen you'll find the Sound Settings. Once that is open, go to the Input tab. There should be a pull down menu to the right of Connector which should allow you to select your microphone input. Once that is done, click the mute check box found to the right of the Input volume slider (not the Output volume one above it).


Cannot install nVidia drivers on Ubuntu Studio

Yes, you have to stop the x server.So that you can be able to install NVIDIA-Linux-x86_64-331.49.run file.Follow the below steps to install Nvidia.run file,

Login into virtual console Ctrl+Alt+F1.
Go into Downloads directory and install the  .run file,

cd ~/Downloads
sudo su
sh NVIDIA-Linux-x86_64-331.49.run


It looks like the old mountpoint directory (/media/oliver/Work) was left behind from before the sudden shutdown & subsequent reboot, and then the system (or whatever program that automounts for you) didn't want to use it again (I'm not too sure why).

To fix it, just deleting the old mountpoint should work

sudo rm /media/oliver/Work

I'm not sure why it made a new folder named Work1 instead of Work_, that's probably the default action for the automounting program. The other question may have been using a different desktop environment (it didn't specify) or the defaults have just changed since then.

If you've got Disks (gnome-disk-utility) installed, it's good at creating fstab entries, under a partition's "gear" icon (currently, until they change the UI again, it used to look very different) select "Edit Mount Options", then turning "Automatic Mount Options" Off.

Depending on how your drive's encrypted, you may need to look into using crypttab, and/or in Disks the "Edit Encryption Options".


Well I have built an empty iso of around 70GB file on my ubuntu system, then converted iso to ext4 system using guide from http://freesoftwaremagazine.com/articles/create_mountable_disk_image_gnulinux/
I have checked and verified that the linux filesystem stored on iso based ext 4 file-system  does indeed preserve filesystem permissions and also support incremental backup from rsync when mounted via "loop" method on your linux system.
But there is no compression, but now you have an archive file that may be carried on your usb(any file-system), while cloning your system on fly.
You may also use resize2fs command to resize(enlarge or shrink(be careful)) according to your need while using command suggested at
"Re-size" the .img for smaller SD-card. How to SHRINK a bootable SD card image.
However, ideally one must keep a static copy and a second dynamical resizable version for precaution or one can simply just use sparse img file.


Paravirtualized guest and Ubuntu 11.04

When installing a Xen virtual machine, you need to determine what kind of block devices you want to work with. There are three possibilities: installing directly on a dedicated partition (maximum performance) or by using an important disk image file or create your own disk image file with dd (resizable; You can use snapshots for making backups)

All commands assume root (ie. sudo su). I also assume using LVM but have also included an untested method where you use dd to use your own image. So skip 1 if you want to use a file (and not LVM) and skip 2 if you do use LVM.

Create a new LVM volume for your virtual machine. Change the name (after -n) to suit your needs:

lvcreate -L10G -n example.ubuntu.natty VolumeGroup

lvcreate is part of lvm2  but it is already installed when you are using lvms.
You can also use a file (dd). I have not found a suitable method for this with Ubuntu but this should come close. If you go with this I have experience with it but all the next steps should be the same. Copied from the link the method to create one using dd (the link also includes other methods of getting a file):

Create a 4Gb empty file with at /var/lib/xen/images/disk1 (change either size and location to fit your needs):

dd if=/dev/zero of=/var/lib/xen/images/disk1 bs=1M count=4096

Apart from creating empty image files using the dd utility, you can also use ISO files as an alternative for your physical optical drives. The usage is the same as the usage of a disk image file created with dd. Don't have an ISO file yet? Then we have good news for you; it's easy to create one. If the cd-rom of which you want to create an ISO file is in your optical drive, use the following to copy it to a file with the name cdrom.iso:

dd if=/dev/cdrom of=/isos/cdrom.iso

After creating either a disk image file or an ISO file, you need to include the disk image file in your virtual machine configuration using the file option in the disk definition:

disk=[ 'file:/var/lib/xen/images/disk1,hda,w', 'file:/isos/cdrom.iso,hdc,r', ]

Get the kernel, initrd, and xen config. wget versions for nl and installer-amd64 (so change the country code nl and also use installer-amd64 in the URL to fit your needs):

wget http://nl.archive.ubuntu.com/ubuntu/dists/natty/main/installer-i386/current/images/netboot/xen/xm-debian.cfg
wget http://nl.archive.ubuntu.com/ubuntu/dists/natty/main/installer-i386/current/images/netboot/xen/initrd.gz
wget http://nl.archive.ubuntu.com/ubuntu/dists/natty/main/installer-i386/current/images/netboot/xen/vmlinuz

Edit the config file

Edit the config file to taste, paying attention to the memory, name, vcpus, vif, and disk options. Also, find the line that says bootloader=pygrub and change it to the absolute path bootloader=/usr/sbin/pygrub.
Start the install (again pay attention to the command: change server country code and architecture to your needs):

xm create -f xm-debian.cfg -c install=true install-kernel="vmlinuz" install-ramdisk="initrd.gz" install-mirror="http://nl.archive.ubuntu.com/ubuntu" install-arch=i386 install-method=network

select a language
select a location
configure your network card. If it fails you will need to configure it manually (choose back, drop to a shell and issue a modprobe xen-netfront && exit. Configure the network card again.
select detect network hardware and insert a hostname

and it starts installing.
Fix the install.

The xen-blkfront module isn’t loaded at first so xen will fail to boot.

(initframfs) modprobe xen-blkfront
(initramfs) exit

Once the host finishes booting, log in and sudo to root. Then enter the following:

echo "xen-blkfront" >> /etc/initramfs-tools/modules
update-initramfs -u
update-initramfs: Generating /boot/initrd.img-2.6.38-11-generic

Untested and from memory + googling to fix my memory


Brightness control doesn't seem to work on a Toshiba Satellite M115 laptop

I am not familiar with your particular model, but you can try some of these 'solutions'.

Add acpi_backlight=vendor to grub:

Open terminal (Ctrl+Alt+T) and type:

gksudo gedit /etc/default/grub

You will find this line in the new opened window:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Change it to:

Example:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"

Note your entry may be different - only add the acpi_backlight=vendor.

After doing that, do:

sudo update-grub

If that does not get the Fn+F6 and Fn+F7 keys working, you can do this via the system settings as seen below:


Have a look here how to efficiently partition a Windows-Ubuntu dual-boot before you begin.

Then: Delete the partitions you've set aside for Ubuntu using Windows from Windows and recreate them with Ubuntu during the Ubuntu install with something else in item number 8 "Allocate drive space"


If you can login to terminal as you say try to run sudo dpkg-reconfigure -a and then sudo apt-get update && sudo apt-get upgrade this should repair broken dependencies and update packages after interrupted update.


Why sudo could not get the right PATH environment?

You might want to make a sudoers.d file for sudo to permanently keep your environment variables.

  CAUTION! This method uses the sudoers file, you might get locked out by sudo if anything goes wrong. Proceed with caution.

cd ~/Desktop
touch 'myfile'
Open the file in an editor.
Add these lines (both blank lines mentioned below are very important):

<This must be a blank line>
Defaults env_keep += "your_variable_name_within_quotes"
<This must be a blank line>

sudo chmod 440 'myfile'
sudo mv 'myfile' '/etc/sudoers.d/myfile'
Now open : '/etc/sudoers' and make sure there's the line: #includedir /etc/sudoers.d
If it isn't there, DO NOT EDIT IT, instead do sudo visudo
Append the line at the end and press Ctrl+X to save it.
Restart and try a sudo command with that environment variable.


How to compile Ubuntu webapps app userscript?

You need to create a Make file.

Here is the sample Makefile.am file

If you look at line number the 3 in Makefile.am file. All the users.js scripts that are placed under src directory will be picked.

You need to create the same structure showed in here and follow the below commands to build

./autogen.sh
make
sudo make install prefix=/usr

  Reference:

  http://quickmediasolutions.com/blog/9/using-the-unity-web-api
  http://bazaar.launchpad.net/~webapps/webapps-applications/trunk/files/head:/


PC doesn't boot and shows "No init found"

Boot from the Ubuntu Live CD;
  Open/Run Terminal;
  Type: sudo fdisk -l (to get the device name) then press Enter;

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: **********

Device Boot Start End Blocks Id System
/dev/sda1 * 1 30238 242886703+ 83 Linux
/dev/sda2 30239 30401 1309297+ 5 Extended
/dev/sda5 30239 30401 1309266 82 Linux swap / Solaris

  The device name for my friend's system based on the above: /dev/sda1
  Type: sudo fsck /dev/sda1 then press Enter;
  Restart the system and boot normally.

Source


How to import a pdf in libreoffice? under ubuntu, all pages are blank

If you make sure the scan is 1 page per pdf, you can open en edit it with Gimp.

As long there is no text-recognition done by the scanning software, libre-office or open-office will never be able to do editing.

A simple scan gives you a image (build up by pixels) => editable by gimp

Afterwards it's possible to do text-recognition => editable by libre-office or open-office

It's also possible to make a vector drawing from the image => editable by inkscape


This is easily possible for google-docs. Just install the chrome-browser, or preferably the free chromium-browser from the repositories and install the Google-Docs plugin from the web-store.


websites randomly don't work with Tor browser

I got the same message. Here is a link on the Tor website which mentioned that BestBuy.com blocks Tor by default. BestBuy.com doesn't WANT you to visit their site through the Tor network. The reason it works sometimes, is probably because you got lucky and got a Tor server that wasn't blocked (yet).


Disable hardware acceleration for Adobe Flash Player

Right-click on the on the video you’re having issues with.
Click Settings.
If you see the option Enable hardware acceleration, uncheck it. If you don’t see it, the option is not available for you.
Click Close.
Refresh the page and check whether the video is working.

Update your graphics card driver if your computer has a discrete GPU

Search in the Dash for Additional Drivers.
Click the Additional Drivers icon to open Additional Drivers.
From the list of drivers, select the graphics card driver that has [Recommended] after it by clicking it. The recommended graphics card driver for Ubuntu 12.04 will usually be up to date not far behind the latest version if your computer is not too old. If the driver is already installed, there will be a green dot to the left of it.
Click the Apply Changes button in the lower right corner to install the recommended graphics card driver.
Reboot to enable the graphics card driver.


LUKS and Nuke key installtion on Ubuntu?

Yes, you can add the NUKE feature to Ubuntu crypsetup!
You need der sourcecode from crypsetup, the patch for cryptsetup-1.6.6...

Then you can compile new libcryptsetup and cryptsetup with nuke feature.

This patch is for 1.6.6-5 (Ubuntu 16.04), for other version you neeed other patch, please visit the link!

get the patch (take a look http://deriv.debian.net/patches/c/cryptsetup/)

sudo apt-get update
sudo apt-get install libgcrypt11-dev libdevmapper-dev libpopt-dev uuid-dev libtool automake autopoint debhelper xsltproc docbook-xsl dpkg-dev
sudo apt-get source cryptsetup

wget http://deriv.debian.net/patches/c/cryptsetup/Debian_cryptsetup_2:1.6.6-5_Kali_cryptsetup_2:1.6.6-5kali1.debian.patch

extract source code from cryptsetup

cd cryptsetup-1.6.6

now its time to patch

patch -p1 < ../cryptsetup-nuke-keys/cryptsetup.patch

please corret the path, in my folder i have modified...

after patching, create DEB files for ubuntu

dpkg-buildpackage -b -uc

now its time to install

sudo dpkg -i ../libcryptsetup*.deb
sudo dpkg -i ../cryptsetup*.deb

edit:

I have made a simple shell script to patch and compile cryptsetup for Ubuntu 16.04.
Please be careful!

run it with sudo!

#!/bin/sh

apt-get update
apt-get install libgcrypt11-dev libdevmapper-dev libpopt-dev uuid-dev libtool automake autopoint debhelper xsltproc docbook-xsl dpkg-dev

apt-get source cryptsetup
wget http://deriv.debian.net/patches/c/cryptsetup/Debian_cryptsetup_2:1.6.6-5_Kali_cryptsetup_2:1.6.6-5kali1.debian.patch

cd cryptsetup-1.6.6
patch -p1 < ../Debian_cryptsetup_2:1.6.6-5_Kali_cryptsetup_2:1.6.6-5kali1.debian.patch

dpkg-buildpackage -b -uc

After that, you can install with

sudo dpkg -i ../libcryptsetup*.deb
sudo dpkg -i ../cryptsetup*.deb

check with

cryptsetup --help | grep luksAddNuke

should look like

luksAddNuke  [] - add NUKE to LUKS device

Now you can add nuke keys with

sudo cryptsetup luksAddNuke /dev/sda5

With a standard Ubuntu installation it is normal sda5 !

Now make a backup of the header!

sudo cryptsetup luksHeaderBackup /dev/sda5 --header-backup-file luks-backup

copy the file luks-backup on save location, if you wipe the header with nuke password, you can recover the header with linux live system!

make sure, that ubuntu update dont install the "normal" cryptsetup

sudo apt-mark hold cryptsetup-bin libcryptsetup4

check upgrade

sudo apt-get upgrade

looks like this

Die folgenden Pakete sind zurückgehalten worden:
  cryptsetup-bin libcryptsetup4 linux-generic linux-headers-generic linux-image-generic ubuntu-core-launcher

If i have some time, i would create ppa.

roema


CA.pl file missing, how do I reinstall it?

Reinstall the openssl package:

sudo apt-get install --reinstall --no-download openssl

The --no-download switch is optional; I put it there because you should already have this deb in your local archives.


Always try the simple step first.  Since you haven't mentioned it, try this.

In terminal type the following:

sudo apt install dpkg

Press Enter and it should work fine.

Hope that helps.  If you get an error, report back here.  We'll take it one step at a time.


How can I downgrade a PPA package to the official version?

You should be able to force version for those packages, setting them to use the official repository one doing a click on each of them in synaptic, then package menu -> force version...

Once you set them back, feel free to remove third party repos and upgrade safely.


Disappearing dropbox icon, can't uninstall and reinstall

I run Ubuntu 14.0.4 and also have the issue where the icon doesn't show by default/from the install I have to run the following:

sudo apt-get install libappindicator1


I suspect this might be due to the fact the Ubuntu One is still in Beta for Windows. Your problem looks similar to this bug on Launchpad.


So to answer my own question, the Ubuntu Live CD's e2fsck won't work. So I booted up the GParted Live CD, ran e2fsck, now everything is back to normal.


How to shutdown automatically when AC power is not available

Create a new rule in udev by opening the terminal and using:

gksu gedit /etc/udev/rules.d/50-ac-unplugged.rules

(If you are using Ubuntu 18.04 or a newer version gksu will not be available by default. In that situation please refer this question  or use the above command as  sudo -H gedit /etc/udev/rules.d/50-ac-unplugged.rules)

Put in the following line:

SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="0", RUN+="/sbin/shutdown now"

Save the file and then restart udev services with:

sudo udevadm control --reload-rules

Save all your work and unplug your power supply.


New lvm install to pick up existing home drive and reinstate swap partition

Ubuntu use eCryptfs to encrypt /home.

The new /home and old home could be using different ciphers, keys and options. I don't think it is possible to merge the 2 logical volumes.

Anyway, you can do it manually by mounting the old home and use rsync to copy all files over to the new /home (data will be encrypted again using the ecryptfs options on the new /home), you can keep using the swap file on the old /home anyway, just edit the /etc/fstab

More on eCryptfs
https://help.ubuntu.com/12.04/serverguide/ecryptfs.html


I can’t configure NTP to work with the GPS module as a synchronization source (NMEA + PPS)

First need to make /dev/pps0 working.
apt install pps-tools; ppstest /dev/pps0
if it is not working.
make sure that /dev/pps0 is using proper source: dmesg | grep pps
[    5.358856] pps pps0: new PPS source pps.-1
[    5.358947] pps pps0: Registered IRQ 349 as PPS source

ntp's nmea driver requires
"/dev/gps%d"    /* GPS serial device /
"/dev/gpspps%d" / PPSAPI device override */ -> symlink to /dev/pps0
Also make sure that you use correct settings in ntp.conf
e.g.
https://www.eecis.udel.edu/~mills/ntp/html/drivers/driver20.html
server 127.127.20.0 mode 88 maxpoll 1 prefer true fudge 127.127.20.0 time1 0 flag1 1 refid GPS
where mode 88
linespeed 115200 bps and process $GPZDA or $GPZDG


"/usr/sbin/grub-mkconfig: 11: /etc/default/grub: *: not found" error when removing kernel packages

You cannot install anything because there are broken packages on your system. Considering the output of apt-get install -f, their removal fails because of an error in your /etc/default/grub, line 11:

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash profile”

Those aren't the quotation marks you're looking for. You need a pair of either " or ' instead. You can change them manually or with

sudo sed -i -e 's/”/"/g' /etc/default/grub

Afterwards you can retry to remove those broken packages (sudo apt-get install -f).


why isn't xbmc media center in Ubuntu Software Center?

XBMC is now included in the Ubuntu Software Centre for Ubuntu 12.04.

Linked Question:

How do I install XBMC?


Well. There are really a number of reasons that your installation can stall. I stumbled upon your question while looking for an answer to my own current (and also first) Ubuntu installation problem.

I'm not versed well enough in Ubuntu (nor Linux in general) to be able to give your direct tips -- but I'll share some of my findings (some of which I have tried, others not):

1) See if your hardware is Linux/Ubuntu compatible. Here's for checking general Linux compatibility. See also Ubuntu Hardware support section in Ubuntu.com wiki.

... Now, I can't share more links in this answer as the Fabulous StackExchange system is limiting my links to 2 (due to my lacking reputation points). More in another answer. (and GRRrr. to CrapExchange for the dorky limitations).


Turning off flash and images was a good idea. You may also want to check out a text-only browser like lynx or elinks.
Turn off automatic updates and checks for automatic updates:

Open Software Center, navigate to Edit->Software Sources.... On the Updates tab change Automatically check for updates to Never.
Disable all syncing services you have (Ubuntu One, Dropbox, etc.).


Unity Desktop not loading after auto update and installing CUDA in Ubuntu 14.04

You've used a .run file which is out-of-scope for the automatic updates.  Have a look here for more background information.

So you're stuck with manual updates of your .run file ad infinitum.

There is however another way to get the NVidia 346.35 on your system and that is to install the xorg.edgers PPA.  As the xorg.edgers group ask not to give installation instructions directly without linking to their page, this is the best I can do for now…

If you don't know what a PPA is or need some guidance about rolling forward and backward of driver versions after reading their page, leave a comment below.


No visible screen after updating to 11.10, system boots to tty1

to solve the first problem you just need to delete the xorg.conf file
easily this way (as root):

sudo rm /etc/X11/xorg.conf

the system should generate a new one automatically if not used the default one and you probably should install your nvidia card's driver.

*always make a backup of a file before deleting it (copy contents and save with different name or tag like xorg.conf.backup .e.g) *

for the second problem, it happens with nvidia usually if you didn't install the driver or you are using too much desktop effects while you have nvidia card

currently i believe ubuntu 11.x is unstable with nvidia cards so don't pressure it with lots of graphics , 10.X was more stable unfortunately i think i'm gonna switch back to 10

if you need me to explain the steps of installing nvidia driver i'll be glad to help
good luck


Clients and a server connection by SSH with authentication key usage

You need some authentication for the users.

If you don't want password, you can create keypair on server and share private part with the client (and store the public part in authorized_keys file), as some services does.

Generate keypair:

$ ssh-keygen -t rsa -f rsa_key
$ # rsa_key <-- private key
$ # rsa.key.pub <-- public key


How to take a Ubuntu system running in kiosk mode on remote outside the local environment

You could use stunnel to connect from clients to servers, then you have open SSH sessions to all of them:
Man page: http://manpages.ubuntu.com/manpages/trusty/en/man8/stunnel4.8.html
Likewise, you could wo with VPN, eg. OpenVPN. Again, establish tunnel from your clients to your central server, then push traffic through it, and you can then ssh as usual to clients (but using the client's VPN IP)
Man page: http://manpages.ubuntu.com/manpages/cosmic/man8/openvpn.8.html
This is a tutorial explaining both in pretty good details: https://medium.com/@jayden.chua/stunnel-openvpn-server-on-ubuntu-18-04-1837eaf2077d
It would help to know if your server is behind NAT as well, or just the clients. Plus, perhaps just solving the NAT issue to properly configure it.


different partition size in parted and in df

I assume that df shows the space available in the file system (without structures needed for the file system itself maybe?), whereas parted probably reports the outer size of the partition.

Other than that, the output of df -BG seems to be rounded down to full GigaBytes. I think that the sizes would differ less if you let df output smaller (optimally the same as parted i.e. 512 bytes) units.


The problem is that, even if you add that directory to your PATH, there's no executable program named "yo" there.

I would add a function to your .bashrc:

yo() ( cd ~/.node/lib/node_modules/yo && node cli.js "$@" )


Screen is flickering when full screen in intel UHD 620

I have Lenovo T480S with Ubuntu 20.04. Playing on Intel video with VLC full screen mode - screen is flickering. As work around I turned off Tools->Interface->Show controls in full screen mode.


Yeah, Fail2ban configuration files has changed a lot since V.0.9.X.

After V.0.9.X you should NOT change the original config file, that is located in

/etc/fail2ban/jail.conf

this is from Fail2ban jail.conf

# WARNING: heavily refactored in 0.9.0 release.  Please review and
#          customize settings for your setup.
#
# Changes:  in most of the cases you should not modify this
#           file, but provide customizations in jail.local file,
#           or separate .conf files under jail.d/ directory, e.g.:
#
# HOW TO ACTIVATE JAILS:
#
# YOU SHOULD NOT MODIFY THIS FILE.
#
# It will probably be overwritten or improved in a distribution update.
#
# Provide customizations in a jail.local file or a jail.d/customisation.local.
# For example to change the default bantime for all jails and to enable the
# ssh-iptables jail the following (uncommented) would appear in the .local file.

Ubuntu 16.04 installs Fail2ban V.0.9.3-1
To config it, do the following:

apt update
apt install fail2ban

after Fail2ban has been successfully installed:

cd /etc/fail2ban/

we now create some local jail, to override the default configurations

sudo nano /etc/fail2ban/jail.local

no copy and paste the following

[DEFAULT]
# Ban hosts for two days:
bantime = 172800

# Override /etc/fail2ban/jail.d/00-firewalld.conf:
banaction = iptables-multiport

[sshd]
enabled = true

now write to the file (ctrl + o) and close it (ctrl + x)

restart fail2ban service

sudo systemctl restart fail2ban

check fail2ban status

sudo fail2ban-client status

you should get a output like this:

Status
|- Number of jail:  1
`- Jail list:   sshd

now you check individuals jails e.g.

sudo fail2ban-client status sshd

with the above commands you can see which IP addresses has been blocked Fail2ban service!

you can control with systemctl is fail2ban is running or not

sudo systemctl status fail2ban

this is it.

PS: you can add other parameters like mail sending, find time, max-retry and ... if you would like!

Sources:

How To Protect SSH With Fail2Ban on CentOS 7

Fail2ban with FirewallD

Using Fail2ban to Secure Your Server

PS2: There is a newer version of Fail2ban available -> v0.9.4

If you would like, you can compile it yourself (read the Fail2ban github page) - though compiling IS NOT recommended
From Fail2ban Github Page

  It is possible that Fail2ban is already packaged for your
  distribution. In this case, you should use it instead.

OR

you can use the .dep package for the next version of Ubuntu (which is Yekkety)
Package: fail2ban (0.9.4-1) [universe]


Undo close tab (Ctrl+Shift+T) not working in Firefox

I noticed that by running Firefox as root (sudo firefox) I am able to do this, but once I come back to normal mode, it does not work again. So it occurred to me that the original problem may have been started when once in the past I executed Firefox as root.

It seems Firefox creates some temporary files and uses them to do these jobs like reopening closed tabs. Since in root mode, the owner of these temporary files is root, in normal mode it cannot overwrite those files and so the related features are disabled!

To fix this I ran this command to change all of the Firefox's config files' ownership to my user using this command:

sudo chown $USER:$USER ~/.mozilla/firefox/ -R

and then I restarted Firefox and it worked.


Change of Root Password for PHPMyAdmin Renders Unexpected Output on CLI

Try to add -p flag for in order to perform login based on password:

mysql -u root -p

More info MySql password reset:


apt says "invalid signature"/"not signed" for all repos even if keys are there

In my particular case the problem lay in busybox being used for the main standard userland tools instead of the GNU ones, so the output of readlink --help is

BusyBox v1.22.1 (Ubuntu 1:1.22.0-15ubuntu1) multi-call binary.

Usage: readlink [-fnv] FILE

Display the value of a symlink

        -f      Canonicalize by following all symlinks
        -n      Don't add newline
        -v      Verbose

and command -v readlink points to /usr/bin/readlink which was a symlink to /bin/busybox. I confirmed that in a clean Ubuntu this is not the case.

Apparently someone accidentally ran busybox --install. The fix was to delete the symlinks pointing to busybox using find /bin /sbin /usr -type l -lname /bin/busybox -delete.


No login screen after leaving the computer for two hours

To lock the screen automatically, you must configure the privacy settings in your Ubuntu:

Configure the automatic lock in: System Settings > Privacy > Screen Lock.

You can find an icon for the System Settings in the top bar of your desktop. There are some screenshots that may help you in the websiteforstudents site.

If you plan to leave your computer for a while, you can also lock the screen manually:

You can press Super+L key combination (Super is usually the Windows key).
or use a command like: gnome-screensaver-command --lock


Using Ubuntu-x-swat PPA solved my problem. Can I be sure the commands I ran are safe?

It depends what you mean by safe, but in general, there is no problem with this.  You have added an extra source of packages (a PPA) where packages and updates which have not (yet) been released to the general public are hosted.  In this case, the package are related to the graphical environment and your graphics card.  (I also used this PPA to try solve some problems with my graphics card.)

The key here is that this is a fairly well-known/trusted PPA.  In theory, someone could host a PPA and put malicious code in it, but he would usually be called out pretty quickly for it on a public forum like this.

There is also some slight risk, in that there is a higher risk of bugs in code that is still in a PPA, rather than released in the mainstream package repositories, because it might not have been tested as thoroughly yet, and less users will have been using it to discover other bugs or problems with it.


Wubi can't detect local copy of ubuntu-12.04.2-desktop-amd64.iso

They changed the kernel from vmlinuz to vmlinuz.efi from release 12.04.1. So the only way to get around this is to use the patched revision 273 of wubi.exe for Ubuntu 12.04.2 here: http://people.canonical.com/~evand/wubi/precise/wubi-r273-signed.exe

It was patched and built, but the fix was only released for 13.04 and not 12.04.2 for some reason. (See https://bugs.launchpad.net/wubi/+bug/1134770)


Boot problems with Ubuntu on Asus Notebook

I can't fully answer your question, but I can help you to stop wasting time on certain mistakes....

  I had Ubtuntu 14.04 LTS installed (with encrypted homefolder) as dualboot with Win8.1
  ...
  of course all the time my BIOS settings where on Secure Boot Disabled, and Launch CSM enabled.

On a computer that shipped with Windows 8 or later, chances are you should NOT be enabling the CSM (aka legacy support). To understand why, first know that you do not have a BIOS; you have an EFI. I know that most people, and even most manufacturers, refer to their EFIs as BIOSes. This leads to confusion, though; EFIs are fundamentally different from BIOSes, and using the term "BIOS" to refer to an EFI leads readers to drag in all sorts of BIOS knowledge that's simply wrong when applied to EFIs. The result is people confidently doing things that have worked in the past but that create new problems on their EFI-based computers.

Most modern EFIs include a Compatibility Support Module (CSM), which enables the EFI to boot using a BIOS boot loader. This is something like Linux using dosemu or WINE to run DOS or Windows programs in Linux; it's a compatibility layer stuck atop another environment, but it doesn't make EFI a BIOS any more than dosemu makes Linux DOS. Worse, activating the CSM greatly complicates the boot path, making it next to impossible to predict what the computer will do as it boots, at least when it's fed a medium (such as many Ubuntu installation media) that can boot in either way. Will the Ubuntu installer come up in BIOS/CSM/legacy mode or in EFI/UEFI mode? Who knows!? Flip a coin, and don't find out until it's too late, since the boot mode is obvious only if you're an expert! Sorry if I sound sarcastic, but I've seen far too many problem reports related to this issue. See this Web page I've written for more detail on the CSM and the complications it creates.

The bottom line, though, is that you should go back into your firmware and disable the CSM. Ubuntu should work with Secure Boot active, but it sometimes causes problems, so disabling it can have some benefits some of the time. OTOH, it also provides at least theoretical protection against some modes of attack, so it's best to leave it active if it doesn't cause you problems. (Problems should be obvious very early, since the system won't get as far as GRUB if Secure Boot blocks it. If it gets past GRUB launching a kernel, it's not a Secure Boot problem, at least not on Ubuntu.)

I should provide a caveat to all of this, though: The CSM is necessary in some cases, either because you've re-installed Windows in BIOS/CSM/legacy mode or because you've got hardware that requires BIOS-style initialization to work correctly with a Linux driver. Such cases used to be moderately common, but they're rarer today.

  I tried boot-repair in Ubuntu rec mode, that killed it completely. After that it said missing file when i tried to boot.

It could be that this is related to your CSM activation, but I can't be sure of that. If you want help with this, run Boot Repair again and post the URL it spits out.

  So i formated the Linux partition, assigned that free space to a new partition B:\ and booted a Windows-Installation-USB, went to command prompt and executed:

bootrec /fixmbr

That's one of the BIOS-specific commands that doesn't work with an EFI-mode boot. Basically, this command re-installs the BIOS-mode Windows boot loader to the Master Boot Record (MBR) of the boot disk. Because an EFI system boots in a completely different way, this command has, at best, no effect on an EFI-mode system. A caveat: Because the CSM introduces unpredictability into the boot process, it's possible that installing a BIOS-mode boot loader in the MBR will cause the computer to try to boot in BIOS/CSM/legacy mode, which would just end up causing further breakage. Depending on what the problem is, any number of Windows or non-Windows commands might do something analogous to the command you specified. The main point, though, is that you need to track down EFI procedures to fix boot problems, rather than use BIOS procedures.

  How do i remove the Ubuntu boot options that still show up in BIOS?

If you're referring to the EFI's boot manager menu, you can remove these from an EFI-mode boot of Linux. Type sudo efibootmgr to see these options (or sudo efibootmgr -v to see more details). Each option has a hexadecimal number, preceded by Boot, as in Boot0003 or Boot001B. You can remove an option with the -b # and -B options to efibootmgr, as in sudo efibootmgr -b 0003 -B to delte Boot0003. There are other ways to do this in other OSes. In Windows, EasyUEFI is a third-party tool that, as its name suggests, makes such manipulations easy. Some EFIs themselves provide such tools, in their setup utilities.

  whats the Problem with my Notebook that Ubuntu didnt work and no Linux live USB launches anymore?

I don't recall seeing your specific issue before, but it looks like either the hardware is defective (either a bad sample of your model or a bad design that affects all samples of your model) or it's new enough that it's not yet supported by the kernel you're using. You say you installed Ubuntu 14.04, but you don't say if that was the original or a point release (14.04.3 is the latest). If it's not 14.04.3, I'd try that; and if that doesn't work, you might try a 15.10 pre-release; see here for download links to the daily builds.

There's no evidence that this error has anything to do with EFI, although some of your repair attempts complicated matters by creating CSM-based complications.


After experimenting with different authenticator apps on my phone (none of which seemd to allow me to see the code scanned from the QR code, including Google's own one) I then changed "use_first_pass" to "try_first_pass" in /etc/pam.d/lightdm. It worked. Yay!


Ubuntu 16.04 lts lost administrator rights bash: /etc/profile: Permission denied

There is no need to execute chmod at all when using sudo to edit a file, although you shouldn't use sudo gedit (rather sudo -H gedit for example)

Since you didn't change permissions recursively, you can fix the problem fairly easily.

Boot a live session (for example, Ubuntu bootable USB you use for installation, or System Rescue. If you don't have one, you can make one using another computer or even buy one). If using an Ubuntu live USB, select **Try Ubuntu without installing".

In the live environment, identify the (afflicted) root partition on the disk using sudo fdisk -l

It will probably the biggest partition and it will be labelled "Linux filesystem". Something like /dev/sda1 or maybe /dev/mmcblk0p2.

Mount the root partition, using the proper name instead of sdXY

sudo mount /dev/sdxY /mnt

Check it was the right partition:

ls /mnt

Should output something you'd expect to see in /, roughly like:

bin    dev   lib64       mnt   root  snap      sys  var
boot   etc   lost+found  opt   run   srv       tmp
cdrom  home  lib         media       proc      sbin usr

If it looks right:

cd /mnt
sudo chmod 755 etc
sudo chmod 755 etc/pm
sudo chmod 755 etc/pm/config.d
cd

Then you can unmount the partition and reboot into your system as normal

sudo umount /mnt
reboot


The alpha-channel is a property of a given layer. Adding one allows you to make transparent pixels later (for instance with the eraser), but doesn't make your layer transparent immediately.

The alpha-channel exists when the image is loaded from a format that allows transparency (such as PNG...). It is also added automatically to all new layersbecause it rarely makes sense to stack opaque layers (except for GIF animations).

There is no such thing as a "layer of transparency". The checkerboard pattern isn't a layer, it it below the lowest layer, you see it where all the stacked layer are transparent.


Is it possible to remove items from "System Settings"

Given that changing the permissions accomplishes your goal, check out this magic:

dpkg-statoverride --update --add root root 640 /usr/share/applications/gnome-printers-panel.desktop
dpkg-statoverride --update --add root root 640 /usr/share/applications/gnome-info-panel.desktop
dpkg-statoverride --update --add root root 640 /usr/share/applications/gnome-keyboard-panel.desktop

You can remove the overrides with:

dpkg-statoverride --remove /path/to/file

(but note this won't reset the original permissions)


Installing Ubuntu 20.04.1 LTS on a DELL xps 8940 with NVIDIA(R) GeForce(R) RTX 2060

The problem was the BIOS settings were configured specifically for Windows.
Here's a link to snap shots with the new BIOS settings.
https://imgur.com/a/9uLrTM2
At one point the BIOS settings got corrupted while attempting to reconfigure them and the motherboard CMOS coin battery had to be removed for ten minutes to reset the BIOS configuration.
Please be aware that many of the security and other modern processor features have been disabled.


Ubuntu live CD upgrade option grayed out (13.10)

you need to have an internet connection in order for the "upgrade" option to be enabled. Else you can only reinstall from scratch.

source and credit: comment from @larienna


I had another issue with bing.com not displaying the picture.  A couple posted comments suggesting clearing cache (Ctl+Shift+Del).  This cleared up that problem.  I thought I'd try again with Audible and that too is now working.  Clearing cache seems to be the "go to" when you have odd issues.


registering sip as protocol in Ubuntu 18 to use TbDialout with Thunderbird and Ekiga

Solved. You still configure TBDialout with a userdefined url as written above.

But the method described above how to register SIP protocol as an url-handler is outdated.

Now you do this this way:

Create a file ~/.local/share/applications/sipurl.desktop and put this in it:

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Exec=/usr/bin/ekiga -c %u
Name=sip-url
Comment=sip-url handler
Icon=
Categories=Application;Network;
MimeType=x-scheme-handler/sip;

Then run

xdg-settings set default-url-scheme-handler sip sipurl.desktop

Credits go to Chris Hastie, author of TbDialout.

https://github.com/tipichris/TBDialOut/issues/12


Searchmonkey. You can find it in universe.


Add the following line in your ~/.bashrc
if [ "$(whoami)" = "root" ]; then PS1="\u# "; else PS1="\u\$ "; fi

when you open a new terminal you will get,
user$
user$ sudo bash
root#

Note: It will work only with sudo bash. As sudo -i or sudo su will check /root/.bashrc instead of user's .bashrc. To get the same behavior copy the same in /root/.bashrc also.
Alternate Better Way:
The same thing can be achieved by setting PS1 as
PS1="\u\\$ "

in user's as well as root's .bashrc


How to add a bookmark to the Home Folder icon in Unity?

There are two parts you need to do with the .desktop file:

Add the shortcut name to the X-Ayatana-Desktop-Shortcuts key, e.g.:

X-Ayatana-Desktop-Shortcuts=Videos;Documents;...;MyBookmark

Add the piece you already posted, just make sure that the section title is of the form [<Shortcut Name> Shortcut Group]:

[MyBookmark Shortcut Group]
Name=MyBookmark
Exec=nautilus MyBookmark
TargetEnvironment=Unity

Also, it's TargetEnvironment instead of OnlyShowIn.


An extra line appears on the leftmost point of additional display. How do I fix it?

Open a terminal and do:

$ xrandr -q

This will return some information about how your displays are configured, you will get something like this:

Screen 0: minimum 320 x 200, current 3285 x 1080, maximum 16384 x 16384
eDP connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 309mm x 173mm
   1366x768       60.1*+
   1280x720       59.9
   1152x768       59.8

VGA-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+1366+0 (normal left inverted right x axis y axis) 480mm x 270mm
   1920x1080      60.0*+   60.0     50.0     59.9
   1680x1050      59.9
   1600x900       60.0

In this case, eDP is the first monitor and HDMI-0 is secondary. Make note of the width in pixels for the primary screen and the id of the secondary display to be able to issue the following command:

$ xrandr --output <sec_screen_id> --pos <primary_display_width - few pixels>x0

for example:

$ xrandr --output HDMI-0 --pos  1364x0

Play with different values until you are happy with the results and then include it on a startup script (probably on ~/.xprofile).


In case we need a partition to always mount at the same place, and to be reliably present it is recommended to auto-mount these partitions at boot or login.

This can be done by an entry to your /etc/fstab file for mounting at system boot, or by using udisks if mounting should only happen on user login.

See below questions on how to do that:

For mounting at boot: How to automount NTFS partitions?
For mounting at login: Automatically mount NTFS drive when I login

To better understand file systems and what mount options there are 2 other recommended place for further reading:

Ubuntu Community Wiki: Mount
How to efficiently partition a single Windows-Ubuntu dual boot disk

Please note that Windows partitions must not be hibernated for mounting on Ubuntu.

To avoid issues with a changing UUID we can also mount by a disk LABEL:

Constant UUID on USB install


How do we break an existing command line already in history into multiple lines

Multiline commands always will be archived in the command history as a single line. On the terminal prompt, you cannot edit a line to appear on multiple lines.
The approach to go about this is, is to open the command in your default editor. With the cursor sowewhere in your command, hit Ctrl+XE. This opens the command in your default editor (nano on Ubuntu), where you can do all your edits, including splitting the lines. In nano, hit Ctrl+SX to save the changes and close the editor: your command will immediately be executed.


How to back up the .vhd files of virtual box before deleting and replacing messed bin/sh and bin/dash?

VirtualBox allows you to take snapshots of your virtual machines.

Create a snapshot of the machine before you make the changes. If the changes destroy your virtual machine, you can simply revert back to the snapshot you took.


The problem was solved by downloading the kernel 5.8.0-31-generic.