In VirtualBox, how do I set up host-only virtual machines that can access the Internet?

I can get the setup I want by setting up two adapters on the vm.

VirtualBox 4.2.12
Ubuntu 12.04 guest

In VirtualBox > Preferences > Network, set up a host-only network.

Mine is called vboxnet0, it is manually configured:
ip 192.168.56.1
netmask 255.255.255.0
no dhcp

Then, in the network settings for the virtual machine, set up two adapters:

Adapter 1
host only, vboxnet0

Adapter2
NAT

Boot the virtual machine and log in through the console VirtualBox provides.

Run this to see your adapters:

ls /sys/class/net

In my case the adapters were named eth1 and eth2 (and lo, the loopback interface).

Then, edit your network configuration.

sudoedit /etc/network/interfaces

# The loopback network interface
auto lo
iface lo inet loopback

# Host-only interface
auto eth1
iface eth1 inet static
        address         192.168.56.20
        netmask         255.255.255.0
        network         192.168.56.0
        broadcast       192.168.56.255

# NAT interface
auto eth2
iface eth2 inet dhcp

Note that eth1 has no default gateway specified. eth2 will get a default gateway from dhcp.

Update March 2018

See this answer from @Hugo14453 for an updated version that works with Ubuntu 17.10 and newer.


How do I revert to the previous permissions for a folder?

No way to change previous permission. chmod -R 775 example is right one for web and you should checkout ownership by ls -l. Then change ownership by chown owner-user:owner-group directory


grub Refresh or Resolution Too High. How can I adjust it?

There are already many questions and answers like this.

In short:

Boot in recovery mode  - instruction here: https://wiki.ubuntu.com/RecoveryMode You will be able to adjust all settings (text mode only).
Follow directions in this post - Screen Resolution "Out of Range"
For more information use Google search. Keywords - "ubuntu out of range 2013 OR 2014"
If you are absolutely out of luck - post more information, at least video card name and version. I think you should change X11 settings too.


Compiz annotate not working in fullscreen mode

install Ubuntu 12.04.2, uncheck download upgrade during installation, and do not update after install. then plugin Annotation of compiz works in full screen mode.

I am trying Ubuntu 14.04.1 now, and Annotation works in full screen mode of VLC (the marks is over the running video), but not work with image view (toggled by F11) and VirtualBox (vm in fullscreen)

I dig a bit further, this problem begins with Ubuntu 12.04.3. early versions are free of this bug.


How to create a usb stick that does a complete unattended installation of xubuntu

While i did a bit of searching i came across Ubuntu's Documentation on Automatic Installation, I figured you could do witht the help, and i guess you could USe it as a guide line

https://help.ubuntu.com/13.10/installation-guide/amd64/ch04s06.html

From Searching through the Docs, I Noticed not much changed through out the Releases, But i would find your distro release (Most likely a LTS) As Supported features may change...

https://help.ubuntu.com/12.04/installation-guide/i386/automatic-install.html


Allow creating directories from applications

You have default permissions to write and create folders in your home directory.  You do not have default permissions to write or create folders anywhere else.

You home folder will be found at /home/username/ and most applications like LibreOffice will default to here, or possibly /home/username/Documents

With a few exceptions it's a bad habit to get into writing elsewhere in the filesystem for just data.  These special cases are set up with special permissions and are for specific purposes - eg /media/username.

If you are having problems writing to your home directories or creating folders in them then it might indicate that there is a permissions problem which needs to be addressed.


VMWare Workstation 6.5.5 on 10.04 Faster than on 8.04?

I can't answer about specific vmware benchmarks - but a strong possibility is better graphics drivers with 10.04 compared to 8.04.

You may have been having 3D graphics issues with 8.04 - this is likely to have improved under lucid and thus the full 3D graphics capabilities in Workstation 6.5 would now be available.

In addition - if you did a new 10.04 install with a ext4 filesystem you will have noticed a better disk-throughput compared to the ext3 filesystem in 8.04.  This was discussed and benchmarked by Phoronix when comparing KVM benchmarks from 8.04 through to 10.10.

Without knowing what hardware you have, its a little difficult to give you specifics.


Can't change keyboard shortcut in Ubuntu

It's correct, Settings does not currently accept those shortcuts.
But you can install gnome-tweaks, open Tweaks and use that mechanism for setting a shortcut for switching input language instead. Most of the shortcuts you mention are selectable there.


How can I get Vuze to work in Ubuntu 14.04 32 or 64 bit

According to the vuze installation instructions Ubuntu modifies the Vuze files before putting them into their repository.  You might need to download the latest version from Vuze, and compile it yourself.


Could not find required OpenGL entry point 'glGetError'

I found the solution to my problem. To get TF2 to work again all I had to do was remove the symbolic link that I made to get Skype working:

  /usr/lib/i386-linux-gnu/mesa/libGL.so.1

The problem now is Skype doesn't work again. I guess I'll just have to remake the symbolic link whenever I want to use Skype until Canonical fixes the seg fault issue with Skype.


Kubuntu 18.04 not starting after shutdown. Stuck after splash screen

Please provide more information as with this much, only few things can be deducted.
One thing i would like to say is to use shutdown now instead of shutdown to immediately poweroff the system safely.
Few questions to help elaborate the problem :-

Did you upgrade the kernel or system ? It is rare but could be that kernel was not updated or grub hook did not work after update.
Did you disable the legacy boot in your bios or it got disabled unknowingly ? Maybe after a windows update ? Please check it out. This and if any option like boot only UEFI got enabled ?
Check the system health with following tools :-

Storage(HDD) with SMARTMONTOOLS
Memory with

if booting in BIOS mode - memtest
if booting in UEFI mode - memtest

Disable secure boot was enabled in bios accidently after system update in windows.
Disable fast boot if it is enabled in windows. Windows is cheesy and acts funny sometimes.
Disable hibernate in windows. unless you are using it extensively.

Let me know if it helps you or you could find something that may help us moving in a direction. :-)


How to copy playlist from Banshee to MP3 player?

I'm a little late to the party, but better late than never right?

I think I have a better solution.  After much reading of forums and gnashing of teeth, I figured out how to get banshee to sync playlists to an sd-card.  I read lots of instructions on different forums/mailing lists, some gave only part of the information you need, some simply gave bad info (for example several posts showed the .is_audio_player file with a line "playlist_format" instead of "playlist_formats".  That "s" makes all the difference!)

Anyway,

Add a file .is_audio_player to the root directory of your sdcard or android device's main memory.

Open the file and add these lines:

name="name you want banshee to call your phone"
audio_folders=Music/
output_formats=audio/mpeg,audio/x-ms-wma,application/ogg
playlist_formats=audio/x-mpegurl,audio/mpeg-url
playlist_path=Playlists/

endoffile=PlaceThisHereToEnsureThereIsABlankSpaceBeforeTheLastLineOfTheFile

