sudo, gksudo, kdesudo and their differences?

sudo stands for Super User Do. That means it provide privileges of the root/main user via terminal. Learn more about sudo from its official site.
From Vinicius's comment

  It originally stood for 'superuser do' as the older versions of sudo
  were designed to run commands only as the superuser. However, the
  later versions added support for running commands not only as the
  superuser but also as other (restricted) users, and thus it is also
  commonly expanded as 'substitute user do'. Although the latter case
  reflects its current functionality more accurately, sudo is still
  often called 'superuser do' since it is so often used for
  administrative tasks.

gksudo and kdesudo both are also sudo thing except that first one is use for graphical sudo operation which works using GUI instead of terminal and second one is gksudo alternative for Kubuntu.

And a short note from wiki

  You should never use normal sudo to start graphical applications as
  Root.You should use gksudo (kdesudo on Kubuntu) to run such programs.
  gksudo sets HOME=~root, and copies .Xauthority to a tmp directory.
  This prevents files in your home directory becoming owned by Root.
  (AFAICT, this is all that's special about the environment of the
  started process with gksudo vs. sudo).


Key security fixes - pace of adoption into 12.04 LTS

The link you posted refers to:

  Security database references:

  In Mitre's CVE dictionary: CVE-2013-4576.

From launchpad and the changelog for the security updates for 12.04:

  Publishing details

  Published on 2013-12-18. Copied from ubuntu precise in Private PPA for Ubuntu Security Team by Ubuntu Archive Robot

  Changelog

  gnupg (1.4.11-3ubuntu2.5) precise-security; urgency=low

  SECURITY UPDATE: RSA Key Extraction via Low-Bandwidth Acoustic
  Cryptanalysis attack

  debian/patches/CVE-2013-4576.dpatch: Use blinding for the RSA secret
  operation in cipher/random.*, cipher/rsa.c, g10/gpgv.c. Normalize the
  MPIs used as input to secret key functions in cipher/dsa.c,
  cipher/elgamal.c, cipher/rsa.c.
  CVE-2013-4576  -- Marc Deslauriers    Wed, 18 Dec 2013 11:17:02 -0500

So I would assume you should have (or at least are able to get) this update as of 18.12.2013. And regarding the speed of updates: in this case it was updated the same day.


How can I install just security updates from the command line?

The package unattended-upgrades provides functionality to install security updates automatically.

You could use this, but instead of configuring the automatic part you could call it manually:

sudo unattended-upgrade -d --dry-run
sudo unattended-upgrade -d # Idem --debug

If you want to run it quietly instead:

sudo unattended-upgrade

Note: When you call unattended-upgrade you leave the "s" off the end (on newer versions there is a symlink to avoid this).

This assumes that the package is installed by default, which it probably is. If not, just do:

sudo apt install unattended-upgrades

See also /usr/share/doc/unattended-upgrades/README.md.


qBittorrent - List directories/folders first under torrent content

You can not see the file without putting the torrent in the queue. But you can use an existing library for write a parser for torrent file, or you can also write your own library, using the specifications of the torrent explained here.


Auto generate English subtitles from video file

I suggest to use pyTranscriber. As its README says:

pyTranscriber is an application that can be used to generate automatic transcription / automatic subtitles for audio/video files through a friendly graphical user interface. The hard work of speech recognition is made by the Google Speech Recognition API using Autosub.


Why does my HP ProBook 4530s get much hotter?

I have same laptop and HP laptop got problem with Ubuntu!

Install graphic card from ATI site. And goto catalyst control center. goto swichable graphics. and select power saving GPU for improved battery life. worked for me.
I find this  post and update your bios maybe help you. If NOT, try other desktop. Like Cinammon or Xfce or KDE. Folow this.


I found a temporary workaround for the problem:

WARNING: this breaks some functions of parallels like coherence.
The workaround can be reverted by reinstalling the parallels tools.

  cd /usr/lib/compiz && sudo rm libprlcompiz_0_*

Compiz (used by unity) is crashing somewhere inside the plugin installed by parallels. Switch to a console and run "unity --replace --debug" for a backtrace. Seems to be an incompatibility caused by the latest updates.


unzipping a folder throws error: End-of-central-directory signature not found

Have you checked that the file on your system is at least the same size as on your friends'? This message is typical of truncated ZIP files.


Why is top breaking history-search-backward in bash?

It turns out that some misbehaving applications break the cursor mode. The symptoms are similar to when we accidentally cat a binary file to terminal.

The fix is to call reset. If Enter is also broken, then we can use Ctrl+J as also mentione here.

