In Ubuntu, you can move the dock to the top with a shell command (variation of the command provided here):
gsettings set org.gnome.shell.extensions.dash-to-dock dock-position TOP

Although this fully answers your question, you may run into other issues: the option is not exposed in the settings dialog. Therefore, placing the dock to the top will cover your top bar. Following are some options:
Shrink the dock so it is centered
You could shrink the dock so that it only covers the center of your top bar:
gsettings set org.gnome.shell.extensions.dash-to-dock extend-height false

Still, that will cover your clock, so you could move it right using an extension (Frippery move clock).
Moving top bar to the bottom
With the dock above, you could move the top bar to the bottom with the extension BottomPanel.
Autohiding the top bar
Instead, you could hide the top bar using the extension Hide Top Bar.
Combining dash and top bar
You could merge top bar and dock. The extension defaults to placing the panel on the bottom, but it can be moved to the top.
gsettings set org.gnome.shell.extensions.dash-to-dock autohide true

Any gsettings command can be easily reverted by issuing the same command, but leving out the actual setting and changing set by reset, e.g.:
gsettings reset org.gnome.shell.extensions.dash-to-dock autohide


I too experienced reboots on my laptop caused by Shotwell.
The issue was Shotwell was using all four CPU cores during picture import, causing its temperature to raise up to a point where a "thermal protection reboot" -so to speak- was performed by the system.
I am unsure whether hardware CPU protection kicked in or Ubuntu (12.04) has a configurable temperature limit somewhere...
(To me that means my laptop has a cooling issue, but that's besides the point.)

The solution I used (and still use today) is limit the amount of CPU power Shotwell can use with cpulimit.

sudo apt-get install cpulimit

Then, after launching Shotwell, I open a terminal and type:

cpulimit  -e shotwell -l 50


What specific mainline kernel does Ubuntu 17.10 ship with?

I HIGHLY suggest you read the release notes, lots of changes.

https://wiki.ubuntu.com/ArtfulAardvark/ReleaseNotes

  Linux kernel 4.13

  Ubuntu 17.10 is based on the Linux release series 4.13. It includes
  support for the new IBM z14 mainframe CPACF instructions and new KVM
  features.

If you need details, check the changelog or launchpad pages

changelog - http://changelogs.ubuntu.com/changelogs/pool/main/l/linux-meta/linux-meta_4.13.0.16.17/changelog

launchpad - https://launchpad.net/~ubuntu-kernel-team

Package search - https://packages.ubuntu.com/source/artful/linux-meta

  linux-headers-4.13.0-16 Header files related to Linux kernel version
  4.13.0


Migrate Nautilus file attributes (Icons, positions, folder views) to another computer

I solved the problem with a small Perl script, see https://github.com/despens/metasave

#!/usr/bin/perl

use 5.10.0;
use strict;
use utf8;
use File::Find;
use String::ShellQuote;

sub handler {
    my $filename = shell_quote($_);
    my $metadata = qx/gvfs-info -a metadata::* $filename/ or die "$filename: $!\n";
    my @lines = split(/\n /s, $metadata);
    for my $line (@lines) {
        my ($attribute, $value) = $line =~ m/^\s*(\S+): (.+)$/s;
        if($attribute and $value) {
            # is there an array in the value?
            if($value =~ m/^\[.+\]$/s) {
                $value =~ s/^\[(.+)\]$/$1/gs;
                my @values = split(/[\[\],\s]+/s, $value);
                map shell_quote, @values;
                my $stringv = join(' ', @values);

                say "gvfs-set-attribute $filename -t stringv $attribute $stringv ;";
            }
            else {
                if($value ne '[]') {
                    $value = shell_quote($value);
                    say "gvfs-set-attribute $filename $attribute $value ;";
                }
            }
        }
    }
}

say "#!/bin/sh";

find({wanted => \&handler, follow => 0, no_chdir => 1}, '.');


There is no default password for the postgres user.  By default, that's a local-only system account that doesn't have a default login.

Further, the postgres user doesn't have direct access to edit the pg_hba file.  You should be editing that with superuser privileges, not with the postgres user.

Edit the file with superuser - pure sudo and a command line to access it.  DO NOT try and edit pg_hba.conf with just the postgres user, use root who actually owns the files.


Where can I find 64bit Ubuntu OS Image for Intel core i5 processor?


Access encrypted home directory of one user when I am logged in as another user

User B being an admin does not mean it can decrypt the home directory of user A. The reason is that only when User A logs in the home folder is made available as if was not encrypted.

I believe this behavior is intended and it is - and should not be - possible.


video frames visibly refresh themselves when playing video clips or youtube on Ubuntu 20.04

BIOS
ASUS AM4 TUF Gaming X570-Plus (Wi-Fi)
You have BIOS 1407.
There's a newer BIOS available, version 2407, and can be downloaded here.

Note: Have good backups before updating the BIOS.
Nvidia
Nvidia RTX 2080 Super
You have driver 440.
There's a newer driver available, version 450.57, and can be downloaded here.


installing openssh-server without an internet connection

This Q How can I install software or packages without Internet (offline)? has a crazy amount of "offline reposiory" type apps.

But if you can run an online apt-get update a basic answer would be found here (if you've got Synaptic available)

Select packages to install in Synaptic
File -> Generate package download script
Run script on an internet-connected (linux/wget enabled) computer
Take downloaded .deb files back to target computer and run sudo dpkg -i [debfiles] or sudo dpkg -i -R [dir with debfiles]

And this other answer about using "simulation" mode (apt-get -s install packagename) to see which packages to download may be helpful too, in case Synaptic isn't available. https://askubuntu.com/a/147606/129271


Default common folder names should automatically change when you change system language.
Two utilities should be run at startup for that (xdg-user-dirs-gtk-update and xdg-user-dirs-update).

I recommend you to manually set folder names and edit the files
- /home/$USER/.config/user-dirs.dirs : path and folder names
- /home/$USER/.config/user-dirs.locale : desktop language

You may rename your folders and edit the user-dirs.dirs file

mv /home/$USER/Téléchargements /home/$USER/Downloads
sed  's/Téléchargements/Downloads/g' /home/$USER/.config/user-dirs.dirs

You may also use the xdg-user-dirs-update program.

More information about Cross-desktop interoperability standards
XDG user directories : https://wiki.archlinux.org/index.php/XDG_user_directories (i love Arch docs)
xdg-user-dirs : https://freedesktop.org/wiki/Software/xdg-user-dirs/


So the solution in this case was simply to switch to the Unity Desktop Environment, after which the OP was able to use the information in this answer:

Install compizconfig-settings-manager
Go to the Display Settings tab and disable output detection
Edit the 640x480+0+0 entry to read 3840x1080+0+0
Then close, and it should work!


Does mounting a USB on Ubuntu Server use the actual PC's disk space?

No, of course not.
If this was the case, you'd never be able to mount volumes larger than the free space left on your root file system.


Wireless shows up as disabled, how can I get it working?

It is likely that the network-manager state got corrupted. Open the file /var/lib/NetworkManager/NetworkManager.state. It should look something like this:

[main]
NetworkingEnabled=true
WirelessEnabled=true
WWANEnabled=true

Change any from 'false' to 'true' to re-enable networking. It may work better if you first stop NetworkManager:

sudo stop network-manager

And start it again once done.. Or reboot

This happened occasionally after wakeup in Lucid. In Maverick this should be fixed.


UPDATE:
I did some looking around and it looks like why it wont minimize to the tray is because it starts before the tray does, so there is no tray for it to minimize to.
So I made a script that delays the start of Gnote so the tray has time to start first.
sleep 5 && gnote -systray
Just put that line is a script file and tell autostart to run that file.
"5" is 5 seconds, so you can change it depending on what you need.

Original Post:
This is how I got Gnote to start minimized on Fedora.
I put a Gnote entry in the autostart and then added --start-minimized so it looked like this:

gnote --start-minimized

but it didn't work.  I was confused because it worked when I put that command in the terminal and it worked, but not when I put it in autostart.
So I found two other commands to try -min and -systray.
-min did the same thing as --start-minimized (worked in the terminal but not in autostart)
but then I tryed -systray and it worked!
so I put this in autostart and it worked:

gnote -systray

The reason I posted the other two commands is because I am not sure which one works in Unity or Ubuntu.

By the way, I got the minimize commands from here: How do I tell a start up program to start minimized?


Restrict internet connection for wps-office on Ubuntu 18.04

You can also use firejail.
firejail --net=none <application>

Firejail offers a ton of choices, including rate-limiting on a per-application basis. It is also a sandboxing application. It has a ton of great features.
sudo apt install firejail
man firejail


Extracting rar files having the same password

I don't think that you can do that in nautilus. In a terminal you can do it with

unrar x -ppassword <files...>

if you want to use the included path names. Type man unrar to see other options.


Printers get signal - but why don't they print in 11.10?

Found this on ubuntuforums.org regarding your Canon. People say it works on 11.10 as well.


Do I need ubuntu-desktop if I'm using i3?

You don't need a desktop package to run GUI applications.

Try to do the Ubuntu Server install with all the things you need. The dependencies will be loaded automatically. If that doesn't fit your needs, revert.


6 icons of oracale java are showing in my apps list

All these icons are different applications:

Oracle Java 8 Console
Oracle Java 8 Visual VM
Oracle Java 8 Mission Control
Oracle Java 8 Web Start
Oracle Java 8 Policy Tool
Oracle Java 8 Plugin Control Panel

All these programs are useful for Java development and there is no reason to "remove this".

If you really want to remove these Launcher items, you can delete .desktop files from /usr/share/applications.

That won't remove JAVA itself.


If you're using the same USB you used to install Windows with to try and boot Ubuntu Live CD are you sure you formatted it before burning the ISO on it?


Recover deleted data with rm -rf on Wubi?

Unfortunately, whether in wubi or standard ubuntu, when you remove things with rm -rf, its nigh impossible to recover.  There are tools out there, but their effectiveness is relatively low when you've used rm -rf

EDIT
One of the tools explained in a comment to this was photorec.  It may help to recover data, but it won't restore filenames or paths, so you'll have to figure out what is what on your own.  Also, it may not work because you're using Wubi and not a direct-to-drive installation.


In Gnome there is a setting deep in dconf, which locks the screen when suspended.  This can be set with dconf-editor using the setting shown in the screenshot below:

To set is via CLI, open a terminal and enter the command

gsettings set org.gnome.desktop.screensaver ubuntu-lock-on-suspend false


Ubuntu uses the Ubuntu font family for its default fonts. The Ubuntu font is used for the desktop, while the terminal uses Ubuntu Mono.

You can see more about the fonts and download them here.

The Ubuntu fonts are distributed under the Ubuntu Font license, which is indeed open source.


Please detach the ethernet and reboot. Check to see if the wireless driver is loaded:

lsmod | grep rtl

If not, load it:

sudo modprobe rtl8192cu

Was a wireless interface created, ideally wlan0?

iwconfig

Does it scan and see your network?

sudo iwlist wlan0 scan

Is the wireless switch or key combination set to enable wireless?

rfkill list all


It could be your graphics or it could be unity itself. Log out and click the small ubuntu icon at the login screen, once there select unity 2D and login as normal. I find unity 3D slows my system down a lot so stick with 2D

If the problem persists then try to reinstall the graphics drivers. I have an NVIDIA chip so am not 100% with ATI drivers.


Open specific software version from terminal

One solution (there are likely many).

Create a link and use a different command for the later version. Because I don't know where you have Blender 2.80 located (directory), I'll use the command ls as an example.

guiverc@d960-ubu2:/de2900/lubuntu_64$   sudo ln -s /bin/ls /usr/local/bin/blah

In this example, I've created a link (soft) for the command ls and put it in /usr/local/bin calling it blah.  So when I type blah now, it'll run ls.

Replace /bin/ls with the location of your Blender 2.80 binary, and replace blah with whatever you think is appropriate (and ideally not used by something else, ie. whereis blah might be worthwhile to check the command isn't already used).

guiverc@d960-ubu2:/de2900/lubuntu_64$   blah
bionic  eoan-desktop-amd64.iso         eoan-desktop-amd64.iso.zsync      kde_neon     qatracker.py   rcksum-Nkzfe5   zsync_eoan.sh
blah    eoan-desktop-amd64.iso.zs-old  eoan-desktop-amd64.iso.zsync.old  qa_query.py  rcksum-BvAetb  zsync_disco.sh

/usr/local/bin/ could also be ~/bin/ if it's set up and in your $PATH.  It's a directory available for all users, so if you have other users on your system, they'll also be able to run it (if they have access to wherever it's located)

PS:  alias is possibly a better alternative.


Missing Operating System after removing Windows though partition (gparted)

Try Boot-Repair.

  Boot-Repair is a simple tool to repair frequent boot issues you may
  encounter in Ubuntu like when you can't boot Ubuntu after installing
  Windows or another Linux distribution, or when you can't boot Windows
  after installing Ubuntu, or when GRUB is not displayed anymore, some
  upgrade breaks GRUB, etc.

To use boot repair, you can download the ISO, and brun it to a CD.  Once the CD is done, go ahead and boot from it, and just follow the directions.

Source:Boot-Repair


Upgrade 16.04.2 LTS to kernel version 4.8?

Ubuntu 16.04.2 installs a 4.8 kernel for new installations. For systems which are upgraded to 16.04.2 the current kernel series is maintained unchanged. If you have upgraded your system to 16.04.2 and want to have the new kernel and X server, then you must opt in by explicitly installing the hardware enablement stack:

sudo apt-get install --install-recommends xserver-xorg-hwe-16.04

This switches the kernel and X server to a rolling upgrade; see RollingLTSEnablementStack .

Also see Old kernel with Ubuntu 16.04.2 update, as user Pilot6 says.


Zotero does not find pdftext and pdfinfo

From the Zotero documentation

  Zotero uses customized, platform-specific versions of the pdfinfo and
  pdftotext utilities from the open-source Xpdf project for PDF
  indexing. Specifically, Zotero uses modified binaries of pdfinfo and
  pdftotext on Windows to prevent the command-prompt window from
  appearing at indexing time, and a custom build of pdfinfo on all
  platforms that support writing to a text file (see source code).

So this is expected behavior on the part of both Zotero and Ubuntu. (FWIW, though "install software" is a rather strong word here: it just downloads two files and places them in the Zotero data folder)


Ubuntu Software Center closes seconds after started?

known bug, first showed in 12.10-dev, seems to now affect 12.04? https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/1000238

I'd suspect it should be fixed fairly soon, if you are affected by the above bug & can't wait  a temp workaround here. http://ubuntuforums.org/showpost.php?p=11945803&postcount=31


I don't know why it failed to mount the filesystem. Before you proceed, though, you may want to read my Web page on EFI boot loaders for Linux. It contains a lot of background information you may find helpful. Also, I recently heard that Ubuntu 12.04.2 has been released, and it includes some improvements to its EFI support. Thus, if you're not already using that version, you might want to give it a try.

Beyond that, here's what I suggest:

Before installing, use a Linux emergency disk to pre-partition the disks. Use a GUID Partition Table (GPT) scheme, create an EFI System Partition (ESP) on at least one disk, and create a separate non-RAID Linux /boot partition that uses ext2/3/4fs or ReiserFS. The former is required to boot an EFI-based computer. The latter isn't required by all boot loaders, but if you don't have such a partition, you'll be limited to using GRUB 2, which doesn't always work well. With a separate /boot partition, you'll be able to choose from among several boot loaders.
When you boot the installer, drop to a shell and look for the directory /sys/firmware/efi. If it's not present, you've probably booted in BIOS mode, which won't work -- or at best, it will require jumping through some extra hoops after installation. Thus, if this directory is missing, reboot and try to find your firmware option to select the boot mode (BIOS/legacy/CSM vs. EFI/UEFI).
If you still see the error that you report or if you can only boot in BIOS mode, you should be able to complete the installation and then install your boot loader or boot manager from an emergency system. This will require extra effort, but it can be done. See the page I referenced earlier on EFI boot loaders for details. If you can't figure out how to boot the installer in EFI mode, though, it's conceivable that your computer is BIOS-only or has such a buggy or restrictive EFI that it's not worth the effort to try to force an EFI-mode boot.


NTFS partitions hidden under EXT4 file system / partition...want to recover files from NTFS

[I wish I had reputation to comment...]

You did not specify if you overwrote the old NTFS partition or created a new partition.  I am hoping you installed you created a new partition on the disk.  (If you overwrote it, there is some hope, but not much hope.)

First thing to do is to stop booting the hard disk on the machine!  You don't want any further chances to overwrite data.

Next,  Go to another machine, and download a copy of the System Rescue CD (at the link below), and then read this section on recovering a non-booting windows installation: http://www.sysresccd.org/Sysresccd-manual-en_Backup_data_from_an_unbootable_windows_computer.

Good Luck.


Is it possible for Ubuntu to run android and iphone apps?

You can run the apps from Android with an Android emulator, see this was asked before: Can I run Android apps on Ubuntu?.
Maybe you can re-compile the source of some app to work on linux.
Would you explain better the similarities you found between deb and apk?
Finally, about the quality of apps, I think it is a matter of opinion. In my opinion, linux has the greatest softwares available (thanks to the community cooperation and efforts).


removing old lxc directory "operation not permitted"

I was having the same exact problem as you.  After reading @vhallac's comment and doing some digging, I discovered that btrfs requires any subvolumes to be deleted before a parent path can be deleted.  Subvolumes are removed using the btrfs subvolume delete <subvolume-path> command.

For your case, try first using $ sudo btrfs subvolume delete /data/lxc/$lxcname/rootfs, then you should be able to run the usual sudo rm -rf /data/lxc/$lxcname.

See also:
BTRFS command documentation


Is it possible to create disposable password for a user account

There is one-time passwords authentication. However, Guest Session can be more secure solution and it available out of the box.


Just ran some updates, broke system and stuck in Unity 2d

After some fiddling with the system, I fixed it.
The last thing I did before everything went back to normal was update grub
$sudo update-grub
once done I rebooted and grub came up, instead of directly booting the latest kernel. I shut down the computer instead of booting, and disabled optimus again in the bios (I had enabled it again in attempts to fix the system). When I rebooted I noticed:
1) Remote login was back
2) The Mouse cursor was responsive again
3) Unity 3d is up and running
4) Display doesn't crash anymore when accessing it from gnome control center.