(there are other lines you can add, just google for .is_audio_player for more info.  That last line comes for a post left by one of the developers of banshee noting that banshee won't pick up the last line in the file without a hard return at the end)

Then load banshee, your sd card will now show that it supports playlists, and the sync function will work for music and playlists.

Pro-tip, you can create a smart playists to act as a meta-playlist for all the playlists you want to transfer over. Your media player on the phone should now pick up all your music and all your playlists (only checked by me with the google play music app).\

hope this helps somebody...


I became very frustrated with the operation of the program, and found no answers that worked in my situation:  To resolve the issue I attempted to remove thunderbird and all of it's extraneous bits, and reinstalled them.

This did not work, and after a bit more frustration I found I had a malformed e-mail somewhere in my inbox.  This apparently caused the failure to fetch new mail, although I was not able to find any error log for this.

Removing the mail I had left sitting in the inbox, compacting the mail file and rebuilding the index seem to have solved my issue.

MozillaZine Knowledge Base article containing possible reasons of Thunderbird not checking for mail:
http://kb.mozillazine.org/New_messages_do_not_appear


Ubuntu Server 16.04.3 fresh install unable to connect to security. & us.archive.ubuntu.com

Further troubleshooting proved that it was eventually a router issue, like Thomas Ward had suggested. After re-configuring the lan port on the router, everything works like a charm.


Setting permissions in ubuntu to prevent access

If test.swf (or test.php) is accessed through the local filesystem, the accessor's UID and GID along with the file's (and directory's) permissions govern access.

If test.swf is requested via the web server, then it's rules (and the UID and GID of its user) apply.

Did I misunderstand? Who is the "directly accessing unauthorized reader"?


How to open a folder with Atom text editor? (Xubuntu)

You need to open Thunar, go to Edit and Configure custom actions.

From there you will be able to add any options you'd like, such as to "Open with Atom" or anything else. I believe this is what you are trying to accomplish?


Second monitor recognized but only black screen

try going into 'Setting -> Display' and select the Asus monitor.

Edit:

After more research I believe this is related to a bug with Intels 945GM chipset.

I also found one post that said they were able to get the monitor to work by:

disabling the 'visual effects'

System > Appearance > Visual Effects is set to None

connecting monitor
Settings -> Display
clicking 'detect monitor'


Can connect ubuntu with windows workgroup

You have to use samba for your requirement  This has been already explained in this  link


To avoid having to always set the permissions manually you can use the setfacl command to ensure that future folders and files will get the default file access control set by you.

The steps include:

Change the current setup:

sudo chown -R www-data:www-data /var/www/html

Add yourself to that group:

sudo useradd www-data $USER

Logout and log back in to have this take effect or reboot if it doesn't

Set the default facl (File Access Control List)

sudo setfacl -d -R -m u:www-data:rwx,g:www-data:r-x,o::r-x /var/www/html

Do sudo getfacl /var/www/html to see the changes

Note: This will set the default permissions to 755


GRUB will show only on MANUAL BOOT but not on REBOOT (dual boot windows 8.1 ubuntu 13.10)

Open the file etc/default/grub and search for the entry GRUB_TIMEOUT then set its value to -1. This will ensure that the GRUB menu will be shown always and you have to choose which OS to boot from. Then update the grub sudo update-grub and reboot.

sudo gedit /etc/grub/default
GRUB_TIMEOUT=-1
sudo update-grub
sudo reboot


Unity-like Dashboard for Gnome fallback?

Yes there is. You can run unity-2d-shell , just type Alt+F2 then enter in unity-2d-shell and it will give you the Unity 2d launcher and dashboard. To start it on start-up How to start applications at startup?

Here is a picture of my Gnome fallback (no-effects) session using the unity dash-

Unfortunately the dash is built into the launcher. But you can auto-hide the launcher, and turn down the reveal sensitivity so it be harder to show unless you access the dash.

I found a way to hack it so the launcher does not appear,

Open the shell.qml to edit, paste this in terminal

gksudo gedit /usr/share/unity-2d/shell/Shell.qml
Find this code in the file, scroll down a bit-

LauncherLoader {
        id: launcherLoader
        anchors.top: parent.top
        anchors.bottom: parent.bottom
        width: 65

Change the width: 65 to width: 1
If you had the unity-2d-shell running while making the changes, in terminal do
killall unity-2d-shell then type Alt+F2 and enter unity-2d-shell to see the change, now the launcher is out of the way, and you can still acess the dash with the Meta (windows) key.


acer travelmate 8371 doesn't charge battery since ubuntu 12.04

Try booting to a LiveCD or LiveUSB for the version you used to have installed.  This way, you will be running on a completely independent instance of the operating system, so if the problem persists you know it is your hardware and not the software.  You could also try a LiveCD for Ubuntu 12.04 to see if it is a configuration issue.


Why are boost package libs installed to /usr/lib/x86_64-linux-gnu?

The library packages have been made multiarch, meaning that you can simultaneously install both the amd64 version and the i386 version on an amd64 computer. If you want to install the i386 version of a library, suffix the package name with :i386. (For example, sudo apt-get install libboost-system1.54.0:i386)

Library packages are shifting towards becoming multiarch, so that it is a little easier to install packages from other architectures and run programs compiled for other architectures.


ubuntu 18.04 LTS bluetooth 'on' button not working

When you use BlueZ you must use its controls and settings, not the built in ones.


Ubuntu 14.4 Logs out user when hitting Super key

Install and run unity-reapir using ubutu tweak tool. You can install and run this in tty mode by following the below process.

First make sure everything is ok.

sudo apt-get -f install

Next get updates for packages

sudo apt-get update && sudo apt-get upgrade

Getting unity-reset: Install unity-reset from Link If you can -> Install unity-reset

Installing unity-reset in tty mode:

First add the PPA:

sudo add-apt-repository ppa:freyja-dev/unity-tweak-tool-daily && sudo apt-get update

Install Ubutu tweak tool:

sudo apt-get install unity-tweak-tool

To reset tweak tool:

unity-tweak-tool --reset-unity

Then type:

$ unity-reset

You may need to reboot.

How to Reinstall unity:
After ruining updates

sudo apt-get install --reinstall ubuntu-desktop

Next Install Terminal:

sudo apt-get install --reinstall gnome-terminal && sudo apt-get update

Then reboot.

Last option install new desktop from tty this option installs Gnome Desktop

sudo apt-get install gnome-shell ubuntu-gnome-desktop


Usually you install the openjdk like this:

sudo apt-get install openjdk-8-jdk

Maybe this is the problem. You can look this up at
http://openjdk.java.net/install/index.html.
If you do this you might have fixed this problem. But cant imagine why your command give this result.


How to disable the advertisements when sshing into an Ubuntu machine

When logging into a computer with SSH, a lot of text is displayed before reaching the command prompt. This comes from the motd (message of the day) process. The text can be somewhat overwhelming in volume.

To reduce or mostly eliminate this text, edit /etc/default/motd-news and change ENABLED=1 to ENABLED=0.


How do I remove the brontok virus that has infected my Ubuntu via Wine?

I will show you how to delete wine and the virus it self, step by step:

Step One:

Run the following command(s) in your terminal:

This will purge wine from your system:

sudo apt-get purge wine

Step Two:

Just in case apt-get could not delete a Wine .exe file for whatever reason, delete the entire wine folder. It resides in your home folder like so: .wine/

sudo rm -rfv ~/.wine/

Step Three:

To make sure no wine process is still loaded:

sudo reboot

This will reboot your system, without confirmation.

You can run the following command after the reboot to see which .exe process is still loaded:

ps aux | grep .exe

And then force close it:

killall -9 brontok.exe

Make sure you know that the process is malicious.

Step Four:

Run this in your home folder, it will try to find any file that ends with the .exe prefix.

find ~/ -type f -name "*.exe"

Step Five:

The previous find command will display the path of the .exe file(s), delete every .exe file you don't trust. Like so:

sudo rm -f /path/to/maybe-a-virus.exe

Step Six:

Scan with an Antivirus for linux, like clam antivirus. How to install and scan here:

security - How do I scan for viruses with ClamAV? - Ask Ubuntu

Notes:

clamav does not have a large database of Windows viruses compared to the mayor Antivirus Corporations. If you are not a hundred percent convinced of the legality of a file, you can upload it to:

VirusTotal - Free Online Virus, Malware and URL Scanner

At the time of writing, it use 57 anti viruses to scan files. Its still not a hundred percent accurate, but, it is right for about 99% of the time. My personal experience.

Mono names its binaries to .exe, So, not all .exe files you don't know, are harmful. For a list of Linux projects that use mono, see:

Mono (software) - Wikipedia, the free encyclopedia#Software_developed_with_Mono

Here is a quote - my own - that comments about the security benefits from using PlayOnLinux:

  "My preferred graphical front-end for Wine is PlayOnLinux, with that you have more control over your Wine environment, and there is a separate environment per application. So, if you happened to get infected by using Safari, use the Configuration options to examine and/or restore, or just delete the entire Safari Volume." - blade19899, malware - Do Wine Viruses only work while Wine is running?

It's a bit safer than using wine.

Step Seven:

After you're absolutely sure that your virus is gone, re-install wine:

sudo apt-get install wine

Links:

malware - Do Wine Viruses only work while Wine is running? - Ask Ubuntu
VirusTotal - Free Online Virus, Malware and URL Scanner
Mono (software) - Wikipedia, the free encyclopedia#Software_developed_with_Mono
security - How do I scan for viruses with ClamAV? - Ask Ubuntu


Check CAPS LOCK. Passwords are case sensitive.


Lost files with newly installed 12.04, is there any way to recover them?

Oh gosh... I'm sooo sorry!
First off, you need to know that you are not the only one! It happens to all of us. When this happens to me, I tell myself that learning is NOT free.
This upgrading feature should be disabled. I had a lot of problems with it too.

First off, you need to know how many partitions you already have on your computer. I guess you only have one hard drive right?

Go to your terminal and type : sudo fdisk -l

Please post here all your partitions that you have on your hard drive such as /dev/sda1, 2, 3 etc.. with the type 83, I guess you only have one partition?

You might be able to recover 'some' files... Most probably not all of them because you ended up reinstalling ubuntu probably on the same partition.

Try photorec application.  Here it is: http://www.cgsecurity.org/wiki/TestDisk_Download
Another good one is http://www.r-tt.com/free_linux_recovery/Download.shtml

Remember that you will probably end up recovering your files bit by bit so there will be corruption in some while others will simply not be recoverable.

I know it's very frustrating. It happened to all of us. I guess that's the way we learn.
Always make a backup!

Go to your ubuntu software center and type 'backup'. Install a backup software and start using it.

All of us have too much stuff to back up so we postpone to backup. My best suggestion is that you need to group what is important and what is not in your documents. Start by only backing up what is important to you... On a daily basis (or at the very least weekly).  Keep a backup off site also. That way, if you get stolen, you will still have your offsite backup you'll be able to recover from.

Trust me, this happened to me too.

StepNjump.


OwnCloud-client 2.1.1 crashes: Aborted (Core dumped)

I did this

– Uninstall owncloud-client using software centre

– Delete temporary files and directories whose names begin with sni-qt *, in /tmp
– Erase the $/.local/share/data/ownCloud (it contains the connection and configuration data from the previous version).
– Reinstall owncloud-client

To see the .local directories go to the file manage and press ctrl H to see the hidden directories.

I got this fix from https://wayneoutthere.com/weird-bug-fix-for-crashing-owncloud-client-on-ubuntu-14-04segmentation-fault-core-dumped/

It has worked for me. good luck


As I read what you've done, yes your data should be encrypted. When you boot, before you recognize Ubuntu you should be asked something like

Attempting to decrypt master key...
Enter passphrase for hd0,gpt2 (xxxxxxxxx)

without any identification as to what's on your system (no mention of Ubuntu or anything).

Your second question I find somewhat confusing, I can boot a 'live' system on my system, and have it mount my partition, and as long as I enter my correct passphrase I can view my encrypted-ssd's data, if I enter a wrong passphrase - no I cannot read anything from my ssd.

fyi: No 'full-disk' encryption is 100% complete (if it was your system wouldn't be able to read it & boot from it), so in my example there is enough unencrypted to throw the "Attempting to decrypt master.." message, check key is valid & open drive-data. This of course includes clues, that tell someone 'hacking' the system for example that I'm probably using GNU/Linux, but not that I'm using Ubuntu. Usually though people breaking in to steal data will look for clues (quick photograph of where they stole it) around where machine was situated that will provide the clue that allows break in rather than brute-force.  ie. they defeat encryption because users are lazy and don't protect the needed passphrases writing it on a post-it note or something similar


EDIT: After google translate it seems like apt-get update complains about main not being found in http://archive.canonical.com/ubuntu/dist/cosmic which is true. Do you get the same error for http://it.archive.canonical.com/ubuntu cosmic InRelease line as that repository does have main folder in the tree. For the broken repository path The packages.gz file seems to be located under http://archive.canonical.com/ubuntu/dists/cosmic/partner/binary-amd64/ so what I think you need to do to fix this is either enable **Canonical Partners ** in Ubuntu Software Sources window. (Ubuntu Software Centre > Edit > Software Sources) or edit /etc/apt/sources.list and add/uncomment

deb http://archive.canonical.com/ubuntu cosmic partner

and comment out

deb http://archive.canonical.com/ubuntu cosmic InRelease

================================


After changing user directory name Ubuntu stuck at boot

Ok, so considering what you have now here's what I would do:

# adduser "your-new-username"
# mv /home/user /home/"your-new-username"
# chown "your-new-username":"your-new-username" /home/"your-new-username" -R

Reboot, and try to login again.


Installing latest FFmpeg with latest external libraries and keeping them up-to-date

First i looked this guide but it doesn't cover all libraries and a bit outdated. At first step, it makes you to install some libraries from Software Center which most likely provides old versions. Ex. libvorbis-dev

The guide uses some packages from the repository for user convenience. Many of these packages, such as libvorbis-dev, are in a mature state and are considered relatively up-to-date, so compiling the most recent version may not make any difference. You'll have to refer to each package.

Of course you can always compile each dependency instead of relying on the version from the repository: just adapt the examples in the guide for the other dependencies that are compiled.

  Also i don't even know how to upgrade just a library or ffmpeg without doing everything all over again.

If you follow this guide, and upgrade a library, then you'll have to re-compile ffmpeg to take advantage of the upgrade. The guide instructs the user to simply delete the old compiled stuff (no system files are interfered with) and starts over.

If you're going to be re-compiling often the I recommend using git to retrieve the source code instead of using releases and snapshots as shown in the guide. See FFmpeg Wiki: Compile FFmpeg for CentOS for examples using git.

  Then i found this static builds recommended on ffmpeg.org, but again, it doesn't include all external libraries

Why would you want to include all external libraries? Seems like a waste of time and effort to me. Just include what you're actually going to use. Do you really need the obscure stuff and corner-cases?

  As speaking of "not included libraries", can i add them to any static build manually?

No.

What do to

I recommend following the compile guide and adapting it to your needs. This is one of the main reasons to compile, so you can customize it however you like.

Investigate if a shared build is more suitable for you. This may introduce a new set of headaches however.

Also, it seems like you may be outgrowing Ubuntu which isn't the best distro for users who want to use the bleeding-edge. I recommend trying Arch Linux; the repo packages keep up with their upstreams, and the whole methodology for customizing repo packages is much saner with the ABS and Arch's "ports-like" build system.


What is the difference between ls [13] and ls {1,3}?

{} is called brace expansion. It has two forms: {x..y} and {x,y}, replace x and y with any alphabetic or numeric value.

In the first form, {x..y} will be expanded to all values from x to y, inclusive. For example, {2..5} will be expanded to 2, 3, 4, 5.

In the second explicit form, {x,y} will be expanded to only x, y. For example, {2,5} will be expanded to 2 and 5.

If no expansion is possible, the pattern is treated literally e.g. in {a..3}.

Important thing to note is that the brace expansion will be done (if possible) irrespective of any file match, while in file creation/matching.
[] is known as a pathname expansion (or globbing) pattern. Unlike brace expansion you can only use it while matching filenames, it will be treated literally if you use it while creating files.

It has two forms: [xyz...] and [x-y].

In the first form, it will match any single character inside the square brackets separately I.e. each character is treated individually. So for [25].txt it will match a file named 2.txt or 5.txt in the current directory, while for [245].txt it will match any file named 2.txt or 4.txt or 5.txt.

In the second form, a range expansion is done first before matching individually, if possible otherwise treated literally. So for [2-5]. txt, it will match any file named 2.txt or 3.txt or 4.txt or 5.txt. If the range can't be expanded, it will treated literally e.g. in case of [a-3].txt.

An important behavioral difference between these two is when there are more patterns to match while less actually is matched. As the brace expansion is done no matter what, it will show error that certain file(s) does not exist while pathname expansion will match whatever possible without any error for the rest:

$ ls {1..4}.txt
ls: cannot access 4.txt: No such file or directory
1.txt  2.txt  3.txt

$ ls [1-4].txt
1.txt  2.txt  3.txt

Portability Note:

The [] pathname expansion operator is defined by POSIX hence portable among Bourne shell and derivatives.

The brace expansion, {}, is not defined by POSIX hence is not portable among all shells. For example,  dash (sh in Ubuntu) does not have this. It was borrowed from csh and will work on certain shells only e.g. bash, zsh, ksh93, fish. Make sure the shell you are using supports this before implementing.

Example:

$ touch {1..3}.txt

$ ls {1..3}.txt
1.txt  2.txt  3.txt

$ ls {1,2,3}.txt
1.txt  2.txt  3.txt

$ ls {1..4}.txt
ls: cannot access 4.txt: No such file or directory
1.txt  2.txt  3.txt

$ ls {a..3}.txt
ls: cannot access {a..3}.txt: No such file or directory

$ ls [123].txt
1.txt  2.txt  3.txt

$ ls [1-3].txt
1.txt  2.txt  3.txt

$ ls [1-4].txt
1.txt  2.txt  3.txt

$ ls [a-3].txt
ls: cannot access [a-3].txt: No such file or directory


Enabling external monitor via eGPU when having multiple NVIDIA Cards - Ubuntu 18.04

I found an answer, and will post it here in case someone else also stumbles upon the same problem.

Ubuntu by default doesn't allow Display output via an ExternalGpu, hence this was the main issue (why the card was detected via nvidia-smi but Display didn't worked plugged to it).

I still have no idea why the NVIDIA X Server Settings wouldn't start - I now reinstalled everything and on Ubuntu 18.10 it works.

To get your external monitor to work via your eGPU on Ubuntu, you'll have to create a X11 config, aka create /etc/X11/xorg.conf.d/ and place an nvidia.conf there.

The config for /etc/X11/xorg.conf.d/nvidia.conf needs to look like this:

Section "Device"
        Identifier      "Videocard0"
        BusID           "PCI:11:0:0" # This must be what your lspci command gave you
        Driver          "nvidia"
        VendorName      "NVIDIA Corporation"
        Option          "AllowEmptyInitialConfiguration"
        Option          "AllowExternalGpus"
EndSection

The BusID needs to be in Decimal, hence why 0b, is 11, and it also needs 2 additional Options:

Option "AllowEmptyInitialConfiguration" - I have no idea why this is needed, but it would get stuck in a login loop without it.

and

Option "AllowExternalGpus" to allow Ubuntu to use the eGPU as a Display.


Move folders modified a day prior 6.30 p.m

timestamp=$(date -d "18:30 yesterday" +%s)
stat -c "%Y %n" * | while IFS= read -r mtime filename; do
    if (( mtime < timestamp )); then
        mv "$filename" /some/folder
    fi
done


Can't login to account on guest or standard

To unlock the the user account, run the command below from a Terminal, from your own account:

sudo passwd -u <username>

(Altrough it seems that your system has bigger problems, like cannot read /etc/shadow etc.)


Wrong directory. See  installer-amd64/current/legacy-images/netboot/


Is it necessary to upgrade to 14.04 LTS or can I stand in 12.04 LTS forever with no problem?

Until about April 2017, yes: https://wiki.ubuntu.com/Releases. LTS releases are supported for 5 years. However, the longer you stick with Ubuntu 12.04, the harder it will be to migrate. Things may have changed drastically in 5 years (just compare 8.04 and 12.04). I recommend that you upgrade next year, when 15.04 is out. A year's time should be enough for you to check on compatibility, and barring proprietary drivers and associated problems, 14.04 will run on most about anything that can run 12.04.


pcap compile syntax error on Ubuntu 10.10

You don't specify a hostname but a pcap expression to tcpkill. The expression that's being used in this case is just example.com which is invalid. You'd have to use something like host example.com. Better yet, if you can use an IP address instead of example.com that'd be best.

With these expressions you can select traffic according to a wide variety of criteria, I suggest you have a look to see how things work. Incidentally, this is the same expression syntax used by tcpdump, so if you want to see which packets are being picked up by the filter/expression before using tcpkill on them, you can use tcpdump to test your expressions. Here's a reference on pcap expressions:

http://www.manpagez.com/man/7/pcap-filter/


LFTP short connection timeout vs longer transfer timeout

According to the answer to this (quite old) question, net:timeout isn't enough as
there's a default net:max-retries 1000.

So you can get the results you want by reducing net:timeout and set net:max-retries to 1 (or a sufficent low number of times you want it to retry).

Pay attention to net:reconnect-interval-base, too, which sets the interval (in seconds) between consecutive retries.

Don't know if recent versions of lftp have changed these defaults, but the current man page lists them as valid options, so give it a try.


I messed up my packages and can't get them to work. Dependencies missing

Try restoring your sources.list.d with the help of Always getting error during apt-get install

And for your package installation error, run...

sudo dpkg --configure -a

This should work.


How can I search for documents in Unity?

Looks like by default unity only returns searches for recently opened files and folders.  This is pretty archaic considering real-time queries have been done on operating systems dating back decades.  I guess the man power and/or OS power is just not up to par for real time queries.


What does idle time output from "w" command tell?

The idle time is supposed to tell how long it has been since the user typed any input on that terminal.  For Xwindows sessions, it is broken since Xwindows never reads input from a terminal, but instead gathers input directly from your mouse and keyboard, so the terminal never gets its timestamp updated since it is never read from.


Do I need to install Apache and PHP/Java to develop Web Apps in Ubuntu touch?

No, you don't want to run a webserver on the tablet.  You have two options here:

1) You can write a native HTML5 app, which runs only in a browser component and has no server-side backend.  You can learn more about native HTML5 apps here: http://developer.ubuntu.com/resources/tutorials/html5/

2) You can integrate your website with Ubuntu Unity using Webapps integration scripts.  Here all of your code lives on your own remote server, but it uses Javascript hooks to integrate with the Ubuntu Touch shell.  You can find out how to do that here: http://developer.ubuntu.com/api/ubuntu-12.10/javascript/unity-webapps/


How do I install javahl _without_ pulling in all the openjdk stuff?

download the lib-svn source package and build manually, in that case it wont download all dependecies by itself and you can avoid openjdk stuff.

Check this article on how to compile svn from sources


It's perfectly normal, as by default, all connections are made through your VPN. You have two options:

you can configure you VPN server to let connections to the outside go through the VPN
you can configure you client to only use your VPN for connections to other machines in the private network


Why failing to install Ubuntu 16.04 alongside Windows with many HDs in Asus X550JX?

There are a number of possible causes of your problem, and different solutions depending on the cause. The solution that's most likely to work is:

Download the USB flash drive version of my rEFInd boot manager and copy it to a USB flash drive, as described in its README-flashdrive.txt file.
Enter your firmware setup utility and disable Secure Boot. (See this page of mine for some examples of how to do this -- note that details vary greatly from one computer to another.)
Boot to the rEFInd USB flash drive and use it to boot Ubuntu.
In Ubuntu, install rEFInd by using the PPA or Debian package, as described in the rEFInd documentation.
If desired, you can re-enable Secure Boot; however, chances are good you'll need to jump through some extra hoops, as described on the rEFInd Secure Boot page.

There are numerous variants on this procedure, and depending on the exact nature of your problem, the preceding procedure might not work -- but at least this procedure has a very high probability of working if you get as far as booting into Ubuntu. The other major option is to try to get it working with Boot Repair, but at least one likely reason why you ran into problems would make Boot Repair fail or create new problems, too, which is why I don't recommend you poke around with Boot Repair just yet. (FWIW, that reason is an activation of your Compatibility Support Module, or CSM, as described in this page of mine. It's gotten to the point where the CSM causes more problems than it solves, IMHO.)