As to the original question of why top (or in my case some random script that uses escape characters for colorful output) breaks history-search-backward. When it is broken, you can run read and then hit the arrow keys. Usually it is \e[A but when broken it may become \eOA. So, one could map that to history-search-backward as well, but usually the terminal is not in a very usable state and reset fixes the issue.


How to edit GNOME Activities so it will only show the currently opened applications?

Quite certainly, this, in principle, could be implemented by a Gnome Shell extension. However, unless you can develop one for yourself, you have to look among existing extensions on the Gnome Shell Extensions website. The issue is that an extension may not anymore work on your version of Gnome Shell.
At least you will probably find a working extension that removes the Dash ("Dock"). A search for "Hide Dash" reveals several extensions. No Dash in Overview and Hide Dash (new) are two options that work on the latest Ubuntu LTS 20.04.
Hiding the Search box may be more difficult. An old extension, Disable Search, has not been updated.


Map button 2 middle mouse to button 1 left mouse

Well never mind. I found a better solution using xinput:
$ xinput list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech Wireless Mouse                   id=10   [slave  pointer  (2)]
⎜   ↳ MyMouse                                   id=11   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=13   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ Power Button                              id=9    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=12   [slave  keyboard (3)]
    ↳ MSI WMI hotkeys                           id=14   [slave  keyboard (3)]
    ↳ Logitech Wireless Mouse                   id=15   [slave  keyboard (3)]
    ↳ BSK30 (AVRCP)                             id=16   [slave  keyboard (3)]

then get the id mouse id e.g. 11 (happens to be a Magic Mouse) and map the buttons.
$ xinput set-button-map 11 1 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20


Why is /var/lib/mlocate.db almost 800 MB?

On one of my systems that acts as a backup server, mlocate.db hit 9GB.  The solution was to exclude the backup directories from locate, since I had no need to search them.

I did this by adding the backup directory to PRUNEPATHS in /etc/updatedb.conf.

Running sudo updatedb then reduced it to 1.6MB (and saves a huge amount of time indexing all of those files).


During installation of ubuntu 12.04, gets stuck on booting screen?, Also, unable to upgrade from ubuntu 10.10?

Odd problem.

(You say 10.10 is installed and you're installing 12.04; are you doing a clean install, upgrading or installing onto another disk?)

The file /etc/passwd- would be a backup of /etc/passwd. The only reason for the chmod to fail I can think of is if the file doesn't exist, maybe it doesn't exist on your system, but the installer assumes it does.

Do

$ ll /etc/passwd-

and if it doesn't exist, create it:

$ sudo cp /etc/passwd /etc/passwd-

and then try the install again, what happens now?


Forgot to unmount local drive's partition during live ubuntu shutdown; now unable to see them in windows 7

First, it's impossible to change a single partition from Master Boot Record (MBR) form to the GUID Partition Table (GPT) form. MBR and GPT are both partition table types that apply to the entire disk, so changing just one partition from MBR to GPT form is impossible. (There is a partial exception in the form of hybrid MBRs, but there's no evidence you have a hybrid MBR, and creating them requires specialized tools that mostly exist on Macs.) Furthermore, even if you had accidentally changed the entire disk from MBR to GPT, that would not affect the data inside any of the partitions. (At least, that change alone would not have such an effect. An accidental MBR-to-GPT conversion could have been done by a program that might also have altered the partitions' contents, though.) MBR and GPT both simply describe partition start and end points, as well as provide some additional metadata; filesystem data structures reside entirely within the partitions, and are not affected by partition table type codes.

My suspicion is that you mistyped your dd command. Perhaps you mixed up the if and of options, thus overwriting the contents of your F: partition instead of copying them to a file on the E: partition, as you intended. Typing sudo blkid /dev/sdx# (where /dev/sdx# is the identifier for the partition in question) might provide some clues about what's wrong. This command displays basic information on the filesystem used on the partition:

$ sudo blkid /dev/sdc3
/dev/sdc3: UUID="5028fa50-0079-4c40-b240-abfaf28693ea" TYPE="ext4"

This example shows an ext4 filesystem on /dev/sdc3. Details will differ for an NTFS volume, or even for another ext4 filesystem. Of course, it's also possible that blkid won't provide much useful information -- if my hypothesis is correct, then it might provide no output at all, if it can't identify a filesystem on the partition.

In a next-to-worst-case scenario, you might need to recover your data from a backup. Don't have a backup? Then you're into the worst-case scenario, in which your only hope is to use PhotoRec or something similar to recover your data on a file-by-file basis. This is likely to be tedious and the results are likely to be incomplete. If Windows was installed to the partition, you likely will never be able to boot that installation again, making a re-install necessary. (Do a re-install after you recover any personal files you can, though; re-installing will make file-level recovery even harder.)


I've resolved by changing the echo

echo -e $oldPassword\n$newPassword\n$newPassword | sudo cryptsetup luksAddKey $rootdevice


How to pause VLC playback when the headphones are disconnected?

Ok, so you will need to do a few things for this:

Detect when the headphones are unplugged;
After the event in (1), send a "pause" command to VLC;
Detect when the headphones are pluggd back in;
After the event in (3), send a "play" command to VLC;

For (1) and (3):
You can use what is shown here.
This answer contains a small procedure to find the difference between a plugged and unplugged jack, and a script that you can modify to conform to your case.

For (2) and (4):
You should use VLC's Dbus interface.
The relevant code should be this:

dbus-send --print-reply --session --dest=org.mpris.vlc /Player org.freedesktop.MediaPlayer.Pause

dbus-send --print-reply --session --dest=org.mpris.vlc /Player org.freedesktop.MediaPlayer.Play

For pause and play respectively.

Now, about the script. In your case, it should look something like this:

#!/bin/bash
# This scripts detecs unplugging headphones.

oldstatus="unrelated string"
while [ 1 ]; do
    # The following line has to be changed depending on the difference (use diff) in '/proc/asound/card0/code#0'
    status=$(grep -A 4 'Node 0x16' '/proc/asound/card0/codec#0' |  grep 'Amp-Out vals:  \[0x80 0x80\]')
    if [ "$status" != "$oldstatus" ]; then
        if [ -n "$status" ]; then
            echo "Plugged in"
             dbus-send --print-reply --session --dest=org.mpris.vlc /Player org.freedesktop.MediaPlayer.Play
            oldstatus="$status"
        else
            echo "Unplugged"
            dbus-send --print-reply --session --dest=org.mpris.vlc /Player org.freedesktop.MediaPlayer.Pause
            oldstatus="$status"
        fi
    fi
    # Now sleep for 250 milli-seconds as per @Serg's request (who learnt if from @Fabby)
    # sleep is timer-based so doesn't use *any* processor cycles while sleeping.
    sleep 0.25
done

Add this modified script to your startup applications, and you're set. I think it should do what you wanted to.

PS - Note that there are more efficient ways to do this, such as using inotify to detect event changes (and maybe even other approaches), but this one should get you started (and the others are above my skill level and experience). I suppose you can start with this "hackish" approach, and build up from here.


stop booting ubuntu 20.04 on a raspberry pi 4 from SSD after upgrade

All you need it to restore you old /boot and you are back to what you had before. That is how these machines boot with all the files contained in it, it is your entire boot configuration. They look for certain named files by the firmware to load into memory then continue on to the next needed... until finally it loads the kernel which line contains the partitionID or label to load the / and you are booted.
You can probably just edit the files on the new /boot to get it going again, the text files that controls the booting. On my Buster install they are /boot/firmware/cmdline.txt and /boot/firmware/config.txt. The first telling it the partition to load the second the kernel and intramfs.


Leaving the graphics issue aside, Ubuntu is, in my opinion, pretty heavy on a VM.

Lubuntu, however, is very light (LXDE in particular); I successfully ran 8 VMs of Lubuntu 15.10 simultaneously (each having 650 MB of RAM and Guest Addition) with minimal lag. You might want to try that.


Non-interactive area overlapping desktop on lubuntu

I think I've found a solution. The problem doesn't happen anymore (tested for 2 days so far).

I removed the openbox desktop environment

sudo apt-get purge openbox obconf obmenu

Also removed Cairo. I'm not sure which one solved the problem, but definitely not needing them anymore.

How to remove desktop environments?


Compose Key on Ubuntu GNOME 17.04 with GNOME Shell 3.24.1

As chaskes pointed out above, you can set the key in Tweak Tool > Typing. There is a fold-out menu named 'Position of Compose Key' which you can set to the key you want.

To activate the changes you may need to log out and log back in.


Distro question - Which (current) linux distro works well with older laptops

You can install Ubuntu then. These specs from your link about Dell Vostro are good enough for Ubuntu as their official page says:

A good "rule of thumb" is that machines that could run XP, Vista, Windows 7 or x86 OS X will almost always be a lot faster with Ubuntu even if they are lower-spec than described below.

So if it can run XP, it is good for Ubuntu.

A final recommendation can only be made after exact specs of that laptop will be known.


I am encountering the exact same issue in 11.10 (Quadro NVS 290 on Dell monitors).  I was able to make things a little bit more tolerable by using the driver version 173 instead of the recommended version.

This breaks nvidia-settings though, as it can't detect monitors correctly with the older driver.  I installed the new driver, configured TwinView, then reverted to the old driver.  The configuration kept working, and was a little speedier than compared to the defaults.


How to connect to Ubuntu Server using external IP

The easiest way would be to use any of the Dynamic DNS services available. This way, you could use a "static" URL when connecting using a SSH / SFTP client.

The most common way to use dynamic DNS on Ubuntu is using ddclient .

The community documentation has some information about how to configure ddclient.


In the terminal...

sudo debsums -s # check the MD5 sums of installed Debian packages

See man debsums for more information about this command.

Also, you can fsck your Ubuntu file system and check for errors...

boot to a Ubuntu Live DVD/USB
open a terminal window
type sudo fdisk -l
identify the /dev/XXXX device name for your "Linux Filesystem"
type sudo fsck -f /dev/XXXX # replacing XXXX with the number you found earlier
repeat the fsck command if there were errors
type reboot

Lastly, if you dual-boot with Windows, and you installed a Windows driver to be able to read/write to ext2/3/4 partitions, remove it ASAP, as it corrupts ext2/3/4 partitions.


How to create a hotspot in Ubuntu to connect an Android phone?

Instead of using Ubuntu's in-built hotspot program, I used this. It worked like a charm!

Anybody having the problem like me, see Connectify Hotspot alternatives for Linux.


Lynx stops downloading file b/c no space is left on device

Apparently the folder where Lynx would store temporarily the downloaded file was located on the main disk somewhere - which happens to be significantly smaller.

The solution is to set LYNX_TEMP_SPACE to a folder on a larger disk.

export LYNX_TEMP_SPACE=~/data/tmp


Simple GUI to display static text informations

Why not using QML and the Ubuntu SDK to build such screens? Here's a snippet of code that you could use to embed images, links and controls:

demo.qml

import QtQuick 2.0
import Ubuntu.Components 0.1

MainView {
    id: main
    width: units.gu(100)
    height: units.gu(75)

    Column {
        anchors.centerIn: parent
        spacing: units.gu(5)
        Text{
            text: "Hello"
        }

        Text{
            text: 'askubuntu'
            onLinkActivated: Qt.openUrlExternally(link)
        }

        Button {
            text: "button"
        }
    }
}

To run it, use qmlscene:

qmlscene ./demo.qml


I am unable to update ubuntu with software updater or in about computer

All I had to do was install synaptic

sudo apt-get install synaptic


Black screen for twenty seconds, then power off on Ubuntu 17.10 and now 18.04 every second time I turn on my laptop

"Calgary: Unable to locate Rio Grande table in EBDA - bailing!"

I did some research on this error and found that it's talking about IOMMU. Some BIOSes have the ability to turn in on/off. If yours doesn't, you can try to disable it by adding iommu=off to your boot option by hitting "e" at the grub menu. If that fixed the issue; then to add this persistently edit your GRUB_CMDLINE_LINUX_DEFAULT= setting in /etc/default/grub file. You will then need to update grub with: sudo update grub.


Steps to install Ubuntu 13.04 on a separated unallocated partition in dual boot with Windows 10

See a nice tutorial at http://www.everydaylinuxuser.com/2015/11/how-to-install-ubuntu-linux-alongside.html. Be sure that you understand what you will be doing before doing it.

Essentially,

Make a bootable USB flash drive containing Ubuntu.
Shut down Windows, for real. Windows 10 does not normally shut down for real in order to fool the users into thinking that it boots very quickly; use Google to find out how to shut down Windows for real.
Boot from the flash drive prepared in step 1.
Install Ubuntu in the free space available on the hard disk.

By the way, there is no such thing as an unallocated partition. Disk space is either in a partition or unallocated.

Ubuntu 13.04 is very very old. The current Long Term Support version is 16.04. Unless you have a very specific reason to use 13.04 you should be installing 16.04.


How to set up environmental variable in Ubuntu?

set environment variables as follows

Edit the system Path file /etc/profile

sudo gedit /etc/profile

Add following lines in end

JAVA_HOME=/usr/lib/jvm/jdk1.7.0
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export JRE_HOME
export PATH

for reference http://javaandme.com


Turn off international characters when I use Alt-Shift-[Character]

The AltGr (RightAlt) is a keyboard layout functionality. For example, if you use the default Great Britain keyboard layout, you (are forced to) get the AltGr functionality.

The proper solution is to change the variant of the keyboard layout. Thus, if you do use the Great Britain layout, change to some other variant for Great Britain.

Looking into /usr/share/X11/xkb/symbols/gb I see that there are no alternative for layouts that do not use the AltGr key.
So, for this example you would need to

gksudo gedit /usr/share/X11/xkb/symbols/gb

and then make this change (erase a line):

@@ -26,7 +26,6 @@
     key <BKSL> { [numbersign, asciitilde,   dead_grave,   dead_breve ] };
     key <LSGT> { [ backslash,        bar,          bar,    brokenbar ] };

-    include "level3(ralt_switch_multikey)"
 };

 partial alphanumeric_keys

(find this segment in the file, then remove the line that starts with the -.
Then, logout and log in again. The change we did here simply mutilated the default Great Britain layout so that these extended characters are not accessible anymore.


Update 12.04 (precise) to Java 7 (OpenJDK)

The Ubuntu 12.04 repositories contain both version 6 and 7 of the JDK, but by default only version 6 is installed.

To update, it is best to use the Synaptic package manager – if you don’t have it, install it with
sudo apt-get install synaptic.

Note: Ensure that Java 7 packages are selected before deselecting any Java 6 packages – else Synaptic will deselect anything that depends on Java (including any Java applications)!
Search for icedtea and select icedtea-7-plugin for installation. This may select some Java 7 dependencies.
Now search for openjdk and deselect openjdk-6 as well as openjdk-6-jre. This may deselect some further packages.
If you had openjdk-6-jdk installed, make sure it is now selected for removal and openjdk-7-jdk is selected for installation. (You can skip this step if openjdk-6-jdk is not selected, meaning it was never installed.)
Click Apply and review your package selections:

default-jre packages are metapackages which are safe to remove in this process.
icedtea-7-jre-cacao is a dummy package, therefore it it OK to remove icaedtea-6-cacao without installing a replacement.
For any other Java/IcedTea 6 package that is removed, you should be installing the Java 7 equivalent.
Packets to be selected for removal should include the following:

default-jre
default-jre-headless
icedtea-6-jre-cacao
icedtea-6-jre-jamvm
openjdk-6-jre
openjdk-6-jre-headless
openjdk-6-jre-lib

Instead, the following should be installed:

icedtea-7-jre-jamvm
icedtea-7-plugin
openjdk-7-jre
openjdk-7-headless
openjdk-7-lib

If any packages are missing, go back and select them manually. When everything is OK, install.

From a console, run java -version. If you have JDK installed, also run javac -version. Both should now report version 1.7.0.


Long boot time after dual-boot (now removed) with Debian

Found out the problem.

As the boot time was too long, I wanted to check what was going on behind the scenes. Therefore, I changed the following line in the file /etc/default/grub from:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to

GRUB_CMDLINE_LINUX_DEFAULT=

On the next reboot, found out that the boot process got stuck at:

  [*    ] A start job is running at... dev ... disk...

So, after reboot, I opened the /etc/fstab file and also ran the command sudo blkid. Turns out that during the installation of Debian my swap partition got formatted and thus, its UUID was changed too.

I changed the UUID value in /etc/fstab to the current value obtained from sudo blkid and now my system boots up fine.


How to disable horizontal mouse wheel scrolling when mouse is over horizontal scrollbar

May be, using 'xinput' and disable that action buttons.

xinput list -> list devices ID
xinput test <ID> ->  monitor actions
If you see, that scroll action use mouse buttons 6 and 7.
Disable that buttons.

xinput set-button-map <ID> 1 2 3 4 5 0 0

Better solution will be, disable that that scroll action in GUI system, but I don't know that solution. Probably it depend also on specific window manager.


Grub rescue in new installation invalid arch-dependent ELF magic

UPDATE:

The solution finally came by using boot repair as suggested by other threads. The recommended changes work well for me, now I have another smaller issues, but I going to start another question, because it seems to me that it is an unrelated problem. Thanks everyone for your help.


Intel Wireless 3165 doesn't work ( Kernel 4.4!)

There are actually quite a few vostros, both desktop and laptop, that are certified pre-installs for 14.04 LTS, and at least two (maybe more) of those with the Intel wireless 3165 adapter.  Do you have a vostro 24-5460 desktop?  If so, the cert. notes indicate that "This system requires all available updates to be applied in order to work properly." http://www.ubuntu.com/certification/hardware/201602-41486/
You may want to start there.  I'm just a newb, others might be able to give you more info about the updating process, or you may be able to research this.  It could be that " $ sudo apt-get update " would be sufficient to fix your problems.  Hope this works out!


It's a configuration error in UTT.
You need to update some configuration files to use:

org.gnome.desktop.peripherals.touchpad

instead of

org.gnome.settings-daemon.peripherals.touchpad

Just open terminal and type:

sudo -H gedit /usr/lib/python3/site-packages/UnityTweakTool/section/system.py

Then change the following lines so they look like:

Line 182: 'schema' : 'org.gnome.desktop.peripherals.touchpad',
Line 193: 'schema' : 'org.gnome.desktop.peripherals.touchpad',
Line 205: 'schema' : 'org.gnome.desktop.peripherals.touchpad',

Save changes, close gedit and, again in terminal:

sudo -H gedit /usr/lib/python3/site-packages/UnityTweakTool/section/spaghetti/gsettings.py

Change the following line to:

Line 114 (in 15.10 its line 120): touch = gnome('desktop.peripherals.touchpad')

Save and exit.
UnityTweakTool should now start without problems.

Note:

If you can't find /usr/lib/python3/site-packages/, then you should have /usr/lib/python3/dist-packages/ instead.


List of files modified between perticular time period

Your syntax is slightly off. Let's redo this with meaningful variable names; we'll understand better what's happening as we go along.

export newerthan="2012-10-04 00:05:00"
export olderthan="2012-10-05 16:30:00"
find . -newermt "$newerthan" ! -newermt "$olderthan"

This will first find files and directories modified after October 4th, 2012, at 12:05 AM. Then, it will remove results that were modified after October 5th, 2012, at 4:30 PM.

To get results without the leading ./ on every line, use this command:

find . -newermt "$newerthan" ! -newermt "$olderthan" | sed 's/^.\///g'


How to install Django-1.11 in virtualenv?

Maybe you have both python version installed. Python 2.* and Python 3.*

Try

sudo pip3 install Django

or

sudo -H pip3 install Django


What are the dangers of sourcing ~/.profile from ~/.bashrc?

Without knowing your .bashrc and your .profile, we can't say. For example, the default .profile on Ubuntu sources .bashrc. Now if you source .profile from .bashrc, you get an infinite loop:

$ bash
zsh: segmentation fault (core dumped)  bash

(I use zsh, that's why zsh reports the segfault.)

You could place guards that ensure these files get sourced at most once, but who knows what else may interact weirdly?

For your environment variables problem, it depends on how you're starting this interactive non-login shell. Try .pam_environment instead.


Automatically select Try Ubuntu with Live USB

Looks like sudo apt remove --purge ubiquity works


Wireless Network Found, can't connect, repeated requests for authentication

Click the NM applet on the panel. Then select "Edit Connections...". In the Wireless tab of the dialog, select and delete the connections in question (or all of them). Save and close the dialog. Click the NM applet on the panel again and select the wifi name that previously not be able to connect. If you can't see the name that you want, try finding it in "More networks". Hope this can help. (Writen on 20130222)
(Editted on 20130226) It was a shame that I did not check the connection thoroughly. The connection type was ad-hoc (which was not infrastructure type) so it did not work the way it usually did. Sorry. (Writen on 20130226)Since I have BCM43228, I followed NikTh's suggession in http://ubuntuforums.org/showthread.php?t=2084508&highlight=BCM43228 and got connected. However, I did not know what really caused the problem and when because I was working in a not stable environment. The AP worked on and off and the computer got new update continually. That was why I could not reallized when the connection changed from working fine to not working. (Writen on 20130226 + about 2 hrs after the first edition)
I have to say sorry again for the problem has come back after I disabled wireless connection and used wired connection for printing jobs. I have to do more research or go back to Lucid. Sorry for not a good answer. (Writen on 20130226 + about 5 hrs after the first edition)After a short research I found and followed http://pkgs.org/ubuntu-12.04/ubuntu-multiverse-i386/broadcom-sta-common_5.100.82.112-4_all.deb/download/. After restarting and did an off and on on a Enable Wireless it connected. This gave me a bit better feeling even though the connection was set to connect automatically. I also found that I got different IP every time I managed to connect. The university dhcp server remembers a served IP and always serves the same IP if the computer reconnects within 5 days. I meant I was not sure this would solve the problem instantly. (Hope this is the last edition) The time I posted these messages was about 24 hours after the (hopefully) last edition. The connection was made in the condition that (1) the computer was shutdown previously with wireless disabled status and (2) no LAN cable was connected to the computer when starting up. What I did was enabling the wireless via NM's menu and got connected. This might not be a good answer but it could be a work-around.This post was done 16 hours later (20130228:0230 UTC). Now what I said to be a work-around could be promoted to be an answer. The computer must not be connected with a LAN cable. The status of wireless connectivity when previously shutdown was not a matter. What really to be done when started up was enabling the wireless network. If the wireless was enabled you might see the NM applet blinks endlessly. In such a situation, just disable it and enable it back again and you'll be fine.


External monitor connected at boot in 14,04

ARandR is your friend,

  ARandR is a visual front end for XRandR 1.2/1.3 (per display options),
  which provides full controll over positioning, saving and loading
  to/from shell scripts and easy integration with other applications.

sudo apt-get install arandr

or get it from Ubuntu Apps


google.com requesting password?! Is my router / firefox / computer infected?

Check the proxy settings on Firefox.

To do so in Firefox, go to Edit → Preferences → Advanced → Network, and click Settings... under Connection. If you aren't using a proxy, set it to No proxy, or enter in your correct proxy settings if you're using one.


Delete libvirt qemu account from login screen

I've just done it by doing the following procedure:

Click on the right top corner of the Ubuntu screen
Choose System Settings
Click User Accounts
Select Qemu Account
Confirm deleting everything


You need to remove the exit 0 at the end of the script, otherwise it will quit everytime it is run.

You can check out cat /etc/init.d/skeleton for an exemple of a working init.d script. (Probably overkill for what you want to do, but it can help with a few things).


No such option of selecting ubuntu after installing windows directly starting windows 8

I just had the exact same problem and resolved it using this guide:

https://askubuntu.com/a/88432/627767

Notes:

When he says main partition, he means your Ubuntu partition
You should follow step 8, even though it's said it's optional.
When using grub-install, notice that there's no number in
/dev/sda
If you don't understand this sda1, sda2, sdb, notation, read up on
it. It's very simple and helpful.

After this, GRUB will automatically detect both Windows and Ubuntu and you will be able to boot into either one next time you restart.


The printing part worked for me, i'm yet to try the scanning. It appears that you have to download the proprietary driver, a ".deb" file, directly from brother.
Brother MFC-L2700DW printer does not work


Let me first tell you that now Ubuntu does not use GDM as its display manager in version 12.04...It uses lightdm as its display manager...

So the screen you want is actually lightdm.

So you will have to install lightdm as follows.

Enter these commands in the terminal:

sudo apt-get install lightdm

Install lightdm

After installing lightdm enter the following commands to set lightdm as the default display manager:

sudo dpkg-reconfigure lightdm

Then you will get the following screen:

hit enter and then you will get this screen:

Navigate your option to lightdm and hit enter.

Now Restart.

you'll get your screen :)


Bluetooth installing and loading at install. I dont have Bluetooth?

You do not have to remove Bluetooth, you can simply disable it while loading system.

Disable bluetooth

sudo gedit /etc/rc.local

then add rfkill block bluetooth line before exit 0.


Does man have a directory? And is it updated ever?

Yes, man has a directory. Whenever apt updates or installs a package, it will also add the new or updated versions of the manuals to the manpages directory.

As such, there are very few cases where a manpage will update outside of apt triggering that update as part of an automatic install.


What is the correct way to change permissions of the printer in /dev/usb/lp0?

You don't fiddle with /dev/usb/lp0 - it is dynamically recreated on every startup or plugin.

Maybe you should, per sudo, add yourself to the group lpadmin.

I guess you're using CUPS for printing.

Open the webinterface

  http://localhost:631/admin

Since my userinterface of CUPS is localized for german users, I freely translate german expressions (back) to english. This might not produce exact fits.

Choose in the top-left group printer entry 3: printer administration. In the table queue name on the following page choose the printer (blue link).
Next page: Choose maintainance specify allowed users.

The next step should be clear by itself.


Page Not Found error: when browsing askubuntu.com with Opera VPN

This problem is common to accessing all Stack Exchange sites with Opera VPN, but it does not affect the https version of the URL, it only affects the http version. It should be possible to access the page you linked to in your question by replacing http with https in the URL.

From the accepted answer to Problems with accessing SE sites with Opera VPN at Meta Stack Exchange:

  Our sites work well on most VPN solutions.

  We can't fix a broken VPN solution.

  What you are describing is the VPN completely blocking access to our
  site - there is nothing we can do to change it.

  I suggest reporting this to Opera so they can fix the issue.


Can't boot, stuck on grub rescue with no modules?

likely some of your files are corrupted during the installation (for me it was root.disk corruption). This is likely to happen if manually reboot during update/install, or other sorts of reason. Another possibility is your CD is damaged.

If you don't have other os installed, I think the only option is to burn another ubuntu install CD(using a working PC, apparently) and boot from it.

Joseph


2-disk RAID array missing one disk. fdisk sees them both. Missing disk is "non-fresh". What to do?

Providing this answer in the proper format rather than just a link from a comment.

"This can happen after an unclean shutdown (like a power fail). Usually removing and re-adding the problem devices will correct the situation."

Refer to your specific drive configuration and mdadm version specific documentation for how to do this.

Another alternative is using the Gnome Disks utility. Select 'Raid Disks' (Ctrl+R) and then select + and then your missing raid drive. After confirming that all data will be wiped from the drive being added, the newly re-added drive should go to 'Recovering'. Closing the dialog will take you back to the main Disks screen. It should show a progress bar with Recovering: x.x% and the estimated time to complete the syncing.


Uninstall Unity, rewind to old UNR interface, keeping 10.10?

You can install the ubuntu-netbook-efl and ubuntu-netbook-efl-default-settings packages (using apt-get or the Software Center) to get one of the 2 versions of the old netbook interface (the one that doesn't require 3D support).


Nokia 5800 is not recognized in Win7 virtual box

SOLVED: I actually installed the version of the virtual box from the Software Centre....while the version from the virtualbox.org site is needed for USB support (make sure there you choose linux and the appropriate kernel architecture (here is the link to the download site: https://www.virtualbox.org/wiki/Linux_Downloads).

I also had to follow the steps recommended by @Achu here (to add myself to the virtualbox users group): askubuntu.com/questions/25596/set-up-usb-for-virtualbox

This should do the magic and help you set up your virtual box with working USB connections.
Good luck.


Does the old version of apt information file exist on the website?

The record of each published version of all packages are maintained on Launchpad, along with dependency information. The URLs are of the form:

https://launchpad.net/ubuntu/<release>/<arch>/<package>/<version>

For example:

Python 3 apt API v1.7.0 for Ubuntu 18.10: https://launchpad.net/ubuntu/cosmic/amd64/python-apt/1.7.0
libc6-dev 2.28-0ubuntu1 for Ubuntu 19.04: https://launchpad.net/ubuntu/disco/amd64/libc6-dev/2.28-0ubuntu1

You can go to https://launchpad.net/ubuntu/<release>/+package/<package> for a list of versions (e.g., https://launchpad.net/ubuntu/xenial/+package/bash-doc for Bash documentation in 16.04).


shell scripting works with 'bash' but not with 'sh'

Array is not supported in bourne shell (sh). For more information about this check this question on stack overflow. For more information about array in bash check following links

TLDP
GNU


When you click on the speaker icon, it shows you the action and not status. So pressing Mute will mute your audio while Unmute will do the opposite.

Status is shown by icon itself. So if your icon is something like , then it means that your sound is muted and then you must see an Unmute option.


WSL2 not working within Windows 10 VM in VirtualBox on Ubuntu 18.04.5 LTS

After 3 work days of messing with this, the only solution I have found:
use VMWare Workstation 16.  I downloaded the Windows 10 VMware VM from Microsoft, verified the Ubuntu distribution was using WSL2 with 'wsl -l -v', then launched the Ubuntu distribution successfully on first try.
I duplicated the exact Virtualbox error posted with the following:
Host: P53;
BIOS: Virtualization is enabled;
OS: Ubuntu 20.04 LTS;
Hypervisor: Oracle VirtualBox 6.1.16_Ubuntu r140961 (Qt5 12.8);
VM: Windows 10, version 2004 (10.0.19041.0);
VM Settings Enabled: System->Processor-> Enable Nested VT-x/AMD-V
(same results if you also Enable PAE/NX);
Windows Settings -> Optional Features -> More;
Windows Features Checked:
Virtual Machine Platform;
Windows Subsystem for Linux
I also duplicate a similar issue when using VM: VirtualBox VM downloaded here: https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/
I kept all of the VM settings Microsoft defaulted for their WSL2 Ubunutu dist to run.  When I open the Ubuntu dist I get an error saying I need to enable "Virtual Machine Platform" and or enable virtualization in bios.  Clearly these were enabled.
I tried uninstalling and reinstalling multiple times.
I have concluded the virtualization feature needed for HyperV virtualizaiton to work in a VM, which is leveraged by WSL2, does not work on Virtualbox version 6.1 on Ubuntu 20.04, despite any claims VirtualBox has made about the feature listed on version 6.1.
Please see here: https://forums.virtualbox.org/viewtopic.php?f=6&t=98448
"Microsoft makes its OS's a moving target now, so the devs have to catch up."
If the Virtualbox 6.1 virtualization feature ever worked when installed on Ubuntu, it doesn't now.
A final note, I needed this solution to work for the same reason as the poster.  I am testing a powershell script I am writing that will install all of the needed software to run our local development environment.  The local env includes an installation of minikube which uses the default docker driver, which on Windows is experimental but works with the workaround posted in the minikube documentation (I wish my teammates would use Ubuntu like I do).
When testing the install script, its much easier to snap and restore between test runs on a VM then it is to on bare-metal.


How to list all existing keyboard shortcuts in Cinnamon?

You can use dconf-editor to view the keyboard bindings. Look under /org/cinnamon/desktop/keybindings. You will see subdirectories (wm and media-keys) that contain all of the configured (and unconfigured) keyboard mappings.


Error while installing Easy-RSA as part of installing OpenVPN

> This is how I solve the problem ... bob@ns1:~$ sudo chown bob:bob
> /etc/openvpn/easy-rsa/ bob@ns1:~$ cd /etc/openvpn/easy-rsa/
> bob@ns1:/etc/openvpn/easy-rsa$ ls -la bob@ns1:/etc/openvpn/easy-rsa$
> source vars NOTE: If you run ./clean-all, I will be doing a rm -rf on
> /etc/openvpn/easy-rsa/
> keys bob@ns1:/etc/openvpn/easy-rsa$ ./clean-all
> bob@ns1:/etc/openvpn/easy-rsa$ ./build-ca Generating a 2048 bit RSA
> private key


Change setting of Dash To Dock using terminal

To get the current value, run

gsettings get org.gnome.shell.extensions.dash-to-dock extend-height

To change it, run

gsettings set org.gnome.shell.extensions.dash-to-dock extend-height <OPTION>

or

dconf write /org/gnome/shell/extensions/dash-to-dock/extend-height <OPTION>

In place of <OPTION> you can have true for panel mode and false for dock mode.


How to safely remove Windows from EFI (and GRUB)

Windows Boot Manager bootmgr, manages the boot process. UEFI-based systems contain a firmware boot manager, Bootmgfw.efi.

The BCD settings for the device and path elements in Windows Boot Manager indicate the firmware boot manager.

The path element specifies the location of the Windows Boot Manager application on that volume.

For UEFI systems, path indicates the firmware boot manager, whose path is \EFI\Microsoft\Boot\Bootmgfw.efi.

According to the information provided by you.

You should erase in the partition /dev/sda2@/

The file /EFI/Microsoft/Boot/bootmgfw.efi

Then run sudo update-grub


App that is rude to you if you mistype your password

There is a way to tell the sudo command to answer in a more "rude" way than usual. To change that, add the Defaults insults option into the file /etc/sudoers:

sudo visudo

add the line

Defaults insults

and save the file.

Entering a wrong password would then output something like:

sudo passwd root
[sudo] password for user: (entering wrong password)
Have a gorilla...

;) have fun...

P.S. The file containing the list of insults is in the source code of sudo plugins/sudoers/insults.h, which you then would have to recompile yourself.


Can't get my ntfs partitions UUID in 15.10

It looks like you don't have an UUID for your partitions on sdb, and that you use PARTUUID instead (which won't work).

You may either:

add an UUID and use it: gparted(8) can normally do it, or ntfslabel(8) with the --new-serial option
use PARTUUID= in fstab


Ubuntu 14.04 cannot open nvidia settings/switch between gpus, hybrid graphics

I have been able to find a solution (using the terminal to move between graphic cards, having a GeForce 840M and Ubuntu 14.04).

First of all, I had broken many things in the system, so I decided to reinstall Ubuntu 14.04 again (some things were not fixed after removing nvidia packages... so I decided to start from scratch). After having Ubuntu 14.04 completely new, I have added the following repository:

sudo add-apt-repository ppa:xorg-edgers/ppa

Then I did the classical apt-get update and apt-get upgrade, and after that, I installed only these 2 packages:

sudo apt-get install nvidia-common
sudo apt-get install nvidia-331

The driver for my 840M GPU should be the 337, but I read that probably 331 works in a better way.

So I rebooted and everything seemed to be right. Then, by running

prime-select query

I saw that it was using nvidia. And nvidia-settings opened correctly. Then I chose from the nvidia-settings to move to Intel. I logged out and when I came back, I was working with intel (check it with prime-select query).

And at this point, nvidia-settings stops working and is not able to open. But if I run in a terminal

sudo prime-select nvidia

and then I log out, the new session start under nvidia GPU and nvidia-settings is able to open again.

In conclusion, after doing that, now I move from one GPU to the other by typing

sudo prime-select nvidia

or

sudo prime-select intel

and logging out after it. And the nvidia-settings only opens when I'm working under the nvidia GPU.

I hope this will be useful for you... I've tried 331 drivers before, but it had't work. I think for me the important point was to reinstall Ubuntu and to install 331 drivers at the begining.

In addition, I have to say that the first time I move from the Intel to Nvidia, X crashed and asked me about reconfiguring it. I said ok, I rebooted and from that point now I move from intel to nvidia (using the terminal) without problems, but probably you won't have this X crash...

Good luck!


how to set screen shots for my deb file in ubuntu software center

As seen in the second step of the publish guide, you need to provide the screenshots and icons for your application:

Prepare your application icons and screenshots
You only need to upload a 64x64 pixel icon, but your app will be more likely to be seen and downloaded if you pay special attention to this step. Make sure you include a representative screenshot and the full range of icon sizes.

http://developer.ubuntu.com/publish/


That checkbox installs the metapackage ubuntu-restricted-extras which also includes the metapackage ubuntu-restricted-addons.  To see the full list of what this installs see the following pages:

https://packages.ubuntu.com/xenial/ubuntu-restricted-extras
https://packages.ubuntu.com/xenial/ubuntu-restricted-addons

Each of these can be uninstalled independently.

There is no sure-fire way to remove them all at once, if they were added at install time.  You could remove the multiverse and restricted repositories, and then remove all newly-obsolete packages - if you are sure you don't need anything else in those repositories.


Try installing this one instead.  Once downloaded, go to the download location and run:

sudo dpkg -i ttf-mscorefonts-installer_3.6_all.deb

Link below as well.

http://ftp.de.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.6_all.deb

Hope this helps!


Screen Share From Ubuntu Desktop To Mobile Device

You could always try something as simple as installing team viewer on both the client and the host.  And then you could start a session on your mobile device into your host device.


By default Ubuntu does not set up a root password and therefore you don't get the ability to log in as root.  Instead you are given the ability to perform tasks with superuser privileges using sudo.

I've answered a similar question before.

While you can create a password for the root account allowing you to log in as root with su, this isn't the typical "Ubuntu" way of doing things.

Sudo is an alternative to giving people a root password in order to perform superuser duties.  In a default Ubuntu install the person who installed the OS is given "sudo" permission by default.

Anybody with "sudo" permission may perform something "as a superuser" by pre-pending sudo to their command.  For instance, to run apt-get dist-upgrade as a superuser, you could use:

sudo apt-get dist-upgrade

You will see this usage of sudo pretty much anywhere you read a tutorial about Ubuntu on the web.  It's an alternative to doing this.

su
apt-get dist-upgrade
exit

With sudo, you choose in advance which users have sudo access. There is no need for them to remember a root password, as they use their own password.  If you have multiple users, you can revoke one's superuser access just by removing their sudo permission, without needing to change the root password and notify everyone of a new password.  You can even choose which commands a user is allowed to perform using sudo and which commands are forbidden for that user.  And lastly, if there is a security breach it can in some cases leave a better audit trail showing which user account was compromised.

Sudo makes it easier to perform a single command with superuser privileges.  With su, you permanently drop to a superuser shell which must be exited using exit or logout.  This can lead to people staying in the superuser shell for longer than necessary just because it's more convenient than logging out and in again later.

With sudo, you still have the option of opening a permanent (interactive) superuser shell with the command:

sudo su

... and this can still be done without any root password, because sudo gives superuser privileges to the su command.

And similarly, instead of su - for a login shell you can use sudo su - or even sudo -i.

However when doing so you just need to be aware that you are acting as a superuser for every command.  It's a good security principle not to stay as a superuser for longer than necessary, just to lessen the possibility of accidentally causing some damage to the system (without it, you can only damage files your user owns).

Just to clarify, you can, if you choose, give the root user a password allowing logins as root, if you specifically want to do things this way instead.  I just wanted to let you know about the Ubuntu convention of preferring sudo instead and let you know that there is an alternative.


MAAS 2.1 on 16.10 cannot deploy a trusty machine (disks missing)

Are you deploying to physical hardware? If so it seems like the Trusty kernel does not have the drivers to access your disks. Try deploying Trusty with hwe-x to get the Xenial kernel. That should allow Trusty to access the disks on your machine.

The best way to do this since this hardware needs at least hwe-x no matter what you deploy. I would set your minimum hardware kernel to "ga-16.04".


Problem with screen when changing users - nvidia GTX 645

I was using nvidia-current and for some reason this did not give me the latest driver version, so I picked the last one available (359) and it worked well.


exaile 3.4.5 shows file=sys.stderr error on ubuntu 16.04

As answered in Getting a syntax error when I type pthon on Ubuntu 18.04, the issue is likely due to one application (exaile here) expecting python 2, and you having python 3 as the default.

In particular, check sys.path. It likely points to python 3.5, i.e., it includes /usr/lib/python3.5/site.py.
As per official documentation, sys.path is a list built from PYTHONPATH and other installation-dependent paths.

As a quick check, find if you have any python 2 in your system ($ python2 --version).
If so, find where is the corresponding site.py located, most likely /usr/lib/python2.7/site.py.
Then,

$ export PYTHONPATH=/usr/lib/python2.7/site.py
$ exaile

If this works, then for a definitive setup you would have to find a way to change your sys.path when executing exaile.

There are quite a few options, depending if you launch it via command line or a launcher. For instance, you could write a script that exports with export PYTHONPATH="/usr/lib/python2.7/site.py:${PATH}" and then executes whatever you need. That can also be the target of your launcher.

PS: Note also the best way to add to PYTHONPATH


Isn't this problem similar to that one: https://stackoverflow.com/questions/26701992/exception-occurs-when-running-scala-test-from-eclipse ?
Error is totally the same.

The solution from there:
"Check your classpath; in particular check that the version of scalatest you're depending on is compiled for scala 2.11, not 2.10." - by lmm.


It looks like you were setting your PATH using

export PATH=$PATH:/home/ofirarzi/anaconda3/bin

Unfortunately, this means that /usr/bin/python3 comes first before //home/ofirarzi/anaconda3/bin/python3, so your system Python 3 gets called instead of Anaconda's Python 3 when you run python3 in the terminal. To fix this, you just need to reverse the order of the components of PATH, i.e., in your ~/.profile, do

export PATH=/home/ofirarzi/anaconda3/bin:$PATH

Then do source ~/.profile and try python3 again. For the new PATH to take effect in the terminal in the future without manually sourcing ~/.profile every time, you have to log out and then log in again or reboot.

Note that the way I have exported PATH is also described by Anaconda's documentation at https://docs.continuum.io/anaconda/install#linux-install.


Is it possible to "cast" desktop/workspaces to another Ubuntu machine over local wifi network?

Ubuntu has a built in Remote Desktop application that can be used to control PCs over your local network. Simply allow your computer to be controlled (allow other users to view your desktop), set a password (optional), and select the correct protocol:

VNC for Ubuntu-to-Ubuntu
RDP for Ubuntu-Windows

Simply open up Remote Desktop on your second computer, type in the specified IP (ex: 192.128.1.1), and you should be good to go.

If you wish to control your desktop from another network other than your own, programs such as Teamviewer make it really easy.


This kernel does not support a non-PAE CPU

I had this problem with my early Pentium-m CPU which does not report PAE in the flags portion of /proc/cpuinfo.

As with the initial install (in my case 16.04), you have to add the "forcepae" kernel option when booting.

The best way to do this is to add it to: /etc/grub.d/10_linux

search for this line:  args="$4"

change to:  args="$4 forcepae"

save then execute:  update-grub

After reboot, you will now have "pae" in the flags portion of /proc/cpuinfo and the update will work.  It will also be persistent for future updates.

This assumes you have a real PAE CPU like the early Pentium-m that doesn't report its PAE capability.  Pretty much any x86 CPU since 1995 supports PAE, so this is 99.99% likely your problem.


Published wget command line to fetch a PGP key for a repository doesn't work in 18.04

You've mis-entered the arguments - that's a capital O not a zero.

The command you want to run is this one:

wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -

... whereas the one you entered is most likely this one:

wget -q0 - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -


Customize the command shell default prompt

I took help from How to: Change / Setup bash custom prompt (PS1)

I did first sudo gedit /etc/bashrc. Then did below change :

# set a fancy prompt (non-color, overwrite the one in /etc/profile)
# PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
PS1='(arup~>\W)$'

Now my prompt is coming close to my expectation -


Disable printing extraneous job info when I print a images

Had this problem too, specifically with the PDF printing... With the latest HPLIP from http://hplipopensource.com/hplip-web/downloads.html and from the Evince: File --> Print --> "Job" tab --> for 'Add Cover Page' --> set 'Before:' to 'None' and 'After:' to 'None'. For some reason mine was set to print 'Secret' under the drop-down arrow choices. Despite all the tips on disabling that "Banner Page" option, the latter one wasn't affecting "print job" 'garbage' output. Hopefully, it will help someone. Cheers!


Ubuntu on ARM Tegra Chromebook (Acer CB5-311)

1) Please check your BIOS to make sure the SD card is listed as a boot device; if not, enable it for booting.

2) Follow the Ubuntu instructions at https://help.ubuntu.com/community/BootFromSD


Kubuntu 18.10 Nvidia GTX 1050 OpenCL compatibility

So I solved the problem by following this tutorial: https://hashcat.net/faq/wrongdriver  But not using apt install to install the nvidia drive but downloading them for the site. You also need to kill Xorg before installing the driver


Here are two utilities you should run one after the other.

The first evaluates for the private key you already used to authenticate into the server.

The second loads this key to the memory.

This way you could login anytime and anywhere in the current session, if the public key has been added to .ssh/authorized_keys*:

eval $(ssh-agent)
ssh-add

How it works:

ssh-agent is the authentication agent itself, whereas ssh-add is used to add your private keys to this agent.

You execute ssh-agent as an evaluation for your private key and then use the ssh-add command to actually add your private keys to this agent, for prolonged usage.


Create unity shortcuts to WINE applications 12.04

You can use alacarte to solve this problem:
Open a terminal by pressing Ctrl+Alt+T and type:

sudo apt-get install alacarte

Start alacarte.
Go to wine - programs - ... (where your wine program is located).
Move the program icon to another folder (outside of wine; e.g., office).
Close alacarte.


To downgrade a package go to Synaptic Package Manager. Find which package you want to downgrade. Select it. Then in the menu, go to Package -> Force Version...

Then you would be able to select which version.

You can also do it in cli, for example:

sudo apt-cache showpkg gstreamer0.10-pulseaudio

It will show the depencies and after Provides will show the versions:
0.10.21-1ubuntu3 - gstreamer0.10-audiosource gstreamer0.10-audiosink
0.10.21-1ubuntu2 - gstreamer0.10-audiosource gstreamer0.10-audiosink

Then you can downgrade:
sudo apt-get install gstreamer0.10-pulseaudio=0.10.21-1ubuntu2


To find out what space is occupied by some directories, run the next commands in terminal:

$ sudo du -h --max-depth=1 /
$ sudo du -h --max-depth=1 /media/<username>/3A8EAA898EAA3CEF/
$ sudo du -h --max-depth=1 /media/<username>/Backup/

Then add folder with biggest size to the end of the command:

$ sudo du -h --max-depth=1 /home/

and so on.


"Swap not available" - I must manually "swapon" after every reboot

You have no configuration for swap in /etc/fstab. Add following line to that file:

UUID=<uuid> none   swap    sw    0       0

You have to replace <uuid> with the uuid of your swap partition. To do that, run sudo blkid

$ sudo blkid
/dev/sda1: LABEL="System Reserved" UUID="88A0D0A1A0D09752" TYPE="ntfs"
/dev/sda2: UUID="0620D9F920D9EFA3" TYPE="ntfs"
/dev/sda5: UUID="c282b418-2045-4852-8789-88a44360a0bb" TYPE="ext4"
/dev/sda6: UUID="f99c6a0c-790a-45ca-a1a9-8874f5a2999b" TYPE="ext4"
/dev/sda7: UUID="4cc2e909-ebd1-4c72-abee-aa32035bf330" TYPE="swap"

This is a list of my partitions, and as you see, /dev/sda7 is my swap partition. So you can copy the value of UUID corresponding to your swap, omitting the quotes, and use it for your fstab file.


That Windows disk in the Mac Mini boot menu is your Ubuntu image on that flash drive. For some reason, Macs recognizes non-Apple external bootable drives as Windows.

Yes, if you installed Ubuntu in an ext4 drive format, then you will need to mount that drive in another Linux OS. Both Windows and Macs do not recognize files in a drive with ext4 format.

You can also try a service like Drive Savers who are the world specialists in data recovery.


Bluetooth not installed properly - Xubuntu 14.04

First some good news... There seems to be a simple workaround to restore the highquality A2DP interworking to your Bluetooth headset.

1) Use Blueman to pair to the headset. My experience was that it will pair and even connect as headset with the horrible audio
     quality "Telephony Duplex (HSP/HFP)" audio profile.

2) The Ubuntu Sound Control panel wont however show the Bluetooth device yet!