It's really odd, could updating grub have fixed the problem or could Ubuntu have randomly clicked into place after a few reboots?


You should concatenate (cat) the split tar-gz files, decompress them (gunzip) and extract the tar archive (tar -x).

You can extract split .gz archives directly using the zcat command which concatenates and directly uncompresses the files. Then pipe the result to the tar extract command, creating no intermediate files:

zcat multiview_action.tgz.part-* | tar -x

Another option (with a different grouping of the 3 mentioned commands) is to use cat piped to tar with the z option:

cat multiview_action.tgz.part-* | tar -xz


Fix read-only partitions on Ubuntu 18.04

I Rebooted the laptop with Windows and I could able to create new files in those read-only partitions.
Later I rebooted the laptop with Ubuntu and the issue was fixed, partitions were no longer read-only.
The partitions might have been corrupted due to improper shutting down of Windows. (Just rebooting with Ubuntu before rebooting with Windows, did not work for me.)


Ubuntu won’t boot after a restart during the update from 18.04 to 20.04

Got the same issue upgrading from 19.10.
I'm still in the process of fixing it, but I've managed to get through your problem.

Try booting in advanced mode on an older kernel (that is, older than 5.4).

When the advanced screen comes up, use the root shell and execute this command:

dpkg -l | grep linux-image

Find out the status at the beginning of the line on the last package. Status ii means installed correctly, but mine was it, which means some triggers were pending. I ran

dpkg --triggers-only linux-image-5.4.0-29-generic

and got the system to unblock (substitute the package name which shows it).

Then ran apt autoremove to clean packages and kernels.

From then on you reboot and then you might be able to progress with the upgrade.


software update interrupted and audio driver not working

Try this:

Open a terminal,Press Ctrl+Alt+T

Run it:

exec sudo -i
rm /var/lib/apt/lists/*
apt-get update
apt-get dist-upgrade
apt-get autoremove
apt-get clean


I ended up deleting the following line: require_secure_transport = ON from the file etc/mysql/conf.d


linux-image-generic vs linux-image-x.x.x-xx-generic security updates

The metapackage exists to refer to the existing version-specific version of the full package.  For example, linux-image-generic will point to linux-image-3.2.0-101-generic or whatever the latest-updated kernel is.

The metapackage is version bumped to point to the latest kernel version with each update.  By installing a specific kernel, and then not relying on the metapackage for your kernel versions and updates, you get no updates.

Each individual update to the kernel, either a critical bug fix or a security fix, requires a new kernel package to be created, and the metapackage bumped.  There is no way to automatically backport 'fixes' to all the older package versions, as the kernels are considered 'different versions' at that point.

If you remove the metapackage and rely only on a specific kernel package, you get no security updates, no bug fixes, and you may actually have difficulty upgrading in the future (if you attempt an in-place upgrade).

You should not remove the metapackage, and should keep it in the system.  You also must install new kernel images to get security updates on the kernels.


Plank issues: not showing active programs nor reopen minimized windows

I'm using Ubuntu Mate 18.04. To modify slighty moofus answer, turn off Show Unpinned but don't reboot. Just quit Plank and launch it again. Works for me.


Software centre and Evolution think I am offline using WICD to make wireless connection

OP has answered the question in a comment;

  Finally found out how to get network manager to run. The command is
  nm-applet for any one else who has trouble. network manager works! I
  have never seen it working before. it is quite exciting. I have filled
  a bug on evolution not seeing the network when WICD is used.


Your file is misconfigured, try something like this:

auto lo eth0
iface lo inet loopback
iface eth0 inet static
        address xxx.xxx.xxx.xxx(enter your ip here)
        netmask xxx.xxx.xxx.xxx
        gateway xxx.xxx.xxx.xxx(enter gateway ip here,usually the address of the router)
        DNS xxx.xxx.xxx.xxx

Then:

How to restart the networking service?


Ubuntu won't boot, only displays GRUB terminal

Boot from LiveCD or USB.
Parted Magic and Ubuntu Live CD specifically.
Check if Ubuntu files are still there. If your Ubuntu partition is
ok, maybe there's some problem with the Kernel. You may try to
install a new one...


Nvidia works until I try to activate second monitor - Ubuntu 19.10

I have the same problem, and as soon as both monitors were plugged into the same card it worked.

hope that helps.


unable to get 3 python scripts running on crontab and rc.local

I believe you need to specify the absolute path to python for this to work.

so /usr/bin/python instead of just python

but personally I think its more pretty and shorter if you add
#!/usr/bin/python  to the first line of  each of your python files
and then chmod +x each .py file to make it executable.

then you can have:

sleep 1
/home/pi/tempstream.py &
/home/pi/streamheart.py &
/home/pi/gps.py &

Also in your example you have a typo for the sleep command  the 1  should be separated by a space from sleep.

Another idea would be to actually make a a real service of this with a systemd unit file. Its easier than you think.


If using crouton, While in develope mode, simply hold down Ctrl, Alt, Shift and press the forward, or backwards key to switch into the alternate OS.

For Chrbuntu, I'm not exactly sure, i can find out if that is what you have used to install it.


What is GRUB doing while it takes 9 minutes to start booting the kernel?

There's a nice tool called BootChart included in the repositories. It also has a GRUB debug component provided. these will allow you to profile your boot and hopefully find out what's eating the large chunk of time.


vncserver in rc.local will not run at boot

Here's why--vncserver exits with the following error:

vncserver: The HOME environment variable is not set.

This is because /usr/bin/vncserver is in fact a script which requires the home directory to be set (i.e. the user to have logged in), and will die (exit) because of this line of code:

745:   die "$prog: The HOME environment variable is not set.\n";

To run vncserver on startup, before login, please follow the instructions in this answer: https://askubuntu.com/a/118645/58612 .


I have no experience with the tool you linked on your question, but it does not seem what you are looking for.

LAMP stands to Linux, Apache MySQL and PHP and is a known development stack. But as you said you are going to use Spring(Java), so this does not suit you.

First you will need to install MySQL. This can be achieved by installing "MySQL Server" on Ubuntu Software Center or with

sudo apt-get install mysql-server

Next you will need a Java capable web server. Common choices are Tomcat or jetty

sudo apt-get install tomcat7

Also you will need to check you have Java Development Kit installed. If you already have one that's ok. If not the easiest to install is OpenJDK:

sudo apt-get install openjdk7-jdk

Finally you will need a capable IDE. Common choices are Netbeans or Eclipse. You can find both on Software Center. Also there is available in Spring website Spring Tool Suite, which is based on Eclipse and bundles also a webserver. So if you choose to go with it you may ignore the web server installation and use the bundled one.


The observed profile switching seems to be a feature of PulseAudio 10.0 and above, mentioned in the release notes as "Automatically switch Bluetooth profile when using VoIP applications". To summarise, if A2DP is used, PulseAudio will switch to HFP when an application uses the microphone. This is necessary because A2DP cannot support simultaneous input and output, whereas HFP does.

The following bug reports have more information on the issue:
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/508522
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1711087

To resolve the problem, you can either edit /etc/pulse/default.pa or ~/.config/default.pa, based on your preference. If you decide to use the user configuration file, you may have to create it by copying /etc/pulse/default.pa. Once you've decided which file you want to edit, find the following line:

load-module module-bluetooth-policy

... and replace it with the following:

load-module module-bluetooth-policy auto_switch=false

The added parameter will stop PulseAudio from performing the profile switching.

I will leave the question open, as this answer doesn't specifically address the issue of enforcing a profile. It does, however, address the cause of switching that I was facing, and hopefully someone else will find it useful.


Have a go at logging out from the system. Then when you choose your user at the bottom of the screen you can choose a different session. Try ubuntu-classic and see if you get the panels back. I had a similar problem when playing around with compiz. To solve it opened up the compiz manager, choose preferences, from the drop down chose unity then hit the "Reset to defaults" button.

Either way, to access a terminal without panels double click a folder on your desktop (if you have one). Then navigate yourself to /usr/share/applications. In there you should find Terminal.

Hope some of the above stuff helps.


Should I upgrade to an LTS release if I want to keep receiving non-LTS releases?

When 12.04 LTS comes out (in mid/end April), it is still 'just another' release in the release cycle. Meaning it brings new and fresh things with it.

Now it's up to you - and you alone - if you want to keep the LTS for the full support time, or as soon as 12.10 gets released, to upgrade to it.

In any case though, if you want to stay on 11.10 and hop on 12.10, you still would need to upgrade to 12.04 in order to be able to upgrade to the 12.10 release.

Upgrades from one release to the following one are mostly seamless. A LTS release means, that it is a very stable release and conceived for long time users (companies, etc), but you are not bound to it!


Because you are using PCRE (Perl Compatible Regular Expressions) syntax and sed doesn't understand that, it uses Basic Regular Expressions (BRE) by default. It knows neither \s nor \d. You are also escaping all sorts of things that don't need to be escaped (neither the \= nor the \> are doing anything useful) while not escaping things that do need to be escaped (+ just means the symbol + in BRE, you need \+ for "one or more".

This should do what you need:

sed 's/" width="[0-9]\+">//g' file

Or, using Extended Regular Expressions:

sed -E 's/"\s*width="[0-9]+">//g' file

Finally, as a general rule you never use sed -i without first testing without the -i to be sure it works or, if you do, at least use -i.bak (-i with any text will do this) to create a backup.


Get the list of installed packages with install time, date and vendor details with dpkg-query command

dpkg-query does not have any field option to show date/time of installation. The other way of saying this is that dpkg does not store this information. Under the hood, dpkg-query uses various files in /var/lib/dpkg/ to get the information.

Here are the available field names:

Architecture
Bugs
Conffiles (internal)
Config-Version (internal)
Conflicts
Breaks
Depends
Description
Enhances
Essential
Filename (internal, front-end related)
Homepage
Installed-Size
MD5sum (internal, front-end related)
MSDOS-Filename (internal, front-end related)
Maintainer
Origin
Package
Pre-Depends
Priority
Provides
Recommends
Replaces
Revision (obsolete)
Section
Size (internal, front-end related)
Source
Status (internal)
Suggests
Tag (usually not in .deb but in repository Packages files)
Triggers-Awaited (internal)
Triggers-Pending (internal)
Version

And some virtual fields too:

binary:Package
binary:Summary
db:Status-Abbrev
source:Package
source:Version

Check man dpkg-query to get a broader idea.

Note that, you can look at /var/log/dpkg.log* for the installation date/time of packages. Also note that, if your package is installed by apt-get (or brothers), you can look at the apt history files, /var/log/apt/history.log*, too.


Gstreamer 0.10.21 - how to update faad decoder version from 0.10.22.3 to 0.10.23

To get any Ubuntu specific Gstreamer plugin find it here: http://gstreamer.freedesktop.org/src/

1) before building from source have the dev libraries

sudo apt-get install faad libfaad-dev libfaac-dev

2) remove existing old faad

dpkg --list | grep gstreamer
sudo apt-get remove gstreamer0.10-plugins-bad

3) install the new one

wget http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-0.10.23.tar.gz
tar xvfz gst-plugins-bad-0.10.23.tar.gz
./autogen.sh
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib --with-package-name="GStreamer Bad" --with-package-origin="http://www.ubuntu.org/" --enable-gtk-doc --disable-static;
make
sudo make install


Three partitions after I dual booted ubuntu?

That's your SWAP partition it supplements your RAM.


You can try, using commands in the terminal.

You need at least: Wireless PCI or USB device connected to Linux with a/b/g and WPA2 support in AP mode, suppose it is wlan0 and Wired ethernet port connected to the upstream router for the Internet access, suppose it is eth0.

Open a terminal. (Ctrl+Alt+T).

Type the following command to install the application:

$ sudo -i
# apt-get update
# apt-get install hostapd bridge-utils

Now you must configure it by editing your file /etc/default/hostapd

$ sudo -i
# nano /etc/default/hostapd

Uncomment and set DAEMON_CONF to the absolute path of a hostapd configuration file:

DAEMON_CONF="/etc/hostapd/hostapd.conf"

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

Now you need to create the text file /etc/hostapd/hostapd.conf

sudo -i
nano /etc/hostapd/hostapd.conf

You must place these lines:

# Wireless network name - Set interface name

interface=wlan0

# Bridge name - set your bridge name

bridge=br0

# Driver nane - set driver name

driver=rtl8188eu

# Country name code - set country name code in ISO/IEC 3166-1 format. US = United Stats

country_code=US

# SSID name - set your SSID

ssid=TameHog

# Operation mode - set operation mode a=IEEE 802.11a, b=IEEE 802.11b, g=IEEE 802.11g

hw_mode=g

# Channel number - set channel number

channel=3

# wpa mode - set wpa mode to 2

wpa=2

# wpa-passphrase - set your passphrase

wpa_passphrase=YourWiFiPassword

# Key management algorithms - set key and auth optionsmanagement

wpa_key_mgmt=WPA-PSK

# Set cipher suites - TKIP and CCMP = AES in Counter mode with CBC-MAC

wpa_pairwise=TKIP

rsn_pairwise=CCMP

# Shared Key Authentication

auth_algs=1

# Accept all MAC address

macaddr_acl=0

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

Now you can setup wlan0 in standalone mode or bridge it with eth0

$ sudo -i
# nano /etc/network/interfaces

Modify or set config as follows:

auto lo br0

iface lo inet loopback

# wireless wlan0

allow-hotplug wlan0

iface wlan0 inet manual

# eth0 connected to the ISP router

allow-hotplug eth0

iface eth0 inet manual

# Setup bridge

iface br0 inet static

bridge_ports wlan0 eth0

address 10.160.10.11

netmask 255.255.255.0

network 10.160.10.0

#Isp Router IP, 10.160.10.2 also runs DHCPD

gateway 10.160.10.2

dns-nameservers 10.160.10.2

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

Reboot and make sure firewall is not blocking required ports:

$ sudo -i
# /sbin/iptables -L -n -v | less


How can I toggle the touchpad depending on whether a mouse is connected?

Okay, I've made an udev rule for it, and it is, like @terdon said, a much cleaner way
So, thanks to this guide, I created a "touchpad_toggle.rules" file in /etc/udev/rules.d/ (requires root access) and filled it with two lines:
SUBSYSTEM=="input", KERNEL=="mouse[0-9]*", ACTION=="add", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/username/.Xauthority", RUN+="/home/username/on.sh"
SUBSYSTEM=="input", KERNEL=="mouse[0-9]*", ACTION=="remove", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/username/.Xauthority", RUN+="/home/username/off.sh"

Don't forget to replace "username" with your username!
The contents of these on and off shell scripts are just castrated version of the script in my question. Example - off.sh:
#!/bin/bash

declare -i TID
TID=`xinput list | grep -Eo 'Touchpad\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'`
xinput disable $TID

You'll have to use xinput enable $TID in the on.sh
And don't forget to add the script in my question (or the one @terdon suggested, but without a loop) to session autostart like he told you in his answer.
That is it, but I have to add one thing:
If you have a Synaptics touchpad (I have Elantech, so it's not suitable for me), you can replace your scripts (paths to which you write after RUN+=) with a simple command /usr/bin/synclient TouchpadOff=0 and 1 respectively


OK I found how to update my FTP client (FileZilla) to the almost last version :

sudo apt-get autoremove filezilla
sudo add-apt-repository ppa:n-muench/programs-ppa2
sudo apt-get update
sudo apt-get install filezilla


How to update .NET SDK to latest version?

Looks like Microsoft has not yet added 3.1.405 to their repository, which means you'll need to do a manual installation. Alternatively, it does appear to be available as a Snap if you choose to go that route.


How do I get spaces instead of tabs in nano?

Either create .nanorc in your home folder, including:

set tabsize 4
set tabstospaces

or edit the system /etc/nanorc file.


Shut down dialog appears at random / random shutdowns

I believe this is caused by a hardware fault.

Using the acpi_listen tool, I was able to see that a button/power PWRF event was being generated when the shutdown dialog appeared.  This is what would happen if you hold down the physical power button for a couple of seconds.

The laptop shutting off entirely now and then is equivalent to holding down the power button for five seconds or so.

I was able to reproduce this in other Ubuntu versions, but also eventually under Windows 7.

So I guess there's some sort of malfunction in the keyboard controller or similar, which causes phantom power button events to be sent.

Currently, I'm using a USB keyboard and for a couple of hours, no shutdown events have occurred.  So it appears to be triggered when using the built-in keyboard to type.

Mystery solved.  Hopefully Lenovo see it the same way...


How to get Windows 7 back on the grub menu list?

Try using Boot Repair in Ubuntu.

Installing Boot Repair

Open the Terminal, then type:

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
Press Enter.
Then type:

sudo apt-get install -y boot-repair && (boot-repair &)
Press Enter

Using Boot Repair

Search for Boot Repair in the dash and launch it. Then click the "Recommended Repair" button and wait until it's finished.

Reboot. Is Windows 7 there again?


I had the same issue.
To fix that I did these steps in a terminal:

sudo su we need to be superuser
cd /var/lib/AccountsService/users here we go to the service that shows users, issue is here (at least in my case)
you should see multiple files, one for each of your users, including the old one that is not showed in your screen. In this file check the value of SystemAccount. If it's true, then this is the issue: it should be false.
if it does not help you, simply check differences between users files, the one that works with ones that don't. Also check that Icon path is correct.
don't forget to exit su, and reboot after each try. Good luck, it took 3h digging before a fixed my issue.


Emesene 2 was only recently (rushed to release) released. For this reason a lot of the old plugins have yet to be ported. You could download some from GIT (see the emesene github page), but they will not be as useful.


How can I check the integrity of a downloaded Ubuntu CD?

First look up the hash of the ISO you download here:

MD5SUMS for 16.04
SHA1SUMS for 16.04
SHA256SUMS for 16.04

(or in general find your Ubuntu release here)

Then check the hash by following this video or  these instructions:

For Windows
For Mac
For Linux

After checking the hash it's safe to burn the image to CD/DVD.


There's a pre-existing PID file that is causing Squid to get annoyed. Put simply, run the following command to delete the PID file:

sudo rm /var/run/squid.pid

Then, kill any current running versions of Squid by running the below command or just rebooting your computer:

sudo killall -9 squid

Finally, start the Squid service as normal. It should fire right up.


Ubuntu 14.04 EliteBook 8460p constant fan, hot, short battery

installing amd driver http://support.amd.com/pt-br/download/desktop?os=Linux+x86 fixed for me.
something very similar to:
How do I get AMD/Intel Hybrid Graphics drivers to work?

hope it helps

t.


Installed 12.10 on my lenovo netbook s10-3 and cannot use wireless connections

Have you tried sudo rfkill unblock all? If it is being softblocked, that will unblock both hardware and software blocks (unless there is another problem in which case that will not work). Also, are additional drivers installed on the system?


Unable to install ubuntu 15.04 64 bit OS

Your USB drive seems to not be properly configured.

Assuming you are running a current Ubuntu system:

Open built-in Disks tool and click ☰ (right top corner) and select Restore Disk Image
Choose the Ubuntu 15.04 ISO image, select the USB drive to write it to and start the process
Reboot the computer and select the UEFI - USB - drive entry from BIOS menu to boot from


cowbuilder --create --distribution lucid fails

Try adding the following to your ~/.pbuilderrc:

COMPONENTS="main universe multiverse restricted"

or, as SunSparc suggested, enter the command as follows:

COMPONENTS="main universe multiverse restricted" cowbuilder --create --distribution lucid

cowbuilder is in the universe component for lucid. I don't see the create operation trying to access universe in the output you included in your question.

The file ~/.pbuilderrc can be set up to set many pbuilder options that are used for cowbuilder as well.


What does Firefox AppArmor restrict/allow?

The only thing confusing in there are the codes and your interpret them like this:

'r'  read
'w'  write
'm'  memory map as executable
'k'  file locking
'l'  creation hard links
'ix' execute and inherit this profile
'Px' execute under another profile, after cleaning the environment
'Ux' execute unconfined, after cleaning the environment

The rest of the file are mainly directories, files and libraries with sometimes some parameters in front (like PROC and HOME which seem easy to understand) and regexes to make it more flexible and sometimes a 'deny' or 'owner' in front of the line (these seem to be self-explanatory to me: they deny access and limit actions in case it is the owner doing them).

Regarding PROC:

Example:

# for networking
  network inet stream,
  network inet6 stream,
  @{PROC}/[0-9]*/net/if_inet6 r,
  @{PROC}/[0-9]*/net/ipv6_route r,