Mysql strange installations problems (logger: command not found)

Had the same issue with mysql-server-5.6 and this solution hs helped me:

launchpad: Bug #392051: [Karmic] logger command not found

Basically, the program logger got messed up;

It can be recreated by reinstalling the package bsdutils:

apt-get --reinstall install bsdutils

or

aptitude reinstall bsdutils


Run service --status-all to get a list off all the Upstart services and their status. (It basically issues a status command for all the services.)


VMWare stopped working after I upgraded. (VMware Kernel Module Updater)

This solution was taken from this answer. However, that answer is still not marked as accepted, but it worked for me.

Run the following script:

#!/bin/bash
if [[ $UID != 0 ]]; then
    echo "Please run this script with sudo:"
    echo "sudo $0 $*"
    exit 1
fi

sudo ln -s /usr/src/linux-headers-$(uname -r)/include/generated/uapi/linux/version.h /usr/src/linux-headers-$(uname -r)/include/linux/version.h

cd /usr/lib/vmware/modules/source
sudo tar -xf vmci.tar
cd vmci-only/linux
sudo sed '127s/.*/   .remove = vmci_remove_device,/' driver.c > driver.c.tmp
mv driver.c.tmp driver.c
sudo sed '1753s/.*/static int/' driver.c > driver.c.tmp
mv driver.c.tmp driver.c
sudo sed '1981s/.*/static void/' driver.c > driver.c.tmp
mv driver.c.tmp driver.c
cd ../..
sudo tar -cf vmci.tar vmci-only/
sudo rm vmci-only/ -Rf
sudo vmware-modconfig --console --install-all
sudo rm /usr/src/linux-headers-$(uname -r)/include/linux/version.h
echo "Done"