3) Open a command terminal and issue the command: pulseaudio -k

4) After a short delay you should see the Headset appear in the listed audio devices of the Ubuntu Sound Control Panel

5) Select the device and connect some audio source (VLC Media or your favourite player)... The quality will still be poor...

6) Now use Blueman GUI, select the device and press mouse right click and then select the "Refresh Services".
     It should show a succes message in the lower status bar.

7) Right click on the headset device in Blueman GUI and select Audio Sink. If it displays a success message your in luck.

8) Now right click the headset device in Blueman GUI and select Audio Profile menu and then select "High Fidelity Playback (A2DP)". It should suceed and switch into the correct mode.

==> You will always have to issue the "pulseaudio -k" command from terminal before using the headset, but it's a tolerable
        work around.

Hope this works for you too.


Unable to mount Audio Disk: Message recipient disconnected from messages bus without replying

If we look at /dev/cdrom, we see (on MY system, YMMV):

walt@bat:~(0)$ ls -l /dev/cdrom
lrwxrwxrwx 1 root root 3 Jul  9 10:06 /dev/cdrom -> sr0
walt@bat:~(0)$ ls -l /dev/cdrom /dev/sr0
lrwxrwxrwx  1 root root      3 Jul  9 10:06 /dev/cdrom -> sr0
brw-rw----+ 1 root cdrom 11, 0 Jul  9 10:06 /dev/sr0
walt@bat:~(0)$

