Issues with dualbooting after installing windows 8 (boot-repair not working!)

You guessed correctly :) According to line 673 of the Boot-Repair log, you have installed a 32bit version of Ubuntu.

You can reinstall Ubuntu-64bit above the current 32bit one while reusing your old /home. See https://help.ubuntu.com/community/UbuntuReinstallation


When I Press Install Ubuntu It Won't Let ME

The second screenshot is for a more recent version of Ubuntu than the first screenshot. It's normal. Press Continue to continue the installation.


Balance the discharge between BAT0 and BAT1 on Thinkpad T450s running Ubuntu

The behaviour is hardcoded in Lenovo's Firmware. You can't change it.


Ubuntu 14.10 chrome doesn't detect keyboard input

There is a conflict with ibus

Turning off ibus: in "Language Support" (found under Ubuntu's Preferences) switch "Keyboard input method system" from IBUS to none


I did not need to call Lapack64, because it was already in Pardiso. The real problem was how I was calling Pardiso.

My pardiso licence was in a different place then the one were I thought it was. I had to change the directory in pardiso.conf.

Then I had to do ldconfig and it worked.

So basically if you write -llapack -L/usr/lib -L<the directory the license is> this problem is solved.


feedback on dual boot parition sceheme (ubuntu + windows7)

assuming that you boot in legacy mode, it looks good.

If you boot EFI mode, it is preferable to format the drive gpt. Then all partitions can be primary. The first partition needs to be a 500 MB partition formatted to FAT32 and flagged as ESP (EFI System Partition). This partition is where the boot loaders go for the EFI system to boot from.
Behind this partition you can add the rest as primary partitions sized as you have described.


Why can snap files not be modified in any way?

While the premise of the question is technically correct (you can't change files of a snap), there are ways to work around this.

One such way is to use the --bind option in conjunction with mount, to remount the existing file hierarchy  to somewhere else.

For example, if you want your snaps to use the system certificates instead of the certificates installed in core, you can mount the directory containing the system certificates on the host on top of the system certificates directory in core with the following command:

sudo mount --bind -o nodev,ro /etc/ssl/certs /snap/core/current/etc/ssl/certs/

This doesn't actually change the snap filesystem. If you unmount the folder, the old folder will take its place:

sudo umount /snap/core/current/etc/ssl/certs

Note: Mounts do not persist between reboots. There are several ways to make mounts persist after a reboot. One such way is to create a systemd startup script:

$ cat <<-EOF | sudo tee /etc/systemd/system/snap-core-current-etc-ssl-certs.mount
[Unit]
Description=Mount unit to fix etc ssl certs in core package
After=snapd.service

[Mount]
What=/etc/ssl/certs
Where=/snap/core/current/etc/ssl/certs
Type=none
Options=bind,nodev,ro

[Install]
WantedBy=multi-user.target
EOF
$ systemctl enable snap-core-current-etc-ssl-certs.mount

Taken from here.


I think the default installation has no way to play audio files from command line, other than using aplay on WAV files (aplay also support other formats, but the man page is not clear in this regard).

To play, for example, MP3 files, you need restricted codecs available through ubuntu-restricted-extras, and a player like mplayer or cvlc, but there are many other: see What Media Players Are there? where text based and GUI based audio players are listed.


Are all of the backup files & folders of encrypted /home folder also encrypted on the backup HDD?

If you want to backup the cleartext versions of these files, you'll need to do two things:

You'll need to be logged in and your home directory will need to be mounted when your backup job runs.
You'll need to backup your actual home directory, such as /home/$USER, rather than just /home.

Full disclosure: I'm the author and maintainer of Ubuntu's Encrypted Home Directory feature


Consider wireshark

sudo apt-get install wireshark

This should help you sniff out any traffic originating from your android emulator to http https based on a variety of filter criteria.


How to clear browser's cache and cookies from terminal

To clean the cookies from terminal you can use the following command:

rm ~/.mozilla/firefox/*.default/cookies.sqlite

To clean all the cache, you can use:

rm ~/.mozilla/firefox/*.default/*.sqlite ~/.mozilla/firefox/*default/sessionstore.js
rm -r ~/.cache/mozilla/firefox/*.default/*

But, better you can make a backup of these files if you want to restore them latter:

mkdir -p ~/.mozilla/firefox/backup ~/.cache/mozilla/firefox/backup
mv ~/.mozilla/firefox/*.default/*.sqlite  ~/.mozilla/firefox/backup
mv ~/.mozilla/firefox/*.default/sessionstore.js ~/.mozilla/firefox/backup
mv ~/.cache/mozilla/firefox/*.default/* ~/.cache/mozilla/firefox/backup


How to make VBoxClient load with the --clipboard option when launched?

A simple solution would be to give your user the right to run the command without entering a password and then adding it to the list of startup programs. First, run sudo visudo and add this line to the file (change geomint to your actual user name):

geomint ALL=NOPASSWD:/usr/bin/VBoxClient --clipboard

Then, use the tools provided by your desktop environment to add the command to your startup applications. Instructions for Unity can be found here.

Alternatively, do it manually. Create a file called ~/.config/autostart/VboxClipbvoard.desktop with the following contents:

[Desktop Entry]
Type=Application
Exec=sudo VBoxClient --clipboard
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=VBox clipboard
Name=VBox clipboard
Comment[en_US]=
Comment=

Now reboot, and it should work as expected.


Grub2 on LVM: How can I switch between alternate root LVs?

If you're looking at your grub2 configuration (use bootinfoscript for a quick summary), you'll notice that the first step in the boot process is to look at the MBR, and find an entry point from where to load  the code needed to access all those mysterious filesystems a PC BIOS never dreamt of hearing about.

If you lack bootinfoscript, you probably want to fetch it ...

sudo apt-get install boot-info-script cl-awk

Example output:

============================= Boot Info Summary: ===============================

 => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of
    the same hard drive for core.img. core.img is at this location and looks
    for (tetrad-12.04)/boot/grub on this drive.
 [detailled per-partition output omitted]

There's a good article at the German wiki describing how to analyze a grub configuration.

For the first tests of your newly installed second boot partition, I'd suggest to leave your MBR unaltered (you did make a backup, in case the install botched it, didn't you?), boot into the old 12.04 partition after the install, run update-grub to include the new and shiny installation on the 14.04 partition into the menu, check /boot/grub/grub.cfg (the entry to 14.04 should point at the correct partition, not the 12.04 one, and probably use nomdmonddf nomdmonisw while you're still using 12.04 in parallel.

If you're able to reboot into 14.04 using this configuration, you can go ahead and run grub-install from your 14.04 partition to have it boot into 14.04 without the detour through 12.04.

Both root partitions will detect the other root partition during update-grub, and both are able to boot into the other partition through the menu generated, but it's the grub-install that determines which partition serves the /boot/grub/grub.cnf.

PS: I happened to just set up an environment like that to safely experiment with the release-upgrade from 12.04 to 14.04. (One lv each for 10.04, 12.04 and 14.04)


Do I need to update mod_ssl for CVE-2014-0160?

No, ModSSL is an interface to OpenSSL, so it will not need any updates itself.


Looking earlier I've just seen this:

Jun 25 10:46:44 dmz sshd[29221]: debug1: Server will not fork when running in debugging mode.

... which looks rather suspect.

Checking processes I see:

/etc/sbin/sshd -D -d

Checking /etc/default/ssh I see:

SSHD_OPTS="-d"

which I have commented out.

I do not know why it was set, I do not not remember ever setting it and ssh worked fine until I upgraded 14:04LTS to 16:04LTS.

ssh now works as expected.


"Kerberos" is a computer network authentication protocol and "krb5-locales" are the settings related to internationalization. Or as explained in the link:

  Internationalization support for MIT Kerberos

  Kerberos is a system for authenticating users and services on a network.
   Kerberos is a trusted third-party service. That means that there is a
   third party (the Kerberos server) that is trusted by all the entities on
   the network (users and services, usually called "principals").

  This is the MIT reference implementation of Kerberos V5.

  This package contains internationalized messages for MIT Kerberos.

So ... any text used in "kerberos" is stored in "krb5-locales" and based on you language settings it will pick up the translation for your language (if available).

It is 3rd party software so I assume translation are done by them.


Install the one in Software Sources > Additional Drivers ?


How to install/update libnl-1.0pre8 (or later)

Install libnl-dev using the following command:

sudo apt-get install libnl-dev

or

sudo apt-get install libnl-3-dev


How can i automatically execute a script after automatic boot?

To execute a script at startup of Ubuntu

Edit /etc/rc.local and add your commands
The script must always end with exit 0

More information : Executing a script at startup and shutdown


Apply multiple patches at different levels

You could do something like:

find . -iname '*.patch' -execdir sh -c 'patch -p1 < $0' {} \;

This find command:

looks for files in the current directory (.) recursively
that are have filenames ending in .patch (adjust according to whatever naming pattern your patch files follow)
and in the directory where a matching file was found, runs sh -c 'patch -p1 < $0' matched-file:

$0 is the first argument, which is the matched file, so the command is essentially patch -p1 < matched-file
sh -c is needed since we're using redirection.


How to clean and add options to the Open With list of apps

It should be enough to edit the folder under

 ~/.local/share/applications

You may find numinous listings for wine there and can edit it. You could also remove it and generate another file.


Sound problem in ubuntu 16.04 (on wake up and suspend/resume)

Use Pulse Audio Volume Control (pavucontrol).  It has more control options over the default Sound app.

You can install it with this command:

$ sudo apt install pavucontrol

Run it from the Search button of Ubuntu Launcher by typing volume.

From the Pulse Audio Volume Control app click on the Configuration tab.  Select your preferred profile.  Depending on how many devices you have available, the best one would most likely be one of the Built-in Audio profile options.

In my case, Analog Stereo Output (unplugged) profile always work.

After making this setting, going back to the default Sound app and clicking on the closest match (which again has the words Built-in Audio included in the description, will bring the sound back.

The only time this has failed to bring back the sound for me was on a few occasions where my external sound system was either physically disconnected or turned down.

I know the latter isn't your case, because rebooting has brought your sound back.


Do I use ext4 for all partitions (such as / and /boot)? What are the other formats used for?

Swap space doesn't use a filesystem at all. For regular filesystem partitions, my thoughts are:

Ext2fs -- This is the major surviving non-journaled Linux-native filesystem, and as such it has limited utility. I'd only recommend it on a small partition (such as a separate /boot partition or possibly a small USB flash drive), where the journal will be more of a detriment than an advantage.
Ext3fs -- This is ext2fs plus a journal, which reduces disk-check times after a power failure or system crash. Ext3fs used to be a decent choice, but it's been pretty well eclipsed by ext4fs these days....
Ext4fs -- This is ext3fs plus some new features that improve performance and enable use on larger disks. It's probably the best general-purpose filesystem for Linux these days; certainly it's the one that most distributions favor by default.
ReiserFS -- This filesystem is roughly comparable to ext3fs in features. Its main standout point is that it's especially good at handling small files (as in a few kilobytes, or even under a kilobyte). If you happen to be storing lots of dinky files, it's still worth considering. OTOH, it's not a "hot" filesystem, so development is slow, and ReiserFS lacks the advanced features found in ext4fs and the later filesystems on this list. A variant, Reiser4, promises such features but has been very slow in materializing as an actual in-kernel filesystem. I'm not holding my breath on Reiser4 becoming viable.
XFS -- Favored by system administrators on big disks (over a few terabytes), XFS has some moderately advanced features, and has a good reputation for handling large files. XFS partitions can't be shrunk, though, which can be a problem if you're not sure how big to make your partitions.
JFS -- Similar in many ways to XFS, JFS has never been as popular. A few years ago, it wasn't as reliable, but I'm not sure that's the case any more. I can't think of any good reasons to favor it today on a Linux-only system, although there may be some specialized cases where it would perform better than other filesystems.
Btrfs -- This is the newest Linux-native filesystem, and it includes advanced features like the ability to span a filesystem across multiple disks and to take snapshots. It's still experimental, though, so it's not really recommended for use in production environments.

ph0t0nix mentioned ZFS, but that's not really Linux-native. (It was developed by Sun, and has been ported to some of the BSDs, but licensing issues prevent moving that code into the Linux kernel.) There are two ZFS implementations for Linux, one of which can be built into the kernel and the other of which is a userspace driver accessed via FUSE. The kernel ZFS driver isn't part of the standard Linux kernel, though, which is a big drawback in my view; IMHO, a driver for your main filesystem should be a standard part of the kernel, not an add-on package that might not work if you upgrade your kernel.

Overall, then, and IMHO, the best general-purpose options at the moment are ext4fs and XFS. Of the two, I give the nod to ext4fs because it's more popular and it can be shrunk. Ext2fs is OK on small partitions (say, under 1GB or so), ReiserFS can be good if you store lots of very small files, and Btrfs is good if you need advanced bleeding-edge features and don't mind the risk. I don't happen to have benchmark data handy on these filesystems, and such data can be difficult to interpret because so many factors can influence performance (disk type, file sizes, system load, etc.). You could try looking up such data if speed or system load is particularly important to you.

There are of course non-native filesystems, too -- NTFS, FAT, HFS+, etc. You can't use these as the filesystem for your main Linux installation. (I suppose you might be able to use HFS+ for that purpose, but I've never tried it, and it certainly isn't supported by the Ubuntu installer!) You'd use these for interoperability on dual-boot computers or on removable disks.


By default fail2ban is configured to work with iptables; this generates a configuration conflict with APF because fail2ban adds a chain to iptables and when you reload APF it wipes that fail2ban chain each time.

Fortunately you can configure fail2ban to have many different actions, this allows it to be able to work with iptables, shorewall, etc.

To make APF and fail2ban work together we just need to add an apf action to fail2ban:
I created the /etc/fail2ban/action.d/apf.conf based on the shorewall.conf and we just need to edit actionban and actionunban to this:

actionban = apf --deny <ip>
actionunban = apf --remove <ip>

Then we have to configure fail2ban to use apf by editing the /etc/fail2ban/jail.conf file.

The line we are looking for is:

banaction = apf


Missing fonts cause LibreOffice Impress to mess up the layout of the slides

I solved this issue.
I will post the solution here as I think it is important for people who comes from Windows and want a smooth experience with Linux.
The bug, which I reported here, is related to a missing font, "Calibri", a font by Microsoft which is missing on Ubuntu.
LibreOffice uses fontconfig to resolve fonts. If a font is missing, fontconfig will use a substitute font. LibreOffice will tell you that the font is missing and has been substituted by putting the font name in italics, but it will not tell you which font was used as a substitute. You can find it out by yourself using the command fc-match <FONTNAME>. By the default Kubuntu 20.10 installation, fontconfig will resolve the missing "Calibri" to "Noto Sans", an inappropriate substitution, which lead to this bug.
You have two options here:

Install an open-source replacement for "Calibri". This open-source font is called "Carlito" and it is not installed by default. It is however available in the official repositories and you can install it by running:
sudo apt-get install fonts-crosextra-carlito

You can also issue sudo apt-get install fonts-crosextra-* to substitute for other Microsoft fonts.

You can install the official "Calibri" font from Microsoft. To do so, I suggest you use fontist and follow the instructions here (disclaimer: I wrote those instructions).


How to show never played albums in Clementine

This cannot be done with smart playlists (yet). Although you can create your own smart playlists, all criteria only match directly to a song from your database. Any comparison between found songs or grouping of matching songs is not possible. At most you can edit the smart playlist for "never played" to order songs by album (of course only the not yet played ones)

Looking at clementine's database at ~/.config/Clementine/clementine.db it seems, that clementine essentially manages all songs in an single table named 'songs' (so no extra tables for artist or album). But as it is a sqlite database it should be possible to write a little program that does the appropriate queries to find albums where no song has ever been played. Something like this:

select album, track, title, playcount, filename from songs
  where album in (select distinct album from songs where playcount = 0)
  and album not in (select distinct album from songs where playcount != 0)
  order by album, track;

From this list a playlist could be generated. I'm not sure about directly inserting it back into the database, but exporting a .m3u or .pls should be possible.

A possible problem could be that several artists could have albums of the same same as well as there could be albums with several artists on them. So separating albums could be an issue.


How come the installation process does not ask me for setting my network?

The installer will ask you to connect to the internet if you are not connected with a wired connection. In step 5 from the official Ubuntu installation tutorial we read:

If you are not connected to the internet, you will be asked to select a wireless network, if available. We advise you to connect during the installation so we can ensure your machine is up to date

The screen that is asking you to connect to the internet with a Wi-Fi connection is similar to this:


Error: The package lists or status file could not be parsed or opened

There seems to be a problem with the /etc/apt/sources.list file. To evaluate this, let's create a new one that is clean.

Open a terminal, and run the following:

sudo cp /etc/apt/sources.list /etc/apt/source.list.backup

This creates a copy of the original file, just in case.

Open the sources.list file with your preferred text editor. For example, with gedit. Delete all the content of the file, and copy this:

deb mirror://mirrors.ubuntu.com/mirrors.txt xenial main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt xenial-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt xenial-backports main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt xenial-security main restricted universe multiverse

deb mirror://mirrors.ubuntu.com/mirrors.txt xenial main restricted
deb-src mirror://mirrors.ubuntu.com/mirrors.txt xenial main restricted

deb mirror://mirrors.ubuntu.com/mirrors.txt xenial-updates main restricted
deb-src mirror://mirrors.ubuntu.com/mirrors.txt xenial-updates main restricted

This file includes the usual repositories to look at. I added the extra tweak of using the mirrors.txt file, which gives you the closest servers (the standard line is http://com.archive.ubuntu.com/ubuntu/). If you want to generate a more presonalized sources list, use this website.

Save, and update with sudo apt-get update.


From the bash manual, on readline commands:

  character-search (C-])
  A character is read and point is moved to the next occurrence of that
  character. A negative count searches for previous occurrences.

So, if I had:

$ set -o emacs
  ^

Then C-]o will take me to o in -o. You can use counts for the search as well, so M-2 C-] e will take me to emacs.


UEFI USB boot error : No such device: /.disk/Info

This sounds like a bug in GRUB, or possibly in your firmware. If you're using a "live USB" boot of Ubuntu, there's little reason to favor an EFI-mode boot over a BIOS-mode boot, so I'd just use the latter, which works. If you have some reason to favor an EFI-mode boot, I recommend you look into replacing GRUB on the USB drive with another boot loader. I know of no step-by-step procedure to do this with an Ubuntu live USB image, though.


"Unable to locate package" When installing in Terminal

The PPA you are using is not available for Ubuntu 12.04.

(From comments:you are using ppa:obsproject/obs-studio)

Please refer here : ubuntu/obs-studio.

On the official site https://obsproject.com/download#linux
you can see that obs is available for 14.04/15.04+ only.

So to install obs you need to upgrade your Ubuntu system.


What keeps ports 32003 and 25419 open on my Ubuntu 14?

You can see the process using the port with:

sudo netstat -lnp | grep :32003
sudo netstat -lnp | grep :25419


How to lock down one specific kernel out of several

For virtualbox you should install DKMS package:
sudo apt-get install dkms

You should not pin kernel versions as they contain security and stability fixes! Meltdown & Spectre as examples.
Continue only if you are completely sure what you are doing.
For kernel packages pinning see my other answer.
If you understand what you are going to achieve (with lowering security, of course) - you should pin the following packages:

linux-headers-4.4.0-119
linux-headers-4.4.0-119-generic
linux-headers-generic
linux-image-4.4.0-119-generic
linux-image-extra-4.4.0-119-generic
linux-image-generic
linux-tools-4.4.0-119
linux-tools-4.4.0-119-generic
linux-libc-dev
linux-libc-dev:i386
linux-tools-common
linux-source
linux-source-4.4.0

To make Synaptic and APT pins consistent (see my other answer):
sudo ln -s /etc/apt/preferences.d/synaptic /var/lib/synaptic/preferences


How can I halt juju and remove it from my local machine?

If you have a running environment first you need to destroy it. If you have data you care about on those instances make sure to copy it someplace else! You can then destroy the environment:

juju destroy-environment

You then need to remove and purge lxc and it's associated dependencies (unless you plan on using LXC containers for something else.)

In your ~/.juju/environments.yaml you probably specified a data dir, like so:

data-dir: /home/jorge/jujustuff

then you'll need to remove that as well, as well as ~/.juju/.


Error: BrokenCount > 0 unable to solve using "sudo apt --fix-broken install"

Since your repositories are correct we can simply force installation of the package with:

sudo dpkg -i --force-all /var/cache/apt/archives/libfreetype6_2.8.1-2ubuntu2_i386.deb

And then resume installation with:

sudo apt-get install -f
sudo dpkg --configure -a

And for sure get all new dependencies with:

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


Default audio device selection not working

I had the same problem.
I went to Audio and Video (Phonon Audio and Video) and had to change the order of the Devices listed under Audio hardware setup
This fixed the issue for me running Kubuntu 16:10 with KDE Plasma.


Using a folder on an ntfs partition as /home

NTFS is not suitable for an home partition, there are certain type of file system objects (character devices, named pipes, etc) which are required for certain services but are not supported on NTFS.


Moving from Ubuntu to Windows 7, need hard to be NTFS format

It is easier to install Windows first, and then install Ubuntu. (Windows tends to like to dominate the whole drive).

What you need to do is put Windows on the disk's Primary Partition. This partition will be formatted with NTFS. you can do this by booting from the Windows CD/DVD and selecting to reformat the hard drive. Select to delete any partitions in the primary partition and then format with NTFS. Once done, install Windows OS. Then when you are done, use the Ubuntu CD to install ubuntu as a dual-boot.

If you install Ubuntu before Windows, when you get done, you will need to reinstall GRUB. If possible, the easiest solution, is to install Windows and then install ubuntu.

It's best if you do some reading before getting started so you have more knowledge of what you need to do:

see here:  https://help.ubuntu.com/community/HowtoPartition

and here: https://help.ubuntu.com/8.04/switching/dualboot.html


It can run Lubuntu, Xubuntu and 14.10 Ubuntu MATE.
These are variations of Ubunut, with different (and lighter) Desktop environments.


How to execute files with ".install" extension?

Does the file have executable permissions? You may need to do

sudo chmod +x shoes-3.3.6-gtk3-x86_64.install

Also are you sure you are in the correct working directory?


My problem was that the "Disk Identifier"  from fdisk -l  were different.
That is not the UUID !

List the UUID with lsbik and use that identifier.

I changed the entry in /etc/fstab and the Grub entry to the correct disk UUID and now it works.

Thanks for the hints.


I suggest you to use inode number to delete this file:

$ cd ~/Desktop
$ ls -i *Frag829
27526975  your long file name would be here  ....

then use find to remove it:

$ find ~/Desktop -maxdepth 1 -inum 27526975


creating a graphic interface for Python 2.5.4

In Ubuntu 12.04 you already have python 2.7 installed so, unless you need 2.5.4, there is no need to install it.

To install IDLE:

sudo apt-get install idle

Or you can install it from the software center searching for IDLE in the search box.

Before, you could install idle for python2.5 with:

sudo apt-get install idle-python2.5  but version 2.5 is not anymore included in Ubuntu 12.04 repo so if you can't work with version 2.7, you may have to download v2.5  manually (and dependencies) and install it manually with sudo dpkg -i path/to/package if you get a deb file or compile it.


It did do the boot repair; the entry entitled Windows UEFI bkpbootmgfw.efi should boot Windows. If it doesn't, I recommend you try the following procedure:

Disable Secure Boot in your firmware. Unfortunately, the details of how to do this vary from one computer to another, so I can't be more specific.
Use the Boot Repair tool again, but click "Advanced Options," check "Restore EFI Backups," and proceed. This will undo most of Boot Repair's "fixes," which obviously aren't working.
In your regular Ubuntu installation (not in a live CD), download and install the Debian package version of my rEFInd boot manager.

When you reboot, the result should be an ability to boot either Windows or Linux (the latter, most likely, via at least two menu entries, one of which uses GRUB and the other of which is more direct). This procedure works for most people, but for some there are other complications -- unfortunately, subtle differences between EFI implementations, EFI bugs, and bugs in software can cause problems, and you've just got to deal with them on a case-by-case basis.


How execute specific command from shell script

You can use

ssh user@hostname "command"

This will open a ssh connection and run the command. You will be prompted for a password, if necessary.

If you want to do this automatically (don't want to enter your password everytime), you should enable a login with a ssh-pub-key.


Use a seperate lightweight compositor: xcompmgr
(or use a heavyweight like compiz)

Install:

sudo apt-get install xcompmgr

Run it just once (until you logout):

xcompmgr -n

Or have it started automatically by adding it in the systemwide startup:

/etc/xdg/lxsession/Lubuntu/autostart

Or create a desktop icon for it and add this to your desktop session startup:

~/.config/autostart

(last option makes it very easy to turn it on or off via Desktop Session Settings )


Cannot install pip module because there is 'no space' left on device

I had that problem once on my raspi. It is the /tmp directory that is too small. So in order to install something with pip i created a /tmp dir somewhere not in memory:
pip install cache-dir=/home/user/tmp ...
The export TMPDIR you refered to did not work..
Then it worked...


"The disk drive for /media/ext-hdd is not ready yet or not present" is shown every boot time

Open a terminal and type:

EDITOR=gedit sudoedit /etc/fstab

Locate the line which contains your Windows partition and comment it out (prepend a #):

#UUID=YOUR_UID /media/ext-hdd    ext3    defaults    0   0

Reboot, and Ubuntu should stop complaining about it not being present.


Access a mount drive via terminal (mounted via samba)

Open a terminal and run:

ls -al /run/user/$UID/gvfs

You should see a list of all the shares you mounted through Nautilus.

They look like you would need to put quotes around them when running commands on them but they do not. So if I wanted to get a list of the files in the mount point I would run something like this:

ls -al /run/user/$UID/gvfs/smb-share:server=server-name,share=share-name


I do not think it is possible to do what you are asking.
You can use mount options to map users and set permissions, but I do not think you can changes the Windows parameters.
See the NTFS-3g documentation for details:
http://www.tuxera.com/community/ntfs-3g-manual/
http://www.tuxera.com/community/ntfs-3g-advanced/ownership-and-permissions/#options

Limitations
The SIDs required to identify users and groups have to be built on Windows. A user mapping file can however be copied on any partition, even if it were never formatted or used by Windows.
Some unusual basic rights configurations, where the group is denied rights granted to owner and to world (as in chmod 745,) are rejected by the Windows administration tools. They are however interpreted correctly by Windows itself. When using POSIX ACLs, more configurations are rejected by the Windows administration tools.
The base version is best suited for dual-boot systems with several users, complex user configurations will take profit from POSIX ACLs. User mapping features required for devices which may be plugged into multiple Windows or Linux systems are not available yet.


I had the same issue and I solved it adding the following line:
options iwlwifi 11n_disable=1

to this file:
/etc/modprobe.d/iwlwifi.conf


Can't set 1280x1024 with Nvidia Geforce 8400 GS

I spent some time googling this card and it appears that you need to be using the Nvidia 185 driver. Install it first

sudo apt-get install nvidia-glx-185

and generate the /etc/X11/xorg.conf file

sudo nvidia-xconfig

Then reboot, that should at least get the card working.

Update your question with what happens then we'll move on to setting the resolution.


Nvidia drivers - Unable to check "Force full composition pipeline"

The solutions above do not work with Ubuntu 20.04 but the problem seems to persist. But the working solution is quite simple:
sudo nano /lib/modprobe.d/nvidia-kms.conf
sudo update-initramfs -u
reboot

The original content of nvidia-kms.conf is:
# This file was generated by nvidia-prime
# Set value to 1 to enable modesetting
options nvidia-drm modeset=0

As it says, modeset=0 has to be changed to modeset=1.
I wonder why this is not enabled from the beginning.


APT

APT only installs softwares using .deb packages, and
By default the apt command does not cache the deb files:

  apt command does not cache the .deb files?
  Where are packages stored installed with APT in Ubuntu 16.04?

It download and install the package and after installation was done it will remove the deb packages.

Apt is only used to do package management using dpkg and deb packages, it's a high level tools which make installation of packages easier.

To get download link of "eclipse" package:

$ apt download eclipse --print-uris |& grep -Po "http.*?deb"
http://archive.ubuntu.com/ubuntu/pool/universe/e/eclipse/eclipse_3.8.1-8_all.deb

or to download it in current directoey:

$ apt download eclipse

Tar

To install "eclipse" using tar files just extract the archive somewhere and run its executable file.
The other situation is when you download a tar archive containing the software source code which depend on the software you should follow some instruction to compile and install it


LXD is free/open-source software and is developed at linuxcontainers.org.
The maintainers have switched to producing only snap packages for LXD, for the following versions: LXD 2.x, 3.x, 4.x. You can see all these versions when you run snap info lxd.
You can still use LXD 3.0.x as a deb package, which is supported by the LXD team until 2023. You get this version of LXD in Ubuntu 18.04. Note that LXD 3.0.x is feature-frozen (there are no new features but does get security updates).
Having said that, there is nothing that precludes a third-party (such as maintainers from a Linux distribution) to package LXD and distribute it in a different package format. You can get the freshest LXD in OpenSUSE, for example.
There used to be a difficulty in packaging LXD in Debian, because Debian has a policy to package separately each individual component packages (i.e. Go libraries in the case of LXD). And until some months ago, a few of those packages existed in a separate source tree (i.e. not a released upstream version). AFAIK, all these have been resolved now, therefore Debian may pick up again the task to package LXD. If you know an interested Debian Developer, you can ask them to look into this.


Is there a way to recover formatted hard disk with Windows when using Ubuntu 17.04?

I recommend you use Testdisk for this purpose. https://www.cgsecurity.org/wiki/TestDisk_Step_By_Step

https://www.youtube.com/watch?v=jhWbSM-630E

I am a real beginner in this topic. Once I lost my partitions while playing with windows diskpart and Testdisk helped me out.

I recommend you to boot your PC with a USB stick. As far as I know this prevents data loss, because your OS might be writing on the Disk and by doing so, overwrite some data.


You can use the tee command

NAME
       tee - read from standard input and write to standard output and files

e.g.

cat account_settings/account_settings.html | tee -a assets/assets.html users/users.html

or (using input redirection)

tee -a assets/assets.html users/users.html < account_settings/account_settings.html

As noted in the manual page, tee also outputs the contents to the terminal (standard output) - if you don't want to see that, redirect stdout to null

tee -a assets/assets.html users/users.html < account_settings/account_settings.html > /dev/null


WiFi connected but no Internet lubuntu 17.10

It is a bit difficult to see by that image, but it appears you aren't allocated an IPv4 address. If your router is handling DHCP, try rebooting the router then reboot your problematic devices.

Then provide the ifconfig outputs for any wifi adapters once more.

Update #1

With the confirmed allocated IP...
[I understand you went right to trying to ping a DNS server 8.8.8.8]

Ping your gateway router. You can confirm the ip with ip r.
Likely to be 192.168.1.1 based on your subnet.

If that succeeds, although I am not sure if it is installed by default,
give
mtr 8.8.8.8 a try and revert with findings.


Electricity went out while installing software

Run:

sudo dpkg --configure -a

followed by:

sudo apt-get install -f

This will fix and then continue the installation of any software which was interrupted when the power went out; although if the installation had not yet reached, say, the fourth program then you will need to manually install that and the fifth again.

There's no equivalent of a restore point to uninstall packages - you will have to do this manually if you don't want the software anymore.

If you get an error when running the above command then post it here and I will tell you how to resolve it.


How to view a list of packages that were manually installed without their dependancies

It's much better to use apt-mark tool:

apt-mark showmanual

This is exactly what you want. You also can mark packages as manually installed or not and hold the packages on fixed versions.


How to configure apache cache expire setting for browser using ubuntu 16.04

The CacheDefaultExpire directive specifies a default time, in seconds, to cache a document if neither an expiry date nor last-modified date are provided with the document. The value specified with the CacheMaxExpire directive does not override this setting.

CacheDefaultExpire 86400 (seconds)


Win7 -> Ubuntu 11.10 - Win Dynamic Disk Raid 1

After some hard searching found the answer to the solution....

Forum w/ solution:
http://ubuntuforums.org/archive/index.php/t-1776909.html

---------  Content of Forum in case it disappears, etc.. ------

I have a computer that I'm dual booting between Ubuntu 11.04 and Win7 (Enterprise?)

I have a SDD that I've split up for the OSs, and a pair of HDD that I'd like to RAID0 together. I've read in a few places that Linux should be able to handle Win7's Software RAID and found this helpful post: http://ubuntuforums.org/showthread.php?t=833653&highlight=dynamic+disk

I ran through the instructions but got stuck in trying to mount the drives.

What I did:
1. Load Win7

Set both drives to GPT
Build the RAID0
Format to NTFS
Verify it works (copied some file to it)
Boot Ubuntu
Run: cat /proc/partitions
major minor #blocks name

8 0 312571224 sda
8 1 1024 sda1
8 2 130048 sda2
8 3 312440118 sda3
8 32 312571224 sdc
8 33 1024 sdc1
8 34 130048 sdc2
8 35 312440118 sdc3
8 16 78150744 sdb
8 17 102400 sdb1
8 18 38972416 sdb2
8 19 1 sdb3
8 21 39072768 sdb5
8 48 156290904 sdd
8 49 156288000 sdd1
9 0 624880128 md0

Run: sudo mdadm --build /dev/md0 --chunk=64 --level=0 --raid-devices=2 /dev/sd[c|a][1-3] /dev/sd[a|c][1-3]
mdadm: array /dev/md0 built and started
Run: sudo mount -t ntfs-3g /dev/md0 /media/raid0
NTFS signature is missing.
Failed to mount '/dev/md0': Invalid argument
The device '/dev/md0' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

I've swapped the devices around in all possible combos (8) and I get the same results each time.

Poking around via Google a bit more, I see that other have this working, so I'm hoping there's just something silly I'm missing.

Any suggestions?

---- Follow up post ----

So 'bout half way through posting that, I thought "Why not try MBR instead of GPT"?

I started over, used MBR on the disk and received a very different partition list:
8 32 312571224 sdc
8 33 312568832 sdc1
8 0 312571224 sda
8 1 312568832 sda1
8 16 78150744 sdb
8 17 102400 sdb1
8 18 38972416 sdb2
8 19 1 sdb3
8 21 39072768 sdb5
8 48 156290904 sdd
8 49 156288000 sdd1
9 0 625137664 md0

The right combo (for me) after that was:
sudo mdadm --build /dev/md0 --chunk=64 --level=0 --raid-devices=2 /dev/sda1 /dev/sdc1

So it seems that Linux CAN handle GPT, and it can handle MS's Dynamic Disk (which Win uses for RAID), it just can't do both at once (at the moment!).

I'm currently mounting and creating files on both Ubuntu 11.04 and Win 7 and can access them on either OS! :popcorn:

I hope this helps someone out there.:D


Package in launchpad but apt-get says no installation candidate found

If you look at one of the binary packages you'll notice their "deleted" status.

It seems that lcms1 is deprecated and that migration to lcms2 has started on several debian packages. That's why liblcms1-dev is not available in ubuntu repositories as of 15.04.

Source: https://lists.debian.org/debian-devel/2013/12/msg00570.html


Forceably set permissions when running rsync

Amongst many other options rsync can change permission by running it with the option:

rsync [options] --chmod=CHMOD source destination

where you can also combine option --archive with the option --no-owner or --no-perms to exclude preservation of owner resp. permissions. For further options on very subtle settings for CHMOD see the manpage for rsync.


trying to change to a file directory in the terminal but I am having trouble

There is a difference between the relative path and the absolute path.
An absolute path starts with the root file system at /.
A relative path is the path that is relative to your current directory.
If you type the path beginning with a /, then you are indicating the absolute path.
If you type the path without the / at the beginning, then you are indicating a relative path.

For example, let's assume that you are currently in your /home/user/ folder:
If you type cd Downloads, you will change to /home/user/Downloads.
If you type cd /Downloads you will get the error "No such file or directory" because /Downloads does not exist under your root file system.


If you installed using make install, you can remove by make uninstall.

The make clean and distclean command only clean out the source directories, but
 they don't remove installed files. Assuming you built octave
from source using the defaults, you probably installed everything in
/usr/local, so you can probably remove everything with the following command:

$ rm -rf /usr/local/bin/octave-****
$ rm -rf /usr/local/share/octave/****
$ rm -rf /usr/local/lib/octave-****
$ rm -rf /usr/local/libexec/octave/****

Source


Hash mismatch error while updating and trouble installing some packages

The broken packages must be removed first.
 Open up your Terminal and execute the commands below:

  sudo dpkg -r openjdk-7-jre openjdk-7-jdk
  sudo apt-get install -f

Then, for example you can install Oracle Java 8 with these commands:

  sudo add-apt-repository ppa:webupd8team/java
  sudo apt-get update
  sudo apt-get install oracle-java8-installer

Use the command java -version to check the version you installed.


nVidia 260.19.06 drivers are known to be buggy with many users reporting exactly the same issue you have.

That is version that Ubuntu 10.10 uses on the repos so that version of the package will not work for you. You need to remove the package and install a more recent version of the drivers, I recommend the latest version directly from the nVidia site or from the Ubuntu-X team.


Asus Xonar DS - How do I get Ubuntu to run my Sound Card?

Ubuntu comes pre-installed with drivers , asus card is well supported so you don't need any extra drivers for that ,it is plug n play ,but you do have to select this sound card  in Sound Settings to tell system to use this card and not default one.


ffmpeg unable to record video with audio how to solve it?

This worked for me:

ffmpeg -f pulse -ac 2 -i default -f x11grab -r 30 -s 1280x720 -i :0.0 -c:v libx264 -c:a pcm_s16le filename.mkv

Based on this video. Contains lots of useful information.


Trying to install Ubuntu 16.04 on a 2011 i7 Mac Mini with broken AMD GPU

I used this on my 2011 MBP. Try if it works on the Mac mini.

https://forums.macrumors.com/threads/installing-ubuntu-on-2011-mbp-with-failed-amd-gpu.2182103/#post-27378444

Edit:

This assumes you're using 18.4.2 LTS. Boot into the USB, when grub appears, type 'e' and edit the grub list.

menuentry "Try Ubuntu without installing" {
   set gfxpayload=keep
   outb 0x728 1
   outb 0x710 2
   outb 0x740 2
   outb 0x750 0
   linux   /casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash i915.lvds_channel_mode=2 i915.modeset=1 i915.lvds_use_ssc=0 ---
   initrd   /casper/initrd
}

This should allow you to boot in to Live mode (though probably with a color-distorted screen). Install Ubuntu, don't worry about partitioning and let Ubuntu erase everything (since you are using a blank drive) and do not include 3rd party drivers. Reboot into the USB, and enter the same codes in the grub.

When the GUI comes up, open Files app> Other Locations >Computer> Boot> Grub, and look for the grub.cfg file. Open a Terminal and type:

sudo chmod 777

Then drag the grub.cfg file into the terminal window. Press enter.
changing the file permissions to R/W

This changes the file's permission to R/W.

Open the grub.cfg file, and look for the [menuentry 'ubuntu'] line. Below this is the [load_video] line. After this line, add

   outb 0x728 1
   outb 0x710 2
   outb 0x740 2
   outb 0x750 0

A few lines below that is the Linux kernel line. After 'quiet splash' add

 i915.lvds_channel_mode=2 i915.modeset=1 i915.lvds_use_ssc=0

This allows you to edit the grub into this:
Editing the grub menu entry

Save the file, then do this in Terminal:

sudo chmod 444

then drag the grub file into the terminal window. If you haven't closed terminal yet, just issue the last sudo chmod command by pressing the up key and change 777 to 444.
changing the permissions back to read only

This assumes you didn't reboot to test if it works.

Reboot the computer. Ideally, if you did things right, it should boot directly into Ubuntu, bypassing the grub entry altogether. You can still access the grub menu by pressing option/alt.


Is there a shortcut to type a symbol from a different keyboard layout?

Well, you can't type symbols from other layouts, but there is indeed an equivalent to access symbols which are actually part of the Lithuanian layout.

To type 1 with the Lithuanian keyboard layout:

AltGr+1

To better understand how the Lithuanian layout on Linux works: When Lithuanian is selected, click the layout indicator at the top right of the screen and select the Show keyboard layout option. That will show an image of the Lithuanian layout. Let's take the 1 key as an example:

That tells us:

1 -> ą
Shift+1 -> Ą
AltGr+1 -> 1
Shift+AltGr+1 -> !

HTH


Yeah, it had some problems with intel graphic cards. I installed missing ATI card drivers, which had given me enough trouble on 9.04 that I decided to skip on 10.04, and now any further fault is on ATI's shoulder. At least youtube works now.


Make a shell script

http://www.wikihow.com/Write-a-Shell-Script-Using-Bash-Shell-in-Ubuntu

use the instruction above but replace the line:

ls

with your two mount command lines:

/usr/bin/udisks --mount /dev/disk/by-uuid/xxx
/usr/bin/udisks --mount /dev/disk/by-uuid/yyy

then (after saving [somewhere in your home folder] and making executable) direct to the script in "Startup Applications".

that's it


Mirror using apt-mirror and exclude certain sections/categories

Sadly, apt-mirror is not capable of such tasks. Meanwhile, the debmirror tool does have such functionality:

--exclude-deb-section=regex
    Never download any files whose Debian Section (games, doc, oldlibs,
    science, ...) match the regex. May be used multiple times.

This can be configured in the /etc/debmirror.conf. Just copy the example from /usr/share/doc/debmirror/examples/debmirror.conf, and do the configurations that you like. The important bit is the # @excludes_deb_section="";.


Is there a better way to connect to my NAS drive then smb://[IP address] with Lubuntu?

Windows uses a different local DHCP-less communication protocol than, well, basically any other OS out there. Most other systems use implementations of the Zeroconf protocol: Bonjour on Apple systems, like Mac OS or iOS, and Avahi on Linux.

When using Zeroconf, hosts can be adressed with

hostname.local

If your NAS supports Zeroconf (simply try), you should be able to access it using the address

smb://Seagate-3A4AAA.local/

It may be that Avahi is not yet installed on your system. If so, install it using

sudo apt-get install avahi-daemon

If avahi-daemon does not start automatically, you can either reboot or start it manually with

sudo service avahi-daemon start


Ubuntu Diskless 16.04.3 LTS (Xenial Xerus)

Your /tftpboot/pxelinux.cfg/default file is wrong.
It must be something like this: (just example, but kernel and initrd versions must be the same and the initrd is those, that was generated with mkinitramfs)

LABEL linux
KERNEL vmlinuz-2.6.15-23-686
APPEND root=/dev/nfs initrd=initrd.img-2.6.15-23-686 nfsroot=192.168.2.2:/nfsroot ip=dhcp rw


How do I clean build and installs, ie un-build?

From the source, create a .deb package corresponding to the manual install procedure using checkinstall:

sudo checkinstall make install

Once the package is created and installed you can remove it:

sudo dpkg -r package_name

Usually it's better to use checkinstall during initial installation, as it allows you to easily rollback the install.


Will (un)installing packages on a liveUSB (Try Ubuntu) affect the installation?

No. Anything you delete just is no longer available to access in that session. Anything you install goes to your RAM. You should be perfectly fine.


I found a cleaner solution than the original I was having problems with.

Instead of using imwheel..  I used CompizConfig Settings Manager

under Window Management -> Scale -> Bindings -> Initiate Window Picker (with the mouse icon).  For my case I wanted the first thumb button which was button8.  Done.


systemd amule-web not starts while the computer boots

First, you can clean up your systemd unit files by using the User= directive:

User=myuser
ExecStart=/usr/bin/amuled
ExecStop=/usr/bin/amulecmd -c shutdown

This is preferred over using sudo.

Second, you should become familiar with the basics of systemd status and logging commands. Check the status of your commands, which includes the last few logs as well as the full logs.

 systemctl status amuled.service
 systemctl status amuleweb.service
 journalctl -u amuled
 journalctl -u amuleweb

Third, /var/systemd is not a standard place to put your custom systemd unit files on Ubuntu. They should go in /etc/systemd/system

Finally, you should review the documentation for Type= and see if you need to set it to non-default value for the service you are trying to manage.


MPLAB X IDE installation problem ubuntu 13.10

64-bit versions of Ubuntu and its derivatives do not include the 32-bit libraries required to run the installer. This may be true of other 64-bit distributions. Before the installer will run, you need to install the ia32-libs.

http://microchip.wikidot.com/mplab:linux64  :

Many recent versions of 64-bit Linux distributions such as Ubuntu, Xubuntu and other derivatives do not have the 32-bit libraries needed by Microchip's installers to run. Although the applications (MPLAB X IDE, MPLAB XC Compilers) are 64-bit applications, the installers are not. If you try to run an installer without the 32-bit libraries, nothing will happen at all.

To install the libraries, you can try the minimal installation:

sudo apt-get install libc6:i386

If the above doesn't work, you can install the full libraries (texted on Xubuntu 12.04):

  sudo apt-get install ia32-libs

The full libraries take some time to install, but may prove useful if you install other programs from binaries too.


This would be because the gt80's touchpad is software based, and not hardware based. You could install wine, and then install the software for the touchpad (probably a .MSI file, you'd have to find it), and see if it works then. Worth a try


CCleaner is a windows application, even if you run it with Wine, it won't make any sense to do so because it removes files based on their file paths which is totally different on Ubuntu. Other programs ran by CCleaner have similar issues and registry cleaning will only affect the wine settings of CCleaner.

So, in no way is CCleaner beneficial on Ubuntu.


How to use IDM on Mozilla Firefox Quantum

You don't need to install IDM to replace the FlashGot add-on in Firefox 57, because FlashGot's functionality is also duplicated by uGet from the default Ubuntu repositories. uGet's Clipboard Monitor is all you need for browser integration.
uGet is a lightweight and very powerful download manager application. You can install uGet in all currently supported versions of Ubuntu with this command:
sudo apt install uget

There is an option in the uGet settings to always show a uGet system tray icon in the notification area of the panel to the left of the clock and volume icons.
Features

Resume downloads  – If your connection is interrupted, you can start right back where you left off with download resuming. (not guaranteed, it's server controlled and cannot be bypassed by a download manager)
Queue downloads
Classify downloads in categories
Batch downloads
Multi-Protocol – support for downloading files through HTTP, HTTPS, FTP, BitTorrent and Metalink
Clipboard monitoring
Import a list of URLs to download via .txt or .html files

uGet also can be launched from the terminal with the command: uget-gtk


Can I use my Ubuntu notebook's display as second external monitor for my Windows desktop?

Notebook display does not have input jack, most likely. So answer is NO.


Purple color of Boot splash screen not changing

you have to open the file with root previlege

gksu gedit /lib/plymouth/themes/ubuntu-logo/ubuntu-logo.script

and then change the values and you can save it.


Is it possible to configure compile option for libs installed from apt-get?

If you install a package via apt, than you cant't change the options (keyword Makefile) for the compiler because you install one or more binaries.

So you have to recompile if you want that a particular option is added or removed.

Alternatively, you can search a PPA that is better suited to your needs.


My Fix:

sudo touch /etc/pm/sleep.d/00_mousereset
sudo nano /etc/pm/sleep.d/00_mousereset

paste/type in the following and save:

#!/bin/sh

case "$1" in
        hibernate)
                ;;
        suspend)
                ;;
        thaw|resume)
                sleep 2
                /sbin/rmmod psmouse
                sleep 2
                /sbin/modprobe psmouse
                ;;
        *)      echo "ERROR calling " $0
                ;;
esac

sudo chmod 755 /etc/pm/sleep.d/00_mousereset

Save and next time you suspend/resume it should work.


Where is torcc for Tor browser in ubuntu 14.04

That file is located at /etc/tor/torrc.

If that file you are looking for. But it is in tor package.

And this package is not in ppa, but in Ubuntu universe repository.

You can find where this file is installed by

dpkg-query -L tor | grep torrc


Netplan: How can I assign the entire subnet to the NIC, exept for the gateway and broadcast IP


Ubuntu 12.04 NFS v4 mount error incorrect mount option was specified

I was getting the incorrect mount option error after I upgraded to Ubuntu 14.04.  What worked for me was to specify the nfsvers option:

mount -t nfs -o nfsvers=3 machine:/ /mountdir


By the Kubuntu developers: http://irclogs.ubuntu.com/2012/11/17/%23kubuntu-devel.html

  as per bug 1067611 we are trying to push 4.4.1 into regular 12.10,
  however first we need to assure that this release is of sufficient
  quality...

  so i tis in a separate part of the official archive called
  'proposed'... once it has been verified that the new version works as
  expected we can move it to from proposed to the regular archive

bug 1067611: https://bugs.launchpad.net/ubuntu/+source/kdevelop/+bug/1067611

Ubuntu proposed: https://wiki.ubuntu.com/Testing/EnableProposed


Problems with link aggregation with Mate 16.04

I figured out where I was going wrong

sudo ifup bond0

did not activate the bond properly. Restarting the pc did this and it all worked a treat.

It was a proper DOH moment, I can tell you!!! I'm just not used to restarting a linux box these days, anyone would think I was still on Windows :-D


Connected to WiFi/ethernet but can't connect to internet

SOLVED: It turns out the problem was a firewall issue. Hopefully OP will find the specifics and update the original post. For those wanting to understand how online tech support works, the comments show the step by step approach used to identify then solve the problem.

I'd start by removing the Wifi as a possible source of problems. Connect directly to your router using an ethernet cable. Next try and ping the router on its IP (I'd expect this to be something like 192.168.1.1), but "ip addr" will tell you.

I can see that your Wifi is on 192.168.43.146 which seems fairly normal, so you could just try pinging/connecting to the gateway using a web browser http://192.168.43.1.

Either Wifi gateway IP or ethernet gateway IP should bring up your router's web UI.

If that works and you have other devices that connect to the internet via this router (i.e. a phone), then the issue is likely to be firewall type issues e.g. iptables, AppArmor, ufw, etc.

If you can't reach your router's web UI then it is likely that you have some odd DHCP configuration that is not giving out the correct gateway for your PC. Try manually configuring the ethernet interface with an unused IP that is in your subnet e.g. 192.168.1.111. This is also much easier to get right when using a cable rather than wifi. If that works and you are connected, then you could just run with it by making sure that IP is never given out by your router (check you router config), but it would be better to find out why and fix it.


First off, like @CassioSposito said, you are using 32-bit Ubuntu. You should really be using 64-bit if your processor supports it.

Ubuntu likes eating up RAM because it likes caching things. Ubuntu, in other words, likes storing stuff in memory because it's faster to read/write. It also likes doing this because it doesn't like wasting valuable RAM.

The cache size is dynamically fluctuating and is based off of two things:

The amount of memory needed by other programs
The amount of free memory.

Ubuntu will use almost all of the free memory for its cache, but it will remove stuff from cache when other programs need the memory.

It is perfectly normal behavior. In fact, most modern operating systems do this because it makes the system faster and has no real downsides.


bash does that by default if the bash-completion package is installed, just type e.g.

> apt i

press Tab ↹ and you'll get

> apt install

If there are multiple matches, pressing Tab ↹ another time will display a list of them., e.g.

> ap

Tab ↹

nothing happens

Tab ↹

aplay                         apport-bug                    apt                           aptdcon                       aptitude-curses
aplaymidi                     apport-cli                    apt-add-repository            apt-extracttemplates          aptitude-run-state-bundle
apm_available                 apport-collect                apt-cache                     apt-ftparchive                apt-key
apparmor_parser               apport-unpack                 apt-cdrom                     apt-get                       apt-mark
apparmor_status               appres                        apt-config                    aptitude                      apt-sortpkgs
applygnupgdefaults            apropos                       aptd                          aptitude-create-state-bundle


Avoid verification code request when using sudo using Google authenticator

Just came across this question while looking for a solution to this problem myself. This is how I have managed to have Google Authentication in the existing services except when using sudo. I assume you have added the following line to /etc/pam.d/common-auth in order to enable the Google Authentication:

auth    required    pam_google_authenticator.so    nullok

In the same /etc/pam.d directory you should have a file called sudo which handles sudo authentication. This file should contain a line

@include common-auth

This is pulling the content of the common-auth file which is forcing the additional google authentication to be implemented.

NOTE -> you should make a backup of your sudo file before proceeding (just in case).

In order to solve this, copy the contents of the common-auth file into the sudo file below the @include common-auth line.
Then comment/remove the lines

@include common-auth

and

auth    required    pam_google_authenticator.so    nullok


This is just one of many possible ways:

Put that script file anywhere. For example mine is at /home/doug/init/doug_firewall.

Make sure the permissions are correct for execution. For example mine:

$ ls -l /home/doug/init/doug_firewall
-rwxr-xr-x 1 doug doug 60254 Jul  3 09:52 /home/doug/init/doug_firewall

Then edit the /etc/network/intrefaces file to execute the script during startup. For example mine:

$ cat /etc/network/interfaces
# interfaces file for smythies.com 2016.01.30
#       attempt to set local DNS herein, as the method
#       used with the old 12.04 server no longer works.
#
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback
pre-up /home/doug/init/doug_firewall
dns-nameservers 127.0.0.1

# The primary interface (d-link PCI card)
auto enp4s0
iface enp4s0 inet dhcp

# Local network interface (uses built in ethernet port)
auto enp2s0
iface enp2s0 inet static
  address 192.168.111.1
  network 192.168.111.0
  netmask 255.255.255.0
  broadcast 192.168.111.255


Install Ubuntu Server to a flash drive, permanently

If you happen to have Ubuntu at HDD with LVM (Ubuntu Server utilizes LVM by default).

This scripts was tested in Ubuntu Oneiric 11.10 x86_64 3.0.0-16-server with next applications:

LVM version:     2.02.66(2) (2010-05-20)
Library version: 1.02.48 (2010-05-20)
Driver version:  4.20.0
grub-install (GRUB) 1.99-12ubuntu5
aufs - advanced multi layered unification filesystem. version 2.1-standalone.tree-3.0-rcN-20110620

Step1. Shrink root FS to the size of your FlashDrive or smaller. Skip this step if your root FS size the same or smaller then the FlashDrive.

Boot with Resc CD mount your root partition. Run next commands:

#make the kernel realize the LVM volumes are there
lvm vgchange -a y

#Before shrinking the file system, it is good practice to check it is all in order.
# Change /dev/ubuntu/root with your root lvm partition
e2fsck -f /dev/ubuntu/root

#After the check, resize2fs can be used to shrink the file system on the LVM volume
# Change /dev/ubuntu/root with your root lvm partition. Replace 6G with your FlashDrive capacity-500Mb
resize2fs -f -p /dev/ubuntu/root 6G
#The e2fsck check command could be run again to make sure the, now significantly smaller, root file system is OK.
# Change /dev/ubuntu/root with your root lvm partition. Replace 6G with your FlashDrive capacity-500Mb
resize2fs -f -p /dev/ubuntu/root 6G

#The lvreduce command reduces the size of LVM volumes.
# Change /dev/ubuntu/root with your root lvm partition. Replace 6G with your FlashDrive capacity-500Mb
lvm lvreduce -L6G /dev/ubuntu/root

#you resided root partition !
reboot

Step 2. Preparing the FlashDrive: for migrating

take a look at your old root UUID

blkid
#it will show something like:
#/dev/sda1: UUID="6b5085da-5b7c-4ca5-a907-1e527c87a478" TYPE="ext2"
#/dev/sda2: UUID="iZjCPX-AwGS-kEmg-zXPc-Z7ne-Xd3N-gXoPQd" TYPE="LVM2_member"

#We will need /dev/sda1's UUID later. Lets remember it (6b5085da-5b7c-4ca5-a907-1e527c87a478) for the future.

# Replace /dev/sdg with your FlashDrive. All data will be last!
fdisk /dev/sdg
make first partition (sdg1) about 500Mb as ext2/ext4
make second partition (sdg2) for example 6GB as LVM partition.

#replace ubuntu with the same LVM VolumeGroup for your root fs
#Extending VG with FlashDrive
vgextend ubuntu /dev/sdg2
modprobe dm-mirror
#Moving root partition to flash drive online :)
#Replace /dev/sdg2 with your Flash Drive's second partition
#Replace /dev/sda5 with your root drive
pvmove --verbose /dev/sda5 /dev/sdg2
#removing old root drive from VolumeGroup, so we can remove HDD from PC after manipulations. But not now.
vgreduce ubuntu /dev/sda5
#Creating boot partition.
#Replace /dev/sdg1 with your Flash Drive's first partition
mkfs -t ext4 -v /dev/sdg1
#Mounting first FlashDrive partition.
mkdir /mnt/boot
#Replace /dev/sdg1 with your Flash Drive's first partition
mount /dev/sdg1 /mnt/boot

#we will need some tools
apt-get install dump
#coping boot drive from HDD to FlashDrive first partition
#Replace /dev/sda1 (source) and /mnt/boot (destination) with your environments
(dump -0f - /dev/sda1) | ( cd /mnt/boot; restore -rf - )
#And let's not forget to restore boot sector (MBR):
# Replace /dev/sdg with FlashDrive disk path
grub-install /dev/sdg

#change UUID for /boot with the one we remember at the beginning of the Step 2 (6b5085da-5b7c-4ca5-a907-1e527c87a478).
vi /etc/fstab

#now we need to write changes to grub.
update-grub

#Now you can power off your PC.
poweroff
#Now you can replace old root FS's HDD.
#Do not forget configure your PC's BIOS to boot from your FlashDrive.

A) If your grub loaded but it do not able to load OS at first reed this article.
try ls command to figure out what grub seeing.

grub>ls
# Replace (hd0,msdos1) regard to previous output
grub>ls (hd0,msdos1)

# Replace (hd0,msdos1)/grub regard to previous output
grub>ls (hd0,msdos1)/grub

grub>configfile (hd0,msdos1)/grub/grub.cfg

After successful booting the changes not permanent, so you have to update grub

update-grub

B) If you do not sees grub at all, then use Rescue CD to boot.

#and install grub
#Lets figure out new name of your FlashDrive
blkid
# Replace /dev/sda with new name of your FlashDrive which system shows you
grub-install /dev/sda
#Reboot without Rescue CD and go to point A)
reboot

Step 3. AUFS for root file system on usb flash drive.

apt-get update
 apt-get dist-upgrade
 apt-get install aufs-tools

# Aufs as root with apparmor. Enter dhclient3 to complain mode
# Network interface without it wount start/
apt-get install apparmor-utils
aa-complain dhclient3
# Or disable apparmor
#/etc/init.d/apparmor stop
#update-rc.d -f apparmor remove
#aptitude remove apparmor apparmor-utils

echo aufs >> /etc/initramfs-tools/modules

Now create /etc/initramfs-tools/scripts/init-bottom/__rootaufs file
and place next script:

#!/bin/sh
#  Copyright 2008 Nicholas A. Schembri State College PA USA
#
#  This program is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see
#    <http://www.gnu.org/licenses/>.

# https://help.ubuntu.com/community/aufsRootFileSystemOnUsbFlash#rootaufs_Script

# Thank you Voyage Linux for the idea, http://voyage.hk/ Great job on release 0.5
#
# Tested with 8.04.1
# tested with 9.10
# tested with debian live 6.0.1
#
# ****************************************************************************************
#
#                                 Change log
#
# 2008.08.01  Added debugging comments in "drop to a shell" section. grub option aufs=tmpfs-debug will stop the init script.
#             reviewed *********** fix fstab on tmpfs ******************
#             rootaufs failed when system was booted with /dev/xxx and fstab had uuid= info.
#             BlaYO pointed out the best and simplest solution was to use grep -v. Grep replaces a sed one liner.
#             Add the comment block to fstab
#
# 2009.12.07 Corrected issue caused by Apparmor.
#            Name changed to __rootaufs.
#
# 2011.08.19 Changed if condition to avoid issue (sh: bad number) when $aufsdebug is not set.
#            Now checks exists apparmor before delete.
#
# 2011.08.20 For work correctly with Debian Live 6.0.1 (http://live.debian.net/) two lines must be removed from rc.local modification part:
#             'mount -f  /ro'
#             'echo aufs-tmpfs /rw tmpfs rw 0 0 >>/etc/mtab'
#

case $1 in
prereqs)
    exit 0
    ;;
esac

export aufs

for x in $(cat /proc/cmdline); do
    case $x in
    root=*)
        ROOTNAME=${x#root=}
        ;;
    aufs=*)
        aufs=${x#aufs=}
        case $aufs in
        tmpfs-debug)
            aufs=tmpfs
            aufsdebug=1
            ;;
        esac
        ;;
    esac
done

if [ "$aufs" != "tmpfs" ]; then
    #not set in boot loader
    #I'm not loved. good bye
    exit 0
fi

# This is a simple overview of the steps needed to use aufs on the root file system and see the /rw and /ro  branches.
# initramfs init-botton script
# move the root file system to aufs/unionfs readonly /ro
# root is mounted on ${rootmnt}
# create tmpfs on /rw
# create a aufs using /ro and /rw
# put some files on the tmpfs to fix mtab and fstab
# move aufs to rootmnt to finish the init process.
# No changes to the root file system are made by this script.
#
#  Why!
#  This will allow you to use a usb flash drive and control what is written to the drive.
#  no need to rebuild the squashfs file just to add a program.
#  boot to single user mode.  The system works the way you expect. boot aufs=tmpfs and no changes are written to the flash.
#  run ubuntu on an eeePC .

# Install
# Install ubuntu 8.04 Hardy. Hardy has aufs installed by default
# apt-get update
# apt-get dist-upgrade
# apt-get install aufs-tools
# echo aufs >> /etc/initramfs-tools/modules
# put this file in /etc/initramfs-tools/scripts/init-bottom/rootaufs
# chmod 0755 rootaufs
# # clean up menu.lst
# update-grub
# update-initramfs -u
# vi /boot/grub/menu.lst
# add aufs=tmpfs to the default entry.
# do not add this line to single user mode.
# boot to single user mode in order to install software.
# note: if your home account is on the root file system, your files are in ram and not saved.
#

echo
echo "       root-aufs:  Setting up aufs on ${rootmnt} as root file system "
echo

modprobe -q --use-blacklist aufs
if [ $? -ne 0 ]; then
    echo    root-aufs error:      Failed to load aufs.ko
    exit 0
fi

#make the mount points on the init root file system
mkdir /aufs
mkdir /rw
mkdir /ro

# mount the temp file system and move real root out of the way
mount -t tmpfs aufs-tmpfs /rw
mount --move ${rootmnt} /ro
if [ $? -ne 0 ]; then
    echo    root-aufs error:    ${rootmnt}  failed to move to /ro
    exit 0
fi

mount -t aufs -o dirs=/rw:/ro=ro aufs /aufs
if [ $? -ne 0 ]; then
    echo    root-aufs error:      Failed to mount /aufs files system
    exit 0
fi

#test for mount points on aufs file system
[  -d /aufs/ro ] || mkdir /aufs/ro
[  -d /aufs/rw ] || mkdir /aufs/rw

# the real root file system is hidden on /ro of the init file system.  move it to /ro
mount --move /ro /aufs/ro
if [ $? -ne 0 ]; then
    echo    root-aufs error:      Failed to move /ro /aufs/ro
    exit 0
fi

# tmpfs file system is hidden on /rw
mount --move /rw /aufs/rw
if [ $? -ne 0 ]; then
    echo    root-aufs error:      Failed to move /rw /aufs/rw
    exit 0
fi

#*********** fix fstab on tmpfs ******************
# test for /dev/sdx
# this is not on the real file system.  This is created on the tmpfs each time the system boots.
# The init process will try to mount the root filesystem listed in fstab. / and swap must be removed.
# the root file system must be mounted on /ro not on /

if [ "0$aufsdebug" -eq 1 ]; then
    echo  "   root-aufs debug:    Remove the root file system and swap from fstab "
    echo
    echo
    echo  "         ROOTNAME $ROOTNAME "
    echo  "         resume   $resume   "
    echo
    echo  '     BlaYO pointed out that grep can be used to quickly remove '
    echo  '      the root file system from fstab. '
    echo
    echo  '     Thank you BlaYO for the debug info.'
    echo

fi
# old code
# I'm sure that sed can do this in one step but I want to correct on the rootname  not matching the root in fstab.
#cat /aufs/ro/etc/fstab|sed -e s/$ROOTNAME/\#$ROOTNAME/ -e s/$resume/\#$resume/ >/aufs/etc/fstab

#Add the comment block to fstab
cat <<EOF >/aufs/etc/fstab
#
#   RootAufs has mounted the root file system in ram
#
#  This fstab is in ram and the real fstab can be found /ro/etc/fstab
#  the root file system ' / ' has been removed.
#  All Swap files have been removed.
#

EOF

#remove root and swap from fstab
cat /aufs/ro/etc/fstab|grep -v ' / ' | grep -v swap >>/aufs/etc/fstab
if [ $? -ne 0 ]; then
    echo    root-aufs error:      Failed to create /aufs/etc/fstab
    #exit 0
fi

# add the read only file system to fstab
#ROOTTYPE=$(/lib/udev/vol_id -t ${ROOT})
ROOTTYPE=$(cat /proc/mounts|grep ${ROOT}|cut -d' ' -f3)
ROOTOPTIONS=$(cat /proc/mounts|grep ${ROOT}|cut -d' ' -f4)
echo ${ROOT} /ro $ROOTTYPE $ROOTOPTIONS 0 0 >>/aufs/etc/fstab

# S22mount on debian systems is not mounting  /ro correctly after boot
# add to rc.local to correct what you see from df
#replace last case of exit with #exit
cat /aufs/ro/etc/rc.local|sed 's/\(.*\)exit/\1\#exit/' >/aufs/etc/rc.local
echo mount -f  /ro >>/aufs/etc/rc.local

# add back the root file system. mtab seems to be created by one of the init proceses.
echo "echo aufs / aufs rw,xino=/rw/.aufs.xino,br:/rw=rw:/ro=ro 0 0 >>/etc/mtab" >>/aufs/etc/rc.local
echo "echo aufs-tmpfs /rw tmpfs rw 0 0 >>/etc/mtab" >>/aufs/etc/rc.local
echo exit 0 >>/aufs/etc/rc.local

#  Copyright 2008 Joaquin I. Bogado Garcia
#fix para apparmor, se desactiva y listo ( From the lethe project. )
[ -e /scripts/init-bottom/_apparmor ] && rm /scripts/init-bottom/_apparmor
[ -e /aufs/etc/init.d/apparmor ] && rm /aufs/etc/init.d/apparmor

#build remountrw
echo \#!/bin/sh >/aufs/bin/remountrw
echo mount -o remount,rw ${ROOT} >>/aufs/bin/remountrw
chmod 0700 /aufs/bin/remountrw

#build remountro
echo \#!/bin/sh >/aufs/bin/remountro
echo mount -o remount,ro ${ROOT} >>/aufs/bin/remountro
chmod 0700 /aufs/bin/remountro

# This should drop to a shell. (rewrite)
if [ "0$aufsdebug" -eq 1 ]; then
    echo
    echo "   root-aufs debug:    mount --move /aufs ${rootmnt} "
    echo
    echo '   root-aufs debug:   init will stop here.   '
    echo
    exit 0
fi

mount --move /aufs ${rootmnt}

exit 0

After we need to change permissions for this file:

chmod 0755 /etc/initramfs-tools/scripts/init-bottom/rootaufs

Step 4. Changing GRUB2.

cat /etc/grub.d/10_linux|sed  s/'linux_entry "${OS}" "${version}" false'/'linux_entry "RO: ${OS}" "${version}" false'/ |sed  s/'"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_EXTRA} ${GRUB_CMDLINE_LINUX_DEFAULT}"'/'"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_EXTRA} ${GRUB_CMDLINE_LINUX_DEFAULT} aufs=tmpfs"'/ >/etc/grub.d/06_custom

sed -i.orig -e \
"/{GRUB_DISABLE_RECOVERY}\" != \"xtrue\" ]; then/s/^.*$/    \
if [ 0 ]; then/" \
/etc/grub.d/06_custom

sed -i.orig -e \
"/in_submenu=:/s/^.*$/    \
/" \
/etc/grub.d/06_custom

sed -i.orig -e \
"/\"Previous Linux versions/s/^.*$/    \
echo ''/" \
/etc/grub.d/06_custom

rm /etc/grub.d/06_custom.orig

chmod 755 /etc/grub.d/06_custom

update-grub
update-initramfs -u


Weak WiFi signal in Ubuntu on HP G240 G5

First installing Realtek wifi driver in ubuntu, use below commnad for the same.

#sudo apt-get install linux-headers-generic build-essential git
#git clone https://github.com/lwfinger/rtlwifi_new.git
#cd rtlwifi_new
#make
#sudo make install
#sudo modprobe rtl8723be

Disable wifi power saving mode by below command.

#sudo vi /etc/modprobe.d/rtl8723be.conf
and type below parameter in to above file.
options rtl8723be fwlps=0

Now test wifi that on which slot it is working good by below commands,

#sudo modprobe -r rtl8723be
#sudo modprobe rtl8723be ant_sel=1
#iwlist scan | egrep -i 'ssid|quality'

or for slot 2

#sudo modprobe -r rtl8723be
#sudo modprobe rtl8723be ant_sel=2
#iwlist scan | egrep -i 'ssid|quality'

If it is working on slot one,run below command,

#echo "options rtl8723be ant_sel=1" | sudo tee -a /etc/modprobe.d/rtl8723be.conf
and If ant_sel=2 was better, then
#echo "options rtl8723be ant_sel=2" | sudo tee -a /etc/modprobe.d/rtl8723be.conf

At last reboot the system
#sudo reboot.
DONE!

For more refer http://www.syshunt.com/hp-ubuntu-16-linux-mint-weak-wifi-signal-problem/


Why choose a low latency kernel over a generic or real-time kernel?

These are some simple guidelines provided to help you understand which
  kernel, and in which order, you should test to fit your use case.

  If you do not require low latency for your system then please use the -generic kernel.
  If you need a low latency system (e.g. for recording audio) then please use the -preempt kernel as a first choice. This reduces latency
  but doesn't sacrifice power saving features. It is available only for
  64 bit systems (also called amd64).
  If the -preempt kernel does not provide enough low latency for your needs (or you have an 32 bit system) then you should try the
  -lowlatency kernel.
  If the -lowlatency kernel isn't enough then you should try the -rt kernel
  If the -rt kernel isn't enough stable for you then you should try the -realtime kernel

Ubuntu Help Source

So it depends on what you will do with your studio distro. For most users needing fast end-user response time generic will just do fine, for others who need to do professional video editing where even a simple frame drop is unacceptable the real-time kernel is needed.

For a more exhaustive easy-to-understand blog post, read this link


Are there plans for snap packages to auto-update through Software Centre?

By default snapd auto-updates snaps. Check the output of
sudo journalctl -u snapd.refresh.service

to see how the last updates went.
Note: Documentation for this feature is available here.


Cannot access shared floder on ubuntu from windows 10 meanwhile I have access to default Public folder

The problem isn't the permissions on Data it's the fact that the system sets up an access control on /media/abdelkrim such that only that user can get to Data.

You have two options:

[1] Move the mount point up a level so that it mounts to /media/Data then share that.

[2] Or edit /etc/samba/smb.conf and add a line under workgroup = WORKGROUP :

force user = abdelkrim

Then restart smbd: sudo service smbd restart


"32-bit color" is generally a misnomer in regard to display color depth. While actual 32-bit color at ten to eleven bits per channel produces over 4.2 billion distinct colors, the term “32-bit color” is most often a misuse referring to 24-bit color images with an additional eight bits of non-color data (I.E.: alpha, Z or bump data), or sometimes even to plain 24-bit data.

Source


Print Dialogue configuration to shell script

Look into the lp command. That man page should help with finding all the options:

man lp


Please read this

For all the tmpfs mounts, "Avail" is an artificial limit. The default size for tmpfs mounts is half your RAM. It can be adjusted at mount time. (man mount, scroll to tmpfs).

Consider also that the limit of your tmpfs is half of your memmory (Physical memmory + SWAP)


Can't change the resolution higher than 1024x768

If anyone follows this question i found the answer myself.
I had a VGA to DVI adapter cause i had no room to plug the VGA cable alone so i used the DVI slot. I made room for the VGA slot and plugged the cable without the adapter and now it works.


Please install all available updates for your release before upgrading. Can't upgrade to 20.10 from 20.04.1

disabling teamviewer and chrome in my 3rd party sources resolved the error.   thank you guiverc for leading me in the right direction with my confusing post :)


SSH Process not Killed on Remote Machine when the Remote System Unexpectedly Disconnects

Try screen or tmux. On the server side, or both sides if you like:

sudo apt-get install tmux

After logging in, start tmux.

tmux

If the connection breaks, log in again via ssh and reconnect the tmux session.
To discover the session number:

tmux ls

The output might be something like this:

0: 1 windows (created Tue Dec 25 19:20:40 2012)

Connect to the tmux numbered session like this:

tmux attach -t 0

Then you are right back where you left it. You won't have to kill the sessions. They just wait for your next visit. Or, if you just want to kill the session...

On the server side, see the /etc/ssh/sshd_config setting for ClientAliveInterval and ClientAliveCountMax. (man 5 ssh_config)

ClientAliveInterval 300
ClientAliveCountMax 0

Once they have been changed to your preference, restart the SSH server.

sudo /etc/init.d/ssh restart

The 300 is seconds (five minutes).


Is it possible to dual boot Mac OSX Lion with Ubuntu 12.04?

It's actually very much possible. There is always a risk of loosing data, so back up first. But it worked well for me. I wrote an extensive guide here. The trickiest part is the work with EFI, since Macs don't have a BIOS. Be sure to check compatibility with your Hardware.


Possible to set Thunderbird to not mark messages as read, by default?

In Thunderbird's Preferences-window choose Display and select the Advanced-tab.There you will find the desired option.


Login screen hangs after upgrading to 5.8.0-49-generic

It appears that the issue was something in the Nvidia proprietary display driver (nvidia-driver-460) not carrying over to the new kernel. Thanks for the tip @Terrance :)
Here's what I did to fix:

Boot back to 5.8.0-48-generic (by choosing "Advanced options for Ubuntu" at the GRUB boot menu).
Open the Software & Updates dialog, go to Additional Drivers, choose the open source driver (the nouveau display driver) and Apply Changes.
Once applied, reboot to 5.8.0-49-generic. Monitor, keyboard and mouse should be working now.
Go back to the Additional Drivers tab, choose and apply the Nvidia proprietary display driver again. And that's it.


How to configure idle period for auto locking screen

Hi yes this is in the System Setting -> Brightness and Lock

Then you can change the amount of time to turn the screen off.


This first part should be a comment, but I can't comment on questions yet:  I find it very interesting that a new usb drive would not be mounted by default as the current user with read/write permissions.  Are you sure that this is a new USB and hasn't been used with some other system that might have changed the permissions?  Regardless... here's something that might work:

Use this command to get some useful information about your USB drive.

sudo blkid

This will list the various devices mounted on your system along with some information about them.  For example here is my output for this command:

~$ sudo blkid
[sudo] password for austin:
/dev/sr0: LABEL="HOMEWORLD2" TYPE="iso9660"
/dev/sda1: SEC_TYPE="msdos" LABEL="DellUtility" TYPE="vfat"
/dev/sda2: LABEL="tango-studio" UUID="f9bc8449-729e-4ae7-b1f1-5292c8e27049" TYPE="ext4"
/dev/sda3: LABEL="XP" UUID="0C70E36470E352CE" TYPE="ntfs"
/dev/sda5: TYPE="swap"
/dev/sda6: LABEL="ubuntu-11.10" UUID="54d4f2c0-16f3-4385-b896-4ca1732edda9" TYPE="ext4"
/dev/sda7: LABEL="home" UUID="59aba69a-2bbb-43ca-b296-81b7fc16323a" TYPE="ext4"
/dev/sda8: LABEL="data" UUID="3abb7974-6402-4de5-bfd7-f4b3af8f7ca7" TYPE="ext4"
/dev/sdb1: LABEL="TOSHIBA EXT" UUID="583AA2D33AA2AE06" TYPE="ntfs"

The last entry is my external USB drive.  Note down the UUID and TYPE of your external drive.

You can make sure that your drive is automatically mounted as your current user by adding a line in your /etc/fstab file.  The fstab file sets the default mount options for your devices.  Here is some more information about fstab: https://help.ubuntu.com/community/Fstab

Backup your fstab file before modifying it sudo cp /etc/fstab /etc/fstab.bak and then you will have to edit it as root gksudo gedit /etc/fstab

In the following examples replace the following variables with your own info:

[your UUID] = the UUID you found for your device from the blkid command

[your mount-name] = the name you want the device to be mounted as, for example "EXTERNAL-USB" (not incredibly important what you choose)

[user_name] = name of your computer

If your USB's filesystem is NTFS use something like this:

UUID=[your UUID]  /media/[user_name]/[your mount-name]  ntfs-3g  user,uid=1000,gid=100,dmask=027,fmask=137  0  0

If your USB's filesystem is FAT use something like this:

UUID=[your UUID]  /media/[user_name]/[your mount-name] vfat user,uid=1000,gid=100,dmask=027,fmask=137  0  0

example : UUID=B4FE-531  /media/ajay/Win7_sp1_32vfat user,uid=1000,gid=100,dmask=027,fmask=137  0  0

The options uid=1000,gid=100 will set the drive as owned by the default user in Ubuntu (hopefully you) and the group "users". The options dmask=027,fmask=137 set the permissions to read/write.  With NTFS theoretically you can now also use the option "permissions" to make it compatible with Linux permissions but I have never tried this.

Hopefully this helps.  Good luck.


Splitting rsnapshot backup to multiple disks

You can mount sdb and sdc on your server at /mnt/backup/husband/ and /mnt/backup/wife

That way you can maintain your current settings. I would not worry about names of mount points so much.


Notepad++ doesn't work out of the box via Wine with the installed Firefox software.

You will need to install Firefox under Wine to make it work, using the Windows installer for Firefox.  Notepad++ should then work with Firefox under Wine.

An alternative to Notepad++ is the already-installed gedit software.  It does most of the same functions as Notepad++ in terms of syntax highlighting and such, and comes included with Ubuntu.


My wireless connection went down suddenly, and I cannot get it back

SOLVED.

Ok, well I feel stupid.  Not being very familiar with the Network Menu, I did not notice that the option indicating the status of the Wireless Hardware Switch was OFF.  I discovered thru 5 min of research that there is a wireless antenna switch on my keyboard, and where it was.  It is located in a row of other switches at the top of my keyboard beside the lighted ON/OFF power switch, and is iconized by a "broadcasting antenna" picture.  My laptop is a Toshiba Satellite A665.  I must have accidentally pressed it to turn it off the other night.  Sorry for the silly problem, but there are so many similar forum posts, I figured I had a real problem.  Maybe this is actually the problem others are having.


You can certainly try the approach I will outline below but I don't know if anyone has tried it successfully.

Install virtualization software on your Ubuntu machine (VMWare, Xen, VirtualBox).
Install Microsoft Windows Server in the virtual machine.
Install MS SQL Server on the newly installed Windows Server.

I don't know if any other way would work but people can correct me the MS SQL Server from what I can remember actually relies on Licensing for Microsoft Windows Server.  On top of this SQLServer is a pretty bad resource hog so normally organizations try to segregate it from running with any other applications on it's own cluster or server.

One thing that I would question is why not try Sybase as the backend?  The connectivity from Linux to SQLServer and Sybase can go through FreeTDS, which would look identical to your client software.


Is it safe to remove gnome-session on a clean Ubuntu 11.10 install?

Removing nautilus will remove the following packages.

 gnome-session nautilus nautilus-sendto nautilus-share ubuntu-desktop

The removal of gnome-session will remove Unity and Unity 2D.  On a clean install you will not have any sessions to log into!

You could install gnome-shell from the software-center first before removing nautilus.

After removing nautilus you will be left with two sessions to log into - gnome-classic and gnome-classic (no effects).

Since you have removed nautilus - you will not be able to right-click and drop files and folders onto the desktop.

You could add to pcmanfm --desktop to your startup applications to get the capability back.


How to start an app with "Always On Top" set?

There is a more general solution, working with a EWMH/NetWM compatible X Window Manager (all commonly used wm are included).

The solution concerns the use of the wmctrl application (found in wmctrl package).

You can set the "on-top" property with

wmctrl -r "window title" -b add,above

There is, however, some work left to automate the process.


Why has my wired internet connection become intermittent?

The network I am on is administrated poorly.  I used to get a lot of IP address conflicts.  Knowing this to be the case, I tried spoofing my MAC address.  I used macchanger.

I have now been using the internet for an hour without any timeouts or slowness.  It looks like this fixed it.


Here's how I do it:

install Gnome-Do

install the Tomboy plug-in, in Gnome-Do

highlight text

bring up Gnome-Do, begin typing in "New Tomboy Note" (it'll fill in the rest for you)

And voila: a new Tomboy note with your highlighted text already included.


Strange sound artifacts when using Firefox while music is played

Audigy 2 user here.

With PulseAudio, I have to lower the Wave volume from my mixer (alsamixer) to remove static / cracking noises. (This took me a stupidly long time to figure out.)

This disables sound from Flash videos and the like, but mpd, VLC, etc. still work as they should without any cracking or popping (they are configured to interface with PulseAudio). That said, when I have to play a Flash video, I turn the Wave volume back up.

mplayer may have the same problem because it tries to use OSS or ALSA instead of PulseAudio (you should be able to configure it differently).

Cheers!


I believe this to be a bug in the driver, there appears to be a workaround which may work for you:

You have to modify the following line in /etc/pulse/default.pa

load-module module-udev-detect

with :

load-module module-udev-detect tsched=0

sources:

munbi at https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/751265/comments/23

http://www.freedesktop.org/wiki/Software/PulseAudio/Backends/ALSA/BrokenDrivers/

If this approach doesn't work for you, look here and here for further instruction.

You can also try this: Distorted and Choppy Audio


Proper Install Tablet WACOM Intuos Pen&Touch CTH-480 on Ubuntu 17.10

The second cursor means you are using Wayland (the default). If you want to use the Wacom tablet on 17.10 you should switch to Xorg.

See this question for how to do this:

How do you switch from Wayland back to Xorg in Ubuntu 17.10?


How to keep specific old kernel on my next kernel upgrade?

I think you can be confident that your -24 kernel is not going to be overwritten, since the kernel version has been bumped to -27 now.

To be on the safe side, however, you can use any one of the methods described here to lock package linux-image-3.13.0-24-generic.


How to remove a partition on a hard disk?

You can try to use fdisk from the command line. In your case, if you want to delete partition on /dev/sdb just type:

fdisk /dev/sdb

Then once fdisk is opened you can type "d" to delete and then select the partition(s) you want to delete. After you removed the partition(s) don't forget to write the changes.

One advice, do not do that if you didn't reinstalled your OS on /dev/sda (your SSD) or you won't be able to boot the computer then.


How to re-enable GRUB when installed Ubuntu system won't boot?

Boot up your liveCD.

Mount the partition your Ubuntu Installation is on. If you are not sure which it is, launch GParted (included in the Live CD) and find out. It is usually a EXT4 Partition. Replace the XY with the drive letter, and partition number, for example: sudo mount /dev/sda5 /mnt.

sudo mount /dev/sdXY /mnt

Now bind the directories that grub needs access to to detect other operating systems, like so:

sudo mount --bind /dev /mnt/dev && sudo mount --bind /dev/pts /mnt/dev/pts && sudo mount --bind /proc /mnt/proc && sudo mount --bind /sys /mnt/sys

Now we jump into that using chroot.

sudo chroot /mnt

Now install, check, and update grub.

This time you only need to add the drive letter (usually a) to replace X, for example: grub-install /dev/sda, grub-install –recheck /dev/sda.

grub-install /dev/sdX
grub-install --recheck /dev/sdX
update-grub

Now grub is back, all that is left is to exit the chrooted system and unmount everything.

exit && sudo umount /mnt/dev && sudo umount /mnt/dev/pts && sudo umount /mnt/proc && sudo umount /mnt/sys && sudo umount /mnt

Shut down and turn your computer back on, and you will be met with the default Grub2 screen.

You may want to update grub or re-install burg however you like it.


One bad sector is not a problem at all. Keep an eye on it, so check regularly.
When it starts increasing dramatically in a short time the disk may fail soon.
The system marks bad sectors as unusable - fixing bad sectors is impossible.
However you can continue to using your disk at the current status of health.


Error generating Ubuntu 12.04 with live build

live-builder defaults to only using the "main" component when building its chroots. This is fine for Debian, where all the packages needed to install a base system are present in main.  Unfortunately, Ubuntu has put busybox in "universe", so you will need to add --archive-areas "main universe" and possibly also --parent-archive-areas "main universe" to your lb config invocation in order to find it.


How do I ":set prompt" by default for a particular program?


You seem to have conflicting versions of libx11-6 installed. When they fail to agree, it stops the whole install process. What you need to do isone of the following:

remove the i386 version of libx11-6 (apt-get remove libx11-6:i386). This might not be an option if a 32-bit application depends on it.

upgrade the amd64 version of libx11-6 (apt-get upgrade libx11-6). This might not be an option if there is no upgrade available.

downgrade the i386 version of libx11-6 (I've never done this without Synaptic). This is a last resort.

Once you have done one of the above, the install should proceed normally. This might have also been causing your LibreOffice problem, but I don't know.


How to skip user creation when installing

You can install Ubuntu as an OEM distributor, with the installer. That way it installs the OS but asks to create a user and it contunues the further setup at a client eg. But in your case this might also be handy.


How to get the command for existing launcher entries?

Launcher entries are .desktop files stored in /usr/share/applications or in ~/.local/share/applications. So you could just use cat on these files.


Why is rc.local in /etc, should it be owned by root, and when is it run?

On Ubuntu 12.04, your rc.local should be owned by root. It's run by root, on startup.

You can sudo -u <user> <command> to run things as another user in rc.local, but I admit that in nearly every single case of using rc.local I've come across, I've found it far simpler to use Startup Programs instead.

I suppose your mileage may vary. I'm afraid I don't know why your rc.local is owned by your user.


How to replace a specific package to be installed with apt

First create a pin file in /etc/apt/preferences.d naming it pin-openssh-client or whatever you want.
Put these lines in the file

Package: openssh-client
Pin: origin ppa.launchpad.net
Pin-Priority: 1001

Save the file and check the priority of the package by apt-cache policy openssh-client.

I added the PPA. The output of the command after adding the pin is

openssh-client:
  Installed: 1:7.2p2-4ubuntu1
  Candidate: 1:7.1p2-hpn14v9-2~ubuntu16.04.1
  Version table:
     1:7.2p2-4ubuntu2.1 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
 *** 1:7.2p2-4ubuntu1 500
        100 /var/lib/dpkg/status
     1:7.2p2-4 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
     1:7.1p2-hpn14v9-2~ubuntu16.04.1 1001
        500 http://ppa.launchpad.net/yoda-jazz-kc/hpn-ssh/ubuntu xenial/main amd64 Packages

From the output, It's seen that the package from the PPA is taking preference over the package provided by the repository (Check the Candidate line).

If you already installed the package, remove it. Then reinstall to get the one from PPA.

Hope that works!


How to write in Brazilian Portuguese using a US keyboard?

When you use the English (US, international with dead keys) layout, the ' (apostrophe) key is turned to a 'dead' key. To type an accent character by itself, you can press ' twice, which results in ´ (acute accent), or you can press ' followed by Space, which results in ' (apostrophe).

Edit:

If you prefer the basic English (US) layout without dead keys, the below may be a suitable setup for GTK applications:

Enable a compose key:
How can I enable Compose key?
Create the file ~/.XCompose and give it this contents:

<Multi_key> <apostrophe> <C> : "Ç" Ccedilla # LATIN CAPITAL LETTER C WITH CEDILLA
<Multi_key> <apostrophe> <c> : "ç" ccedilla # LATIN SMALL LETTER C WITH CEDILLA

Then you can easily type the most common accented letters, for instance:

Compose followed by ' followed by A => á

Compose followed by ' followed by C => ç

and at the same time:

' followed by S => 's

Edit II:

As David pointed out in a comment, the compose key has a built-in way to type ccedilla:

Compose followed by , (comma) followed by C => ç

So basically the ~/.XCompose file suggested above is redundant.