Run this command

sudo apt-get install --install-recommends xserver-xorg-core-lts-wily xserver-xorg-lts-wily xserver-xorg-video-all-lts-wily xserver-xorg-input-all-lts-wily libwayland-egl1-mesa-lts-wily libgl1-mesa-glx-lts-wily libgl1-mesa-glx-lts-wily:i386 libglapi-mesa-lts-wily:i386

and it will install mesa 11.0.2.


How to Use Keepass Auto-type with Ubuntu One

I don't use Keepass, but a bit of research after thinking about your question leads me to suggest that you use The URL in Title Bar plugin which supports Firefox, Opera, and Chrome.

Enable the option 'An entry matches if its URL is contained in the target window title' in KeePass 2.x (Tools->Options->Advanced, auto-type by URL can be realized. Some scripts just append the host/domain; in this case the option 'An entry matches if the host component of its URL is contained in the target window title' should be enabled.

Sources:

http://keepass.info/features.html#lnkdragdrop

http://keepass.info/help/v2/plugins.html

http://keepass.info/plugins.html


How do I make an alias that shows only the date?

alias dateonly="date +%D"

check man date to see all the possible % formats, there's plenty of them :) for instanc,e change %D to %F for a different date format.


purge old and reinstall new to sda - BIOS

sudo apt-get purge grub grub-pc grub-common
sudo mv /boot/grub /boot/grub_backup
sudo mkdir /boot/grub
sudo apt-get install grub-pc grub-common
sudo grub-install --recheck /dev/sda
sudo update-grub

Or in Boot-Repair's advanced options check reinstall grub main options and uninstall old version in grub options.

https://sourceforge.net/p/boot-repair/home/Home/


How can I restore a folder backed up on my old computer running Ubuntu to my new one?

First, a quick refresher from question above on the key paths I'll be working with here:

Folder from old dead computer I want to restore: /home/klenwell/projects
Folder of old computer backups on external drive (when plugged into new computer): /media/klenwell/my-external-drive/u2014
Folder on new computer where I want restore folder: /tmp/restored/u2014/projects

Command Line

From command line, here at the command I ran to restore the backup. See the next section for a step-by-step guide with explanation:

# backup new project directory (to be safe)
mkdir /tmp/new-projects-backup
cp -R ~/projects /tmp/new-projects-backup

# review list of backed up paths from old computer
sudo duplicity list-current-files file:///media/klenwell/my-external-drive/u2014 > /tmp/u2014-backup-list.txt
less /tmp/u2014-backup-list.txt

# make destination folder for restored directory
mkdir /tmp/restored/u2014/projects

# restore backup
sudo duplicity restore \
  --file-to-restore home/klenwell/projects  \
  file:///media/klenwell/my-external-drive/u2014 \
  /tmp/restored/u2014/projects

# confirm folder has been restored
ls -al /tmp/restored/u2014/projects

Step-By-Step Guide

Here's a break down of the commands below with explanations for each command:

Plug in external drive to new computer and confirm it's accessible:

ls -al /media/klenwell

Notes:

In reality, the mounted external drive's directory name a random string like ksdfd987s-0sll1332-skd09233.
To simplify this guide, I will assume it was named my-external-drive and backups were in folder u2014.

Confirm I can see backed up files from older computer:

sudo duplicity list-current-files file:///media/klenwell/my-external-drive/u2014 > /tmp/u2014-backup-list.txt
less /tmp/u2014-backup-list.txt

Notes:

I needed to use sudo to deal with this import error: https://lists.nongnu.org/archive/html/duplicity-talk/2013-10/msg00002.html
I needed to know the password I used to encrypt backups on my old computer meaning I entered 2 password: my sudo password and my backups password.
Note the file:// prefix for my backups folder path.
It took a few minutes to generate the output file.

Back up /home/klenwell/projects on my new computer just to be safe in case duplicity tries to restore the backup folder to same path for some strange reason:

mkdir /tmp/new-projects-backup
cp -R ~/projects /tmp/new-projects-backup

Here's where the magic happens (it was a somewhat large directory so it took a few minutes in my case):

sudo duplicity restore \
  --file-to-restore home/klenwell/projects  \
  file:///media/klenwell/my-external-drive/u2014 \
  /tmp/restored/u2014/projects

And to confirm all went well, I should now see my old project directory restored:

ls -al /tmp/restored/u2014/projects

References

https://askubuntu.com/a/332914
Extract a Folder from Duplicity Archive
https://lists.nongnu.org/archive/html/duplicity-talk/2013-10/msg00002.html


MaaS install 64-bit client nodes doesn't work

As discussed on IRC. The reason a 64bit client is not being installed in this particular case, is because the installation process that seems to be using i386 is not really an installation process.

What's happening here is that the client Machine is trying to enlist itself into 'MAAS', and it uses a i386 image. Once the machine is enlisted, you will be able to 'Accept&Commission' the machine from the WebUI. Once the machine is commissioned, then it will become 'Ready' for deployment.

Once you deploy it will install Ubuntu 64bit.


Moving windows left/right/up/down between multiple monitors on KDE

I'm hunting the same functionality and found in the shortcuts/KWin settings:

quick tile window to the left/right will maximize it to the left/right.

It doesn't look like top/bottom functionality exists.

https://bugs.kde.org/show_bug.cgi?id=310005

Window to Next/Previous Screen works for moving windows to other monitors.

I'm hoping to find more, but so far KDE is not quite as friendly with multiple windows on multiple monitors as Win7 or even Ubuntu with compiz.


This might or might not help but this is what i did. When i first bought my IPod Touch and Ipod Shuffle i synced them in Banshee with no problem but for music only. mp3 files. For other stuff i put the touch in itunes on a friends mac. I was afraid of some corrupt error but nothing happened. Ever since i have been doing it in any way i want. Sync with Banshee or when am on my friends Mac i sync them there. No weird stuff has happened. Am using the Banshee ppa.


Cant install polybar because python-xcbgen is not available

Building polybar does not seem to work well with anaconda. The recommended way is to either uninstall it or completely disable it while building polybar.

From the Known Issues polybar wiki page:

  Problem: On systems using Anaconda compiling polybar will likely fail
  with one of these error messages:

  Missing required python module: xcbgen
  ERROR: could not calc required_start_align of Struct "xcb.Setup"
  Cairo was not compiled with support for the xcb backend

  The general issue is that the libraries and programs provided by
  Anaconda cannot be used to build polybar in many cases.

  Fix: The easiest fix is to uninstall Anaconda if you don't need it.

  If you can't/don't want to uninstall Anaconda, we need to force
  polybar to not use any resources provided by Anaconda. This can be
  done by temporarily removing any paths that point to anaconda from
  both the $PATH and $PKG_CONFIG_PATH environment variables in the
  terminal before building polybar.

  People have reported that conda deactivate does that for you for the
  currently open terminal. If that doesn't work, try doing it manually:

  For example if your PATH variable contains:

  /home//anaconda2/bin:/home//bin:...:/usr/bin

  Remove /home//anaconda2/bin and reexport the variable:

  export PATH=/home//bin:...:/usr/bin

  Do the same thing for PKG_CONFIG_PATH (though this variable is often
  already empty). Now you should be able to build polybar with either
  the build.sh script or cmake and make. Make sure that you do a clean
  build (redownload all polybar sources).

The last sentence is very important. You must do a clean build. This means deleting the polybar sources that you downloaded and redownloading them.


Ubuntu Openstack Installer stuck at dialog

You need to configure PuTTY to use UTF8 as it's encoding.


In some case, you need to Enable External Device boot or sometimes called USB Boot from BIOS Settings in order to see Flash Drive in option.

Check your computer specific BIOS Settings for more precise USB Settings, External Device Boot & BOOT ORDER related information.

Try other Boot Devices listed in Boot Menu, sometimes it is known as Mass Storage or comes under Hard Drive!

PS: Don't forget to Save Changes and Exit. in BIOS!


Is there any way to get a details pane in Ubuntu 14.04 like in Windows File Explorer?

Nautilus and Thunar has both got this capability in Ubuntu 14.04 LTS

Is this what you are looking for or something else?


How can I get Seahorse Passwords and Keys to read-in passwords from $HOME/.gnupg?

Seahorse does not read the passwords from $HOME/.gnupg, but from $HOME/.gnome2/keyrings.


External blu-ray drive not working ubuntu 19.04

I unplugged and reinserted the USB cable and now it works.


Squeeking noise issue with Asus laptop. Found working solution for Windows, now how to do this on Ubunutu?

What you are hearing are probably the coils of the CPU power converter, when the CPU switches between powersaving modes, so in order to get rid of the sound you have to disable the powersaving modes, which will have a negative impact on power draw.

In order to do this, you have to add the kernel cmdline option cpuidle_sysfs_switch to your bootloader configuration. Then you can disable modes by writing a 1 to the disable files in /sys/devices/system/cpu/cpu0/cpuidle/stateX/.

First change to root by running sudo -i, then disable states with, for example,  echo 1 >/sys/devices/system/cpu/cpu0/cpuidle/state3/disable.

You'll have to try which powerstates you have to disable. Once you have figured it out, you can make the changes permanent by adding the command lines to /etc/rc.local, before the last line, which by default is exit 0.

The official documentation can be found here.


The problem is with the colorspace gray part of the command. This option checks only difference between gray colour of the images.

So the correct command should be

convert image1 image2 -compose Difference -composite  -format '%[fx:mean*100]' info:

This should give you more appropriate answer.


For 15.10

Running the following command:

sudo apt-cache search ladspa-plugin | grep plugins

returned the following relevant results:

amb-plugins - ambisonics LADPSA plugins
fil-plugins - parametric equalizer LADSPA plugin
mcp-plugins - LADSPA plugins designed for Alsa Modular Synth
rev-plugins - reverb LADSPA plugin
ste-plugins - stereo LADPSA plugins
swh-plugins - Steve Harris's LADSPA plugins
tap-plugins - Tom's Audio Processing LADSPA plugins
vco-plugins - LADSPA plugin sporting anti-aliased oscillators
wah-plugins - auto-wah LADSPA plugin

It looks like the following may resolve your issue:

sudo apt-get install rev-plugins

This will install all of them:

sudo apt-get install rev-plugins ste-plugins swh-plugins tap-plugins vco-plugins wah-plugins mcp-plugins fil-plugins amb-plugins


After installing Ubuntu how do I know that all devices have their necessary drivers

Open a Terminal with Ctrl+Alt+T

use this commands

lspci
lsusb

They will give a detailed report.

This command also can be used to list all devices to a file on your desktop.

sudo lshw -html >Desktop/myconfig.htm


Ubuntu 13.04 can only work in recovery mode

It looks I've solved this issue by adding "nomodeset" param to the grub settings. More info can be found here http://ubuntuforums.org/showthread.php?t=1613132


Making IntelliJ IDEA community edition available in software repository

There are several ways you can get an app into USC:

From Debian:
If you get your application packaged and accepted into Debian, it will automatically be available in the next release of Ubuntu (depending on when in the development cycle you get it into Debian).  We will also pull the version of your application in Debian into every new release of Ubuntu at the beginning of the development cycle.

Ubuntu Universe:
You can also submit your application package directly to Ubuntu's Universe repository.  This is ideal for Ubuntu-specific application that don't make sense for Debian to have, like ubuntu-tweak.  However, if your application isn't Ubuntu-specific, it's preferred that you get it into Debian eventually.

Ubuntu Developer Portal:
This is the newest way to get your applications into USC, it supports both open and closed source apps, both free and for sale.  You will need to signup for an account at http://developer.ubuntu.com and follow the guidelines for publishing your app.  Applications submitted this way can be included into any stable supported release of Ubuntu at any time, but they do have slightly different packaging guidelines you will need to follow.


Partitioning to the "left" after deleting a Windows partition?

You can resize to the left or right, it is written as space preceeding and space following.

But
First you will have to boot from a live disk inorder to resize your partitions on your hard disk.

Then you will have to first resize your extended partition.
Then you would be able to resize your ubuntu partition,

BUT it would give a warning that moving root partitons can lead to boot failure.

So best option is to right click on the unallocated space and click on new to create a new partition, choose type as ext4.

This partiton you could use in ubuntu to store your data instead of resizing the ubuntu partition.


Is it possible to have Wine use a dual-boot Windows's profile data and vice versa?

No.

  Respectively, is it possible for changes made to those files using Windows be used by Wine?

No.

WINE is not a drop-in replacement for Windows.

Why are you skipping the more obvious method: virtualbox/vmware virtualization. Internally that would be 100% identical to a normal installed Windows. Only thing that is required is to set up guest additions to have Windows be able to connect to external devices.


How to fix Startup Disk Creator which ends in an unhandled exception?

Create a bug report

This looks like a bug that affects Ubuntu 17.10 in your computer. I suggest that you create a bug report at Launchpad.

Edit: I tested in my 'testing Ubuntu 17.10 amd64 installed system', and it works to install (clone) Lubuntu 17.10.1 amd64 with the Startup Disk Creator. So I cannot report the bug. Of course, we have different hardware, but another difference could be the installation. My system was a fresh installation from the 17.10 iso file, and kept up to date. Was your system upgraded from a previous version of Ubuntu?

Use another tool

Until it is fixed, I suggest that you use another tool to create a USB boot drive,

Disks alias gnome-disks (which comes with Ubuntu)
mkusb which is installed via a PPA

sudo add-apt-repository universe  # only for *live* standard Ubuntu

sudo add-apt-repository ppa:mkusb/ppa  # and press Enter
sudo apt-get update
sudo apt-get install mkusb mkusb-nox usb-pack-efi


Adding a Google account via GNOME returns an error

The problem appears to be that it should be sending en_US.UTF-8, not en-us.utf-8.  So I believe there are two bugs here: one apparently in GNOME for sending a hyphen instead of an underscore (as your locale output shows you should have), and the one in Shibboleth IdP (patched [as noted in their response to you] but probably not released and definitely not deployed) for not catching the java exception when it received that illegal header.


Maximizing HDD space on dual boot Fedora 16 and Ubuntu 12.04 system

Since no one had an answer, I went ahead and tried it out.  I was warned that moving and Resizing my boot partition my result in problems, but forged ahead anyway.  I deleted the /dev/sda5 partition and resized both my Fedora and Ubuntu partitions, all using GParted on my Ubuntu 12.04 LiveCD, and everything went fine.  I just figured I would close this out just in case anyone else has the same question I did.


Remove boot partition item from file manager in Ubuntu 20.04

You can remount the drive with the x-gvfs-hide, for example: mount -o remount,x-gvfs-hide /dev/sda1 which will hide it immediately.

Then you can also update /etc/fstab to make this permanent, but ensure you make a backup of it first.

To see how the device is currently mounted, you cat grep sda1 /etc/mtab


How to select a column of text in Sublime Text 3?

Although the use of Ctrl+Alt+↑ and Ctrl+Alt+↓ are currently suggested for column selection in Sublime Text 3 for Linux,

they don't work. Instead, one has to use alt+shift and the appropriate arrow key according to this technical support response.

To get these keybindings to work in Lubuntu 18.04, I commented out the following lines in ~/.config/openbox/lubuntu-rc.xml:

<keybind key="S-A-Left">
  <action name="SendToDesktop">
    <to>left</to>
    <wrap>no</wrap>
  </action>
</keybind>
<keybind key="S-A-Right">
  <action name="SendToDesktop">
    <to>right</to>
    <wrap>no</wrap>
  </action>
</keybind>
<keybind key="S-A-Up">
  <action name="SendToDesktop">
    <to>up</to>
    <wrap>no</wrap>
  </action>
</keybind>
<keybind key="S-A-Down">
  <action name="SendToDesktop">
    <to>down</to>
    <wrap>no</wrap>
  </action>
</keybind>

saved the file, ran openbox --reconfigure and now I can use Shift+Alt together with the appropriate arrow keys to select a column of text in Sublime Text v 3.2.1.

Note: openbox --reconfigure does two things:

It parses your rc.xml or menu.xml files for errors and
it "reloads" the edited (and saved) file so you don't have to log out and log back in for the changes to take effect.

Note: If you have LXDE the file to modify is ~/.config/openbox/lxde-rc.xml instead.


Use dconf-editor (If not installed, install it with sudo apt-get install dconf-editor) and change idle-delay in org.cinnamon.desktop.session to the desired time in seconds.


Lid switch on notebook stopped working after update. How can I fix it?

It seems that the problem comes from the lack of systemd according to this article.

From the same webpage, there is a workaround: put the following into /etc/acpi/local/lid.sh.post, and make it executable.

#!/bin/bash

grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]; then
   pm-suspend