that /dev/cdrom is a soft link to /dev/sr0, and that /dev/sr0 is owned by root:cdrom. /dev/sr0 is a block device, and allows rw (Read/Write) access to the owner (root) and members of the cdrom group. /dev/sr0 denies access to users who are neither root nor in the cdrom group.

Use id to see if you are in the cdrom group. If not, read man adduser, and do:

sudo adduser $USER cdrom

Then, the next time you login, all of your processes will have cdrom group membership, and rw access to /dev/cdrom -> /dev/sr0.


You need to use the -e "enable interpretation of backslash escapes" option with the \n to force newlines

echo -e "lollipop\nlollipo\nlollip\nlolli\nloll\nlol\nlo\nl"


Ubuntu One file sync error: SSL Handshake

There is a bug report about this, which is marked as invalid. Apparently it's a momentary issue (either with your network connection or with Canonical servers).


is it possible to install Ubuntu / iso via a local hard disk with no OS?

Then its simple! You need to get a micro SD / SD Card , and put the iso on your SD card just like a normal USB HDD!

You can use pendrivelinux.com or normal terminal dd if="" of="" bs="512k" cmd but its very sensitive command so better to use something like pendrivelinux or unetbootin!

Then go to Boot menu and normally your device be listed else use USB HDD one!


How can I install a 32bit python on 64 bit Ubuntu

