What is more reliable - apt-mark or APT-pin (/etc/apt/preferences.d/pin) for version locking?

Yes, pinning is more reliable, than apt-mark.

What I have discovered:

last 12-14 years Synaptic uses its own pinning file (/var/lib/synaptic/preferences) - see bug 42178 on launchpad.
For system-wide one may want to set symlink between /etc and Synaptic

sudo ln -s /etc/apt/preferences.d/synaptic /var/lib/synaptic/preferences

so it is workaround, locking versions in Synaptic is not recommended method (this file does not read by apt-get and aptitude).
Muon uses system-wide pin files per-application in /etc/apt/preferences.d.
aptitude has two bugs:

on 14.04 LTS it does not respect apt-mark completely (see my bug 1747189 at launchpad).
on 16.04 LTS holds, which were set by apt-mark are lost after clicking on Actions -> Cancel pending actions (see my bug 1747191 at launchpad).

but in 18.04 LTS aptitude do not have such bugs, it is great.

So my conclusion is the following: apt-mark is usable only if you install/remove/upgrade software only with apt-get, otherwise you should use pinning (i.e. /etc/apt/preferences.d/), it is more reliable and straightforward.

Note: to prevent package installation pin priority should be negative:

  P < 0 :
        prevents the version from being installed

for example Pin-Priority: -10.


I am not familiar with GUI tool but cryptsetup is the tool to interact with LUKS.

Basically AFAIK LUKS lets you add 8 passphrase slots and you can do that with:

sudo cryptsetup -y luksAddKey ENCRYPTED_PARTITION
sudo cryptsetup luksRemoveKey ENCRYPTED_PARTITION

where 0 is the slot number. I guess LUKS stores slots as 0,1,2 etc. But I recommend you to be very careful with LUKS as you may lock yourself out. Please refer to manual of cryptsetup. Also I recommend you to visit other distro IRC channel just to be extra safe before you proceed.

You may need to reboot the machine and try your new passsphrase as well before you remove the key.

cryptsetup FAQ

Edit: Seems like gnome-disks (AKA gnome-disk-utility) lets you change the passphrase.


Cannot install ocrfeeder on Ubuntu 18.04

Resolved by reinstalling Ubuntu 18.04. I think the original installation was installed from an unreliable mirror with old versions of some components.


How to make Thunderbird open links in Firefox in Kubuntu 18.10?

If a email contains a link in Thunderbird based on Kubuntu 18.10 Thunderbird ask to select an application to open http links. Thunderbird does (not yet) show a list of suggested applications. Instead a file open dialog is shown. In Kubuntu 18.10 select /usr/bin/firefox and if you check on the "remember" flag, you will not be asked again.


You will likely find the .pc file in /usr/lib/x86_64-linux-gnu/pkgconfig/

It's not unusual for pkg-config --cflags to return nothing: it just means that no additional flags are required (for example, all the required header files are on the standard include path).

In any case, CFLAGS relate to the compile phase of a build, not the link phase - which is where undefined symbol errors occur.

Your issue is likely that you are linking the libraries and object files in the wrong order: see for example Why does the order of '-l' option in gcc matter? So try

$(BINDIR)/$(TARGET): $(OBJECTS)
    $(CC) -o $@ $(OBJECTS) $(LFLAGS) $(LDLIBS)
    @echo "Linking complete!"

Also, it doesn't make sense to specify an include path during the link phase; if you need to link libraries from the current directory, then replace

LFLAGS = -Wall -I. -pthread

by

LFLAGS = -Wall -L. -pthread