fi


Try this:

cd /media/angel/ADATA\ HD710/


Create an alias for a directory while working in virtual environment

To shorten the prompt, one way is to set PROMPT_DIRTRIM:

$ cd /usr/share/man/man1
/usr/share/man/man1 $ PROMPT_DIRTRIM=3
.../share/man/man1 $

PROMPT_DIRTRIM, when set, limits the number of directories shown in the prompt path, replacing earlier parts with ....

There are other ways, such as removing unnecessary elements from them (such as the hostname). For that you'd need to edit PS1 in your .bashrc.

To create an alias, just string all your commands together. Aliasing cd just for this purpose isn't a very good idea. I'd use some other name, like django3:

alias django3='cd ~/Desktop/django-user3; source newenv/bin/activate; cd superlists; PROMPT_DIRTRIM=1'

Then you can do:

cam@cam:~ $ django3
(newenv)cam@cam:.../django-user3/superlists $


It works!

I have disabled time sync with following commands:

VBoxManage setextradata "VM Name" VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled 1
VBoxManage setextradata "VM Name" VBoxInternal/TM/TSCTiedToExecution 1
VBoxManage setextradata "VM Name" VBoxInternal/TM/WarpDrivePercentage 400 # means 4x times faster

Note, in Virtual Box 4.3.x you need to enter parameters without quotes (see comments here).

Also you need totally power off and start the virtual machine… Simple reboot for some reason didn't work.


Mouse pointer automatically clicks on selection

I think you have set a condition under Universal Access to allow Hover Click.

Go to System Settings > Universal Access and ensure that Hover Lock is set to off as shown in the below image.


laptop (show applications continiously-left bar) and monitor(auto hide the dock)

To change the applications bar, and also hide it (automatically)

Go to applications / or press super:
search "settings" → appearance
Auto-Hide Dock: [] ← tick this one.
And here you can also choose the location of the bar.

Hope this solves your issue!
//Regards


How can a live distribution be made to access DVDs?

How to install libdvd-pkg

You need the repository, where libdvd-pkg resides, multiverse. When you are adding a repository, you should also add universe with many useful packages, for example ubuntu-restricted-extras, which is useful for playing multimedia.

sudo add-apt-repository multiverse
sudo add-apt-repository universe

In earlier versions you should run

sudo apt update

but it is automatically run via add-apt-repository in 18.04 LTS.

Now you should be able to install with

sudo apt install libdvd-pkg

How to make libdvd-pkg survive shutdown and reboot.

You can do this in a live-only drive, but it will disappear at shutdown or reboot. If you want it to survive, you should create a persistent live system.

The following links describe how to create a persistent live drive

help.ubuntu.com/community/mkusb

help.ubuntu.com/community/mkusb/persistent

How to clone a DVD

If you want to create an image file of a DVD disk or clone it to another DVD disk, I suggest that you use a safer tool than dd. k3b is a good tool for that purpose, and you get it from the repository universe

sudo apt install k3b


How to copy odd files in a folder where all the files are named using numbers

You can do this:
cp *[13579].JPEG ../some/other/dir

This will copy all files in current directory that haves an uneven number followed by .JPEG in the end, to the destination ../some/other/dir


Monospace font is  not mono spaced in eclipse, why?

I'm having a similar problem with Monospace.

As a workaround I've switched to using Bitstream Vera Sans Mono which looks very similar but doesn't have the bold problem.

If you don't have it, you can install it by doing sudo apt-get install ttf-bitstream-vera.


It is easy,

You can use shortcut key Start+P OR Command+P Key To Toggle Multi-Screen Modes Like Windows.

OR

Log into any tty and run sudo startx


The Arch wiki suggests putting this line into /etc/pulse/default.pa for a permanent change. Or, for a temporary change, you can use

pacmd load-module module-remap-sink_name=mono master=alsa_output.pci.0000_00_14.2.analog-stereo channels=2 channel_map=mono,mono

N.B. the second link's format is slightly different, so if this doesn't work, you can try.

pacmd load-module module-remap-sink sink_name=mono master=alsa_output.pci.0000_00_14.2.analog-stereo channels=2 channel_map=mono,mono

Similarly for the /etc/pulse/default.pa method.


Python command not working in ubuntu 18.04

Ubuntu 18.04 comes with Python 3 by default. If you installed python 2.7 you need to execute the file in the version you want to run. So in the terminal change to the directory where the .py file is you're trying to run and use either $ python filename.py for python 2 or
$ python3 filename.py to execute a python 3 file.


Added the following to my xorg.conf

Section "Monitor"
    Identifier "TV-0"
    Option "Ignore" "True"
EndSection

Problem solved !


What is the difference between free and vmstat commands?

From the manpages: free, vmstat

  free displays the total amount of free and used physical and swap
  memory in the system, as well as the buffers used by the kernel. The
  shared memory column should be ignored; it is obsolete.

  vmstat reports information about processes, memory, paging, block IO,
  traps, and cpu activity.

  The first report produced gives averages since the last reboot.
  Additional reports give information on a sampling period of length
  delay. The process and memory reports are instantaneous in either
  case.