To run 32 bit applications on a 64 bit Ubuntu system, you will need ia32-libs.
From a terminal, validate if you have this using

dpkg -l ia32-libs

If you've installed it, the output should looks like:

ii   ia32-libs ...

If it looks like un  ia32-libs, you need to install it using:

sudo apt-get install ia32-libs


Having problems running Atom text editor on Debian Linux 9.0 and Lubuntu 17.04

After doing more research, I found the root cause of problem:

First I have to add that the problem happened when running Lubuntu or Debian in a Virtual Machine, as when tried in a Lubuntu-based laptop all worked fine.

So I went ahead and disabled 3D acceleration in the settings of my VirtualBox VM.

After that atom worked flawless on my VM boxes. I'm not sure if this is an atom's bug or a Virtualbox one, but as long as it works I have no more questions.

Thanks for your help.


Is there a limit to the number of subdirectories I can create?

Yes, for ext4 systems every file or directory uses an inode, of which a limited amount are pre-allocated when the disk is first formatted. You can see what percentage of this is used by running this command:

df -hi

Look at the IUse% column. For most situations this never be exhausted, but it's possible this can lead to problems if you start out on a small disk (and therefor not many inodes) and later resize to a larger disk since inodes are not re-allocated when growing a partition. In those cases you would want to copy the file system from a small disk to a larger disk in a special way.