and do

cd /proc/
ls *

See all the directories with digits? These correspond to each running process.
If any of them contain a directory net (network) and that holds a file if_net6 or ipv6_route they are considered read.


Trying to access the console from the dashboard returns: "console is currently unavailable."

Did you enable console access in the nova-cloud-controller charm? The configuration key is called console-access-protocol:

Protocol to use when accessing virtual machine console. Supported types
are None, spice, xvpvnc, novnc and vnc (for both xvpvnc and novnc)


Dual boot install of Ubuntu 15.1 on Win 10 freezes at logo screen

Boot from the Ubuntu installation media.
Highlight Try Ubuntu without installing.
Press the E key.
Add nouveau.modeset=0 to the end of the linux line.
Press the F10 key to boot to the Live desktop.

Start the installation of the Ubuntu system.

When finished boot the installed system.
Highlight the Ubuntu GRUB menu entry.
Press the E key.
Add nouveau.modeset=0 to the end of the linux line.
Press the F10 key to boot the Ubuntu system.

When the login screen appears press Ctrl+Alt+F1.
Enter your user name and the password, then execute :

sudo apt-get update
sudo apt-get install nvidia-352 nvidia-prime
sudo reboot


This could be done this way:

mkdir ~/Desktop/new_file && touch ~/Desktop/new_file/adas.txt && echo "Hello World" > ~/Desktop/new_file/adas.txt

Information:

&& This ensures that the command preceding it executes correctly before the next command, hence if the preceding command fails the next won't execute.
> Directs the output of the echo command into the adas.txt file.


How do I disable the touchpad while typing?

I suggest installing libinput it has much better "disable while typing" and "palm detection" algorithms.

Run

sudo apt install xserver-xorg-input-libinput

and restart the GUI session, or reboot.

If you need "tap to click", you can add

Option "Tapping" "true"

to the touchpad section of /usr/share/X11/xorg.conf.d/90-libinput.conf.

All options can be found on the manual page.

If you are using Ubuntu 16.04 with the -hwe-16.94 stack, you will need to install xserver-xorg-input-libinput-hwe-16.04 package instead of xserver-xorg-input-libinput.

You can check which HWE stack is installed by checking if xserver-xorg or xserver-xorg-hwe-16.04 package is installed.


Encountering problems with Installing Sage

There are several ways to install Sage.  You may wish to try the Ubuntu PPA - but note the special instructions for command line:

sudo -E apt-add-repository -y ppa:aims/sagemath
sudo -E apt-get update
sudo -E apt-get install sagemath-upstream-binary


For the time being, I do not have a clear answer for this, however it is obvious that the linux Kernel is using some energy saving mechanisms.

However, doing some quick research around, I quickly realised that the most recent Linux kernels make use of a feature called ACPI which is an acronym for Advanced Configuration and Power Interface.

What the ACPI is doing:

  the Advanced Configuration and Power Interface (ACPI) specification
  provides an open standard for device configuration and power
  management by the operating system.

via Wikipedia.

Basically the ACPI allows for control of different CPU states, to allow for better power management.

Different ACPI CPU-states:

CPU C-States (power management)

  Basically, there is probably nothing that you have to worry about
  concerning the CPU "C states". These are automatically controlled by
  the kernel+ACPI system taking into consideration current system load.
  (CAVEAT: check out the note about AMD Athlon and Duron processors
  below). The ACPI code in the newer (2.6+) kernels automatically puts
  your CPU to sleep when there is idle time (note: this does not change
  the CPU frequency. That is controlled by "P states" - see below).

  The only thing to realize is that your system is completely
  "conscious" when the CPU is momentarily halted - you won't notice much
  of a difference. However, the power savings can be considerable. Just
  think of it as having your CPU taking thousands of "micro-naps"
  whenever it is idle.

CPU-T States (throttling)

  These are very much like "C states" (the same HLT instruction is
  used), however the difference is that throttling is "forced by you"
  (like every 4th cycle is forced to be a sleep cycle, as opposed to the
  "C states" above which are automatically determined by the system
  load). Note that the frequency has NOT been changed... see the "P
  states" below.

CPU-P States (performance)

  Many processors these days (especially laptops) can have the clock
  frequency actually slowed "on the fly". This adds up to huge power
  savings. Intel calls this "SpeedStep" and AMD calls it "Cool'n'Quiet"
  or "PowerNow". More generically these states are called "P states".
  You will almost certainly have to go into the BIOS and enable this
  feature for your CPU FIRST!

** Some consumption benchmarks:**

  What are the power savings from the above CPU states? The following
  data is extracted from the AMD website. Consider an AMD 64
  3400+/2200MHz with 1 MB of L2 cache. By the way, while I'm here, let
  me complain about the AMD naming convention. The number 3400+ doesn't
  mean jack squat. This is just AMD's way of saying that this processor
  "looks like" an Intel Pentium-4 running at 3400MHz. I guess this is
  their way of not losing marketshare. Here are the P and T state power
  consumption values (the C state is the same HLT instruction as the T
  state):

Performance State 0 (Fully Active) (2200MHz): 89 Watts
Performance State 1 (2000MHz): 70 Watts
Performance State 2 (800MHz): 35 Watts
Throttled (HLT instruction): 2.2 Watts

Some references for further reading

Red Hat power management guide ( I know you asked about Ubuntu, but this is still a good read)
http://www.spencerstirling.com/computergeek/powersaving.html
This article talks about APM mostly (an older version of ACPI) but it makes a reference to ACPI too.
Very technical information can be found here.
The PowerTop software, which seems to be cool.
The Gentoo Power management guide. Still a good read.
An introductory Linux Journal Article.
And the Wikipedia article.

EDITS