Installing Steam on Ubuntu 13.10 - Need Execute Permissions

If is NTFS you need to edit /etc/fstab and add your partition there with exec option to allow execution of binary files.


Kubuntu 11.10 disable tapclick not working from gui

Try this one:

Section "InputClass"
    Identifier "touchpad catchall"
    Driver "synaptics"
    MatchIsTouchpad "on"
# This option is recommend on all Linux systems using evdev, but cannot be
# enabled by default. See the following link for details:
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
    MatchDevicePath "/dev/input/event*"
    Option "TapButton1"  "0"
    Option "TapButton2"  "0"
    Option "TapButton3"  "0"
EndSection


Ubuntu: tried to move home directory to other partition, no SSH access

Apparently in your situation, not having the authorized_keys file in place, you have no chance to login, if you have disabled password logins in SSH and only rely on public keys and have no alternative account to login in, such as root. So you have to wait for the support team to give you access to the machine.

However if SSH is not your only service running on the machine you have several ways to create an authorized_keys file in your home folder. Here are some ideas:

Use a running FTP / File service and upload a new authorized_keys file in your home directory
If you have Apache with PHP running and a website which let you upload files, try to upload a webshell (like php-web-shell, phpShell, or google php shell) so you get shell access. From there you can try to su to your user and try to fix the wrong mount or at least set a symlink with ln -s /path/wrong /path/right to the correct file or just copy it
even more sophisticated: you can try to remote exploit one of your running services to gain a remote shell access. You can do the same as in step 2.
If it is a virtual server, check the management console. Sometimes you will find also some nice features to manipulate your VM, like uploading or changing configuration.
Do you have service accounts to do stuff from other machines on this server? Try to use their credentials and see what you can do.

The shortcoming of all this is, if you have setup your server securely, all this should not work.


Is there any drawback to using jpg instead of png for screenshots?

PNG reproduces the original image exactly.  JPEG reduces quality it in a way that, theoretically, you shouldn't notice in normal conditions (such as, when not zooming in).

PNG is usually recommended for screenshots because it still compresses fairly well unless the screenshot contains photographic or complex imagery.  JPEG can be used if you are concerned about file size.


How to print A5 2-up saddle-stitched booklets from PDF with manual dupex?

Use pdfbook from texlive-extra-utils to create a booklet and print that.


Can I safely uninstall older versions of Python after upgrading?

Actually, there are only 3 versions of Python in Ubuntu 14.04 repository: 2.7, 3.3, 3.4

Almost all applications use v2.7 , so I could say it: noway to remove it.
v3.3 not used (only if you are a developer), could be removed no harm.
v3.4 few applications start using it as alternative (they keep 2.7 compatibility), could be removed but check if it will suggest removing other packages.

It is possible to check their reverse dependencies, using apt-cache to get better idea:

apt-cache rdepends python2.7
apt-cache rdepends python3.3
apt-cache rdepends python3.4


Shortcut that bring me back on the previous window

The shortcut for directly switching windows in reverse order in Unity is AltCtrlTab. While already in the AltTab menu, you can hold Shift to go in reverse order.


Although you can migrate many Steam games, and some other games, not all games or apps will migrate.

The sole solution without virtualization is Dual-Boot; installing Ubuntu on the same drive which now boots Windows. Once installed, you will be offered the choice of which operating system to boot, every time you boot. If you make no choice before it times out, the top OS on the list boots; you can edit that list if you want to change the order of choice.


Ubuntu Budgie dash goes off screen after upgrade 17.10 >> 18.04

Use menulibre to remove menu items to free up space on screen.
Credit goes to @fossfreedom.


Change all dates of all files in directory

You use -a:

  -a     change only the access time

But ls -l shows the modification time, run stat %y file or ls -lu to see the updated Access time.

If you want to change modification and access time, leave out the -a:

touch --no-create *

or if you want to update modification time only, use -m.


The key is here:

valugi-desktop:/$

You are on the root directory, you will need superuser privileges to write to var.

Just try:

sudo 7z x /var/www/site/data/7zip/eu/

Or,if the script is going to be called by another user.

sudo -u username 7z x /var/www/site/data/7zip/eu/


Ubuntu 17.10 crashes to console, sometimes!

It happened again, I pressed (alt+ctrl+f2) accidentally and the session comes back!!!


Globally disable "include online search results"

The command you are looking for is:

gsettings set com.canonical.Unity.Lenses remote-content-search 'none'

To make the command globally (for all users) on log in, you'd have to add a launcher in /etc/xdg/autostart, running the command:

/bin/bash -c "gsettings set com.canonical.Unity.Lenses remote-content-search 'none'"

The file would look like:

[Desktop Entry]
Name=Disable Search
Exec=/bin/bash -c "gsettings set com.canonical.Unity.Lenses remote-content-search 'none'"
Type=Application

Save it as disable_onlinesearch.desktop in /etc/xdg/autostart

Remove the Amazon launcher

To make sure no user can use the Amazon launcher, it is best to remove it globally: go to /usr/share/applications and look for the file:

ubuntu-amazon-default.desktop

and remove it.

Alternatively

If for some reason, you'd like to keep the file ubuntu-amazon-default.desktop, but (temporarily?) disable it (make it invisible in Dash/Unity) add a line to the file:

NoDisplay=true

Later versions

The solution(s) above works for the current versions of Ubuntu, at least from 14.04 and higher. (as on May 28, 2015).


Can I rate an application in software center without writing a review for it?

According to this section of the specification it appears to be on purpose, probably to discourage people from voting without giving a reason why:

  The review service should reject with an error any review that does not have all of review text, summary, and a rating.


How do I change the desktop cube into a sphere or cylinder?

You will need to make sure you have all the extra plugins installed as well

sudo apt-get install compiz-plugins-extra

Then you just have to enable it in the compiz settings


I have already installed to srilm on Ubuntu 14.04. Following are the commands:

mkdir /usr/share/srilm
mv srilm.tgz /usr/share/srilm
cd /usr/share/srilm
tar xzf srilm.tgz

In the Makefile, uncomment the SRILM= parameter and point it to /usr/share/srilm (or your equivalent path).

The run the following commands in Supper user mode:

tcsh
make NO_TCL=1 MACHINE_TYPE=i686-gcc4 World (if you are using 64 bit system then i686 to replace with x86_64)
./bin/i686-gcc4/ngram-count -help


Ubuntu Core 18: serial-getty@.service keeps timing out, delaying initial boot

It turns out that this is actually sort of a known issue already and can be solved simply by updating your kernel. I updated from 4.14 to 4.19 and it works now.


Welcome to the world of Ubuntu Chris. Give yourself time to learn it and it will server you well.
Short Answer: Yes you will get a screen at startup that lets you choose between Windows and Ubuntu.
Long Answer:
Here are some tips as you proceed.  I am still a relative rookie.