Why is wireless slow with Atheros AR9285?

I found this to work!

http://www.jrhenkelmann.net/index.php?option=com_content&task=view&id=34

The tick box was not listed as "Pre-Released updates" but all boxes were ticked on the updates tab


When you receive the warning message, you'll notice the cursor blinking as well. It's waiting for you to provide a command.

If you hit Tab, you can see the list of valid commands or you can simply type live, press Enter and your live OS should boot!

I faced this issue myself but later realized it's some sort of a bug that's been reported and worked upon. You can see the bug report here.


How can I change PrtScn to capture by area?

For future reference, in 12.04 you can use Shift+PrtScn to capture area.


intel WIFI AC 9560 don't work in ubuntu 18.04

According to the rfkill report, your WiFi is working properly, it is just hardblocked.

Find what is hardblocking the wifi. (Probably a hardware switch you might need to toggle).


Did you delete the files in using the GUI Files tool? If so, they are probably moved to the Rubbish Bin rather than deleted.

Open Files, right click on the Rubbish Bin and choose Empty Rubbish Bin.


New XPS 13 9380 with ubuntu 18.04 flicker problems

Bug in intel drivers causes flickering.
See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1826125
Specifically:
https://bugs.freedesktop.org/show_bug.cgi?id=110511#c15


who is changing my grub.cfg? changes to timeout makes grub not show

The answer is obvious: it is changed by grub-mkconfig. If you change grub.cfg manually, all changes will be overwritten on the next update-grub.

Grub is updated on every kernel upgrade and also in other cases.

Instead of changing grub.cfg edit /etc/default/grub and run sudo update-grub.

You can read this in the beginning of grub.cfg.

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#


On Ubuntu 17.10 Qt4 apps do inherit the global GTK theme, while Qt5 don't. Since libqt5libqgtk2 isn't available in the official Ubuntu repositories anymore, we have to use another workaround:
Install qt5-style-plugins from the Ubuntu repositories with sudo apt install qt5-style-plugins.
Then add export QT_QPA_PLATFORMTHEME=gtk2 to ~/.profile by echo "export QT_QPA_PLATFORMTHEME=gtk2" >> ~/.profile. This will theme all apps started as user.
If you prefer to apply the theming system-wide (for user and root apps), then use sudo sh -c "echo 'export QT_QPA_PLATFORMTHEME=gtk2' >> /etc/environment".
For Ubuntu 20.04+ you have to sudo apt install appmenu-gtk2-module, so that qt apps don't start with a delay.
I prefer this method over using kvantum, because with this method also root apps are themed properly and you don't have to adjust the theme in the kvantum manager, to match it your gtk theme.
Reboot and enjoy!


Just right click on the application icon you want to remove and select "Remove from Favourites". Similarly right click on an application icon you want to add when the application is running and select "Add to Favourites".

If you really want to use Terminal to achieve your goal, see this.


Thanks user26687!

Yes after I installed sessioninstaller I can again uninstall software from KDE menu :D


It appears that Minecraft isn't able to run on Java version 9. Installing Java 7, and setting Minecraft to use that seems to have fixed the issue.

I was still getting occasional "screen turns off" crashes happening OUTSIDE of Minecraft, which only started happening after installing minecraft. I have no idea what the cause of those were.

I've done a completely fresh installation of the latest Ubuntu, so I'm hopefully those will have stopped.


Restore default power settings on Ubuntu 12.04

Suspend is normal when power is low. Open up "System Preferences" and click "Power". There it will tell you what it does when the power is low or system idle etc.

If you want alternate power management then you can always install Jupiter.

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

After you've done that logout and log back in.
If you don't like it then you can remove it with:

sudo apt-get remove --purge jupiter


Do applications need to be stopped before upgrading packages or restarted after upgrading packages?

No process in a server environment need to be stopped/closed during an update with the package manager. The installation and removal scripts in /var/lib/dpkg/info start and stop the services for you, if it's necessary. Mostly it's only a reload, e.g.

sudo systemctl reload service_name

or a restart

sudo systemctl restart service_name

A reboot is usually also not necessary. Read this When is it necessary to reboot an Ubuntu system?.


Remmina 1.3.4 on Ubuntu - which is the HOST KEY?

Thanks for the info.
What I detected is:

a) must select a text to copy.
b) press left-ctrl and C to copy.
c) "click on another place"
d) press left-ctrl and V to paste...

Not really easy to discover I must click in another place and the PASTE can' t identify "paste it in the cursor site". (like other tools)

Anyway, thanks !


You're looking for the -t flag for mount. From man mount:

   -t, --types vfstype
   [...]

   More than one type may be specified in a comma  separated  list.
   The  list of filesystem types can be prefixed with no to specify
   the filesystem types on which no action should be taken.   (This
   can be meaningful with the -a option.) For example, the command:

            mount -a -t nomsdos,ext

So, this command would mount all cifs filesystems:

sudo mount -a -t cifs


Three Drives. First with Windows 10, Second with Ubuntu, and Third of storage. Storage Driver visible from Windows but not from Ubuntu

Launch the Disks program from the launcher. The "Volumes" section will show you all the disks in your system.

Select your 3Tb HDD.

In the bar at the bottom of the Volumes diagram, click the gear wheels icon to bring up the settings for that disk.

Click on Edit Mount Options

Turn on the Auto Mount option, and make sure the 'show in user interface' option is ticked.

Then close Disks and reboot. Your drive should now show up in Nautilus.


some webpages are not opening "The site can't be reached" on newly installed Ubuntu 20.04 LTS after resetting the router

First the nameserver is for DNS your error has nothing to do with DNS its says address cant be reached. You did not say why it was necessary to reset the router to a default configuration.


Have you tried pressing Ctrl + Alt + F1 through F7 ?
On my pc when I press Ctrl + Alt + F7 it exits tty.


Command not found when executing node.js n package on sudo

I have found solution which worked for me:

sudo -E env "PATH=$PATH" n stable

Found it here: https://stackoverflow.com/a/29400598/861615


Gimp opens too big for the screen in Ubuntu 12.10?

If we had the same problem, I could be available to reset the Gimp size by

Edit >Preferences > window management and clicking '" reset saved window positions to default value' ".

Source


Remap a button from my gaming mouse to a keyboard key

For anyone who has the same problem: I just achieved my goal using XTE, i found the solution after almost a week searching. Found this website https://matmunn.me/post/binding-volume-control-mouse-buttons-ubuntu/

It consists in installing xbindkeys and  xautomation packages, in my case it was already installed, don't know if it's a default package.
Next you need to edit a file called xbindkeysrc with comand:

xbindkeys --defaults > ~/.xbindkeysrc

or

touch ~/.xbindkeysrc

all you need to do is to write there is a block of code that tells the system what to do if you press a particular key wether its a Mouse button or a Keyboard key.
The code looks like this.

# button 8

"xte 'key 5'"
  b:8
witch means, whenever you press "Button 8" (witch is a side button on my mouse)
act like i have pressed the keyboard "Key 5" .
You can use the comand xev to check what is the number of your mouse's button.
Hope this can help other with the same problem.


I've just tested this. Cleaning "System/Temporary Files" with BleachBit removed following files:

Delete 4,1kB /tmp/sni-qt_copyq_7487-uq6jv3/icons/hicolor/48x48/apps/copyq_7487_3b113d95128bb105a6dd1b89f6652e0a.png
Delete 4,1kB /tmp/sni-qt_copyq_7487-uq6jv3/icons/hicolor/16x16/apps/copyq_7487_3b113d95128bb105a6dd1b89f6652e0a.png
Delete 4,1kB /tmp/sni-qt_copyq_7487-uq6jv3/icons/hicolor/32x32/apps/copyq_7487_3b113d95128bb105a6dd1b89f6652e0a.png
Delete 4,1kB /tmp/sni-qt_copyq_7487-uq6jv3/icons/hicolor/22x22/apps/copyq_7487_3b113d95128bb105a6dd1b89f6652e0a.png
Delete 0 /tmp/unity_support_test.1