[EDIT #1]: Googling around, I found some other posts in some forums too (OpenSuse forum seems to be relevant to what you seek) and found out that this is not that much of an issue for Linux as it is for windows and especially in gaming. I also dug up some information in two mails (first one and second one [follow-up]) in the RedHat mailing lists that seems to be related. I am currently researching the information in it.

[EDIT #2]: I have researched the issue a bit, and I am getting more and more certain that there is not a core parking mechanism in Linux, unless there is one the ACPI that I am unaware of. Some interesting findings are some pieces of software that allow for direct manipulation of the cpu and the processes run on it, like cpuset, numactl and last but not least, CPUfreq. Will continue with my research.


How to ssh into a VM via mobile devices like phone/tablet?

I recommend JuiceSSH if you happen to use an Android phone. It's by far the best SSH client for Android I have seen and supports login via password as well as login via private key authorization.

Using different SSH keys for different devices has the disadvantage that you have to handle different keys but the advantage that should one of the devices get compromised, you can just delete that one corresponding pubic key from the server and don't have to hustle to create a new private key on a different device asap and switch the public keys out. So I'd recommend to use different keys for different devices but that's of course personal choice.

You might not be able to create SSH keys inside an app. In this case, create more keys on your computer and transfer them to your mobile devices. To create them, simply run:

ssh-keygen -t rsa -b 4096 -C "yourEmailAddress@host.com"

To make your server accept connections using different private keys, append the file ~/.ssh/authorized_keys on the server with the public key. The default location for the public key of your first key pair is ~/.ssh/id_rsa.pub on your local machine.


Having the unnecessary packages from the Elementary PPA installed on your system shouldn't slow down your system, if the Elementary packages you installed are not being used as would be the case if you can't login on Elementary because there is no option to choose Pantheon. To remove the Elementary packages you installed from the terminal:

sudo apt-get remove elementary-* pantheon-* plymouth-theme-elementary* syslinux-themes-elementary maya-calendar
sudo add-apt-repository --remove ppa:elementary-os/stable
sudo apt-get update
sudo apt-get autoremove


How can I force fish to save new key bindings persistently after closing a terminal window?

You can add the bindings in the initialization files:

/usr/share/fish/config.fish
/etc/fish/config.fish
~/.config/fish/config.fish

For example you can add the following function:

function __fish_less
       commandline -i -- "|less"
end

bind \ey __fish_less

An example:

https://github.com/zmalltalker/fish-nuggets/blob/master/config.fish

EDIT:

From the fish shell documentation:

  Initialization files On startup, fish
  evaluates the files
  /usr/share/fish/config.fish (Or
  /usr/local/fish... if you installed
  fish in /usr/local),
  /etc/fish/config.fish (Or
  ~/etc/fish/... if you installed fish
  in your home directory) and
  ~/.config/fish/config.fish (Or any
  other directory specified by the
  $XDG_CONFIG_HOME variable), in that
  order. The first file should not be
  directly edited, the second one is
  meant for systemwide configuration and
  the last one is meant for user
  configuration. If you want to run a
  command only on starting an
  interactive shell, use the exit status
  of the command 'status
  --is-interactive' to determine if the shell is interactive. If you want to
  run a command only when using a login
  shell, use 'status --is-login'
  instead.

  Examples:

  If you want to add the directory
  ~/linux/bin to your PATH variable when
  using a login shell, add the following
  to your ~/.config/fish/config.fish
  file:

  if status --is-login  set PATH $PATH
  ~/linux/bin end

  If you want to run a set of commands
  when fish exits, use an event handler
  that is triggered by the exit of the
  shell:

  function on_exit --on-process %self
    echo fish is now exiting end

  Universal variables are stored in the
  file .config/fish/fishd.HOSTNAME,
  where HOSTNAME is the name of your
  computer. Do not edit this file
  directly, edit them through fish
  scripts or by using fish interactively
  instead.

So, you should edit the ~/.config/fish/config.fish, logout (or re-source the config.fish) and finally you should have your "custom bindings".

I kindly advice you to read the whole documentation and play a bit whit the shell, nothing that I wrote here doesn't come from the doc.

Then, if it doesn't work, come back here with logs (whenever available), config files, debug output and so forth.


Run this from the terminal:

Ctl+Alt+T

$ sudo dosfsck -w -r -l -a -v -t /dev/[drive and partition]

Replace the drive and partition with the drive and partition of your device.

You can get this information with this command:

sudo lsblk -o name,mountpoint,label,size,fstype,uuid&&sudo parted -l

The output will reveal a partition similar to: /dev/sdb1.

The results from the chat is revealing that the usb drive's partition is clean.  The problem is with the directories under the 3ds folder.  Since that folder can't be processed the alternative is to backup the the content of the drive while skipping the offending folder.

Below is a script and steps to do this:

Make a backup folder:

$ sudo mkdir /usbbackup
$ chwon $(whoami) /usbbackup

The folder can be any place on your system.  The second command is giving your account access to the folder.

Change the settings in the script to these settings:

source     - The name of the mount point of the usb drive
dest       - The destination folder.
skipfolder - The problem folder that is being skipped

The backup script

#!/bin/bash

source=/media/joaovictor/9016-4EF8/
dest=/usbbackup
skipfolder=3ds

ls $source | while read -r item;do
    # echo $item
    if [[ $item == $skipfolder ]]; then
        # echo $item
        continue
    fi
    echo "$source/$item -> $dest"
    cp -pvau "$source/$item" "$dest"
done

echo "Finished"


How to install skype on ubuntu 12.04 64bit

Download the .deb file from skype.com
Select Ubuntu 12.04 (multiarch) in the drop down menu.
Double left-click on the .deb file it downloads. Ubuntu Software Center should handle the installation.


The problem is not with IPv4 address but IPv6 due to AAAA record is not exist.

This can be resolved by switching postfix to use only IPv4. sudo postconf -e 'inet_protocols = ipv4' then reload postfix.


Cannot configure tex-common after failed font installation

There is probably something wrong with the procedure you followed to install the local fonts. There are "local user" tex-related files in /root, which is the  root user's home directory --- seems like you tried to do a user-local font installation as root, which is a no-no.

Now, even if you un-installed everything with something like apt-get remove --purge, notice that the files in the home directories are never touched by the package system --- even the /root ones.

There should be no tex-related things in /root --- you are not supposed to run TeX &co as root, really. So try to remove those things (everything tex-related under /root) and try again.


Ubuntu freezing randomly while mouse works

If you are using a wireless mouse and/or keyboard, your problem might stem from electronic interference.  I've found that mouse problems of the sort you describe will disappear if you install your wireless receivers at the end of a short USB extension cord.


On your Galaxy when you plug it in, a notification should pop up in your notification area saying that USB is connected. If you tap it, it should bring up two options. One is use as mtp device and the other is use it as mass storage. Tap mass storage then tap the new notification that pops up and tap the button that says "mount USB storage". It'll pick it up like a thumb drive (or two thumb drives, depending on if you have a memory card.) From then on when you connect it, just tap "mount USB storage"
... or so it works like that on my stock Galaxy S II. Hope it helps!


Download the boot-repair iso (613MB download) here:

http://sourceforge.net/projects/boot-repair-cd/

Burn this iso to a usb using a program called Rufus

https://rufus.akeo.ie/

Use these settings:

Reboot your computer and press an fkey such as f1, f2, f10, f11, f12 (depends on your computer model) in order to boot from your usb.

Boot from your usb.
Click Recommended Repair. This automatically fixes any problems that occurs. After the repair is done, reboot.


The problem was I installed Nemo and since then it was handling the desktop. I disabled it at some point, leaving no other application to handle it because standard file manager was already uninstalled. I made Nemo again the desktop handler.

For a way to enable nemo to handle the desktop like normally nautilus does, check this answer

How to completely integrate Nemo with Ubuntu? (Konstigt's answer) .


Where is startup files include pactl load-module module-bluetooth-discover

You need to install the bluez package:

sudo apt-get install bluez

A startup-script called bluetooth gets created in your /etc/init.d folder.
Also don't forget to enable bluetooth:
Go to System Settings -> Bluetooth


Show files being accessed most in a short time period

Try inotifywatch.

From the man page:

% inotifywatch -v -e access -e modify -t 60 -r ~/.beagle
Establishing watches...
Setting up watch(es) on /home/rohan/.beagle
OK, /home/rohan/.beagle is now being watched.
Total of 302 watches.
Finished establishing watches, now collecting statistics.
Will listen for events for 60 seconds.
total  access  modify  filename
1436   1074    362     /home/rohan/.beagle/Indexes/FileSystemIndex/PrimaryIndex/
1323   1053    270     /home/rohan/.beagle/Indexes/FileSystemIndex/SecondaryIndex/
303    116     187     /home/rohan/.beagle/Indexes/KMailIndex/PrimaryIndex/
261    74      187     /home/rohan/.beagle/TextCache/
206    0       206     /home/rohan/.beagle/Log/
42     0       42      /home/rohan/.beagle/Indexes/FileSystemIndex/Locks/
18     6       12      /home/rohan/.beagle/Indexes/FileSystemIndex/
12     0       12      /home/rohan/.beagle/Indexes/KMailIndex/Locks/
3      0       3       /home/rohan/.beagle/TextCache/54/
3      0       3       /home/rohan/.beagle/TextCache/bc/
3      0       3       /home/rohan/.beagle/TextCache/20/
3      0       3       /home/rohan/.beagle/TextCache/62/
2      2       0       /home/rohan/.beagle/Indexes/KMailIndex/SecondaryIndex/


how to enable hyperZ on radeon hd 5000 series?

After asking on phoronix forums, just put

R600_HYPERZ=1

in /home/$USER/.profile


S1300I scanner issues under Ubuntu 16.04 using Sane

Thanks to everyone who posted valuable info and links here. Without your posts, I would not have been able to figure it out.

This is a revised version of my earlier post that referred to Sane v.1.0.23 / Ubuntu 14.04. Sane v.1.0.23 detects Fujitsu S1300i scanner but then somehow gets stuck and finds no scanners on the second and subsequent runs of "scanimage -L", as described in previous posts.

Sane v.1.0.25 (Ubuntu 16.04) detects Fujitsu S1300i with "sane-find-scanner" or "sudo sane-find-scanner". However, "scanimage -L" or "sudo scanimage -L" does not detect S1300i on my Ubuntu 16.04 system at all.

The following procedure is designed to make Fujitsu S1300i work on an  Ubuntu 16.04 desktop system. With appropriate modifications, it should work for other Ubuntu versions as well.

1. Obtain, compile and install the latest version of Sane

The following instructions are loosely based on the "Compile Sane From Source" article at the Ubuntu Community Help Wiki.

The commands below will install Sane into /usr/local. If you choose to install into /usr instead of /usr/local, review the "Compile Sane From Source" and use the appropriate switches instead of the ones used below. I recommend installing into /usr/local, because this will leave your stock installation of Sane intact in case you want to switch back to using the stock version.

Install prerequisites:

sudo apt-get install libusb-dev build-essential libsane-dev
sudo apt-get install libavahi-client-dev libavahi-glib-dev libjpeg-dev
sudo apt-get install git-core

Download the latest Sane:

git clone git://git.debian.org/sane/sane-backends.git

At the time of this writing, the latest commit is this one:

$ git log -n 1
commit 1e013654cc3af09f4731ab9ec8d8324d03a7de4a
Author: Alessandro Zummo <a.zummo@towertech.it>
Date:   Mon May 9 11:10:35 2016 +0200

Compile and install Sane:

cd sane-backends
./configure
make
sudo make install

If you decide to remove this installation of Sane, use "sudo make uninstall" to remove all installed files from /usr/local. This is a clean way to revert back to using the stock installation in /usr.

2. Register libsane

Check how your system finds Sane shared object library:

sudo ldconfig -v | grep libsane

If you see something like:

libsane.so.1 -> libsane.so.1.0.25
libsane.so.1 -> libsane.so.1.0.26

it means that the system first finds version 1.0.25 and then 1.0.26, which is not the correct order. In this case, you must change the order of the library paths in /etc/ld.so.conf or you must create a new configuration file for sane:

echo "/usr/local/lib" | sudo tee -a /etc/ld.so.conf.d/1-sane.conf

Once you have changed the library paths in /etc/ld.so.conf or created the new configuration file in 1-sane.conf, check the order of libraries one more time with "sudo ldconfig -v | grep libsane". Make sure that version 1.0.26 appears first before any other versions.

3. Install scanner firmware

Copy Fujitsu S1300i driver file, "1300i_0D12.nal", from the Windows computer where the scanner software was installed. Usually, this driver file is found in "C:\Windows\SSDriver\S300". Place the driver file into the /usr/local hierarchy:

sudo mkdir -p /usr/local/share/sane/epjitsu
sudo cp ./1300i_0D12.nal /usr/local/share/sane/epjitsu/

4. Adjust permissions to access scanner as a non-root user

The default udev rules set the ownership of the USB device to "root" and the group ownership to "root". Change the udev rules to set the group ownership to "scanner". Use your favourite editor to create this file:

/etc/udev/rules.d/79-scanner.rules

and place the following into it:

# Fujitsu ScanSnap S1300i
ATTRS{idVendor}=="04c5", ATTRS{idProduct}=="128d", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"

Add yourself to the "scanner" group if necessary:

sudo usermod -a -G scanner <username>

5. Finish installation

Reboot your computer. You may be able to start using your Fujitsu S1300i scanner without rebooting your computer, however a reboot is strongly recommended. I observed some odd behaviour with "scanimage -L" failing to find the scanner on a second run before a reboot even after making all necessary configuration changes. It could be that some libraries or drivers from the earlier version of Sane get "stuck" somewhere in cache or else. A system reboot cleans it all up.

After a reboot, connect your scanner, open the lid and execute:

scanimage -L

That's all. Enjoy your scanner.


Below is a 'one step' bash script that creates an encrypted bootable livecd from an existing Ubuntu installation. (Tested/Working on Ubuntu 18.10)

Basically, the script copies the existing Ubuntu installation into a set of working directories at /tmp/livecd and:

Uses chroot to add casper to the installation
Modifies casper-helpers to add the encrypted squashfs booting functionality
Creates the inital unencrypted squashfs housing the entire file system
Uses a random string input to pre-encrypt a new encrypted squashfs file
Uses an entered passphrase to then setup the encrypted squashfs file, create an ext4 file system, and then copy over the unencrypted squashfs file into it
Finally, the entire encrypted bootable ISO (for squashfs files below 4GB)  or IMG is created at /tmp/livecd/live-cd.iso or /tmp/livecd/live-cd.img

When the ISO/IMG is booted on the machine or in a VM, the encrypted squashfs is transfered completely into ram, the user is asked to enter the proper passphrase, and the squashfs is then unencrypted and used to boot the system.

The rsync command line string can be modified to add/remove items that are copied from the existing Ubuntu installation when the encrypted livecd is being created.

EDIT: The script now handles images above the iso6990 4GB limit. If the created filesystem.squashfs file is above 4GB then a live-cd.img is created which is a bootable ext4 image housing the same files as the iso would have had. In addition, the script asks if you prefer to create and iso or an img when the filesystem.squahfs file is below the 4GB limit.

livecd.sh:

#!/bin/bash

echo
echo Setting up /tmp/livecd
echo
sudo mkdir -p /tmp/livecd/cd/{casper,boot/grub} /tmp/livecd/chroot/rootfs /tmp/livecd/mnt

echo
echo Installing necessary packages
echo
sudo apt-get update
sudo apt-get install -y grub2 xorriso squashfs-tools cryptsetup

echo
echo Copying over existing system
echo
sudo rsync -av --one-file-system --exclude=/swapfile --exclude=/proc/* --exclude=/dev/* \
--exclude=/sys/* --exclude=/tmp/* --exclude=/lost+found \
--exclude=/var/tmp/* --exclude=/boot/grub/* --exclude=/root/* \
--exclude=/var/mail/* --exclude=/var/spool/* --exclude=/media/* \
--exclude=/etc/fstab --exclude=/etc/mtab --exclude=/etc/hosts \
--exclude=/etc/timezone \
--exclude=/etc/X11/xorg.conf* --exclude=/etc/gdm/custom.conf \
--exclude=/etc/lightdm/lightdm.conf --exclude=/tmp/livecd/chroot/rootfs / /tmp/livecd/chroot/rootfs

echo
echo Setting up links to chroot
echo
sudo mount --bind /dev/ /tmp/livecd/chroot/rootfs/dev
sudo mount -t proc proc /tmp/livecd/chroot/rootfs/proc
sudo mount -t sysfs sysfs /tmp/livecd/chroot/rootfs/sys
sudo mount -o bind /run /tmp/livecd/chroot/rootfs/run

echo
echo Processing chroot commands
echo
cat <<'ABC' | sudo chroot /tmp/livecd/chroot/rootfs /bin/bash
LANG=
apt-get update
apt-get install -y casper lupin-casper
cat >> /etc/cryptsetup-initramfs/conf-hook <<'DEF'
CRYPTSETUP=Y
DEF
patch -d /usr/share/initramfs-tools/scripts /usr/share/initramfs-tools/scripts/casper-helpers <<'GHI'
@@ -141,6 +141,13 @@
                 losetup -o "$offset" "$dev" "$fspath"
             else
                 losetup "$dev" "$fspath"
+                modprobe dm-crypt
+                mkdir /mnt
+                echo "Enter passphrase: " >&6
+                cryptsetup --type plain -c aes-xts-plain64 -h sha512 -s 512 open "$dev" squash >&6
+                mount -t ext4 /dev/mapper/squash /mnt
+                dev="$(losetup -f)"
+                losetup "$dev" /mnt/filesystem.squashfs
             fi
             echo "$dev"
             return 0
GHI
depmod -a $(uname -r)
update-initramfs -u -k $(uname -r)
apt autoremove
apt clean
find /var/log -regex '.*?[0-9].*?' -exec rm -v {} \;
find /var/log -type f | while read file
do
        cat /dev/null | tee $file
done
rm /etc/resolv.conf /etc/hostname
exit
ABC

echo
echo Copying chroot images to livecd
echo
export kversion=`cd /tmp/livecd/chroot/rootfs/boot && ls -1 vmlinuz-* | tail -1 | sed 's@vmlinuz-@@'`
sudo cp -vp /tmp/livecd/chroot/rootfs/boot/vmlinuz-${kversion} /tmp/livecd/cd/casper/vmlinuz
sudo cp -vp /tmp/livecd/chroot/rootfs/boot/initrd.img-${kversion} /tmp/livecd/cd/casper/initrd.img
sudo cp -vp /tmp/livecd/chroot/rootfs/boot/memtest86+.bin /tmp/livecd/cd/boot

echo
echo Removing chroot links
echo
sudo umount /tmp/livecd/chroot/rootfs/proc
sudo umount /tmp/livecd/chroot/rootfs/sys
sudo umount /tmp/livecd/chroot/rootfs/dev

echo
echo Creating the squashfs file
echo
sudo mksquashfs /tmp/livecd/chroot/rootfs /tmp/livecd/filesystem.squashfs -noappend

echo
echo Setting up encrypted squashfs file
echo
size=$(du --block-size=1 /tmp/livecd/filesystem.squashfs | awk '{print $1}')
((size=size+size/10))
((size=size/1024))
echo $size
sudo dd if=/dev/zero of=/tmp/livecd/cd/casper/filesystem.squashfs bs=1024 count=$size status=progress
dev="$(losetup -f)"
sudo losetup "$dev" /tmp/livecd/cd/casper/filesystem.squashfs

echo
echo Enter a large string of random text below to setup the pre-encryption.
echo
sudo cryptsetup --type plain -c aes-xts-plain64 -h sha512 -s 512 open "$dev" squash

echo
echo Pre-encrypting entire squshfs with random data
echo
sudo dd if=/dev/zero of=/dev/mapper/squash bs=1M status=progress
sync
sync
sync
sync
sudo cryptsetup close squash

echo
echo Enter the desired passphrase for the encrypted livecd below.
echo
sudo cryptsetup --type plain -c aes-xts-plain64 -h sha512 -s 512 open "$dev" squash

echo
echo Creating ext4 into encrypted container
echo
sudo mkfs.ext4 -m 0 /dev/mapper/squash
sudo mount -t ext4 /dev/mapper/squash /tmp/livecd/mnt

echo
echo Moving unencrypted squashfs file into encrypted sqaushfs container
echo
sudo mv /tmp/livecd/filesystem.squashfs /tmp/livecd/mnt
sync
sync
sync
sync
sudo umount /tmp/livecd/mnt
sudo cryptsetup close squash
sudo losetup -d "$dev"

echo
echo Creating size and md5sum cd files
echo
echo -n $(sudo du -s --block-size=1 /tmp/livecd/chroot/rootfs | tail -1 | awk '{print $1}') | sudo tee /tmp/livecd/cd/casper/filesystem.size
find /tmp/livecd/cd -type f -print0 | sudo xargs -0 md5sum | sed "s@/tmp/livecd/cd@.@" | grep -v md5sum.txt | sudo tee -a /tmp/livecd/cd/md5sum.txt

echo
echo Creating grub.cfg for the livecd
echo
sudo bash -c 'cat > /tmp/livecd/cd/boot/grub/grub.cfg <<EOF
set default="0"
set timeout=10

menuentry "Ubuntu GUI from RAM" {
linux /casper/vmlinuz boot=casper toram quiet
initrd /casper/initrd.img
}

EOF'

filesize=$(sudo du --block-size=1 -s /tmp/livecd/cd/casper/filesystem.squashfs | tail -1 | awk '{print $1}')

echo "filesystem.squashfs size: $filesize"

devflag=0

if [ $filesize -lt 4294967295 ]
then
    echo
    echo filesystem.squashfs is under the 4GB iso6990 limit
    echo
    echo "Create a bootable iso or bootable device img for (usb, hd)?"
    select yn in "iso" "dev"; do
        case $yn in
        iso )   echo;
            echo Creating bootable ISO at /tmp/livecd for the now encrypted livecd;
            echo;
            sudo grub-mkrescue -o /tmp/livecd/live-cd.iso /tmp/livecd/cd;
            echo
            echo COMPLETE!
            echo
            break;;
        dev )   devflag=1;
            break;;
        esac
    done
else
    devflag=1
fi

if [ $devflag -eq 1 ]
then
    echo
    echo Setting up /tmp/livecd/live-cd.img
    echo
    filesize=$(sudo du -s --block-size=1 /tmp/livecd/cd | tail -1 | awk '{print $1}')
    ((filesize=filesize+filesize/10))
    ((filesize=filesize/1024))
    sudo dd if=/dev/zero of=/tmp/livecd/live-cd.img bs=1024 count=$filesize status=progress
    dev="$(losetup -f)"
    sudo losetup $dev /tmp/livecd/live-cd.img
    echo
    echo Formating /tmp/livecd/live-cd.img to ext4
    echo
    sudo mkfs.ext4 -m 0 $dev
    echo
    echo Installing grub and copying live system files
    echo
    sudo mount -t ext4 $dev /tmp/livecd/mnt
    sudo grub-install --no-floppy --force --root-directory=/tmp/livecd/mnt $dev
    sudo rsync -av --one-file-system /tmp/livecd/cd/ /tmp/livecd/mnt
    sync
    sync
    sync
    sync
    sudo umount /tmp/livecd/mnt
    sudo losetup -d $dev
    echo
    echo COMPLETE!
    echo live-cd.img can now be written to a usb or hard drive using dd or similar
    echo
fi


Make application always on visible workspace by default?

Install compizconfig-settings-manager if you haven't already.
Open CompizConfig Settings Manager and enable the Window Rules plugin:

In the Window Rules plugin, enter class=Gcalctool (If you are using a different calculator find out the class name by clicking the + button and then using the Grab feature).

Your calculator should now be visible on every workspace:


Can't have access to the menu of desktop unless I click any icon at the launcher

You would have to click the Desktop to get the menu to show, and yet it has to do with focus.


How to compile and run C programs avoiding "bash: ./a.out: Permission denied"

give that program (I mean a.out) the permission to "be executed" by this command:

chmod +x ./a.out

then execute it ;-)


How to keep application running after closing the terminal?

EDIT: This may only work for certain types of terminals.  It is best to run one more command of disown after starting your commands like below so the applications are disassociated with the terminal window.

From a terminal window, type in
nohup geany > /dev/null
disown

or
nohup geany >/dev/null &
disown

nohup allows the application to be ran and immune to hangups, so closing the terminal window would have no effect on the application being run.  Adding the >/dev/null to the command prevents the creation of a nohup.out in each directory the application is being run from.
From the man page:
NAME
       nohup - run a command immune to hangups, with output to a non-tty

SYNOPSIS
       nohup COMMAND [ARG]...
       nohup OPTION

And
$ disown --help
disown: disown [-h] [-ar] [jobspec ... | pid ...]
    Remove jobs from current shell.

    Removes each JOBSPEC argument from the table of active jobs.  Without
    any JOBSPECs, the shell uses its notion of the current job.

    Options:
      -a    remove all jobs if JOBSPEC is not supplied
      -h    mark each JOBSPEC so that SIGHUP is not sent to the job if the
            shell receives a SIGHUP
      -r    remove only running jobs

    Exit Status:
    Returns success unless an invalid option or JOBSPEC is given.


If you're not changing architecture (32-bit to 64-bit or vice versa) you can just back up /var/cache/apt/archives, restore it to the new machine and run

sudo apt-get update

That'll get all the applications migrated so you don't have to download them but it won't install them for you.

Better yet, try this-

dpkg --get-selections > installed-programs.log

That will dump a list of your currently installed applications to a text file. You can then move the file to the new machine and do

sudo dpkg --set-selections < installed-programs.log

then do

sudo apt-get dselect-upgrade

to install the packages.


Please look at this answer over on the Unix Stack Exchange site:
https://unix.stackexchange.com/a/90869

ssh-key with passphrase, with ssh-ident

ssh-ident is an utility that can manage ssh-agent on your behalf and load identities as necessary. It adds keys only once as they are needed, regardless of how many terminals, SSH or login sessions that require access to an SSH agent.

ssh-key with passphrase, with keychain

keychain is a small utility which manages ssh-agent on your behalf and allows the SSH agent to remain running when the login session ends. On subsequent logins, keychain will connect to the existing SSH agent instance.


Installing Ubuntu 14 from USB on Fresh Drive on HP Mini 110 says Missing Bootmgr

I've used LinuxLive USB Creator to do so successfully many times. You can try too from downloading- http://www.linuxliveusb.com/download . It's free and Win 7 compatible.
You need to format again the usb stick and make it bootable with this LiLi again.


Canon MX 892 printer on USB recognized not working

Try going on Canon's site and manually installing the correct driver for your printer. It may be that Ubuntu has the wrong driver or none at all (though in the latter case I don't think it would recognize it).


Pulling multiple alternatives from a variable in a case condition

Your first clode block wouldn't work, since it will try to pipe the output of tomcat6 through the command james.

At any rate, case is probably not the right tool for this. Use an array and then check against that:

#!/bin/bash
declare -a ALLOWED_SERVICES
ALLOWED_SERVICES=(james tomcat6)

for servicename in ${ALLOWED_SERVICES[*]};
do
        if [ "${servicename}" == "${1}" ];
        then
          service $1 restart
          exit
        fi

done

echo $0: Error: service \"$1\" not recognized

EDIT: also: use bash :-)


How can I switch a 64-bit installation to a 32-bit one?

If it is for using 32 bit ELFs, then install multilib support. Or else its easier and less error prone to reinstall ubuntu in 32 bit mode, then installing hundreds of new packages.


Where is defined this service used to start a program?

Run systemctl cat wso2ei , it should tell you what file is used to define service and what is actually started.

It's worth mentioning that as of Ubuntu 15.04, Ubuntu has switched from Upstart to SystemD  system for managing services, which means what you run with service is likely going to be either Upstart service or sysvinit type of service converted to work with systemd, and the file location should be in /run/systemd/generator.late/.


Looing at login.c, after the fork to change to user level priv, login exec's the user shell from etc/passwd. In my case, this is bash. At the bottom of my .bash_profile, I have if [ -z "$DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then exec startx fi This question is answered. Thanks


Getting false positives is nothing uncommon. You can still verify the files on virustotal. I had in the past false positive on busybox binary and within two weeks the definitions were updated and warning went away.

Also there is a possibility to get in touch with Avast by reporting a false positive on their web pages.


integrity problem loading x.509 certificate (-65) in ubuntu 20.04

If "Secure Boot" is disabled then I would strongly recommend testing your hard drive for bad blocks. You will need an Ubuntu Live USB/DVD to do this, so be sure to have one handy.

Boot into a Live USB/DVD session

Open a terminal

If you do not know where your Ubuntu installation is installed (For example: /dev/sda2), let's find out. Type this in the terminal:
sudo fdisk -l

You're going to see a lot of information go past on your screen. Scroll up until you see the record for your Toshiba hard drive. It will look something like this:
Disk identifier: D846D15F-9BF1-4583-B863-24DD1902198D

Device             Start        End   Sectors   Size Type
/dev/nvme0n1p1      2048    2000895   1998848   976M EFI System
/dev/nvme0n1p2   2000896  936214527 934213632 445.5G Linux filesystem
/dev/nvme0n1p3 936214528 1000214527  64000000  30.5G Linux swap

Yours will probably have device names like /dev/sdaX or /dev/sdbY. One of these will be where you installed Ubuntu. The type will likely say Linux filesystem. Remember (or write down) this device name.

Now let's test for bad blocks using the following command:
sudo badblocks -sv /dev/sda

Note: Be sure to change /dev/sda to whatever device name has your Linux installation. You do not need to have the number. So if Ubuntu is installed on /dev/sda3, just type /dev/sda.
This process may take a long, long time depending on how quickly the computer can scan the entire 1TB drive. You may want to consider having the task run overnight.
When the system is done running badblocks it will provide a report letting you know if there is anything wrong with the hard drive. If there is, then it's time to replace your Toshiba HDD with something else. You may be able to temporarily repair the drive by running sudo fsck /dev/sda2 (with the appropriate number in the device name, as reported by the output of badblocks), but you do not want to put too much faith in a hard drive that reports errors.
If no errors are reported, then it will be important to confirm that "Secure Boot" is disabled in the BIOS. These are generally the two things that can cause Ubuntu to report the integrity problem.

Hope this helps,


How to add Workspace Switcher indicator in Docky?

Right click on the dock - Go to Settings and then Docklets- There is a Workspace Switcher- Click Plus (Add) button.

(Make sure you have not disabled workspaces from System Settings)


Won't book after running sudo apt remove

One or more of the packages you removed might have had dependencies to the desktop, and removed that too. You should always check  the list of packages that apt says it will remove, before saying YES. Look in /var/log/apt/term.log to see the list of what was removed.

You can (re)install the desktop, with sudo apt install ubuntu-desktop or sudo apt install --reinstall ubuntu-desktop if the first one gives errors.

The desktop package name could be something else depending on what DE you where using before. But this one will install the default Ubuntu DE.


Ubuntu Tweak not working properly in Ubuntu 14.04

First Remove Old Ubuntu Tweak using following command in terminal ( Ctrl+Alt+T) .

sudo apt-get purge ubuntu-tweak

Download new Ubuntu Tweak debian package for trusty (current it's ubuntu-tweak_0.8.7-1~trusty2_all.deb )  from http://ubuntu-tweak.com/.

Type following command in terminal

sudo dpkg -i Downloads/ubuntu-tweak_0.8.7-1~trusty2_all.deb


Installed Ubuntu 12.04 over Windows 7 fine but now Ubuntu crashes

Resolved the issue on my own by burning at a lower speed then I had previously. I also disallowed Brasero to verify checksum at the end of the burn by disabling that plugin.

Now I am back up and running but not sure if I will risk installing nVidia drivers for linux this time, seeing as this whole Black Screen episode began after doing this in the first  place.

I will put some time into researching the error 5 issue when it comes to burn speeds and or checksum at a later time and till come back and post my results.


You can use rsync

I often use the following command line to test what would happen, 'dry run',

sudo rsync -Havn source-dir/ target-dir

and the following command line to do the job,

sudo rsync -Hav source-dir/ target-dir

Edit:

I use sudo, when running locally in order to be able to preserve ownership and permissions, which is very important for system files and configuration files. If you want to do the same, please use a linux file system, for example ext4 in the external drive.

If you 'only' copy data files (documents, pictures, multimedia files ...) you need not worry about permissions and can use a simpler rsync command line

(End of edit)

Notice the trailing slash. See

man rsync

for details about the trailing slash and the parameters (-H, -a, -v, -n and -t)

You use rsync in the same way you use rcp. You must specify a source and a des‐
tination, one of which may be remote.

Perhaps the best way to explain the syntax is with some examples:

    rsync -t *.c foo:src/

This  would  transfer all files matching the pattern *.c from the current direc‐
tory to the directory src on the machine foo. If any of the files already  exist
on the remote system then the rsync remote-update protocol is used to update the
file by sending only the differences in the data.  Note that  the  expansion  of
wildcards  on the commandline (*.c) into a list of files is handled by the shell
before it runs rsync and not by rsync itself (exactly  the  same  as  all  other
posix-style programs).

    rsync -avz foo:src/bar /data/tmp

This  would  recursively  transfer  all  files from the directory src/bar on the
machine foo into the /data/tmp/bar directory on the local machine. The files are
transferred  in  "archive"  mode,  which  ensures  that symbolic links, devices,
attributes, permissions, ownerships, etc. are preserved in the transfer.   Addi‐
tionally,  compression  will  be used to reduce the size of data portions of the
transfer.

    rsync -avz foo:src/bar/ /data/tmp

A trailing slash on the source changes this behavior to avoid creating an  addi‐
tional  directory  level at the destination.  You can think of a trailing / on a
source as meaning "copy the contents of this directory" as opposed to "copy  the
directory by name", but in both cases the attributes of the containing directory
are transferred to the containing directory on the destination.  In other words,
each of the following commands copies the files in the same way, including their
setting of the attributes of /dest/foo:

    rsync -av /src/foo /dest
    rsync -av /src/foo/ /dest/foo

Note also that host and module references don’t require a trailing slash to copy
the  contents  of  the  default  directory.  For example, both of these copy the
remote directory’s contents into "/dest":

    rsync -av host: /dest
    rsync -av host::module /dest

You can also use rsync in local-only mode, where both the source and destination
don’t have a ’:’ in the name. In this case it behaves like an improved copy com‐
mand.


You can find the download links of older version of Ubuntu in the "alternative download" page.

Just go here or in this one or here and you can find the download links for the version you want.


I haven't used Nomachine NX in quite a few years, but I can confirm that X2go works, if you're willing to give another NX-solution a try. X2go is quite nice, with PulseAudio support and everything.

I do remember a similar issue a few years ago with FreeNX. Back then, if I remember correctly, it had something to do with libxklavier, if you want a starting point.


I can't find the file 'transmission' on my computer with the search function

For the GTK+ client, all settings are kept in ~/.config/transmission

For the Daemon, all settings are kept in ~/.config/transmission-daemon

For the CLI, all settings are kept in ~/.config/transmission-cli

The default download folder is ~/Downloads

The transmission torrents file is located in ~/.config/transmission/torrents

Executable file location


What does "Package  has no installation candidate" mean?

This happens when you try to install a package about which APT does not have any idea. When you add software sources, you need to do an apt-get update so that your system APT's database is updated with all the packages on the repositories listed in the software sources lists.

Then when you try to install any package, APT checks the package name in it's database, finds it and checks the name of the repo from where it got it. It then downloads the package from that repo.

This means of all the repositories listed in your software sources, none of them have the package named munin-memcached. I checked again and it is not available in official Ubuntu repos.

After a bit of googling I found that it is available in this PPA: chris-lea/munin-plugins

Add this PPA and install the packages at your own risk. I do not know this person.

To add the PPA, issue the below command:

sudo add-apt-repository ppa:chris-lea/munin-plugins

To install package munin-memcached, issue the below command:

sudo apt-get update && sudo apt-get install munin-memcached


To create an image from a drive

sudo dd if=/dev/sdx of=/path/to/new.iso

Alternatively, to create a USB drive from an image

sudo dd if=/path/to/iso of=/dev/sdx

Replace /dev/sdx with your USB drive, e.g. /dev/sdc.

WARNING: It is imperative that you make certain you are using the correct drive. If you don't use the correct drive, you could lose your data. To check your currently mounted drives, use the command lsblk.

Note: Copying large files (1 GB or higher) can take a long time, be patient.


Maybe you should try ARandR, for configuring dual monitors. Or look for the orientation parameter in "Display" in the Settings manager. Hope i was helpfull.


Battle for Wesnoth
A turn-based multiplayer strategy game.
I play this game almost everyday with my friend. This game is superbe with a beautiful music and a never boring gameplay you can play a map for 5 min or for hours, you can download a infinite number of addons and there is always players online. You can play it on Windows, Mac OS X or Linux so you don't need to have all your friends on Linux.
Here a screenshot :

Try it, you will not regret it.


cannot change background, no files on desktop

Since after installation of Gnome Desktop I had this problem, I have removed Gnome Desktop

sudo aptitude purge ubuntu-gnome-desktop
sudo systemctl reboot


I know it's not quite answering the question as asked, but from the looks of things, adding any users which need that access to group "vboxsf" might actually be the better way to go.  The command:

usermod -aG vboxsf user

should do the trick, assuming the user you want to give access to is named "user".  After that, try writing to the directory as the user.  I think it should work.


Can't uninstall postgresql package due failing to start service?

Your first installation was kept uncertain, this will nuke it:

sudo dpkg --purge postgresql-9.1

Now you can reinstall the package:

sudo apt-get -f install
sudo apt-get install postgresql-9.1


This is probably what you want.

sudo apt-get install libapache2-mod-mono mono-apache-server2

Here are some informative links that should help you get started.

Official mod_mono Tutorial
Ubuntu's Official mod_mono Tutorial
Nice write-up on setting up a Ubuntu machine with Apache, MySQL, and Mono

If you're only searching for which package to install, try the following command:

sudo apt-cache search keyword-here

So for instance,

sudo apt-cache search mod_mono

Gives this:

asp.net-examples - demo pages for ASP.NET infrastructure
libapache2-mod-mono - Apache module for running ASP.NET applications on Mono
mono-apache-server - ASP.NET backend for mod_mono Apache module - default version
mono-apache-server2 - ASP.NET 2.0 backend for mod_mono2 Apache module
mono-apache-server4 - ASP.NET 1.1 backend for mod_mono Apache module

The first package mentioned is not necessarily relevant, but the other lines tell you which packages have something to do with mod_mono, and what they do exactly.

Hope this helps!


You use wrong options in the conf file.

For instance,

Option "Tapping Enabled" "1"

is wrong.

The correct one is

Option "Tapping" "True"

Regarding Accel Speed the correct syntax is

Option "AccelSpeed" "-0.525"

The Ubuntu libinput manual


This can be solved by checking your bios setting. Once i stucked on the same problem and that was solved by unchecking HDD array setting on my BIOS. And the application you are using to make bootable usb drive works the best. So there would must be problem in BIOS boot setting.


How to set resolution higher than maximum shown?

Ah, AMD graphics. Finicky at best.

1) If you can, try a DVI/HDMI cable. My laptop doesn't like external monitors larger than the internal screen when using a VGA cable.

2) Add the X-Swat PPA to your system and update your graphics drivers.

3) Check in CCC, under Display Manager, that Multi-Display is set to "Multi-display desktop with display(s) ...". Under Display Properties check Resolution is set correctly, then Apply. If this changes the overall Desktop Area you should be asked to save the changes and restart the machine; if this hasn't happened go to 4)

4) Purge fglrx from your system (e.g. sudo apt-get purge fglrx, then sudo rm /etc/X11/xorg.conf) Restart the laptop with the monitor connected; this will use the Open Source drivers, so you will lose Compiz and desktop effects. Now reinstall and re-enable fglrx, all with the external monitor connected to make sure it is picked up when the installer generates xorg.conf.


How to enable color blindness in ubuntu desktop?

If you use NVIDIA graphics card, there is a simple GUI-way how to make a color correction with NVIDIA X Server Settings tool.

I can't tell you right now, if there is any tool for AMD or Intel similar to this, but you can also do your color correction in terminal with xrandr tool.


Problem in installing NVIDIA Quadro K2100M, on Ubuntu 12.04

Yeah, the Nvidia graphic cards can be a pain in the butt sometimes.
Here's a solution that work for me running Ubuntu 16.04 (kernel 4.10) and 18.04 (kernel 4.15.0-38 generic) on a HP Zbook 15 equipted with NVIDIA K2100M.

This is a solution that does not use the drivers downloaded from the official NVidia website.

After executing the following commands you have to restart your workstation:

sudo ubuntu-drivers autoinstall
sudo ubuntu-drivers devices
sudo apt install nvidia-340
sudo apt-get --purge remove xserver-xorg-video-nouveau

By far this is the most simple and basic way to workaround the problematic drivers.

Usually when I use the X.Org X server (The Nouveau drivers), my resolution drops down to something close to 320x240.

Using Nividia-410 or Ndivia-394 causes strange screen ripples (or fluctuations) on the left hand side of the display.

The only negative thing of running a Nvidia-340 driver with a 4.15 kernel on Ubuntu 18.04 is that I cannot change the screen brightness, therefore you've got to use another piece of software (or night mode) if you are an owl like me.
Nvidia-340 works smooth as hell on Ubuntu 16.04 though - all the functionality is available and there are no glitches.


As also suggested by others, do cp instead of mv.

cp  /home/sysadmin/test/hei.txt /home/sysadmin/test/hei2.back

cp : It's used to copy a file/folder.

mv : It's used to move/rename a file/folder.

You can learn more on cp and mv. Go to your terminal and type

man cp (Describes various option available in "cp")
man mv (Describes various option available in "mv")


Partitions on clean install Ubuntu 14.04.1 LTS

Congratulation to getting rid of dual boot, that is a vice decision.

  Since I will no longer have a dual-boot, how do I create my partitions such that they use my entire harddrive?

Ubuntu installation allows you to use your whole hardrive and it will erase it fully and create partitions for you. If you decided to do so you can also manually alter the partitions.

  Or is it better to use the default ones that the installer creates?

As a user of Linux for 15 years, I realized that playing with partitions creates more hassle than it solves, so I would go with default ones.

  If yes, on which partition will my virtual machine be?

default partitions for ubuntu Desktop is only one big partition for root and one swap partition. Than it will be obviously in the root partition.

  When I make a clean install of Ubuntu will it erase my Windows partitions?

if you let Ubuntu to use whole your hardrive, it will erase all your Windows partitions! (please do your backup)

Additionally you should be aware:

if you have OEM version of Windows 7 which is tight to your BIOS, it will be difficult to get it properly registered under VirtualBox. Especially Dell laptops are well known for this.
Remember to verify that your backups actually works!


mysql doesn't update due to error in apparmor profile

It seems you have an error in your apparmor profile for mysql. While fixing it, you can disable apparmor profile for mysql and mysql should work:

sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/usr.sbin.mysqld

and restart apparmor with: sudo /etc/init.d/apparmor restart

When you have the mysql apparmor profile fixed, you can remove the symlink and restart apparmor.

UPDATE2:

New steps to remove and reinstall mysql:

sudo apt-get purge mysql-server mysql-client mysql-common mysql-client-5.5 mysql-server-5.5
sudo apt-get autoremove
sudo apt-get autoclean

sudo rm -rf /etc/mysql

sudo apt-get install mysql-server mysql-common mysql-client

(should ask for a new admin password)

Check if it works:

sudo service mysql status

If it doesn't work, check if you have a file /etc/mysql/my.cnf. If not, copy it from the default one and restart mysql:

sudo cp /etc/mysql/my.cnf.dpkg-dist /etc/mysql/my.cnf


Unable to boot after installing fglrx. Changing mirrors?

After booting into recovery mode you first have to enable the network.
There is a menu entry in the same overview where you select the root account.

Now execute:

sudo apt-get update
sudo apt-get install -f
sudo apt-get purge fglrx


I can get sound if I open up alsamixer then crank the headphones up to full.  Problem is that I have to do this after every reboot.  The speakers are in the right jack.  It's weird.

edit:  I just found out on another site that you can use:

sudo alsactl store   ## to store your alsamixer settings.

sudo alsa restore    ## to restore saved settings


Amd RX 500 series compatibility with linux (drivers issues)

The open source amdgpu driver solves both the EGL crash and the audio over the hdmi.