Turn off Encryption.  You have W10 Pro.  It comes with BitLocker. I recommend turning it off or disabling during the install.  And save your Key in at least two places.  If you have small children then 4!(Not 4 children but 4 places!!)
Use Easus Partition Master Home edition to partition your drive first from Windows. Take your Windows partition and add 20 to 30 GB Minimum to the Used amount and shrink it to that.  In the Unallocated space make an ext3(you want ext4 but it doesn't offer it) partition.
Now make a USB disk of Ubuntu 20.04 and install in the new partition. As @oldfred suggested try first to install in UEFI mode by booting the install media in UEFI mode. If that does not work then you have to wage the Bios Battle getting the computer to "see" and boot from the bootable media.

OK have at it.


How can I use the eOS terminal notification in Ubuntu?

What you want most probably already is available via your ~/.bashrc courtesy this and this:

Note: this assumes you have libnotify-bin installed. If it isn't, just run sudo apt-get install libnotify-bin to get it.

Check that your ~/.bashrc has lines like this:

# Add an "alert" alias for long running commands.  Use like so:
#   sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "Task finished" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'

Note that "Task finished" isn't present in the original code.

So, in your specific example, you'll run

sudo apt-get update; alert

If you want the notification to remain on-screen a little longer, use -t 3000 (in milliseconds). Or, if you want the notification to display until you dismiss it, use --urgency=critical.

Here's what I see:


Found this in another thread.
What I needed to do is to rewire Unity launch button as a whole.

  in the Compiz Config open the Unity Plugin page, change the "Key to show the launcher" to anything other than just Super. Mine is Alt+Super.
  original thread

Afterwards all started to work fine.


efibootmgr & The rEFInd Boot Manager: unknown boot sequence w/ chinese letters

I have had the same problem with refind disapppearing. Unfortunately I don't know what could be causing your lack of sound and Bluetooth.
For refind, what worked for me was removing the Chinese character boot entry and manually re-adding refind as a boot entry.
You can adapt the commands below:
efibootmgr -v
#at this point, check the numbers of the boot entries.

sudo efibootmgr -b 0002 -B
#remove all of the Chinese character boot options. For you the boot number appears to be 0002.

sudo nautilus /boot/efi
#this helped me determine the file path for refind on my system. In my case it was /boot/efi/EFI/refind/refind_x64.efi

df -h
#view all of your system partitions. You need to determine which partition on your system corresponds to /boot/efi

sudo efibootmgr -c -d /dev/sda -p 1 -L refind -l /EFI/refind/refind_x64.efi
#you can type "man efibootmgr" for more information. You need to determine which partition on your system corresponds to /boot/efi and put the number of that partition after the -p option.

efibootmgr -v
#at this point, check the numbers of the boot entries. In my case refind was 0000 and ubuntu was 0001.

sudo efibootmgr -o 0000,0001

For more information, see:
https://www.linuxbabe.com/command-line/how-to-use-linux-efibootmgr-examples


Ignoring a complete thread in a mailing list

I don't know of a way to do it through Thunderbird, but if you're using a gmail or google apps email account, you can "mute" conversations through the web interface. There is also a Lab that you can enable called "Smart Mute," helps even more.


Black screen after reboot on ubuntu desktop (Raspi 4)

So in the end I reflashed the card, and installed ubuntu desktop, rebooted and it just worked.
sudo apt install ubuntu-desktop
sudo reboot


Create bootable macOS USB for a non Apple computer

Credits to David Anderson and Nimesh Nima for the answer.

Microsoft offers Windows to Go which can be run from a flash drive on different machines. Many Linux distributions offer a live version which also can be run from a flash drive on different machines. Some also offer persistence which allow data to be saved between boots. Apple's MacOS can be installed on USB HDD and USB SSD which can be run on different Macs. AFAIK, MacOS is not designed to run from a flash drive.

MacOS doesn't generally support installing and running on non supported hardware, i.e. non Apple computers. Apple, unlike Microsoft doesn't license its operating system for running on commodity PCs.

  It seems that it only works on Mac. My laptop does not detect my Mac bootable USB as a bootable one on startup.

This is by design. A MacOS bootable USB can only boot a compatible Apple Mac computer.

  Is it possible to create a bootable MacOS USB for by Ubuntu 20.04 - Windows 10 dual boot HP laptop with persistence (optional) so that I can use it by just plugging it in during boot up for building my flutter projects?

Generally speaking, no.


You can use this to identify active network connections

lsof -i -P +c 0 +M

or

netstat -tlpn | sort -t: -k2 -n


How to install Asterisk on Ubuntu 11.10?

There is a tutorial here which uses a slightly out of date version of Asterisk. It is for Ubuntu server 11.04.

The latest version of Asterisk is listed here. (Currently 1.8.x for Long Term Support till 2015-10-21 or the newer 10.x supported until 2013-12-15.)

You can use the newest version, currently 10.4.1 by replacing asterisk-1.8.4 with asterisk-10.4.1 in the following commands:

apt-get install build-essential libxml2-dev ncurses-dev
wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.8.4.tar.gz
tar zxvf asterisk-1.8.4.tar.gz
cd asterisk-1.8.4/
./configure
make
make install
make config
make samples


Via

java -Xmx3072m <your_class_name>

or

java -Xmx3072m -jar <your_jar_file>

or

JAVA_OPTS="-Xmx3G"
java "$JAVA_OPTS" -jar <your_jar_file>

Example

% java -Xmx80m -XshowSettings:all -jar HelloWorld.jar
…
VM settings:
    Max. Heap Size: 80.00M
    Ergonomics Machine Class: server
    Using VM: Java HotSpot(TM) 64-Bit Server VM
…

all described in man java

-Xmxsize
    Specifies the maximum size (in bytes) of the memory allocation pool
    in bytes. This value must be a multiple of 1024 and greater than
    2 MB. Append the letter k or K to indicate kilobytes, m or M to
    indicate megabytes, g or G to indicate gigabytes. The default
    value is chosen at runtime based on system configuration. For server
    deployments, -Xms and -Xmx are often set to the same value. See the
    section "Ergonomics" in Java SE HotSpot Virtual Machine Garbage
    Collection Tuning Guide at
    http://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/index.html.

    The following examples show how to set the maximum allowed size of
    allocated memory to 80 MB using various units:

    -Xmx83886080
    -Xmx81920k
    -Xmx80m

    The -Xmx option is equivalent to -XX:MaxHeapSize.

java JAVA_OPTS="-Xmx3g"

Can't work, JAVA_OPTS= … isn't a valid parameter for java
JAVA_OPTS="-Xmx3g"

Works, but useless in your case, because you define an environment variable without using it, eg:

% JAVA_OPTS="-Xmx3g"
% echo $JAVA_OPTS
-Xmx3g


juju deploy ceph 'hook failed: "mon-relation-changed"'

did you try juju destroy-machine --force?

To debug what happened when running the hook, try juju debug-log, or juju ssh ceph/0 (or whatever the failing unit is), then look in /var/log/juju for a log file named after the service, that will show exactly why the hook failed.


Sleep: pmi action suspend

Hibernate: pmi action hibernate

Sleep after 40 minutes: echo 'pmi action suspend' | at now + 40 minutes

You can also use the gnome commands:

gnome-power-cmd suspend
gnome-power-cmd hibernate


Maybe its because of graphic issue. Ubuntu 12.04 use different desktop environment wich can effect resourses of your hardware.As ubuntu 10.04 lts user you can install gnome fallback desktop and see similar gnome 2 environment in latest lts version wich i guess yuo prefer as it more stable ..or just install other desktop environment Or else try to disable some fancy compiz effects and use 2d unity mode( chose it while login in )


Ubuntu 12.10 failing to install on Alienware M17x

I have encountered a similar issue when installing Ubuntu 12.10 alongside UEFI-enabled Windows 8.
In my case, after disabling the UEFI booting and enabling the legacy boot, I created a Ubuntu live USB stick. Then after booting with the USB and installing the Boot-Repair with the command

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update  && sudo apt-get install -y boot-repair && (sudo boot-repair &)

I have successfully managed to make both of the OSs bootable.


ldconfig: Path `/lib/x86_64-linux-gnu' given more than once

ldconfig.real searches /lib/x86_64-linux-gnu and /usr/lib/x86_64-linux-gnu by default.

On my system there is a configuration file in /etc/ld.so.conf.d/x86_64-linux-gnu.conf that included these directories, hence causing the error.

I then discovered that this file is created by the libc6 package. Thus, the /etc/ld.so.conf.d/x86_64-linux-gnu.conf file can be safely deleted.

When you run ldconfig --verbose again, you will see that those two directories are still indexed.


CPU spikes and performance problems changing window focus in Unity/Ubuntu 16.04.2

I'm also seeing this on 16.04 with i5-4460 and a GTX 960 on a 32bit system (don't ask!) I don't see it with nouveau drivers but I do with the NVidia proprietary ones (all I've tested up to 381.13.)

Although not a proper solution, restarting unity by using unity --replace seems to work around the issue for that session.  (You might need to try it again if it doesn't work first time.)

This could be related to bugs.launchpad.net/ubuntu/+source/unity/+bug/1300892.  If you think that bug affects you then please do click "This bug affects me" at the top so that the maintainers get a good reflection of how many people this bug impacts as this is currently triaged as a low priority bug.

EDIT: It seems that adding the command /usr/bin/unity --replace command to "Startup Applications" does work okay as a kludgy but less temporary workaround.  :)


Click on the Player button and in Removable Devices option Disconnect the Network Adapter. Hope it will work!


There is a problem with wine not showing in the menu on 18.04 - But it will still install and can be run from a terminal.
install from terminal with this command sudo apt install wine-stable wine32 Then navigate to the folder where your .exe file is located and install the program with this command wine setup.exe exchanging setup.exe with the actually name of the file.

after that if you need to configure the install you can type winecfg and bring up the wine configuration tool.

I'm sure this will all get fixed eventually - until then you can use the terminal or perhaps install playonlinux for a nice gui.
Good Luck.


Vim-LatexSuite: /bin/bash: latex command not found

The script sudo ./install-tl-ubuntu will install latex at /opt/texbin, where is not a default path(/usr/local/texlive/2015/bin/x86_64-linux) for latex.

It seems you have installed two latex, any one of them should work in case you set their corresponding $PATH in .bashrc.

I note that your shell and vim have different $PATH. Vim cannot find latex with it’s $PATH.
It is not likely that you started vim in an old shell as you restarted your computer.
I guess you run vim with sudo, as sudo uses root's environment, where usually keeps a default $PATH, exactly the same value in your vim.


I think you can do that with gnome-tweak-tool!


Meaning of Total errors on result of Clamav scan

Read this Clamav faq  question #21. No need to sweat.

  These "errors" are not actually errors but are usually files you don't
  have read access to. They may belong to another user or to the System.
  Either way they probably aren't anything to be concerned about.


Ubuntu trackpad not working after sleep/suspend

If you are using Ubuntu <= 18.04, do try this link:
https://sangams.com.np/fix-ubuntu-18-4-touchpad-not-working-properly/


No thumbnails for mp3 files in 18.04 (Nautilus)

I did the following:

sudo apt-get install ffmpeg ffmpegthumbnailer gstreamer1.0-libav totem

if as a result of executing this your thumbnails don't start appearing immediately, then try the following:

nautilus -q

(This will kill the nautilus file manager, so then restart it by opening "files".)

If that does not work either, then try logging out and then back in.


There are two basic ways to do this:

Make a package for samba with the changes you want, and install it as an upgrade. I think this is the better choice, but It is complicated the first time you do it, and you have to make sure that you create a new package each time there are changes to the package in the repository.
Make a package called samba that is empty, using equivs or similar. (for detailed instructions see http://shallowsky.com/blog/linux/install/blocking-deb-dependencies.html ) and install samba by hand into /usr/local. The drawback of this approach is that samba is no longer managed by your package management system, you have to keep up with all security updates by hand, and If at some point a version of samba with a higher version then your dummy package comes along, you have to make sure it does not get installed.


Removing duplicate rows based on column value

Since the input appears to be grouped/sorted by the 2nd column already this should be quite simple and doesn’t require to keep and sort the entire data set in memory, only two records at a time.1

I first thought of an Awk solution but found it to clumsy to deal with arrays and non-blank field delimiters. Then I decided on a short-ish Python program:

#!/usr/bin/python3
import sys
DELIMITER = ','

def remove_duplicates(records):
    prev = None
    for r in records:
        r = (int(r[0]), int(r[1]), int(r[2]), float(r[3]), int(r[4]))
        if prev is None:
            prev = r
        elif r[1] != prev[1]:
            yield prev
            prev = r
        elif r[3] > prev[3]:
            prev = r
    if prev is not None:
        yield prev

def main():
    for r in remove_duplicates(
        l.rstrip('\n').rsplit(DELIMITER) for l in sys.stdin
    ):
        print(*r, sep=',')

if __name__ == '__main__':
    main()

On my system it has a throughput of ~250,000 records or 5 MB per CPU second.

Usage

python3 remove-duplicates.py < input.txt > output.txt

The program can’t deal with column headers, so you need to strip them off:

tail -n +2 < input.txt | python3 remove-duplicates.py > output.txt

If you want to add them back to the result:

{ read -r header && printf '%s\n' "$header" && python3 remove-duplicates.py; } < input.txt > output.txt

1 This is one major advantage over waltinator’s and steeldriver’s  approaches for data sets that don’t fit into main memory.


From my experience, this usually happens when the Desktop Environment cannot be started, since the login manager comes up when the DE quits. Try resetting your Unity settings.


as suggested by Ubuntu
and

Power Management Wiki

Measure power consumption with powertop

Before you start making any changes, it is a good idea to first get a base line for what your current power consumption is:

sudo aptitude install powertop
sudo powertop

You must be running on battery power for powertop to get the machine's current watt usage.

Using less power with pm-powersave

The pm-utils package comes with scripts for managing low-power modes.

sudo aptitude install pm-utils

In order to enter low power mode, run this:

sudo pm-powersave true

In order to leave low power mode, run this:

sudo pm-powersave false


Get maximum bandwidth of a Network Adapter

Use ethtool.  ethtool can be used to query and change settings such as speed, auto- negotiation and checksum offload on many network devices, especially Ethernet devices.

To install ethtool in ubuntu, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

sudo apt-get install ethtool

If you want to find what type of network card is used, its speed, on which IRQ it is listed, and the chip type used, you use the following command :

dmesg |grep eth0

But keep this in mind:

Cat 6 cable should squeeze more speed out of your connection
Cable length - Keep it as short as possible
Your best speed results will be between 2 computers. Internet usage
speeds will be lower in most cases.
Make sure jumbo frames are set in network properties for your network
adapter.
Hard Disk speed can bottleneck your transfers


Your root partition (/dev/sda7) is inside an extended partition (/dev/sda2), and /dev/sda2 is full.

You will need to first extend the size of /dev/sda2 to use the empty space, and then you will probably need to move /dev/sda5 and /dev/sda6 so that the emtpy space is next to /dev/sda7.


My Thinkpads run excellent with Linux, even faster than with windows.
The trackpoint, suspend on lid closing, wifi, webcam, everything but the fingerprint reader works.


Gedit won't let me change the text size: stuck in giant text mode

It sounds similar to this problem: gedit "Manage External Tools" menu option doesn't appear

Use namei to find if sudo owns some of your configuration files:

$ namei -l ~/.config/gedit/tools
f: /home/rick/.config/gedit/tools
drwxr-xr-x root root /
drwxr-xr-x root root home
drwxr-xr-x rick rick rick
drwx------ rick rick .config
drwxr-xr-x root root gedit
drwxrwxr-x rick rick tools

If you see root appear as owner or group (after the first two directories, / and home) then use this command:

sudo chown -cR user:user /home/user

Where user is your user ID. ie Max:Max /home/Max


You can put AppImages anywhere you want and run them from there -- even USB thumbdrives or network shares.

However, the official recommendation by the AppImage developers is to create an extra directory, ${HOME}/Applications/ (or ${HOME}/.local/bin/ or ${HOME}/bin/) and store all AppImages there.


It seems I deleted (completely) the default repository for Artful, how do I get it back?

Simply open software and updates and re-set your choices in the first tab, select a server from dropdown. You should get a requeast for putting in your password during doing that. (see screen-shot)

This should usually fix it.

alternatively you can  use sudo -i in terminal and copy & paste the following (complete block) into it:

cat > /etc/apt/sources.list << EOF
deb http://archive.ubuntu.com/ubuntu artful main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu artful main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu artful-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu artful-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu artful-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu artful-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu artful-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu artful-security main restricted universe multiverse
#deb http://archive.ubuntu.com/ubuntu artful-proposed restricted main universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu artful-proposed restricted main universe multiverse
deb http://archive.canonical.com/ubuntu artful partner
deb-src http://archive.canonical.com/ubuntu artful partner
EOF

After that you should use exit to get out of root. This should fix it as well.


How do I determine file system type for a partition?

In terminal, type sudo parted -l and it'll give you the info you need.

If parted doesn't give you an answer, and you believe that there was a valid file system there before, you may have to resort to a utility like testdisk to recover the partition. Testdisk is available the the Ubuntu repositories. See http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step for some more information about how to use this tool.


How to only allow access to web server through SSH?

I would just use the ubuntu firewall script and iptables to only allow yourself, and make sure your webserver only listens on localhost/127.0.0.1. Note the below locked out all services except SSH to the IP address you specify. If you want to add additional services you can use UFW to add those ports or ranges.

be careful not to lock yourself out. If you are already logged into ssh your connection shouldn't drop.

Assuming 24.1.1.1 is your IP, please double check.

apt-get install iptables ufw
sudo ufw status
sudo ufw default deny incoming
sudo ufw default allow outgoing
ufw insert 1 allow from 24.1.1.1 to any port 22
ufw enable

vi /etc/YOURSERVER/server.conf

make sure bind is set to 127.0.0.1

You should be able to browse from this host, or use an SSH tunnel.

check this with

curl http://localhost

or

wget http://localhost

Good luck!


Ubuntu 20.04 - How to disable a shortcut for switching keyborad layout?

The problem seems to be the same as in:
https://askubuntu.com/a/1048836/1237677
(I upgraded my system from Ubuntu 18.04)
The solution suggested in the link above solved the problem to me.


You started ssh-keygen in $HOME. The files get created there:

ls -ltr ~/id_github*

I guess the files in .ssh/ are old ones?


How to record the RAM usage during Python and C++ run time?

You can read the text file /prof/self/stat after all the memory allocation takes place. Its fields are described here. In linux we refer to two kinds of memory:

Resident Set Size (RSS) is how much memory is allocated to the process and in in RAM,
Virtual Memory Size (VMZ) is how much memory is allocated including swapped out memory and memory allocated by shared libraries.

From the stat file read vsize and rss. After reading this you can find the size in kb using the following in C++.
#include <unistd.h>
...

long page_size_kb = sysconf(_SC_PAGE_SIZE) / 1024; // in case x86-64 is configured to use 2MB pages
vm_usage     = vsize / 1024.0;
resident_set = rss * page_size_kb;

In Python you can use os.sysconf("SC_PAGE_SIZE") to get the PAGE_SIZE and do the equivalent calculation.
You can also explore Valgrind for this purpose.


Problem installing software with Ubuntu 14.04 LTS 32-bit

Use this:

sudo apt-get install stellarium stellarium-data

By using sudo, you run your command as the root user. The root user can do the necessary lock manipulation.


how to install Ubuntu Server with GPT GUID Partition Table

The installer will use GPT automatically for disks over 2 TiB.  As long as you choose one of the automatic options everything will work automatically.  If you wish to choose the manual partitioning option, you just need to make sure to create a 1 MiB bios_grub partition if your machine is bios booting instead of uefi.


How do I find which PPA to remove from update?

All the medibuntu repos aren't working, so this will find where they are

grep -RE '^\s*[^#].*medibuntu.*' /etc/apt/sources.list{,.d/*.list}

That will likely just show up a couple of files. Edit those (remove the lines or comment them with a #) and your next update should work fine.


I just upgraded to 13.10 in my virtual machine through Virtual Box but can restart successfully

It looks like you may have a hardware conflict for it to boot to in that fashion. Instead of upgrading the image inside of the virtual machine, you can simply download a new image of the upgraded OS and boot the VM from that image. For any files that you need cross platform, use dropbox or Google drive!


Podcatcher for home server and desktop PC (frontend/backend)

I use cron andhpodder (available from Software Center) to update my subscriptions and download my podcasts at night. You could do that, and open your application and point it at the downloaded files.


How to put arch independent files into separated .deb package?

I did this yesterday for the Inkscape PPA.  It's the first multiple-binary package I've written so I'm not 100% sure I've done things correctly, but basically there are two steps...

Add an arch-independent binary (whatever-plugins) package description into your debian/control file
Update the dependencies in your debian/control file so that your new whatever-plugins package is recommended/suggested by anything that needs it
Replace your debian/install file with separate debian/whatever.install and debian/whatever-plugins.install files, specifying which files should be part of each package.

There is also some fairly sparse documentation available in the Debian developers' reference and maintainer's guide.  Would love to know if anyone else has found detailed documentation.


You can try out the following commands to resolve this issue:

gsettings get org.gnome.nautilus.preferences  click-policy

If you get something as an output, go ahead with this command:

gsettings range org.gnome.nautilus.preferences  click-policy

If the above command still lists single and double as options, then proceed with the below command:

gsettings set org.gnome.nautilus.preferences  click-policy single

If all goes well, your issue will no longer be in existence. Let us know in the comments below.


How to properly use latest Nvidia drivers on Ubuntu 14.04

There is a great explanation here: https://linuxconfig.org/how-to-install-the-latest-nvidia-drivers-on-ubuntu-16-04-xenial-xerus

Go to http://www.nvidia.com/Download/index.aspx
Enter your card information to determine the most recent driver version (e.g. 361.42)
sudo apt-get install nvidia-{the major version of your card driver} e.g. sudo apt-get install nvidia-361.
Restart your system.
open NVIDIA X Server Settings to verify.


This is meant to be informative. It was hard to find out an answer for this question from other online resources.

While using the provided adaptor types in virtual box, this issue arises.
VLAN tag is stripped is because the Intel adapters support VLAN tagging and needs to be set in the adapter properties. When you don't provide such tag, the default is used (untagged). If you don't have the VLAN tab in the adapter properties, you haven't installed the advanced features of it.

Hence don't use the Intel PRO/1000 family of adaptors, because they will strip the VLAN tags. Instead, either use the Paravirtualized Network adaptor old default of AMD PCNet FAST III, neither of which seem to have this restriction.

When I provided para-virtualised adapter settings, this started to work.


Copy folders /home /usr and /opt from hd2

Use:

sudo mount /dev/sdb1 /mnt/tmp

/dev/sdb1 is not a directory - a trailing slash shouldn't be present.


A good option is to check the system's logs
Type cd /var/log/syslogs to see if you can find the issue


since it requests its IP from the server using a different IAID and DUID.

Initially DUID comes from

/etc/machine-id

and is created ONCE on installation. Mind that we nowadays use systemd so use that as an extra search argument to filter non-systemd answers.

Important file:

/etc/systemd/networkd.conf

has a part related to the creation of the DUID:

  If DUIDType=vendor, then the DUID value will be generated using "43793" as the vendor identifier (systemd) and hashed contents of machine-id(5). This is the default if DUIDType= is not specified.

Regarding IAID:

  [DHCP] SECTION OPTIONS

  This section configures the DHCP Unique Identifier (DUID) value used by DHCP protocol.
         DHCPv6 client protocol sends the DHCP Unique Identifier and the interface Identity
         Association Identifier (IAID) to a DHCP server when acquiring a dynamic IPv6 address.
         DHCPv4 client protocol sends IAID and DUID to the DHCP server when acquiring a dynamic
         IPv4 address if ClientIdentifier=duid. IAID and DUID allows a DHCP server to uniquely
         identify the machine and the interface requesting a DHCP IP. To configure IAID and
         ClientIdentifier, see systemd.network(5).

To set IAID and DUID you need:

  DUIDType=

  Override the global DUIDType setting for this network. See networkd.conf(5) for a
             description of possible values.

  DUIDRawData=

  Override the global DUIDRawData setting for this network. See networkd.conf(5) for a
             description of possible values.

  IAID=

  The DHCP Identity Association Identifier (IAID) for the interface, a 32-bit unsigned
             integer.

Example from networkd.conf for DUID:

  Example 1. A DUIDType=vendor with a custom value

DUIDType=vendor
DUIDRawData=00:00:ab:11:f9:2a:c2:77:29:f9:5c:00

  This specifies a 14 byte DUID, with the type DUID-EN ("00:02"), enterprise number
             43793 ("00:00:ab:11"), and identifier value "f9:2a:c2:77:29:f9:5c:00".


Force specific letter for usb drive in /dev/sd*

You need a custom UDEV rule to set this up. Plug the device in and you can find out the vendorid and productid with ...

lsusb

this will show several lines that look something like this...

Bus 005 Device 003: ID 04fc:0c25 Sunplus Technology Co., Ltd

From this you can see that ...

Vendorid is 04fc
Productid is 0c25

As the device is a storage device we will be writing the rule in 60-persistent-storage.rules. So open this file with your prefered editor (for instance sudo vi /etc/udev/rules.d/60-persistent-storage.rules) and add the following line:

KERNEL=="sd*[0-9]",SYSFS{idVendor}=="04fc",SYSFS{idProduct}=="0c25", SYMLINK+="usbdrive"

This informs udev-manager, that if any storage device with vendorid 04fc and productid 0c25 is plugged into the system to add a symlink in /dev with name usbdrive. I used usbdrive but you can use another name if need be.

From now on you can access this drive with /dev/usbdrive.

I used this Source for the example.