Disk space recovered: 16,4kB
Files deleted: 5

So it seems that Ubuntu wrapper library for displaying QSystemTrayIcon stores icon image file in temporary directory. Oddly the library will just use invalid icon if the image is removed.

After CopyQ is restarted icon is back in place.

Removing temporary files randomly is not a good practice. Yes, there could be some stale files, but it may also contain some important data or backups. CopyQ uses temporary files when you edit items in an external editor.


Why encrypted $HOME files showing to root, how to make it hidden again?

eCryptfs does not protect your data from root.  eCryptfs is only sufficient to protect your data at rest on the physical media.

After you've logged into the system as your user, your decrypted data is only protected by Discretionary Access Controls (DAC).  This is generally enough to protect you against other non-root users on the system, but not root.

Also, are you absolutely sure that never entered your non-root user's password on this system after booting?  Because the situation you describe is impossible -- root would never be able to see your decrypted data if you haven't logged in yet.  This is how eCryptfs protects you against LiveCD attacks.


Windows-manger not working? I can't see the maximize, minimize and close buttons

It happens when the windows-manager is not working. The windows-manager should automatically restart if its process is terminated, but sometimes it don't happen. I first would recommend the system reboot, so the windows-manager would be started automatically by the own system. If it did not happened you could try to run it manually from the Terminal, with the following command:

$ compiz

Or

$ compiz --replace


configure 'other users are able to view my desktop' via command line

Try something like this?
gconftool-2 -s -t bool /desktop/gnome/remote_access/enabled true

Source: https://linuxexplore.com/tips-tricks/configure-remote-desktop-from-command-line/

Not sure where these things are actually stored, but gconf is generally modified by issuing commands via gconftool or some other CLI tool.


How does 'apt' decide how many old kernels to keep?

There is a file that is auto-generated that tells apt-get what kernels to autoremove and which ones to keep.
The file that tells apt-get which kernels they are is /etc/apt/apt.conf.d/01autoremove-kernels which is generated from /etc/kernel/postinst.d/apt-auto-removal.

Usually what happens is that when you are receiving kernel updates, when the kernel version changes, say from 3.13 to 3.16, /etc/apt/apt.conf.d/01autoremove-kernels is then updated to keep the 3.16* kernels and is then set to remove all of the 3.13 kernels unless specified by the generating script to not be removed.

From the apt-auto-removal script:

# Author: Steve Langasek
#
# Mark as not-for-autoremoval those kernel packages that are:
#  - the currently booted version
#  - the kernel version we've been called for
#  - the latest kernel version (determined using rules copied from the grub
#    package for deciding which kernel to boot)
#  - the second-latest kernel version, if the booted kernel version is
#    already the latest and this script is called for that same version,
#    to ensure a fallback remains available in the event the newly-installed
#    kernel at this ABI fails to boot
# In the common case, this results in exactly two kernels saved, but it can
# result in three kernels being saved.  It's better to err on the side of
# saving too many kernels than saving too few.
#
# We generate this list and save it to /etc/apt/apt.conf.d instead of marking
# packages in the database because this runs from a postinst script, and apt
# will overwrite the db when it exits.

However, this sometimes will not mark them for auto-removal since some of the coding has changed over versions to prevent this from happening.

If you want mark the previous kernels for autoremove except for the required kernels based on the scripts, run the following command from a terminal window:

sudo apt-mark auto ^linux-image-

Then, when you run the apt-get autoremove command only the ones that are old and no longer needed can be removed.   I have put examples below:

This first one shows all kernels on the system minus the current running kernel.

root@terrance-Linux:/home/share# dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d'
linux-headers-3.16.0-34
linux-headers-3.16.0-34-generic
linux-headers-3.16.0-36
linux-headers-3.16.0-36-generic
linux-headers-3.16.0-37
linux-headers-3.16.0-37-generic
linux-headers-4.0.0-040000
linux-headers-4.0.0-040000-generic
linux-image-3.16.0-34-generic
linux-image-3.16.0-36-generic
linux-image-3.16.0-37-generic
linux-image-4.0.0-040000-generic
linux-image-extra-3.16.0-34-generic
linux-image-extra-3.16.0-36-generic
linux-image-extra-3.16.0-37-generic

This one shows the current running kernel.

terrance@terrance-Linux:~$ uname -r
4.0.1-040001-generic

terrance@terrance-Linux:~$ sudo apt-get autoremove
[sudo] password for terrance:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

terrance@terrance-Linux:~$ sudo apt-mark auto ^linux-image-
linux-image-extra-3.16.0-33-generic can not be marked as it is not installed.
linux-image-extra-3.13.0-27-generic can not be marked as it is not installed.
linux-image-3.13.0-44-lowlatency can not be marked as it is not installed.
linux-image-3.13.0-27-generic can not be marked as it is not installed.
linux-image-3.16.0-31-lowlatency can not be marked as it is not installed.
linux-image-3.16.0-36-generic set to automatically installed.
linux-image-lowlatency-lts-utopic can not be marked as it is not installed.
linux-image-extra-3.13.0-36-generic can not be marked as it is not installed.
linux-image-3.13.0-36-generic can not be marked as it is not installed.
linux-image-4.0.0-040000-generic set to automatically installed.
linux-image-extra-3.13.0-45-generic can not be marked as it is not installed.
linux-image-3.16.0-25-generic can not be marked as it is not installed.

NOTE: The above one was too long to list, so I truncated a bit.

terrance@terrance-Linux:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  linux-image-3.16.0-34-generic linux-image-3.16.0-36-generic
  linux-image-4.0.0-040000-generic linux-image-extra-3.16.0-34-generic
  linux-image-extra-3.16.0-36-generic
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
After this operation, 613 MB disk space will be freed.
Do you want to continue? [Y/n]

So, after running those commands, you can see that I can now auto-remove all the old but the current kernel (4.0.1-040001-generic) and the next newest one (3.16.0-37-generic).

Hopefully this helps.


Move Ubuntu Server Virtual Machine from Linux to Windows

I have found File -> Export Appliance followed on the other machine by File -> Import Appliance to be the best way to move virtual machines in Virtual Box.


How to create bootable usb from pre-installed Ubuntu?

I was writing this recipe when you hurried up to accept an answer, anyway this took a while to write, so here it is.

One of your best chances to have such a "copy" of your current pre-installed operating system is to clone the installation itself, which will result in an exact operational copy of your hard disk drive's installed OS but in a bootable USB/SD/MicroSD card.

A relatively similar question was asked before, but the question was exactly the opposite of what you wish to achieve in this task. Anyway the same answer is useful for both your case and the previous question, you can reach it right here: Installing/Cloning from Ubuntu Installed and Running on USB to HD

Additionally you may wish to take a look at this answer: https://askubuntu.com/a/176110/9598 and this: https://askubuntu.com/a/106585/9598 or this: https://askubuntu.com/a/106585/9598. Note that they are basically the same answer but additional answers provided by different users in the same questions may give you a clue on how to do this task.

For your specific case, I suggest you to first check out how much disk space is your current pre-installed operating system using. This detail is important in order to gather the proper size's USB/SD/Micro SD Card so that the whole operating system can fit on that device. I am aware that Cloning can be done from smaller disks to a bigger one. But I haven't experienced yet with cloning from bigger to smaller disks so I can't suggest you about it. Which lead us to the next:

If the File system is bigger than the USB/SD/Micro SD Card, let's say: you have your current pre-installed OS In a 160 GB Hard disk drive, but it is only using 4 GB for the OS and other 20GB for documents, music, pictures and other data, you should decrease the partition itself in order to fit to the new device's size, let's analyze the scenery:

Having in mind a disk as of 160GB with 24 GB Total disk used (20 data, 4 OS) and wish to clone your OS into a 16GB USB/SD/Micro SD Card.

The recipe:

Ingredients

A Live CD/USB with Ubuntu and gparted
A Live CD/USB with Clonezilla

The directions

You need to decrease the current 160GB partition to something like
30 GB and leave the other 130GB unused.
Then let's create a container for spare space, the same size as your
data, 30 GB so far. (from now on "spare partition")
Now let's create a bigger container for the data backup, the last
100GB (from now on "backup partition")
Next, move your data (documents, pictures, music, etc.) into your
backup partition in order to keep your data apart from the cloning
process.
We need to match the new device's size and the partition size, so
let's reduce again the system partition for a maximum of 16GB,
leaving the remaining 14GB unused. You will then have a partitioning
like this:

|--SYSTEM-16gb--||--UNUSED-14gb--||---SPARE-30gb---||---------BACKUP-100gb---------|
This is the point where we start Clonezilla and run a cloning from
device-device, to work directly from a disk-partition to
disk-partition, in this case we are going to clone from "partition
to disk"
After the cloning finishes and if you already checked that the USB
properly boots, then we need to revert the process in order to leave
your computer "as it was" before cloning your OS.
First we're going to expand the system partitions from its current
size to the unused 14 gb in order to make it as of 30GB, size where
you can put your backup data again in order to:
Remove the spare-30gb and the backup-100gb partitions in order to
leave that space unused.
Expand the system partition to fill the 160gb of your hard disk
 drive.
And enjoy.

That seems to be a hard process but it is not indeed, it will take an hour or less, depending on your computer and the speed of your hard disk drive/optical drive (which will read the Clonezilla process).

For the operations related to resizing the partitions you can use gparted in a live CD, and you may wish to take a look at the answers to this question: Why I'm seeing a lock besides the partition I'm trying to modify with gparted? in order to understand how to achieve that task, further information about gparted and Live Gparted images for both CD and USB can be reached right here: http://gparted.sourceforge.net/

REMEMBER: That you can't resize a partition that is currently in use (the system partition). So make sure you first run all the partitioning process before starting the cloning process.

Serve it cold and in companion with your favorite drink.

Good luck!

Some extra-explanations:

The spare-partition: It is not required at all but I strongly suggest to make it in order to have extra space in order to keep
your data apart from the cloning process or in case that you need
extra space for resizing/moving your partitions.
When cloning: make sure you answer "yes" (just a "y" without quotation marks) when the Clonezilla asks you if you wish to clone
the boot sector, otherwise your USB/SD/Micro SD Card won't boot.
Remember: It is strongly recommended to leave the OS alone, (with no user
data) and to include the all the software that you wish to keep in
the cloned device before cloning, nevertheless, after cloning you
can run updates and/or install new software in the cloned device.
You may wish to use dd instead of Clonezilla, of which I won't give
any explanation but you can find lots of answers over here.
When serving the recipe: make sure to include a glass with ice and
Cuban rum for me.


Why is there "no new release found" during do-release-upgrade when using an intermediary TLS termination proxy?

I've started with enabling debug mode:
% export DEBUG_UPDATE_MANAGER=yesplz
% do-release-upgrade -c