(although TBH I'm not sure that -Wall has any effect during the link phase).


Chromium does not start (launch seems to start but not opening the application)

I suspect there is a problem with the user profile folder. Try renaming the ~/.config/chromium folder to something else.

You will loose everything (bookmarks, history, addons, etc). If Chromium works like this, then you may try to recover your old user data from the renamed folder a bit at a time.


Why does the command "xterm xterm" create an infinite recursion?

I (guess) this is because the first parameter you give to xterm is the shell to use - xterm bash (or xterm /bin/bash), xterm python etc.

So it runs xterm, tries to start xterm as a shell, which starts another xterm as that ones shell, then another, and another...

You can probably find a bit more on this by running man xterm


Find all files based on a list of file names / patterns

The find command does not search the files' content.

The -iname option selects the filenames.

The error means that printf does not reconize the -o option. In such situation you should use printf -- '-o...

I think the final filter you are looking for is:

find some_dir/ -type f \( -iname \*satin\* -o -iname \*perdido\* ... \)

Note the \( ... \) to enclose all the -iname ...

-o ... is said to be POSIX in the man find

You need to be sure that the filenames.txt file contains at least one value.

If you need to find the filenames in the some_dir/, then give a try to this:

set -f ; find some_dir/ -type f \( $(printf -- ' -o -iname *%s*' $(cat filenames.txt)| cut -b4-) \) ; set +f


What is the difference between libcurl3 and libcurl4

If you look closely you will see, that actually only the -dbg, -dev and -doc packages contain a version 4 in their package name, while the packages that ship the actual compiled libcurl library are still at version 3.

For a discussion on Debian about this, see this link: https://lists.debian.org/debian-release/2007/04/msg00257.html

If I understand it right, there was a change in the API but not the ABI, so the binary packages were left at version 3, while the development files needed a version bump.

It also means that for example libcurl4-openssl-dev is the corresponding development package for libcurl3 despite the different version in the package name. You can see that if you take a look at libcurl3-dev (which is a virtual package and points to libcurl4-openssl-dev:

No current or candidate version found for libcurl3-dev
Package: libcurl3-dev
State: not a real package
Provided by: libcurl4-openssl-dev (7.47.0-1ubuntu2),
    libcurl4-openssl-dev (7.47.0-1ubuntu2.2)

The above snippet was taken on Ubuntu 16.04 but this will probably look similar on 14.04.


Why is TCP port 514 open on my Ubuntu 16.10?

Ah... I had enabled port 514 in /etc/rsyslog.conf to allow syslog entries from my router...

# provides UDP syslog reception
module(load="imudp")
input(type="imudp" port="514")

# provides TCP syslog reception
module(load="imtcp")
input(type="imtcp" port="514")


I'd highly recommend runnning

sudo apt update && sudo apt install gparted

then running "gparted" from your start (after entering your password) it'll open this :

From here you can select your hard drive, you'll be able to tell which is which mainly from the size but the partition types also help.

From there interactively either with the list or with the graphic you may resize partitions (even live ones) to create empty space. and create a new partition in that empty space.

The green check mark or "Apply" is required for the changes to take place.

I recommend the partition type both would use be NTFS. Windows cannot read EXT4 (or even 3) to save it's life. I know there are multiple apps meant to do this but none of them work any longer.

EX4 is better than NTFS but ubuntu reads/writes to NTFS as well if not better than windows itslef. Only hold-up being windows locks all NTFS drives by default on reboot/shutdown.

Typing powercfg -h off into an Admin CMD (windows-side) before you reboot your windows will prevent that but if that's a hassle just make a FAT32 partition which is the most neutral type there is and any os can read/write to it.

If I'm being honest here I don't think you should make a seperate partition for file sharing between windows and linux. To save time just make your "shared space" the entire windows partition. You can easily do the command I listed above and you only need to retype it every time windows updates.

And you can create shortcuts straight to your "My Pictures", "My Documents", ect... folders within your windows partition in your ubuntu very easily. This will save you the time of copying the files to and fro from partitions.

Say, for example, you have Myresume.docx that is editable/openable by libre office without jumbling it up. You can boot to ubuntu open the file where it sits in your windows "My Documents", edit it, save it reboot to windows and repeat the process there with word and you don't loose any time.


how to declare that you have full superuser permissions when prompted on terminal?

You need sudo in front of the command get-edid. You are accessing hardware so it will need to issue commands that a normal user can not use.

This

get-edid | parse-edid

will give ...

mmap /dev/zero: Operation not permitted
get-edid: error initialising realmode interface
get-edid: do you have full superuser (root) permissions?

because the mmap /dev/zero needs root permissions.

sudo get-edid | parse-edid

will show something similar to...

Performing real mode VBE call
Interrupt 0x10 ax=0x4f00 bx=0x0 cx=0x0
Function supported
Call successful

etc.


Ubuntu tweak tool - Mouse cursor would not change theme

That is a known issue.
To change your cursor globally follow below instruction.

Open terminal and paste gksu nautilus hit enter then insert your password hit enter.

You will be now viewing nautilus as root. now go to file system on left panel.

Navigate to /usr/share/icons/default and open index.theme with your favorite text editor and change DMZ-White to DMZ-Black.

Or you can apply this change easily by executing the below command

sudo sed -ri 's/DMZ-White/DMZ-Black/g' /usr/share/icons/default/index.theme

And it's done! Either Reboot your computer or run the command to see the changes

compiz --replace


Graphics drivers and wifi not working after installing ubuntu

Solution:

Thanks to @Jeremy31 I was pointed in the direction of network-manager / nmcli.

nmcli con gave me a list of connections, including the successful one from the install process. nmcli -a con up [SSID]  established an fully function connection.


I hope you realize that your using the logrotate mechanism does NOT control the size of the syslog file, it only will each day whenever logrotate is run, take the current /var/log/syslog file and if it is over 100MBytes, compress and save the result.  A new /var/log/syslog file is then created which starts receiving messages from that point forward.


How can I make a bootable UEFI Ubuntu installation USB that works with Secure Boot?

The Ubuntu 64-bit (alias amd64) iso files, for example

ubuntu-16.04.1-desktop-amd64.iso

works when cloned also with secure boot (in UEFI mode).

From the version 16.04, the built-in Ubuntu Startup Disk Creator, is a cloning tool.
Disks alias gnome-disks is also a cloning tool: 'restore' from the iso file to the USB pendrive, and it works also in earlier versions of Ubuntu.
mkusb is another tool that can clone as well as make persistent live drives with another method. Using the grub bootloader and the signed files of the iso file makes Ubuntu work also with secure boot.

help.ubuntu.com/community/mkusb/persistent#Using data from the source iso file

General description and 'how to' install mkusb
Solution: It is a Mac computer, so I suggested UnetBootin and dd as a last resort. It turns out that Unetbootin makes a boot drive, that works with secure boot.


Can't install Ubuntu 13.10 from 12.04 lts

If you want to try the Ubuntu 13.10 live CD, you can safely try it without installing Ubuntu 13.10, assuming that you can find a solution to the problem that the Ubuntu 13.10 live CD is booting to a black screen.

You can also upgrade directly from Ubuntu 12.04 to Ubuntu 14.04 without any additional complications. That is because both Ubuntu 12.04 and Ubuntu 14.04 are Long Term Support (five year support) releases, and it is possible to upgrade from a Long Term Support release to the next Long Term Support release. It is also highly recommended not to skip over the next supported release in the distribution upgrade path when doing a distribution upgrade. So you can upgrade directly to either Ubuntu 12.10 or Ubuntu 14.04 from Ubuntu 12.04.


try proxychains i think there's no proxy limit.


How do I block websites for several PCs via wireless router?

Use OpenDNS to filter everything you like. Register a free account and follow their instructions.


Ubuntu 15.10: CIFS not mounting on bootup

comment=systemd.automount fstab parameter helped me.

Example fstab:

//host/share /media/user/share cifs _netdev,comment=systemd.automount,credentials=/path/to/.smbcredentials,sec=ntlm,file_mode=0777,dir_mode=0777   0 0

Reference


Insufficient permissions to execute files with root access

I guess the UID (user ID) that's been assigned to your user on the previous system differs from the new one. Try terdon's hint and check which user owns the file(s) on the second disk:

$ ls -l <directory>

If this assumption is correct the owner column will either contain a number instead of your own username, or some other username. Also check that the group is correct (usually identical to the username).

You can change the owner to your new user by using chown, either for a single file or (example below) for a complete directory tree:

$ sudo chown -R <username> <directory>

Use chgrp in the same manner to change the group if necessary, or add the groupname to chown:

$ sudo chown -R <username>:<groupname> <directory>

Do not use chmod for this! You will mess up permissions without solving the initial issue.


Check if /boot/efi exists (in Ubuntu). If it is there, it means that you installed Ubuntu in UEFI mode, otherwise - in Legacy mode.


How to install Ubuntu 20.04 on usb with persistant data

Since you have access to a Windows computer, you can download Rufus here. Insert your USB drive into your Windows PC, open the Rufus, choosing your USB drive and the 20.04 ISO file which you'll need to download first. A "persistent partition size" option should appear. Choose how much space to allocate and create your drive.
Edit: I failed to notice that the original question asked not to use Rufus. In that case, one could either use another USB creation tool that supports persistence on Windows, or otherwise on Linux use mkusb. If the Rufus approach fails for you again, please let me know and I'll update the answer with either another Windows USB tool or the mkusb tool instructions. If you don't want to use persistent boot software period, I'm sure there's still a way to do this but it would be beyond me.


Package ggtern was removed from the CRAN repository (Archived on 2015-03-03 as misuse of \donttest was not corrected).

Formerly available versions can be obtained from the archive.

You can install the source package manually in R:

R> download.file("http://cran.r-project.org/src/contrib/Archive/ggtern/ggtern_1.0.1.3.tar.gz",
                 destfile="ggtern_1.0.1.3.tar.gz")
R> install.packages("ggtern_1.0.1.3.tar.gz", repos=NULL)

or in a shell:

sh> wget "http://cran.r-project.org/src/contrib/Archive/ggtern/ggtern_1.0.1.3.tar.gz"
sh> R CMD INSTALL ggtern_1.0.1.3.tar.gz


trying to add user to sudoers group gives me error

You are trying to use sudo , however you do not have the right to do so as you yourself are not a member of the sudo group. In such circumstances you will always get that error message when you attempt to use sudo for whatever reason. Example (notice that richard is not a member of sudo):

richard@s15:~$ groups
richard adm cdrom dip plugdev lxd lpadmin sambashare libvirtd
richard@s15:~$ sudo ls -l
[sudo] password for richard:
richard is not in the sudoers file.  This incident will be reported.

Now, that same thing for me (notice that I am a member of the sudo group):

doug@s15:~$ groups
doug adm cdrom sudo dip plugdev lxd lpadmin sambashare libvirtd
doug@s15:~$ sudo ls -l
total 4112
drwxrwxr-x  2 doug doug   4096 Oct 25 16:37 audio
drwxr-xr-x 39 doug doug   4096 Oct 14  2016 backup_carrie_01
...

Furthermore, since I have the rights to do so, I can add richard to the sudo group:

doug@s15:~$ sudo adduser richard sudo
Adding user `richard' to group `sudo' ...
Adding user richard to group sudo
Done.

And for a subsequent login for richard:

richard@s15:~$ groups
richard adm cdrom sudo dip plugdev lxd lpadmin sambashare libvirtd
richard@s15:~$


You have probably hibernated your Windows.

Boot into windows, disable fast shutdown in Windows, fully shut windows down properly (do not hibernate), and then boot into ubuntu and you will be able to mount drives properly.


Your node.js version is incompatible with some react packages.
Install the Node.js latest LTS version 14.17.0, like this
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs


Cannot locate wireless networks on Acer Aspire M5 laptop

Pleased do:

sudo apt-get update
sudo apt-get install bcmwl-kernel-source

Reboot.

How to install the bcmwl-kernel-source package without an internet connection.

The bcmwl-kernel-source and dkms package and there required dependencies are on the livecd or liveusb disk that you installed ubuntu from.

Insert the livrcd or liveusb disk and navigate to pool > restricted > b > bcmwl and copy and paste the bcmwl deb package to your desktop.

Now do the same with pool > main > d > dkms.

Now install the deb files. Open the terminal with CTRL+ALT+_T and:

cd ~/Desktop
sudo dpkg -i *.deb
sudo modprobe wl


How to fix Optical Drive slow reading CDs - Dell XPS17 Xubuntu 18.04.2

I also posted this on   https://ubuntuforums.org/showthread.php?t=2418511 where I think the problem has been isolated.  It seems that current versions of Brasero write a bad block at the end of recording and the new distro (18.04) sees this and sets the drive speed to min, ie 4x.  Earlier versions of Ubuntu ignored the error.

jg
10May
2019


It is not missing.

Since 17.10 release, Ubuntu changed its Desktop Environment from Unity to Gnome-Shell. Unity use Compiz as its compositing manager. Compiz provide that animation. IIRC, the animation is called magic lamp. On the other hand Gnome-Shell use Mutter as its compositing manager and magic lamp is never available in Gnome-Shell/Mutter.

If you still really want the magic lamp animation, KDE compositing manager KWIN have one! Also I've seen people use Compiz on XFCE. So your option is either Kubuntu install or Xubuntu install. Though it will be a lot easier if you choose Kubuntu since KWIN is the default while XFCE default is XFWM and Compiz is not really well maintained anymore.


Ubuntu on VirtualBox crashes when laptop goes to hibernate

Hibernating a host will not hibernate a virtual guest too. Depending on the guest's state this will lead to issues or even data loss.

For some people the guest additions will take care of most, others can't hibernate a host at all when a guest is running.

We should therefore put the guest in savestate mode before we hibernate a host.

Putting a guest to savestate can be done from the command line or a script. We could therfroe add it to the host's hibernating routine.


Those guides should work with other 2FA applications (such as FreeOTP) as well.

Google Authenticator uses TOTP, and most 2FA applications such as the open-source FreeOTP use the same standard and you can use them in place of Google Authenticator.

For completeness, here is a (modified) guide from DigitalOcean to set up FreeOTP. Note that SSH public key logins will not ask for a 2FA token, if you want to use public key authentication with 2FA, see DigitalOcean's guide (and disable password-based authentication).

Update Ubuntu's repositories and install libpam-google-authenticator (this works with other 2FA applications as well).

sudo apt update && sudo apt install libpam-google-authenticator

Set up a TOTP key for your user:

google-authenticator

Answer yes to the Do you want authentication tokens to be time-based and Do you want me to update your "~/.google_authenticator" file questions.
Scan the (big) QR code (most GUI terminal emulators let you use Ctrl + - to zoom out and Ctrl + 0 to reset zoom) with FreeOTP or the 2FA application of your choice.
Write down the backup codes somewhere and store them securely.
Configure openssh-server to allow 2FA logins. You can remove nullok if you do not want to allow users without 2FA set up to log in.

[ -e /etc/pam.d/sshd ] || echo '@include common-auth' | sudo tee /etc/pam.d/sshd
echo auth 'required pam_google_authenticator.so nullok' | sudo tee -a /etc/pam.d/sshd
sudo nano /etc/ssh/sshd_config

Find the ChallengeResponseAuthentication line and change it to ChallengeResponseAuthentication yes, then press Ctrl + O then Enter to save the file and Ctrl + X to close nano.
Restart sshd to apply the changes.

sudo systemctl restart sshd

Open another terminal (so you still have access if it didn't work) and try to log in.


Ubuntu 10.04 or 10 are EoL (End of Live), unsupported and shouldn't be used.

Please install a current version, 16.04 LTS or newer.


Error message on 5TB Harddisk: Partition 1 does not start on physical sector boundary

Your output shows two warnings, one of which is important and the other of which is irrelevant. The first warning is:

WARNING: GPT (GUID Partition Table) detected on '/dev/sde'! The util fdisk doesn't support GPT. Use GNU Parted.

The second warning is:

Partition 1 does not start on physical sector boundary.

The first warning is the important one -- the version of fdisk that ships with Ubuntu 14.04 is useless on GPT disks, which your disk is. You can therefore safely ignore the second warning. Instead, use GParted, parted, or gdisk to partition the disk. The gdisk output you showed clearly identifies the first partition as starting on sector 4096, which is reasonable for almost all disks in use today, including (AFAIK) all disks with capacities in the ~5TB range.


kill is quite polite by default, it raises the SIGTERM signal. With this, the application is expected to see and handle the signal (eg quit) but that is completely up to the application to be able and willing.

You can see here that vim is "running" —that's what the R means— and that means it's likely too busy to intercept and process the signal. If it's been doing this a while, you may have stumbled on a bug.

Either which way, if you want to forcibly nuke it, you can use other signals. SIGKILL is a popular choice.

kill -9 13799

It cannot be ignored as it interrupts the current process (with some run-state exceptions, like zombie or other uninterruptible states).

This is an extremely high-level look at this. Take a look at man 7 signal to zoom in.


How to enable automatic login after suspend in Ubuntu Gnome 17.04

This issue is same as here: How do I stop the screen from being locked on suspend?

You can disable the lock on suspend:

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

OR completely disable the whole lock screen:

gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true'


From your ~/.mozilla folder find the file named places.sqlite

Open it with DB Browser. Go to Browse Data tab and choose moz_places table.

To install DB Browser for SQLite (http://sqlitebrowser.org/):

sudo add-apt-repository -y ppa:linuxgndu/sqlitebrowser
sudo apt-get update
sudo apt-get install sqlitebrowser


I'm using Ubuntu 18.04 LTS. You can try to use alsamixer :

The general sound volume could be increased / decreased with the Master level, which is the 1st on the left. Here are 2 screenshots :

You could see that the lonely difference are MM / 00 under Master (and Speakers in my case) volume level; MM just said that it's mute, whatever is the volume set. To disable / enable mute, use M.

Also note that you can send sound via Headphone and Speakers both thanks to alsamixer (if you want to do the DJ, it can be useful)


Cannot resolve any hosts, do not have IP address (static assignment not working ??)

You should add auto eth0 above the iface eth0 line in order to get the network up at boot. Run sudo service networking restart after you added the line in order to avoid rebooting.

You need an entry in /etc/resolv.conf it you assign you addresses statically. Due to the fact that /etc/resolv.conf is managed by the resolvconf service, you need to add nameserver [your nameserver IP, usually on the gateway] to /etc/resolvconf/resolv.conf.d/base and apply the changes with sudo service resolvconf restart.

Using DHCP is your gateway supports it is a much more comfortable alternative.


No Firewall installed or enabled: what is blocking a specific port?

In the case of the OP, debugging with netcat showed that the problem was not in the network, or in the Ubuntu system where the listening process was running. Specifically, the Slave process could be reached from localhost but not from another host in the same network.

The problem, therefore, had to be in the coding. It turned out that the socket was bound to the localhost address (127.0.0.1) instead of the IP address. Packets arriving from the network on that interface will never make it to the listening process.


Can't boot from USB flash drive (Thinkpad T430i)

The problem may be to do with the boot security options in the ThinkPad BIOS. Try disabling secure boot, and altering the UEFI boot option to "Both" (although perhaps this doesn't apply to models pre-installed with Windows 7?).

This worked for me to enable PXE booting a Debian installation image. I was having similar problems with a USB live distro. Once I got the PXE boot to work I just stuck with that. Hopefully the problems with USB booting are the same.


What to do about "the disk drive for /dev/mapper/cryptswap1 is not ready yet or not present"?

This error message indicates that the the system was unable to use its encrypted swap partition.

Not being able to use swap may cause slowdown, especially if your machine doesn't have much RAM installed.

Assuming the system is booting, you should be able to fix the problem without too much hassle.

If this is happening when you boot the CD/DVD or USB flash drive to install Ubuntu, then assuming installation is still working, it can be ignored. Your installed system might or might not have the same problem once created--if it does, the problem can be addressed in the installed system.

If this is happening on a system that is installed on your hard disk, then your system might still run okay, but it's a good idea to fix it--if you have a swap partition (or swap file), you may as well use it.

Most Ubuntu systems with swap have a swap partition. Assuming that is the case, the technique described in this blog post may help:

Ubuntu 12.04 - How to solve "The disk drive for /dev/mapper/cryptswap1 is not ready yet or not present" error at boot

Here's a summary, with some additional information that may be helpful for novices, and in my own words. I suggest taking a look at that post as well though (assuming it remains accessible), as it contains some examples and other information that I've left out for brevity.

Open a Terminal window (Ctrl+Alt+T) or a virtual console and run: sudo swapoff -a
Open /etc/crypttab (e.g., sudo nano -w /etc/crypttab or sudo -H gedit /etc/cryptab for a GUI editor) and put a # at the beginning of the line that starts with cryptswap1. Save the file.
Do the same thing with the line that starts with /dev/mapper/cryptswap1 in /etc/fstab.
Install gparted . Run it and format your swap partition as linux-swap. Make sure to get the right partition; if you get the wrong one, you'll lose possibly important data! The line you commented out in crypttab should give the correct partition name (it comes right after /dev/).
Run sudo mkswap /dev/..., repacing ... with that same device name. Part of that command's output should be text that says UUID=..... where ..... is a string of letters and numbers.
In the file /etc/initramfs-tools/conf.d/resume, find the line that says RESUME=UUID= followed by letters and numbers like (but not identical to) ..... from the last step. Replace them with ..... (i.e., with the letters and numbers mkswap gave after UUID=.
Run sudo swapon /dev/... (with the same /dev/... as you had in steps 4 and 5 above).
Run sudo ecryptfs-setup-swap.

swapon -s will check to see if swap is successfully enabled. See that blog post for more information, and example output, for checking this.

Source: http://punygeek.blogspot.com/2012/10/ubuntu-1204-how-to-solve-disk-drive-for.html (on http://punygeek.blogspot.com/) by Litmus / Puny Geek. Some commands are copied; prose is not copied, but often expresses the same ideas.

Finally, note that this might be a bug. (I believe multiple factors could cause this problem, only some of which are bugs.) In particular, it resembles Launchpad Bug #1153661. If you believe that's your situation, you might want to subscribe to that, mark yourself affected (with the green "This bug affects..." link at the top of the page), and if you have any additional information to provide, comment with it.


how to change double key stroke rate ubuntu 12.04

I used xset. The following will show the current Repeat Rate Delay and the Repeat Rate:

xset q

My default values were 200,33. The following will set the repeat rates:

xset r rate 500 33

The Repeat Rate Delay refers to the time it takes for a 2nd repeat character to appear when a character key is pressed down.

The Repeat Rate refers to the delay between the next repeat character to be displayed after the repeat rate delay has expired.


Monitors wake immediately after they are put to sleep automatically

I have this issue on a laptop and it was the USB keyboard or mouse that was causing the wakeup. I had to issue the following for me to disable wakeup for my USB devices:
sudo -s
echo XHC > /proc/acpi/wakeup
echo EHC1 > /proc/acpi/wakeup
echo EHC2 > /proc/acpi/wakeup

And I added those commands to /etc/rc.local as otherwise the state was not permanent.
I see you don't have either XHC or any EHC named devices but you do have XHC0 which may be a USB device.
Only drawback for me is of course now I can't use the USB keyboard to wake the laptop at all.


It's a bit weird that you need to give proof that something is wrong but anyway, it seems to be a fact of life, so: depending on what you want/need/know, you could:

These two together:

ping -D -i 2 1.2.3.4 > /var/log/ServerName.log in one minimised terminal and tail --follow /var/log/ServerName.log in the other.  The first couple of hours when something goes wrong have a look and see whether it's network-related or not.

AND

A script, running on your local machine that renames a file every 2 seconds on one of your NFS directories and logs the times when it cannot.

#!/bin/bash
while true
do
  mv /szNFSMount/TestFile.1 /szNFSMount/TestFile.2
  if [ $? -ne 0 ]; then
    echo $(date) >> /var/log/NFSMount.log
  fi
  sleep 2
  mv /szNFSMount/TestFile.2 /szNFSMount/TestFile.1
  if [ $? -ne 0 ]; then
    echo $(date) >> /var/log/NFSMount.log
  fi
  sleep 2
done

Why these two together?  ping is extremely low level: data link layer and the other one is extremely high level: Application layer. Together they make for unrefutable proof.

Do NFS debugging... It's tricky stuff and you need to have root access to your own machine. Do you???


when i try to uplaod to dev/ttyUSB0 it doesn't work

Looks like you do not have permission, as the error message says; for some operations avrdude needs root privileges.

To solve: add sudo in front of the command you used.


Usually, dither is something you apply purposely on an image to compensate loss of information when you remove colours. This is something gifsicle can do:

  --dither

  This  option  only  matters  if  the  colormap  was  changed. With
              --dither  on,  Floyd-Steinberg  error   diffusion   is   used   to
              approximate  any  colors that were removed. This looks better, but
              makes bigger files and can cause animation artifacts, so it is off
              by default.

But if I understand correctly, you are asking for the converse operation, rolling back changes applied by a dithering algorithm. This is not impossible to do, but requires the exact knowledge of the dithering algorithm applied. gifsicle is naturally not able to do it.


To have the webmin working, I must have an Ip address for my server. When I try "ip addr show" I don't find it.
The best video that I found to show how to have an ip adress is: https://www.youtube.com/watch?v=Ykt3MeNwORQ


How can I use systemctl from within a docker container (run on ubuntu 20.04, with ubuntu 18.04 base)

You cannot use systemd within a Docker container without major effort.  Most people use something like supervisord instead.


How to find which "package can be updated"?

To do a simulated update: sudo apt-get -s upgrade
To update only a single package: sudo apt-get upgrade packagename_here


There is a sample of LightDM setup for multiseat using Xephyr. It looks like Andrzej Pietrasiewicz (the author of the blog copied/referenced below) created a PPA with all the code displayed below. By installing that PPA, you should be able to get a lightdm installation to work "magically".

Note: As I have been trying to get that to work, I have not succeeded yet. However, I can tell you that there are a certain number of contradictory parameters in what follows.

Some important parts:

The [Seat:0] entry which defines the "hardware server". That starts the X server. It represents Display :0
The xserver-command entries that define exactly what needs to be started to get seats. Xephyr is started with Display :1 and Display :2. So in effect the users will log in Display :1 and :2, but not in :0.

Something like that:

+------------------------------- Display :0 -----------------------------+
|  X server                                                              |
|                                                                        |
|  +--------- Display :1 ----------+  +--------- Display :2 ----------+  |
|  |  Xephyr 1                     |  |  Xephyr 2                     |  |
|  |  User A                       |  |  User B                       |  |
|  |                               |  |                               |  |
|  |                               |  |                               |  |
|  |                               |  |                               |  |
|  +-------------------------------+  +-------------------------------+  |
|                                                                        |
+------------------------------------------------------------------------+

The xorg.conf file:

# File: /etc/X11/xorg.conf

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
EndSection

Section "ServerFlags"
    # start even without the mouse
    Option "AllowMouseOpenFail" "yes"
    # disable VT switching
    #Option "DontVTSwitch" "yes"
    # Ctrl+Alt+Backspace disable
    #Option "DontZap" "yes"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Philips 170B4"
    HorizSync       30.0 - 82.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 8400 GS"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "1"
    Option         "TwinViewXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "CRT: nvidia-auto-select +0+1080, DFP: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Source: http://beforeafterx.blogspot.com/2011/02/multiseat-setup-xorgconf.html

The script in lightdm.conf:

# File: /etc/lightdm/lightdm.conf
[LightDM]
greeter-user=root
user-authority-in-system-dir=false
common-vt=true

[SeatDefaults]
xserver-allow-tcp=false
greeter-hide-users=true
user-session=lightdm-xsession
session-wrapper=/etc/X11/Xsession

[Seat:0]
xserver-command=X -br -dpms -s 0 -novtswitch
greeter-session=xinerama

[Seat:1]
xserver-command=/etc/multiseat/scripts/Xephyr-seat-1
greeter-session=multiseat-greeter-1

[Seat:2]
xserver-command=/etc/multiseat/scripts/Xephyr-seat-2
greeter-session=multiseat-greeter-2

Source: http://beforeafterx.blogspot.com/2012/08/multiseat-setup-lightdmconf.html

The multiseat scripts start Xephyr with parameters describing the mouse and keyboard to use for that seat. I will do my best to find out that information and provide it here too.

#!/bin/bash
# File: /etc/multiseat/scripts/Xephyr-seat1, Xephyr-seat2, ..., Xephyr-seatN
#
# $1 - display number of this Xephyr

. /etc/multiseat/scripts/helper-functions

trap "" usr1

XEPHYR=/root/Xephyr-new
export DISPLAY=:0
export XAUTHORITY=/var/run/lightdm/root/:0

SEAT=1

SIZE=`get_conf $SEAT SIZE`
KEYBOARD=`get_conf $SEAT KEYBOARD`
LAYOUT=`get_conf $SEAT LAYOUT`
MOUSE=`get_conf $SEAT MOUSE`
DPI=`get_conf $SEAT DPI`

exec $XEPHYR -retro -screen ${SIZE} -keybd evdev,,device=/dev/input/${KEYBOARD},xkbrules=evdev,xkbmodel=evdev,xkblayout=${LAYOUT} -mouse evdev,,device=/dev/input/${MOUSE} -dpi ${DPI} $1

Source: http://beforeafterx.blogspot.com/2012/08/multiseat-configuration-xephyr-seat-1.html

The greater referenced in the lightdm is also a separate shell script. Note that I would recommend you reference /bin/sh instead of /bin/bash. I did not see anything that would require bash. Note that it references the default lightdm-gtk-greeter at the end.

#!/bin/bash
# File: /etc/multiseat/scripts/multiseat-greeter-1, ..., multiseat-greeter-n
#
# multiseat wrapper around ligthdm greeter in order to position a Xephyr instance
#
. /etc/multiseat/scripts/helper-functions

PRIMARY=`get_conf 0 PRIMARY`
SEAT=1

if [ $SEAT != $PRIMARY ]; then
    XEP=`XAUTHORITY=/var/run/lightdm/root/:0 xwininfo -root -children -display :0 | grep "Xephyr on :$SEAT" --max-count=1`;
    XEPHYR_WIN_ID=`echo ${XEP} | cut -d' ' -f1`;
    DISPLACEMENT=`get_conf $SEAT DISPLACEMENT`
    DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 wmctrl 2>&1 -v -i -r ${XEPHYR_WIN_ID} -e 0,0,${DISPLACEMENT},-1,-1;
fi

XAUTHORITY=/var/run/lightdm/root/:$SEAT
DISPLAY=:$SEAT
exec /usr/sbin/lightdm-gtk-greeter

Some of the functions may be defined in the following script. Somehow, it includes yet another multiseat script that I haven't seen yet...

# File: /etc/multiscript/scripts/helper-functions

. /etc/default/multiseat

#
# private implementation of get_sect
#
# get given section's contents from the given config file
#
# $1 filename
# $2 section number
#
__get_sect()
{
    cat $1 | awk -v sect=$2 '
    BEGIN {
        SECT="^\\[" sect "\\]"
        NEXT_SECT="^\\[" (sect + 1) "\\]"
    }
    $0 ~ SECT, $0 ~ NEXT_SECT {
        if ($0 ~ SECT)
            next;
        if ($0 ~ NEXT_SECT)
            next;
        if (substr($1, 1, 1) == "#")
            next;
        print
    }
    '
}

#
# private implementation of get_conf
#
# get given key's contents from the given section
# from the given config file
#
# does not work for tables in the config file
#
# $1 filename
# $2 section name
# $3 key name
#
__get_conf()
{
    __get_sect $1 $2 | awk -F"=" -v key=$3 '
    BEGIN {
        KEY=key
    }
    $1==KEY {
        print substr($0, index($0, "=") + 1)
    }
    '
}

#
# private implementation of get_num_seats
#
# get number of seats from the default config file
#
# $1 filename
#
__get_num_seats()
{
    cat $1 | awk '
    BEGIN {
        count=0
    }
    /^\[[0-9]*\]/ {count++}
    END {
        print count - 1
    }
    '
}

#
# get given section's contents from the default config file
#
# $1 section name
#
get_sect()
{
    __get_sect $CONFIG $1
}

#
# private implementation of get_table
#
# $1 filename
# $2 section number
# $3 table name
# $4 size/entry switch [-size => size, <number> for entry]
#
__get_table()
{
    SIZE=0;
    ENTRY=-1

    if [ $4 == "-size" ];
    then
        SIZE=1;
    else
        ENTRY=$4
    fi

    RESULT=`__get_sect $1 $2 | awk -v table=$3 -v get_size=$SIZE -v entry=$ENTRY '
    BEGIN {
        print BEGIn
        TABLE=table "\\\=" "\\\("
        GET_SIZE=get_size
        ENTRY=entry
        size=0
    }
    $0 ~ TABLE, /^\)/ {
        if ($0 ~ TABLE)
            next;
        if ($0 ~ /^\)/)
            next;
        if (substr($1, 1, 1) == "#")
            next;
        if (get_size == 0 && size == entry){
                print
                exit
        }
        size++;
    }
    END {
        if (get_size)
            print size;
    }
    '`
    RESULT=`echo $RESULT | sed 's/^[ \t]*//g'`

    echo $RESULT
}

#
# get given key's contents from the given section
# from the default config file
#
# does not work for tables in the config file
#
# $1 section name
# $2 key name
#
get_conf()
{
    __get_conf $CONFIG $1 $2
}

#
# get number of seats from the default config file
#
get_num_seats()
{
    __get_num_seats $CONFIG
}

#
# get size of a given table in the given section of the config file or
# get specified entry of the table
#
# $1 section number
# $2 table name
# $3 size/entry switch [-size => size, <number> for entry]
#
get_table()
{
    __get_table $CONFIG $1 $2 $3
}

The fake-greeter script is a sleeper. It just sleeps until it gets killed by a full shutdown. Apparently, this is not required. According to a comment, the -noreset option is enough to avoid having to wait like this. I will report later once I tested for myself.

#!/bin/bash
# File: /etc/multiseat/scripts/fake-greeter

pid_set=0

kill_sleep()
{
    if [ $pid_set -ne 0 ];
    then
        kill -15 $pid
    fi
    exit 0
}

trap 'kill_sleep' TERM

while true;
do
    sleep 1000 &

    pid=$!
    pid_set=1

    wait $pid
done

The same blog says that he is having problems with udev and he has to re-reset it so multi-seat works properly. This was in August 2012 so I do not know whether that would still apply in 2014.

#!/bin/sh
# File: /etc/init.d/multiseat
### BEGIN INIT INFO
# Provides:          multiseat
# Required-Start:    bootlogs
# Required-Stop:
# Default-Start:     1 2 3 4 5
# Default-Stop:
# Short-Description: Trigger udev rules
# Description:       For some reason the rules for multiseat config need to be
#                    fired once more and later than at the very beginning.
### END INIT INFO

/sbin/udevadm trigger

To properly setup this script on your system, run the following command:

sudo update-rc.d multiseat defaults

Again, I do not know whether this script is required at this point. Just organizing the scripts offered by Before after X.

Source: http://beforeafterx.blogspot.com/2012/08/multiseat-setup-initdmultiseat.html


getting this message when i try to update from a terminal

It's look like your URL doesn't exist anymore. That's why APT give you this message.
Try to locate the new PPA and replace it.

EDIT : By looking the launchpad of jsevi83, I've found that the address of his PPA is ppa:jsevi83/precise


Dropbox sync icons not showing up on Dropbox folder and files in Ubuntu 16.04

You need to have the nautilus-dropbox package installed. Run the following command in Terminal:

sudo apt install nautilus-dropbox

Then log out and log in again.


After Ubuntu 18.04 reinstall, monitor stops working

It seems to me that 18.04 have problem with some Radeon HD card. So this may not be related to your monitor but Kernel Mode Setting. You can try to add "nomodeset" kernel parameter in Grub before boot to see if this helps.


It might be this bug in compiz. As far as I am aware of the current daily image of 15.04 should have this fixed. You could try that and see whether that helps.


Think of aliases as nicknames.  You might have a command that you perform a lot but want to shorten.

As an example, you often want to go straight to desktop in commandline, so you can do this

alias desktop="cd ~/Desktop"

From then on you just type

desktop

in terminal and it will perform the cd ~/Desktop for you.

Functions contains logic.  In a function, you might make calls to several different programs.  Here's a simple echo function

function e {
                echo $1
                echo $1 $1
                echo $1 $1 $1
           }

While it may appear similar to an alias when you call it

e Hello

Your e() can have a lot of different things happen.  The above is a simplistic example.

Aliases should be reserved for simple use cases.  Personal example - I have replaced my rm command like this

alias rm='trash-put'

Whenever I do an rm, it will send it to trash instead of deleting it from disk.  This caters to my clumsiness in the terminal where I may (sometimes) accidentally delete an important file.

Functions, you need to remember, are pieces of logic.  You wouldn't use a function standalone, usually.  It would be part of a larger script.  Imagine a script which takes all of your files and renames them to their pig latin versions.  Ignore that there are different ways of doing it.

But what you could do is loop through every file in the directory and pass the filepath to your RenameAsPigLatin function.  The RenameAsPigLatin function might have extra logic in there involving numbers, where you decide that files ending with numbers shouldn't be renamed.

Immediately you can see the benefit of having it as a function.  The function can focus on the renaming by your strange rules while the rest of the script can traverse various directories as necessary.


Error "configure: error: GLib >= 2.28 is required" while configuring bluez stack

I was able to solve that compiler error by issuing:

sudo apt-get install glib2.0

You might also like to refer to Ubuntu 13.04 and bluez-5.8 configure: error: systemd system unit directory is required


How to change Firefox drop-down menu color?

In another thread a user suggested a workaround: run Firefox (and only Firefox) with another theme:

GTK_THEME=Adwaita firefox

Works like a charm.


The installer is simply telling you to remove the .iso file you mounted to the virtual machine as a virtual CD/DVD or USB drive. It tells you to do this so that when it reboots to complete the installation, your machine does not boot into the installation media, but rather, your newly installed OS on the virtual hard drive.
To complete what it is asking you, unmount the Ubuntu .iso file you mounted at the beginning. Virtual box may even disconnect it for you after you reboot. From the virtual box setting bar, the navigation would look like:
Devices → CD/DVD Devices → Remove disk from virtual drive


You can try to re-install chrome like this for 64bit

sudo apt-get purge google-chrome

sudo apt-get install libxss1 libappindicator1 libindicator7
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*.deb

OR 32bit

sudo apt-get install libxss1 libappindicator1 libindicator7
wget https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb
sudo dpkg -i google-chrome*.deb

This will also install a PPA to stay up to date.


Looking at your partitions

If you used WUBI to install Ubuntu its contained in your C:/programs. Just delete it using 'programs add/delete' under Windows.

It would have not installed Ubuntu into a separate partition.

According to your partition table the only OS on that computer is the primary Windows OS.


Can Kubuntu simulate the Aero Desktop Peek functionality from Windows 7

In my experience, the closest for this case it would be the "Opacify" function inside of the CompizConfig Settings Manager, which will allow you to define which key binding you wish to activate it. When in use, the "opacify" function will decrease the opacity level of the active window in order to allow you to "see" the items below it. This behavior is also observed in the windows placed in lower places.

The next screenshot illustrates the options that can be configured via CompizConfig Settings Manager Opacify function:

The next screenshot shows the "opacify" function in action.

When the mouse arrow goes far from the window size, the "opacify" function starts to work.

However, the behavior of the transparent windows can be handled via de Commands section and its respective bindings, as shown for the Aero Snap function shown in this answer: Is there any Window Manager like the Windows 7's for Ubuntu? but I haven't tried that yet. I hope you find a better solution because of the commands/bindings may become a hard work.

Good luck!


ClamTk not showing scan results and history

Solved by launching clamtk at terminal with

env LC_TIME=C clamtk


Installing applications on a separate USB

You could move the Thunderbird-profile-folder ~/.thunderbird to the thumb-drive and create a symlink to the moved profile-folder in your home-directory. Then just make sure the thumb-drive is plugged in when you run Thunderbird.


Block internet access to my client systems in my LAN

You can redirect the requests of your client PCs to wild using iptables.

  sudo iptables -A INPUT -s client_ip -p tcp --dport port_number -j ACCEPT

For port_number specify a port that you can't use to access Internet (123 maybe?)


you need to boot from ubuntu live cd and use gparted wich is installed by default in it.just read some tutorial before you make some changes be sure you do it correctly ps resizing process can take a long time ,watch display options under progres bar to see more detailed  info


Grub 2.02 Freezes When Using Razer Black Widow Keyboard to make Selection

Try to enter BIOS and check if your keyboard is working after the first key is pressed at all. I had a same problem but it was hardware related, keyboard got frozen after a first key was pressed. Solution was to re-plug the keyboard after each key press or replacing the keyboard with a new one.


Window controls missing; Cannot maximise or minimize applications - make fix permanent

The solution I ended up using was to create a new user and set up that account with gnome-classic and then rename the old user to user_old and rename my new user to the original users name. And then do a bunch of file moves and chowns to restore the account to its previous state.

Not really a great solution. But the "compiz --replace" method turned out to create more problems


Unable to update with "apt-get" getting "429 too many requests" error

I just solved this problem with these steps:

Open the terminal

Start your file manager with sudo, in my case it's nautilus:
sudo nautilus

on Nautilus or any other file manager, navigate to /etc/apt/sources.list.d.

Delete the files packagecloud-shiftky-desktop.list and packagecloud-shiftky-desktop.list.save

Now it will not appear when you run sudo apt update.


Disable touch on Bamboo Touch&Pen CTH-460

Found my solution.

Edit /usr/share/X11/xorg.conf.d/50-wacom.conf and add "Option "Touch" "off"" to each group. Works like a charm.


Issues installing pandoc 2.3.1 in Ubuntu 18.04.1

I had the same problem and it was solved after updating all conda packages : conda update --all


I hope this works for you:

sudo apt-get remove xserver*

sudo apt-get -f install --reinstall xorg


VirtualBox not starting after kernel upgrade

I was facing the same problem. After kernel upgrade my gcc version was showing as 5.4.1. Downgrading this version to 5.4.0 helped me to have retpoline for vboxdrv kernel module.

Following steps from this link helped me solve my issue:

sudo apt-get install ppa-purge
sudo ppa-purge ppa:ubuntu-toolchain-r/test
#Select gcc version 5 using update-alternatives manually
sudo update-alternatives --config gcc

After these steps gcc --version should be (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609

Then purge all the new linux headers (4.4.0-116)

sudo apt-get purge linux-headers-4.4.0-116 linux-headers-4.4.0-116-generic linux-image-4.4.0-116-generic linux-image-extra-4.4.0-116-generic linux-signed-image-4.4.0-116-generic

Again install them

sudo apt-get install linux-generic linux-signed-generic

Then re-install virtualbox, I installed latest virtualbox-5.2 this time, but default 5.0 version of virtualbox should also work fine.

sudo apt-get purge virtualbox-dkms virtualbox virtualbox-qt
sudo apt-get install virtualbox-5.2

And, we have retpoline support in latest module

anirudh@AHDRMD34579:~$ modinfo vboxdrv
filename:       /lib/modules/4.4.0-116-generic/misc/vboxdrv.ko
version:        5.2.6 r120293 (0x00290000)
license:        GPL
description:    Oracle VM VirtualBox Support Driver
author:         Oracle Corporation
srcversion:     4880B21EFF1B605D6402982
depends:
vermagic:       4.4.0-116-generic SMP mod_unload modversions retpoline
parm:           force_async_tsc:force the asynchronous TSC mode (int)


make slingshot-launcher run in fullscreen mode on Xubuntu

This is by design - from the Elementary OS blog

  Slingshot is our new app launcher. It displays an optimal 3x5 paged grid of app icons, the result of iterative design and user testing. We’ve targeted three classes of users: those used to the point-and-click/tap mechanism present in modern interfaces, those accustomed to the category-based list view, and those who want full keyboard control including opening, searching, and launching in just a couple of keystrokes. Slingshot is built for speed and utilizes Granite which ensures consistency with the rest of the system.

I did notice that you can edit the size of the grid, using dconf-editor. Navigate to org.pantheon.desktop.slingshot and change the number of rows and columns to whatever suits you. Still no full-screen mode though.


How can I remap my F keys on my HP laptop?

You can do this by flipping a switch in your BIOS.

First, before you do this, BE WARNED. Messing in your BIOS can be hazadous, and it can TURN YOUR COMPUTER INTO A EXPENSIVE PAPERWEIGHT.

Warning aside, heres how I did it.

First, I booted into the BIOS. Shutdown the computer, and then get into the BIOS. To do that on a HP 2000 Notebook, hit Esc before GRUB loads - might take a few tries to get it to work.

sorry for the blacked out stuff, figured it'd be better if I kept my laptops serial number and related info private

Then, select the System Configuration tab. Navigating the BIOS menu is normally done with the arrow keys, but read the instructions for your machines specifics.

Then, select the Action Keys mode toggle. Turn them to DISABLED.

Save your changes, and then reboot.

Now that you've got it working, you can do the same things (volume, brightness etc) by using the keyboard shortcut fn + F key


Bash command-line in vi mode - command-line find/replace

The command for replacing a string with another in vi editor is

  %s/FindMe/ReplaceME/g

for more information on usage :  vim


Shotwell Viewer can't open files without file ending

How can I view images without file extension with shotwell?

The answer is short:

You can't. It works with a suffix, but not without. The same for JPGs and so on. You have found a four years old bug.

Here is the bug report.


What's the correct Nvidia driver for my card+system?

As Geforce 9600 GT owner I can write the following.

I'm using it with nvidia-340 driver on my 16.04 LTS, it still exists for all current releases. It is recommended on Nvidia Drivers site.

The driver PPA are not needed. So you may remove the PPA with

sudo apt-get install ppa-purge
sudo ppa-purge ppa:graphics-drivers/ppa

and install nvidia-340:

sudo apt-get install nvidia-340


You might be having obsolete source PPAs. Remove every other apt sources:

sudo rm -rf /var/lib/apt/lists/*
sudo rm -rf /etc/apt/sources.list.d/*
sudo apt-get update

Then try again.


How to make my system delete all the files in a certain directory older than a certain time while keeping the directory structure intact?

Using find:

find ~/tmp -type f -mtime +0 -delete

~/tmp is the directory to be searched recursively, change this accordingly
-type f will look for only files
-mtime +0 which will match a file if it was last modified one day or more ago
-delete will just remove the matched file(s)

Here the catch is -mtime +0, most might think of using -mtime +1 but find will ignore any fractional time while calculating days. So, -mtime +1 will match a file if the last modification was made at least 2 days ago.

Quoting man find, -mtime has the same timing convention as -atime:

  -atime n

  File was last accessed n*24 hours ago.  When find figures out how
  many 24-hour periods ago the file was  last  accessed,  any
            fractional part is ignored, so to match -atime +1, a file has to have been accessed at least two days ago.

Also note that if you want precision, you should look at the -mmin option of find to indicate time in minutes.

To run it periodically after 3 hours, you can add a cron entry.

Run crontab -e and add:

00 */3 * * * /usr/bin/find ~/tmp -type f -mtime +0 -delete

Using zsh to remove the files:

rm ~/tmp/**/*(.-m+0)

Adding to cron:

00 */3 * * * /usr/bin/zsh -c 'rm ~/tmp/**/*(.-m+0)'


Doubt : About dual boot(14.04 with Windows 7)

You should always install Windows before Ubuntu or any other Linux distrobution. Ubuntu and the grub boot loader can recognize an installation of Windows, but Windows will never recognize an Ubuntu installation. Install Windows on the entire disk first, then when installing Ubuntu you should get an option to install along side Windows, which will take care of all the paritioning for you.

For more detail, see WindowsDualBoot in the Ubuntu Community Help Wiki.


Photography post processing for slideshows to music

I use Kdenlive as a video editing program and also use it for timelapses. I think it will probably suit you quite well. It is open source and not that hard to use. You may find the official manual helpful.
To create a slideshow all you have to do is

Import a folder or pictures where all your photos are in as a slideshow clip (click on the arrow next to the import clip button and select slideshow clip)
Choose how long the pictures should be shown for and other settings. It automatically cuts them to a clip.
Put the music in one channel add the clip in another and you're done!


How to uninstall Kubuntu Plasma Desktop/Netbook system installed with Ubuntu 12.04 LTS Unity

You did not follow the specific instruction for your distro version.

"If you're using 12.04, go here"

Source http://www.psychocats.net/ubuntu/pureubuntu


crontab refuse simple task which should always work

You are missing the user part, the correct syntax is:

* * * * * root env > /tmp/env.output

Replace the root with the user you want to run the command with.


How to switch between tabs opened in gnome-terminal and also close any particular tab using shortcut key?

You can switch the tabs using Ctrl+PgDn to next tabs and Ctrl+PgUp for the previous tabs.

Reordering can be done using Ctrl+Shift+PgDn and Ctrl+Shift+PgUp.

Also Alt+1 to Alt + 0 can be used to switch tabs starting from 1 to 10. Where Alt+1 is for 1st tab in terminal, Alt+2 is for 2nd tab ... Alt+0 is for 10th tab.

If more than 10 tabs are opened then you've to switch using the shortcut mentioned above. i,e Ctrl+PgDn and Ctrl+PgUp

To close any selected tabs use Ctrl+Shift+W


Unlock password when reboot Ubuntu 14.04

About Ubuntu only...

If it really is full system disk encryption (dm-crypt/LUKS/cryptsetup style) then there is no quick or easy way to remove the encryption. Maybe start up & decrypt, copy unencrypted info to new disks as a new "system", then run the new system only, but that's about the same as reinstalling, and harder than just using a live cd/usb to reinstall from scratch.

If you're talking about user-level encryption (eCryptfs) with just an encrypted home directory, you could set up new users (possibly with no encryption) and their own login password. Using adduser or useradd or gui user/group tools could do that.

A BIOS password just to boot would have to be given out or removed, but there should the ability to set a different password for changing BIOS settings.


Assuming you installed from a standard package, you should be able to use

sudo service apache2 restart

You might also try the older

sudo /etc/init.d/apache2 restart


How to resolve "release command failed" in quickly app hello-world?

When I run quickly on my system (version 12,94-0ubuntu1) it asks for a Launchpad project name right after I enter the command quickly release. I see that your version didn't do that, therefore quickly may try to upload your version to launchpad.net/hello-world (unless you've already configured quickly to use a different launchpad project name).

If the project name is still hello-world it can't upload it because there already is a project with that name, and you aren't part of the group that controls it. That would explain the message: lazr.restfulclient.errors.Unauthorized: HTTP Error 401: Unauthorized. In that situation you should either start over renaming the program with a unique name, or more simply use the quickly configure lp-project command to provide the name of your own project on launchpad.

If you had already configured quickly with your own launchpad project name, please be sure that project already exists under your ownership on Launchpad and please edit your question to mention the project name.

Nevertheless a program shouldn't abort with a traceback, so this is still a bug. Please report it with launchpad.


First things first, note this very noticeable warning:
------------------------------------------------------
You are using a 64-bit WINEPREFIX. If you encounter problems, please retest in a
clean 32-bit WINEPREFIX before reporting a bug.
------------------------------------------------------

This indicates you need to create a 32bit Wineprefix, as Wine works better with 32bit stuff - this can be done simply by running telling wine what architecture to use before running its commands (this can I think can also be done by uninstalling Wine x86_64 and installing Wine i386/i686 - anyway, keep the terminal open for the other wine commands after running this):
export WINEARCH="win32"

This sets the environment variables wine reads before it launches (see man wine).
It would also be a good idea to get it to create it's own WINEPREFIX (where the Wine virtual drive is stored). By default this is ~/.wine, but you can create individual ones for each architecture & program - so to create a WINEPREFIX in directory /home/USERNAME/.wine-PROGRAM-NAME/:
export WINEPREFIX=~/.wine-PROGRAM-NAME/

The directory doesn't have to exist (ideally it shouldn't exist so stuff doesn't have to be overwritten), but the parent directories probably should - you should also have permission to read & write to it, and I don't think the wineprefix can be on a FAT/NTFS drive for technical reasons (it won't work).
So to setup a 32bit wine prefix for a program:
export WINEARCH="win32"
export WINEPREFIX=~/.wine-PROGRAM-NAME/
wineboot -u

You can replace PROGRAM-NAME with the name of the program to make it easier to identify the program later. Just make sure it only includes the letter and numbers as punctuation often has a special function in various command shells.
You should then get a window like this:

Then you are ready to go. Now you can install NET 4.0 using winetricks (you might want to get the latest version from here first):
winetricks dotnet40

This should be in the terminal after the export WINEPREFIX=... command, or by placing it just before the wine command as so (useful for app launchers that one command line):
env WINEPREFIX=~/.wine-PROGRAM-NAME/" winetricks dotnet40

You may also want to use winetricks to install some other stuff it might need - e.g. fonts (using the options corefonts,lucida,tahoma). To list winetricks' options, use winetricks list-all.
You can then install the program using wine "~/Downloads/PATH/TO/INSTALLER.exe". Yet again (copy the file, then 'Paste Filenames' into terminal, so it looks like '/home/wilf/Desktop/name spaces/installer.exe' not file:///home/wilf/Desktop/name spaces/installer.exe').
You should make sure the WINEPREFIX has been exported before running this command (especially if you closed the terminal), or in the same line. After getting it to work (or not work) you might want to do a report on how well it works here (including what you did etc so you can help other people). If you have issues, and noticeable errors appear in the output you can report a bug.
Once installed, it should make the launcher of the app appear on the Dash/Menu and sometimes on the Desktop. Otherwise in future to run the app you may need to run the app with the export WINEPREFIX=... and wine .... (or env WINEPREFIX=... wine .....) again, unless you create a launcher (comment below or somewhere if you need to know how to do so....)

More info, troubleshooting etc
How do I install winetricks?
You can a version from the Ubuntu repositories using this command (or installing Winetricks from the Software Center):
sudo apt-get install winetricks

You can then use winetricks OPTIONS to do stuff.
For the latest version, you can use these commands to download and use the latest version:
wget  https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks

Note you will have to run it as ./winetricks <OPTIONS>, unless it's directory is in the shell's $PATH.
I don't want to use terminal, what can I do?
The app you want to use may be runnable under PlayOnLinux (it should be if you can find it here) - this is pretty much all GUI and automatically does most of the steps for you.
Otherwise, you can use the terminal to do it very easily (you usually have much more control than if a GUI program is doing it), just be careful what you put in (especially if it includes the commands sudo, rm, etc). Try to understand what is going on with each command first.
Also, some of these steps can be done in other ways - both winecfg and winetricks open GUIs through which you can do some steps, but again what you can do is limited.
How do I install the latest Wine version?
The newer wine versions are more up to date, so may be able to run the program better (unless there is a regression which impacts it). To install the current latest version (Wine1.7) you can use the offical Wine PPA:
sudo apt-add-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine1.7

If it can't find the package wine1.7, try running the install command again but with wine instead of wine1.7
For installing and configuring Wine generally, you can also try this question.
The program I want to use is designed for a newer version of Windows, what can I do?
Wine by default replicates Windows XP, which some programs don't support as it is EOL (which I supposes in handy as you probably can run programs for WinXP under Wine under Linux, and you can 'nuke WinXP from orbit' :)
Anyway, first open up the Wine configuration window:
export WINEPREFIX=~/.wine-PROGRAM-NAME/
winecfg

Where ~/.wine-PROGRAM-NAME/ is the WINEPREFIX you created earlier.
And select the Windows version to replicate at the bottom of the 'Applications' tab. Then try installing the app again.
WINDOWS VIRUSES UNDER WINE?!?!
Quite possibly. Don't install random software of the internet, try to ensure it is from a trusted site.


Ubuntu 14.04 fails to recognize FakeRaid volume

Ok, it looks I found the solution. I have to tell mdadm to use external metadata, as detailed here


How to always enforce sudo password for specific command?

You can set the timestamp_timeout to 0 for particular commands in /etc/sudoers.
Create a file visudo -f /etc/sudoers.d/pduck with the following content:

Cmnd_Alias DANGEROUS = /bin/rm

Defaults!DANGEROUS timestamp_timeout=0

pduck ALL = (ALL:ALL) DANGEROUS

Now the user pduck is always asked for a password when running sudo rm (no matter what additional parameters are given) even though the user is member of the sudo group and sudo remembers his password for other commands.

The downside is that you cannot easily add parameters to the /bin/rm line in the file to further restrict this. Well… you can, like:

Cmnd_Alias DANGEROUS = /bin/rm -f

but then you just get prompted for exactly sudo rm -f and not (again) for sudo rm -rf, for example.


How should I specify command-line arguments for atd?

In Ubuntu 11.04 atd is started in /etc/init/atd.conf. Modify the line

exec atd

to use the command-line options you want.

In older version of Ubuntu atd be be started in something like /etc/init.d/atd using normal shell syntax. If you have such a version and need help editing please provide that file.


can not sign in online accounts with facebook

I found a Workaround. Check this : https://bugs.launchpad.net/ubuntu/+source/account-plugins/+bug/1180297/comments/4.

Edit /usr/share/accounts/providers/facebook.provider

sudo gedit /usr/share/accounts/providers/facebook.provider

Put this under line 13,

<setting name="AllowedSchemes" type="as">['https','http']</setting>

Example:

This is the original /usr/share/accounts/providers/facebook.provider:

<?xml version="1.0" encoding="UTF-8"?>
<provider id="facebook">
   <name>Facebook</name>
  <icon>facebook</icon>
  <translations>account-plugins</translations>
  <domains>.*facebook\.com</domains>
  <plugin>generic-oauth</plugin>
  <template>
    <group name="auth">
      <setting name="method">oauth2</setting>
      <setting name="mechanism">user_agent</setting>
      <group name="oauth2">
        <group name="user_agent">
          <setting name="Host">www.facebook.com</setting>
          <setting name="AuthPath">/dialog/oauth</setting>
          <setting name="RedirectUri">https://www.facebook.com/connect/login_success.html</setting>
          <setting name="Display">popup</setting>
          <setting type="as" name="Scope">['publish_stream','read_stream','status_update','user_photos','friends_photos','xmpp_login']</setting>
          <setting name="ClientId">302061903208115</setting>
        </group>
      </group>
    </group>
  </template>
</provider>

This is the modified /usr/share/accounts/providers/facebook.provider:

<?xml version="1.0" encoding="UTF-8"?>
<provider id="facebook">
   <name>Facebook</name>
  <icon>facebook</icon>
  <translations>account-plugins</translations>
  <domains>.*facebook\.com</domains>
  <plugin>generic-oauth</plugin>
  <template>
    <group name="auth">
      <setting name="method">oauth2</setting>
      <setting name="mechanism">user_agent</setting>
      <group name="oauth2">
        <group name="user_agent">
+         <setting name="AllowedSchemes" type="as">['https','http']</setting>
          <setting name="Host">www.facebook.com</setting>
          <setting name="AuthPath">/dialog/oauth</setting>
          <setting name="RedirectUri">https://www.facebook.com/connect/login_success.html</setting>
          <setting name="Display">popup</setting>
          <setting type="as" name="Scope">['publish_stream','read_stream','status_update','user_photos','friends_photos','xmpp_login']</setting>
          <setting name="ClientId">302061903208115</setting>
        </group>
      </group>
    </group>
  </template>
</provider>

Note:  however that this exposes your desktop to some security risks, so please use it only if you are connected to a trusted network. -- Alberto Mardegan (mardy)

Source: https://bugs.launchpad.net/ubuntu/+source/gnome-control-center-signon/+bug/1180297

Update: Seems that this bug is fixed on the quantal-proposed and raring-proposed. The package is account-plugin-facebook and its version is 0.10bzr13.03.26-0ubuntu1.1


Ubuntu 20.04 Login loop after lots of updates

In this case... It was because I accidentally sourced my .profile from my .bashrc, when my .profile also sources my .bashrc creating a loop for any bash shell.
Bit of a face palm, but I guess the lesson it to start with the simplest stuff first.
So the part that is not mentioned in any questions here is that a malformed .profile or .bashrc can stop Gnome from loading, without throwing any errors to Gnome itself, causing a unique login loop.


Just leaving this here for others who may stumble across it and face similar issues.  After scouring the apache error log I traced the issue back to the apache2.conf file, where the virtual host was not properly set up (I had missed a bracket ).  Once I corrected that issue I was golden.  The lesson here is to actually check your logs rather than assuming that you are having the same problem as everyone else.


Sorry to say this, but I think you don't know what you're doing. Let me explain it a bit.

It's texlive, not textlive.
If you install "from upstream" (the ISO file, rather than Ubuntu packages), it's not being managed by your package management. It will not show up in any of those tools as it doesn't know about it. Please don't mix up installation from both methods - it will get you into more trouble and it will confuse your package management.
tlmgr is supposed not to work in Ubuntu, as you should install TeX Live packages using your system package management, rather than another package management tool only for one application. This is a change that Ubuntu/Debian package managers make to software and such a change applies to many more packages. For example, the Firefox updater is disabled in the application itself - you will get it via the system package updates instead. See below one approach I use to find the right Ubuntu package.

Steps to get your system back in a reasonable working state:

Uninstall the TeXLive version you installed using that ISO file. I don't know how to properly uninstall that - it should come with instructions to do so.
Remove all the packages with possible leftovers as well:

sudo apt-get remove texlive texlive-\*

Reinstall:

sudo add-apt-repository universe
sudo apt-get install texlive-generic-recommended

Install additional packages you need. Search the package management using the texlive- keyword for generic packages you may want. For specific missing .sty files, use the packages.ubuntu.com search, like I did here: setspace.sty search. It will show that this file is present in the texlive-latex-recommended package (which you previously didn't install I guess).


If you only want to compare difference in files and directories between live and backup servers, you can try rsync's dry-run as below.

rsync -ravun --delete {source} {destination} |grep "^deleting "

From man rsync :

u - skip files that are newer on the receiver

n - perform a trial run with no changes made


Command-line to switch between profiles in gnome-terminal

A lot of great answers already but I wanted to add one more variation using xdotool that does not require the menu bar to be visible...

The key combo shift+F10 will open a pop-up menu (the equivalent of right-clicking on terminal) and from there the profile can be changed.

e.g. xdotool key shift+F10 r 3 to get to the third profile

I've also found that this method does not require setting a delay for xdotool (which I found necessary for the menu bar method) so it's therefore a little faster.

I tend to change profiles a lot so I wrap this into a function:

function chp(){
      xdotool key --clearmodifiers Shift+F10 r $1
}

so I can just call chp N to switch to the Nth profile.

Some more tips and idiosyncrasies of my setup:

By adding a chp command to my .bashrc I can force new tabs to always switch to the default profile
I color code my ssh sessions based on host but I don't like my ssh alias to open new tabs or windows AND I want the profile to change back to the default when I exit ssh.  My solution:
      alias somehost="chp 2; ssh user@somehost; chp 1"
I give xdotool the flag --clearmodifiers so that if I happen to be holding a modifier key (when opening a tab/window, exiting ssh, etc.), it won't interfere with xdotool.
I prepend my profile names with numbers so that if I add a new one, it doesn't shift all the others due to the alphabetizing of the profile menu


My PC device appears twice in device list

Having a device listed multiple times is perfectly normal, it only means you logged in twice. If you want, you can remove the "extra" device from the Ubuntu One website.


What is the "Input Method" application used for?

The im-config command provides the framework to configure the input method on X Window System. This input method is the essential mechanism for Japanese, Chinese and Korean (CJK) languages to enter their non-ASCII native characters.

FYI: For any command you want to know the purpose of, you can open a terminal and type man COMMAND_NAME. Example: To find the information I posted above, I opened up a terminal, entered man im-config, and then pressed Enter.


One different way would be GhostScript:

gs -dNOPAUSE -dBATCH -sDEVICE=jpeg -r96 -sOutputFile='page-%00d.jpg' input.pdf

where -r96 is desired dpi resolution

Output are multiple JPEG images.

You can generate transparent PNGs also if you wish:

gs -dNOPAUSE -dBATCH -sDEVICE=pngalpha -r96 -sOutputFile='page-%00d.png' input.pdf


Is it worth upgrading Ubuntu 17.10 kernel from 4.13 to 4.15?

The best kernel to run is the one supplied with the distribution.  This one is the most likely to get timely security updates, is most likely to be in a stable, dependable state, and most likely to be compatible with other things (such as loadable kernel modules - drivers - provided by other packages).

The mainline kernels do not benefit from any of the work that the Ubuntu team puts into fixing things to work well on Ubuntu, may not be as well-tested in Ubuntu, and should be considered for experimental purposes only.  Not all drivers will work with them and in some cases getting a driver to work may involve recompiling the driver yourself.


Can I just buy a Landscape server license?

Landscape is part of Ubuntu Advantage, which is a package that includes support for Ubuntu and a Landscape registration for the supported system.

In a SAAS configuration, you would purchase 400 Desktop UA subscriptions, and use Canonical's default Landscape.canonical.com server.  If you prefer to have the service on premise, you will need to add 1 Landscape Dedicated Server license to have a local instance of Landscape within your firewall perimeter.

As for the price, it changes significantly with volume.


Why was gnome-desktop-item-edit removed?

Being sarcastic. GNOME Shell developers have new fresh vision of the desktop. This desktop does not include desktop shortcuts in the traditional manner. Users should find or write some extension to get it working as before. The desktop experience had never been simpler than now.
The gnome-desktop-item-edit executable came from gnome-panel package which was the last chance to get GNOME FlashBack working as it was in 12.04 LTS. For now gnome-flashback session is very buggy and less functional.
The desktop in GNOME Shell session is controlled by gnome-shell-extension-desktop-icons (instead of Nautilus) with very limited functionality too.
Two above moments make gnome-desktop-item-edit existence useless.
So it was removed from gnome-panel with version 3.32.

Also you way want to read more about all this:

Basic desktop actions are not available on Ubuntu 20.04
How to enable default file manager(nautilus) to handle desktop icons

Possible action may be removal of GNOME Shell from the system and installation of normal desktop instead (like MATE, Xfce, KDE and so on).


How to sync clipboard between ubuntu desktop and android phone?

Finally, got an app called KDE connect which can be used to sync clipboard and many other additional features are also there. But it is available by default for Ubuntu 14.04 in software center, but in order to use this app one will have to install KDE- system setting from Ubuntu software center along with KDE connect app from google play.

Install KDE connect from Ubuntu software center

Install KDE system setting from Ubuntu software center

Install KDE connect on android from google play KDE connect

Pair the device and pc by opening KDE connect from KDE system setting.


Setting up wxWidgets 3.0 for codeblocks12.11 on Ubuntu 12.04?

You could try

sudo apt-get install codeblocks-contrib

http://linux-buddy.blogspot.ca/2014/08/wxsmith-plugin-is-not-loaded-can-not.html


Loop through all folders and executing script

Use full path of your parent directory(in my case apps directory located in my home directory) and remove one extra command(cd ..)
for dir in ~/apps/*;
  do
     [ -d "$dir" ] && cd "$dir" && echo "Entering into $dir and installing packages"
  done;

See screenshot: with cd .. command and using apps/*

See screenshot: without cd .. command and using ~/apps/*


User is in docker group but can't access docker commands anymore without calling `newgrp docker` before

Okay, I found the reason for that. I recently switched to lightdm and it seems to have a bug that is causing this. It's bug 1781418.

The solution is either to uninstall libpam-kwallet4 or commenting out these lines in /etc/pam.d/lightdm fixes the problem:

auth optional pam_kwallet.so
auth optional pam_kwallet5.so


Update /etc/apt/sources.list by copying default sources.list from https://repogen.simplylinux.ch/.

After that check the respective modules and run modprobe module


Delete all ubuntu desktop stuff from ubuntu server

The following command sequence removes the ubuntu-desktop metapackage and then all automatically installed, unneeded packages (i. e. nothing depends on them anymore).

apt-get remove ubuntu-desktop
apt-get autoremove

If autoremove doesn't do anything, then somehow all the dependencies of ubuntu-desktop are not flagged as “installed automatically”, which is required for autoremove to select them. You could set this flag for every recursive dependency (manually or with a script), but I don't think it's worth the work, if you don't experience problems related to desktop packages.


Disclaimer: I know practically nothing about mongo. Never the less, the answer to your question would be "Yes, if there is a 'mongodb' upstart service".

There are a couple ways to check for this:

sudo initctl list | grep mongo

If this command returns anything, check that the service it lists matches the name you're using ('mongodb').

Other wise, check the contents of /etc/init (note, not /etc/init.d) and see if there is a mongo related .conf file. This will be the name of the service to use, meaning change your start on stanza to start on started [service name].

If there is no mongo related upstart service, then mongo is still using init.d scripts. If that's the case you'll need to find or make a mongo upstart script, install it and disable the init.d scripts (I used bum for that).

Googling for that turns up a couple of options:

Ubuntu upstart script for MongoDB with automatic repair

This one looks more complete:

MongoDB multiple instance upstart scripts


How can I learn all the options I can pass to DEB_BUILD_OPTIONS?

See section 4.9.1

  nocheck This tag says to not run any build-time test suite provided by
  the package.

  noopt The presence of this tag means that the package should be
  compiled with a minimum of optimization. For C programs, it is best to
  add -O0 to CFLAGS (although this is usually the default). Some
  programs might fail to build or run at this level of optimization; it
  may be necessary to use -O1, for example.

  nostrip This tag means that the debugging symbols should not be
  stripped from the binary during installation, so that debugging
  information may be included in the package.

  parallel=n This tag means that the package should be built using up to
  n parallel processes if the package build system supports this.[27] If
  the package build system does not support parallel builds, this string
  must be ignored. If the package build system only supports a lower
  level of concurrency than n, the package should be built using as many
  parallel processes as the package build system supports. It is up to
  the package maintainer to decide whether the package build times are
  long enough and the package build system is robust enough to make
  supporting parallel builds worthwhile.

https://www.debian.org/doc/debian-policy/ch-source.html#debian-rules-and-deb-build-options


First confirm that you are able to browse other websites.
Then, Run this commands:

sudo mv /var/lib/apt/lists{,bakjune4};
sudo mv /var/cache/apt/archives/partial{,bakjune4};
sudo apt-get update;
sudo apt-get upgrade;

Note:
In any case you can revert to your current situation by using followiing commands:

sudo rm -r /var/lib/apt/lists /var/cache/apt/archives/partial/;
sudo mv /var/lib/apt/list{bakjune4,};
sudo mv /var/cache/apt/archives/partial{bakjune4,};


How do i show HDD partitions in "Other locations" section?

Firstly, it's always a good idea to back-up before deleting or re-sizing partitions. You can use something like partimage, clonezilla or dd if your feeling brave!

1) Create a USB Gparted live image and boot to it. https://gparted.org/liveusb.php

2) Find your Windows partition in Gparted's menu, it should be NTFS.

3) Right-click on your Windows partition and choose "Delete". Select any other Windows related partitions, you may want to delete them as well.

4) Right-click on your Linux partition and choose "Resize/Move." Resize it so it takes up the rest of the now-free space on your drive.

5) Click the "Apply All Operations" button in the toolbar to perform the selected tasks.

6) Shutdown and remove the USB Gparted live image.

7) On startup your boot-loader will still have some Windows entries. To delete, open a terminal and type: sudo update-grub


This sounds like a problem with DNS, and more specifically DNS when using dnsmasq with a VPN.  There is a known issue when using dnsmasq and NetworkManager with a VPN which will break DNS resolution within dnsmasq.  Upstream has acknowledged but also done nothing towards fixing it.  This has been an issue since 16.04, and doesn't seem to be on their radar to fix any time soon.  My guess is that they have no idea where it's actually breaking. (LP Bug #1588018, among many other bugs on the same problem)

The solution is to not use dnsmasq at all, and instead use a different DNS system or set of DNS servers by default, usually by forcibly overriding the resolvconf service settings.

However, this is a major, nontrivial change, and can cause other problems.
 Therefore, there's no real workaround currently to this issue.

  WARNING: This is my workaround to this problem, and is a non-standard, nontrivial solution to the DNS issue.  Use only at your own risk.

My workaround was a painful, non-trivial one.  I installed and configured bind9 to be a forwarding DNS resolver, so that it forwards all DNS queries off to Google DNS (8.8.8.8 and 8.8.4.4), and then once that was working I went and edited my /etc/resolvconf/resolv.conf.d/head file to query the local DNS.  Note that I had to add a local DNS binding for 127.0.2.1 and in order for that to work I have to roll custom IP ranges in my lo adapter by adding these lines to my /etc/network/interfaces file (I included the default lo auto/loopback declarations for context):

auto lo
iface lo inet loopback
    up ip -4 addr add 127.0.2.1/8 dev lo
    down ip -4 addr del 127.0.2.1/8 dev lo

... and by setting bind9 in the /etc/bind/named.conf.options folder so that this is now in the options configuration block:

listen-on { 127.0.2.1; };

Once I rebooted the system after making those changes, the system began defaulting to using my local bind9 resolver.

However, this prevents VPNs which have Intranets and internal DNS resolutions and internal domains from properly resolving; this introduced other issues, but nothing I couldn't work around (as a power user and system administrator).


How can I see large thumbnails of the files I want to attach to an e-mail?

Changing the size of thumbnails unfortunately is not (yet?) implemented in the Gtk File Chooser used here. Unless the application in question does not use another file chooser there will be not much change to this, I'm afraid.

From Bugzilla bug #141154 there are some patches around now. Launchpad bug #137606 has state in progress.


How to remove ubuntu partitions and use them to install windows

Try Virtualbox. Emulate Windows. Hope it help.


There was an error in my /etc/fstab, so I have added this line:

LABEL=HOME /home ext4 errors=remount-ro 0 1

After that I was able to login properly but it was very slow. I was unable to do anything.

Then I tried booting in the recovery mode. There, I got one line like this

Repair broken packages

Then I clicked on that line and got this message:

Continuing will remount your filesystem in read/write mode and mount any other filesystem defined in /etc/fstab

then clicked Yes.

After that it took around 15 minutes to repair. Now it's good and pretty fast.


How do I change the keyboard layout to a non-standard one on a Live (USB) session?

According to own test on a Live USB session of Ubuntu 13.10, it seems to now be possible to change the keyboard layout to a non-standard one.

This is probably due to the introduction of a new keyboard indicator (see http://www.webupd8.org/2013/10/ubuntu-1310-available-for-download.html for instance).


No module named 'uaclient' during `sudo apt upgrade` (ubuntu 16.04)

For me, the reason to cause this problem is that I have additional python distribution installed on my computer /usr/local/bin/python3, which comes before /usr/bin/python3 in the search path.  I modified manually the post-installation and pre-remove script in /var/lib/dpkg/info/ubuntu-advantage-tools.postinst and /var/lib/dpkg/info/ubuntu-advantage-tools.prerm and replace python3 with the complete path /usr/bin/python3.  This solved my problem.


Desktop Icons dissapearing and windows not opening up

If you feel that is a Nautilus/Files error, try to restart it with the following command:
nautilus -q


Either you're confused or I am.  My take on this is that the PXE step boots up an Ubuntu image that's pre-arranged.  You say...

  "...not booting the Image that I downloaded under 'Images'..."

...which, to me, suggests that you've got OpenStack running, that you're in the website which looks like https://someipaddress/horizon, you're in the Admin section and you've clicked the Create Image button under Images.  You then selected an ISO image or similar from somewhere and you allowed that to download.

At this point then, it wants you to "create an instance" (a.k.a. "spin up a virtual machine from this image").  Upon doing so, OpenStack then will throw the work to the scheduler which will attempt to filter the existing available nodes and find a good place for this to be placed.  If it's successful it will virtualize a server and install the image you downloaded.  I'm guessing that you're not at this step yet.

On the cluster controller--on mine at least--I often...

cat /etc/maas/maas.log|grep nameofnode

...or I might...

juju debug-log -n 500|grep nameofnode

...to see what's going on.

On the nodes themselves (other than the cluster controller), you'd want to...

ssh Ubuntu@nameofnode.domain

...and then look in the /var/log/maas folder area, especially looking for the words "cloud-init" in the filename(s).


New Ubuntu, combining two separate primary partitions

Here we go...

FIRST, backup any data on sda3 and sda4!

Boot to a Ubuntu Live DVD/USB and start gparted

right-click on partition sda4 and delete it
right-click on partition sda3 and select move/resize
place the mouse pointer in the center of the partition, and the icon will change to a hand
drag the partition all the way to the left
drag the partition's RIGHT HANDLE all the way to the right
click the APPLY icon
reboot, and restore any sda4 data to sda3


Non-persistant user sessions with hard disk

I believe you can run your distro as live from hard disk itself. You can create manual entry in grub2 as per the instruction in given link run-linux-live-images-from-hard-disk-in-linux. But still i am searching for a way to make it persistent. I hope that helps.


"Libkmod: EROR... ignoring bad line" start-up issue

It magically stopped showing error when the Linux start-up after i deleted file and restarted a few times. I don't know the reason why it required few restarts.


The adduser command creates a home directory for the newly added user by default.
The command sudo adduser bob returned a Couldn't create home directory `/home/bob': Permission denied error message because you are already root at the command line prompt and don't need to use sudo to obtain root permissions from the # command line prompt. Please close the terminal and reopen it. Then sudo adduser bob will run from the $ command line prompt without an error. If you only have access to a root user account that shows you a # command line prompt, then adduser bob without sudo will work after reopening the terminal or else try running exit to try to exit from running with root privileges, but it might just close the terminal window instead because your current user is root@IU.


problem to push volume beyond 100% on Ubuntu GNOME

Press Ctrl+Alt+T to open a terminal and as an admin user type:

sudo chmod +x /usr/bin/volume150.sh

When you double-click it, it will ask you to execute or display.  Click execute, but that's not the default behavior. Open the Settings for Nautilus aka Files and make your choice for Executable Text Files

When you assign a keyboard short-cut to /usr/bin/volume150.sh it'll have the same effect as double-clicking it.


I was having the same problem,

'www-data' is the user which performs the file operations here. Assigning proper permissions for www-data can solve the problem.

Try this :

sudo chown -R www-data:www-data /path/to/your/directory/

in your case -

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

I was using nginx on ubuntu 14.04 , I hope this works for apache too.
and chmod 777 is dangerous ,avoid it.


Why bonding does not improve network speed?

To reach the ~20Gbps transfer bandwidth with LACP bonding (mode 4) one needs to connect the server to more than one client, The maximum transfer speed of one client is capped to the speed of an individual channel (10Gbps /client max. in the above case). LACP "Does not increase the bandwidth for a single conversation"; LACP "Achieves high utilization only when carrying multiple simultaneous conversations" as from the slide 7 from the presentation of the gurus:  http://www.ieee802.org/3/hssg/public/apr07/frazier_01_0407.pdf and the same question here: https://serverfault.com/questions/569060/link-aggregation-lacp-802-3ad-max-throughput/569125#569125


How to delete Ubuntu files loaded on Vmware permanently to increase disk space c

From a recent article (January 2018) you can make Ubuntu partition smaller and then give the free space to Windows. Here is the link to the full article: How to Resize Ubuntu Partition Without data loss in Ubuntu & Windows?. The link has many steps complete with screen shots. There are two different methods in the link:

Method 1: Change Ubuntu partition size using GParted with Linux.
Method 2: Resize Ubuntu partition without data loss with Eassos PartitionGuru within Windows.

After making Ubuntu partition smaller, you can then expand the Windows partition to fill the void:

How to Expand or Extend Windows 7/Windows 8 Partition without Data Loss


Why am I unable to restart or shutdown my computer from the LightDM login screen?

If you are already logged into another user account, then try to restart or shut down without logging out of all accounts first, the machine may prevent shutdown from occurring in order to protect the possible loss of those users' data. I agree it should offer a dialog with some explanation, however.

You should try filing a bug that thoroughly describes the current behavior and how to reproduce it, as well as what you might have expected to happen instead. (You can easily do this if you have a Launchpad account by running ubuntu-bug lightdm in the terminal.)

Also, don't forget to edit a link to the bug back into your question so future visitors can locate it easily and mark themselves as affected.


I think before you execute the dd command. You should execute the lsblk command to see which drive your USB is located. After that, you can do what you have just done. However, this time, try with the following style:

sudo dd bs=4M if=path/to/your/*.img of=/dev/sdx (x is the letter of your drive) && sync

Edit: This method will only work on Linux, so you have to do it in another way for Macintosh.

diskutil list > list out all the drive in your system.
diskutil unmountDisk /dev/diskN > identify your device and unmount it (In your case, I believe that drive is /dev/disk1)
sudo dd if=/path/to/downloaded.img of=/dev/diskN bs=1M


Okay, I digged some further into the issue. I already suspected the programmability of the G300 might have something to do with it. And when you enter

xinput list, it shows the G300 as both a mouse and a keyboard. In my case the G300 keyboard entry has id 12.

xinput list-props 12 gives all properties of the G300 keyboard. It includes this line:

  Device Enabled (146): 1

which means that if we set the property with id 146 to a value of 0 for device id 12, the G300 keyboard is disabled.

Using

xinput set-prop 12 146 0

http://ubuntuforums.org/showthread.php?t=1849041&highlight=g300


"ata2: link is slow to respond, please be patient" during boot

It turned out that my broke DVD/CD drive caused that error.


Where is the configuration file of a lxc container?

A bit late, but in case someone else is - like I was - searching for an answer to this "obvious" question:

The config file for a privileged container seems to be in /var/lib/lxc/${containerName}/config.


Where do I put a .desktop file so the launcher can always show it?

You can copy the .desktop into ~/.local/share/applications

Basically you're doing the end steps of this:

How can I edit/create new launcher items in Unity by hand?

After this the application will show up in the Dash, then you can either drag it to the launcher or run it and right click "Lock to Launcher".


Since what you want is, essentially, simple, the sane thing to do is just revert all your changes instead of using third parties which can be too complicated. Just copy the /usr/share/doc/apt/examples/sources.list file to /etc/apt/ and remove the files in your /etc/apt/sources.list.d directory. Or, in simple commands:

sudo mv /etc/apt/sources.list{,.bk}
sudo mv /etc/apt/sources.list.d{,.bk}
sudo mkdir /etc/apt/sources.list.d
sudo cp /usr/share/doc/apt/examples/sources.list /etc/apt/sources.list
sudo apt-get update

That will restore the original sources.list file, without complications.


does t include in explorer search as we do in windows 7

If you are asking if a File Manager is available in Ubuntu which includes file searching like Windows Explorer then the answer is YES. Ubuntu comes preinstalled with Nautilus a very popular n powerful file manager.