... and finding the following in the output:
...
result of meta-release download: '<urlopen error Tunnel connection failed: 403 SSL CONNECT proxying not configured>'
...

The first work-around I've tried is changing the URL in file /etc/update-manager/meta-release to have http:// instead of https://. This "works", but not something to take lightly.
I've also tried installing squid (a caching proxy) on the same machine and setting environment variables http[s]_proxy (lowercase and uppercase), guessing that an extra layer of software may cargo-cult releases into becoming reachable; but that didn't work (i.e. same error).
The last workaround - which works! - is downloading the file manually:
% curl https://changelogs.ubuntu.com/meta-release-lts -o /home/`whoami`/.cache/update-manager-core/meta-release-lts
% sudo curl https://changelogs.ubuntu.com/meta-release-lts -o /var/lib/update-manager/meta-release-lts

... and then forcing this file to be used, by editing /usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py and inserting at line 339, before an urlopen() attempt is made:
print('UGLY: urlopen my XSS! >:(')
raise(HTTPError(code=304, url='', msg='', hdrs='', fp=open('/tmp/myXSS', 'w')))

So, to answer my own question, this is likely because of:

the particular TLS terminating proxy configuration (that I don't have control over); or
Python's urllib's urlopen not picking up the proxy settings, or the settings being incorrect (in the "squid workaround" case).


These 'plugins' are really just normal packages, hidden from the default software center view because they are deemed technical items – basically anything that's not a program is considered technical and thus hidden (according to this answer here on AskUbuntu).

You can have the software center show technical items – and thus the packages you're looking for – by searching for their name and clicking the Show x technical items text in the lower left corner of the program windows.

If you don't want to bother with searching for each package and clicking the link,

sudo apt-get purge libgnomecanvas2-common libgstbuzztard libgnomecanvas2-0 gstreamer0.10-buzztard libbml0 libbuzztard0 buzztard-data

will remove all packages and their configuration at once.

As a general note: Since those packages are mostly libraries, they won't slow down your machine or do any harm to it other than occupying a few kB of your HDD space.


Google Chrome not shown as active ubuntu 14.04

This appears like an issue with the chrome shortcut.

You can try the following.

Right click and unlock the shortcut from launcher.
Launch chrome from dash.
Right click the present chrome icon and lock to launcher.

Hope this helps.


Is there a command line tool that allows online search for linux commands?

While it is not as full-featured as google, you can find local commands with apropos.  For example:

$ apropos "disk space"
df (1)               - report file system disk space usage

apropos searches through man pages.  Its argument can contain wildcards (apropos -w) or a regex (apropos -r).

man apropos explains:

   Each manual page has a short description available within
   it.   apropos  searches the descriptions for instances of
   keyword.

   keyword is usually a regular expression, as if  (-r)  was
   used,  or  may contain wildcards (-w), or match the exact
   keyword (-e).  Using these options, it may  be  necessary
   to quote the keyword or escape (\) the special characters
   to stop the shell from interpreting them.

   The standard matching rules  allow  matches  to  be  made
   against the page name and word boundaries in the descrip‐
   tion.


The easy solution is installing the latest kernel image/headers pair. This can be done using:

sudo apt-get install linux-generic


The first two hosts it will hit are api.snapcraft.io and dashboard.snapcraft.io. However the snaps are delivered via a content delivery network (two in fact, I believe) so it's not as simple as one host.

If you'd like to help debug speed issues when downloading snaps, here's some steps you can try to get more information.

Enable debugging in snapd.

$ sudo systemctl edit snapd.service

[Service]
Environment=SNAPD_DEBUG=1 SNAPD_DEBUG_HTTP=7

Restart snapd

$ sudo systemctl restart snapd.service

Install a large snap such as libreoffice or vscode

$ sudo snap install libreoffice

Then inspecting the logs using

$ journalctl -xeu snapd

I'd recommend starting a thread on the snapcraft forum in the store category, where the store admins and developers hang out. They're the only ones who can debug this, honestly.


How do I kill elasticsearch from the command line?

the pidof doesn't give any result because elastcisearch is run through java binary.
the not-so-simple solution to get the id would be:
ps -aux | grep 'elastic' | grep 'java' | awk -F " " '{ print $2 }'

which is:

print all processes ( ps -aux )
filter the result by 'elastic' keyword ( grep 'elastic' )
filter the result by 'java' keyword ( grep 'java' )
only print second column (  awk -F " " '{ print $2 }' )

then you can kill specific ID using kill -9 if you really need to.
However, please note it's always better to securely shut down the service by using the command suggested by Rinzwind in one of the comments.


Accidentally run command rm -R in Amazon EC2. Unable to login

You can recover the instance data by deploying your SSH key to a new copy of the instance, see e.g. https://stackoverflow.com/questions/3260739/add-keypair-to-existing-ec2-instance


Read error while installing DraftSight in Ubuntu 13.04

Try these two commands on terminal,

sudo apt-get clean
gdebi draftSight.deb

If not worked,try to redownload the draftSight.deb file after running  sudo apt-get clean.


Home folder quicklist not showing quicklist on right click unless it's open

This happens when nautilus crashes.  In Gnome and Unity sessions, nautilus is run on login, and manages the desktop background.  That process is running whether you have a nautilus window open or now.  It's crashing on me right now, because of bug 1053670 in Quantal.  And I'd say it's crashing on you, or not running for some reason.  (What are you running?  Did you update recently?)

When there's no nautilus running, the quicklist becomes a generic one.  And right-clicking on the desktop does nothing.  (I think folders on the desktop might disappear, but I don't have any.)


To kill a zombie (process) you have to kill its parent process (just like real zombies!), but the question was how to find it.

Find the zombie (The question answered this part):

a@SERVER:~$ ps aux | grep 'Z'

What you get is Zombies and anything else with a Z in it, so you will also get the grep:

USER       PID     %CPU %MEM  VSZ    RSS TTY      STAT START   TIME COMMAND
usera      13572   0.0  0.0   7628   992 pts/2    S+   19:40   0:00 grep --color=auto Z
usera      93572   0.0  0.0   0      0   ??       Z    19:40   0:00 something

Find the zombie's parent:

a@SERVER:~$ pstree -p -s 93572

Will give you:

init(1)---cnid_metad(1311)---cnid_dbd(5145)

In this case you do not want to kill that parent process and you should be quite happy with one zombie, but killing the immediate parent process 5145 should get rid of it.

Additional resources on askubuntu:

What are zombie processes?
Is there any way to kill a zombie process without reboot?


lsyncd - Sync immediately when source is shared folder

rsyncOpts was depreciated you need to use the rsync {} structure in the lua config file

This link should help: https://github.com/axkibe/lsyncd/wiki/Lsyncd%202.1.x%20%E2%80%96%20Layer%204%20Config%20%E2%80%96%20Default%20Behavior

Look at the "default.rsync" section, there's some example code and below it a list of the available rsync options.


Can't upload in subdirectories of a custom home directory

Probably you have to:

chown -R yazrihm:yazrihm /var/www

This is needed to be changed the owner of contained (in the target directory) files and sub-directories. From man chown:

 -R, --recursive
              operate on files and directories recursively

This is an answer for the probable solution of the problem, but in your case keep in mind the advice given to you from Rinzwind!


`sudo apt autoremove` suggests removing large package

autoremove is smart. It removes old kernel versions along with all their baggage, leaving the current kernel and one spare. It also runs update-grub to clean the bootloader menu. You should proceed without trepidation :)

However, before running it, you can see your current kernel version with uname -r, then you can see for sure autoremove isn't going to delete your running kernel or any of its files.

You can also do ls /boot to see the kernels you have there and compare with what autoremove is going to do.


How can I install a new stable Linux kernel without removing the older one?

To get a listing of the latest packages available for upgrade use

sudo apt-get update

Instead of running sudo apt-get upgrade and selecting "Y" for "Yes"

use sudo apt-get install "linux-image-###" to install the newest version alongside the old one.

Make sure to select the appropriate version when at the GRUB screen.

3b. Hold/mash Shift after bios boot to get the GRUB screen to load if your installation is set to skip it.


How to setup Ubuntu on a Motherboard Raid, no alternate image

Software RAID (mdadm) is not inferior to BIOS RAID. You might need the latter in a multi-OS environment (dualboot with Windows), but other than that, mdadm is good.

As for your installation method, I did the same, for Ubuntu 13.04 on LVM on LUKS on RAID-1. Create the partitions and set up the RAID, LUKS and LVM from the terminal. I had to do this w/o swap as for me, the installer would crash for swap on mdadm for some reason. I set up swap once the install was finished instead.

The steps I took however differ from yours at point 7)/8). I never heard of boot-repair before. So my steps instead look like this:

A) Chroot into your install.

mount /dev/your/root /mnt
mount /dev/your/boot /mnt/boot
mount -o bind /dev /mnt/dev
mount -o bind /dev/pts /mnt/dev/pts
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys
cp /etc/resolv.conf /mnt/etc
chroot /mnt /bin/bash

Now you have a chroot-shell in the Ubuntu you just installed.

B) Install software necessary for the extra stuff you did. As well as the missing bootloader.

apt-get install mdadm
apt-get install cryptsetup
apt-get install lvm2
apt-get install grub2

C) Set up your /etc/crypptab (only if you used some kind of encryption which wasn't set up by the installer)

echo yourluks UUID=`cryptsetup luksUUID /dev/yourluksdev` none luks > /etc/crypttab

D) Update initramfs

update-initramfs -u -k all

E) Install GRUB2 onto the RAID members

grub-install /dev/sda
grub-install /dev/sdb
update-grub

F) Sync & Reboot

sync
exit # chroot
reboot

Note that there are some oddities after the install, at least for 13.04. In Unity there is a "Install RELEASE" button left over, so for whatever reason the installer installed the installer...? Other than that everything seems to be working fine though.

So it's entirely possible (although probably not the recommended way) to use the regular Desktop CD for complex mdadm/luks/lvm setups.


After trying to make grub the default, boots into blank screen

Boot computer into live instance of linux from USB. Then install and use a tool named Boot-Repair

https://help.ubuntu.com/community/Boot-Repair

It should correct problems with GRUB.


Bluetooth headset works fine in HSP/HFP but one side is NOT working in A2DP Ubuntu 19.10

I had the same problem
What worked for me, opening the settings -> audio

set A2DP for headpones
change the output device to another device, then switch it pack to the headphone
set balance in the middle (of left and right)

What I recognized, the balance (left/right) was on the left hand side. Before performing the steps above, changing the balance didn't change anything.
But after the steps above, everything worked fine.
Have a look on the image link below:


Cannot connect to Ubuntu Server via SSH over wireless LAN

Most probably, It is not a configuration issue.
It is the issue of ip.
type ifconfig and get the ip of wifi connection and use it to connect to the server via ssh. That's it.
If not working, reply with your ssh config in comment.