How can current Ubuntu versions be installed via PXE network boot and an automated installation?

Introduction
Instead of having a small package specific to the task, it's now necessary to use the regular full ISO image. Only the server installer Subiquity can be automated, so it's required to use the server image even for a desktop installation.
The following steps are for the current version 20.10 (Groovy Gorilla). For future versions, replace all occurrences of 20.10 by the version number you want to install.
Prerequisites
Prerequisites on the server machine that is going to serve the PXE files, installer image and autoinstall configuration:

A working TFTP server and corresponding DHCP configuration
A working web server
Having the packages pxelinux, syslinux-efi, syslinux-common installed

Serving the ISO image and autoinstall config

Download the full live server image: wget https://releases.ubuntu.com/20.10/ubuntu-20.10-live-server-amd64.iso
Copy the ISO image to your web server
Create a directory on the web server to hold the autoinstall configuration. Create the files meta-data and user-data in the directory.
Write your autoinstall configuration to the file user-data by using https://ubuntu.com/server/docs/install/autoinstall-reference as a reference

Preparing and serving the PXE environment

Go to the directory your TFTP server serves, by default /srv/tftp

Copy the ISO image downloaded in the previous section to the current directory

Create some directories that we are going to use in the following steps: mkdir -p iso_mount init boot/uefi boot/bios pxelinux.cfg

Mount the image and extract the kernel and initrd:
 mount -o loop ubuntu-20.10-live-server-amd64.iso iso_mount/
 cp -p iso_mount/casper/vmlinuz init/
 cp -p iso_mount/casper/initrd init/
 umount iso_mount

Prepare the PXELINUX files for booting via UEFI as well as via BIOS:
 # UEFI
 cp -p /usr/lib/SYSLINUX.EFI/efi64/syslinux.efi boot/uefi
 cp -p /usr/lib/syslinux/modules/efi64/ldlinux.e64 boot/uefi
 cp -p /usr/lib/syslinux/modules/efi64/libcom32.c32 boot/uefi
 cp -p /usr/lib/syslinux/modules/efi64/libutil.c32 boot/uefi
 cp -p /usr/lib/syslinux/modules/efi64/vesamenu.c32 boot/uefi

 # BIOS
 cp -p /usr/lib/PXELINUX/pxelinux.0 boot/bios
 cp -p /usr/lib/syslinux/modules/bios/ldlinux.c32 boot/bios
 cp -p /usr/lib/syslinux/modules/bios/libcom32.c32 boot/bios
 cp -p /usr/lib/syslinux/modules/bios/libutil.c32 boot/bios
 cp -p /usr/lib/syslinux/modules/bios/vesamenu.c32 boot/bios

Configure your DHCP server to set the boot filename to boot/uefi/syslinux.efi for UEFI clients and boot/bios/pxelinux.0 for BIOS clients

Create a PXELINUX config at pxelinux.cfg/default similar to the following. Replace the URLs in angle brackets by the URLs to your web server: Replace <iso url> by the URL to the ISO image and <autoinstall url> by the URL to the directory containing the autoinstall configuration (including a trailing slash!).
 DEFAULT vesamenu.c32
 PROMPT 0
 NOESCAPE 1

 MENU TITLE PXE System Installation

 LABEL Ubuntu 20.10
   MENU LABEL ubuntu_20.10
   KERNEL ../../init/vmlinuz
   INITRD ../../init/initrd
   APPEND root=/dev/ram0 ramdisk_size=1500000 ip=dhcp url=<iso url> autoinstall ds=nocloud-net;s=<autoinstall url>

Link the PXELINUX config into the boot directories for UEFI and BIOS:
 ln -s ../../pxelinux.cfg boot/uefi/pxelinux.cfg
 ln -s ../../pxelinux.cfg boot/bios/pxelinux.cfg

Conclusion
You should now be able to boot both UEFI and BIOS clients via PXE into the Subiquity installer, which will then run automated according to your autoinstall config.
Desktop installation
If you are installing a desktop system, it's necessary to install the ubuntu-desktop package.
You'll also need to fix the network configuration in the installed system, since Subiquity enables systemd-networkd instead of NetworkManager, which is normally used on desktop systems:

Remove the network configuration created by Subiquity: rm /etc/netplan/00-installer-config.yaml

Create a file /etc/netplan/01-network-manager-all.yaml with the following contents:
 # Let NetworkManager manage all devices on this system
 network:
   version: 2
   renderer: NetworkManager

Run netplan apply or reboot


yes. the  problem in 16.04 only. some pon code allows us to connect but still by that way, ubuntu app store not finding the connection. It is serious problem for DSL connection users


Ubuntu 12.10 gets stuck at startup (laptop)

I'm facing this problem too. However, it helps to move your mouse during boot. Doesn't happen when grub is in hidden boot. If you aren't multibooting, try edit /etc/default/grub to enable hidden boot.


Snap-installed Krita's icon keeps disappearing from launcher when upgrading

This bug is fixed as of core 16-2.28.5 (3247) (may also be fixed in 16-2.28.1 (3017)) and krita 3.3.1 (27).

At least, when I switch between krita 3.3.1 (27) and krita 3.2.0-beta.2 (25), the Launcher icon remains locked to the Launcher.

(Please comment if my answer is incorrect)


There is a crackling sound each time I mute or unmute the sound

There is something in your audio chain that is incorrectly (de)activated when sounds starts or stops, you should try to reinstall the audio related drivers as well as programs like ALSA. When such options don't help, use this page as a troubleshoot guide.

I've recently fixed such a problem on Windows, so it should be fixable in a similar way on Ubuntu.


Could anybody recommend me some games for my kid in ubuntu?

Ri-Li
Ri-li is an arcade game licensed under the GPL (General Public License). You drive a toy wood engine in many levels and you must collect all the coaches to win.You can download it and play indefinitely. It's Free. You can play on 'Linux', 'Mac OsX', 'Windows', 'AmigaOS4'

1 small snag: there is no Ubuntu package for it so download the rpm package and convert using alien:
sudo alien - d -c Ri-li-2.0.0-1.i586.rpm

Also have a look at the gcompris  package.

GCompris is a large collection of educational games for small children (2-10). It is designed to be a unified interface to integrate more educational games.

Currently available boards include: learning how to use a mouse and keyboard, learning simple arithmetic, learning how to read an analog clock, recognize letters after hearing their names, reading practice, small games (memory games, jigsaw puzzles, ...).
Screenshots: http://gcompris.net/screenshots-en.html


Figured it out by myself. Installing Dell Alps Driver seems to work. Also needed to install gpointing-device-settings to be able set correct speed on the sensitive since the one in system-settings didn't do anything.

Everything work now, and xinput give me this:

axept@aXept-Lifebook:~$ xinput | grep point
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ PS/2 Mouse                                id=14   [slave  pointer  (2)]
⎜   ↳ AlpsPS/2 ALPS GlidePoint                  id=15   [slave  pointer  (2)]


Is the key acquired from running gpg --export-secret-key encrypted or cleartext?

When you import a key created by the --export-secret-key option, you get both the public & private keys; however, just like before you'll need the passphrase in order to use the private key. This is shown in the fact that you do not need your passphrase to run gpg --export-secret-key -a, and therefore the secret key never gets decrypted.

Personally, I would make sure to encrypt such an exported key again (perhaps symmetrically, with a long unique passphrase) if I was transporting or storing it.


Video tearing sorted now Low cube performance

The original questioner's comment on nate8nate's answer confirms that Ubuntu "10.10 with the new 260 Nvidia graphics driver" fixes the problems.


Ubuntu Latex community specify:

  TeX Live

  The preferred LaTeX distribution is the one that comes with TeX Live.
  This is a general TeX distribution that is actively maintained by the
  TeX Users Group.

You can use the information from here and install Tex Live:

Open terminal (Ctrl+Alt+T) and run command to add the PPA:

sudo add-apt-repository ppa:jonathonf/texlive

run command to install or upgrade to Tex Live 2016:

sudo apt update && sudo apt install texlive-full

You may install a text editor for Tex Live, such as Kile, TeXMaker, JLatexEditor. The PPA contains an update version of TeXworks that can be installed via command:

sudo apt update && sudo apt install texworks

How to Restore:

It’s always easy to uninstall Tex Live 2016 and downgrade to the stock version in official Ubuntu repositories by running command:

sudo apt install ppa-purge && sudo ppa-purge ppa:jonathonf/texlive


sudo service lightdm stop

Then a console appears and you can try again.

It's better if you write commands in a console that you can start by pressing Ctrl+Alt+F1.


Why does /usr/bin/mail ignore aliases in $HOME/.mailrc

I did:

sudo apt-get install bsd-mailx

and the problem went away. The mail programs provided by bsd-mailx support .mailrc aliases, while apparently the ones in mailutils do not.

Credit to mdpc (https://askubuntu.com/users/5863/mdpc) for leading me to this solution in his comment above.


Ubuntu/Kubuntu LTS: longer support for server packages

Yes, the server packages are what continues to receive updates.  How those packages got installed doesn't matter.  Note that if you want the kde desktop on a server, you might be better off installing the server edition, and then adding the kubuntu-desktop task instead of installing kubuntu, and then adding server packages.


Samsung wifi printer printing garbage after upgrading to 18.04

First install the suldr driver either by downloading it from the HP/samsung site, or via the https://www.bchemnet.com/suldr repository (see https://github.com/dorfsmay/laptop-setup-ubuntu-18.04/blob/master/idempotent/031-suldr-samsung-drivers). This is required to be able to use the scanner.

Then:

open a browser
navigate to localhost:631
click on "Printers" in top bar
click on name of the printer (Samsung...)
Click on the "Administration" drop down menu, and select "Modify Printer"
You'll be prompted for your user id and password, enter your Linux login credentials
select the first printer in "Discovered Network Printers", "Continue"
"Continue" again
select "Samsung XXXXX driverless cups-filters", "Modify Printer"

Now when you click again on "Printers" in the top bar, it should show "driverless" under "Make and Model"


Script to check if a program is running correctly

Redirect your scripts stdout to a file, something like:

my_program1.py > /tmp/log.1

Then in your script read the log.1 to see if it's as it should be.

If you want to see your scripts output on the terminal they're running at, then instead of redirecting the output to a file use tee.

my_program1.py | tee /tmp/log.1


Please do:

sudo apt-get purge bcmwl-kernel-source

the above command will remove the wl driver that is the wrong driver for your device.
The next command installs the b43 driver that your device needs.

sudo apt-get install firmware-b43-installer

Reboot

Go into network manager and remove wireless connections then reboot and set the settings to match the screenshots.

Also reboot your router.


I think you have two possibilities:

Analyze the error and fix it

It depends a bit on how deep you want to dive. This requires reading logs. The logs of a release upgrade should be in /var/log/dist-upgrade, if I recall correctly.

Just set up a new Ubuntu

This saves you from reading logs and gives you 20.04 without upgrading twice.
You would have to backup all your files and reinstall your programs, though.


Are there any for-pay (commercial) but open source applications in Ubuntu Software Center?

Yes, there are such commercial applications. You can install them via Ubuntu software center.

Just Open Software Center, Click the down arrow after All software catagory and select for purchase.

Please note, not all of the softwares in this catagory is open source. Some are proprietary too. You can see the licence type by clicking the more info button beside the Apps name.

And some proprietary Apps are provided for $0.0 i.e free in cost.

Example: One example of such applications is dupeGuru which requires $10.0 but is open source. (BSD-Licence)


What is your lock screen setting and sleep mode setting? i think there should be a difference.
For example if setting is as below:

Lock screen after blank for : Screen turns off
Blank Screen : 5 Min

In this case Your be blank after 5 min and once the screen will blank your system will be locked. You can make setting from these settings.


Telegram Icon is showing incorrectly on the unity panel

Open terminal and run this command:

/snap/telegram-sergiusens/3/bin/Telegram
Lock to launcher it will automatically create dash icon called  Telegram desktop
You can open with this icon it should fix the indicator icon.


How to setup Remote Desktop Client through VPN.

I am not sure I really understood your question but normally, you should only need to enter the hostname or IP address of the Computer you want to connect to in the Computer or Computer Name box and then click connect. The other boxes (Domain, Client Hostname...) are optional.

The box Protocol File allows you to put a file where you store the connection settings to make it easier next time. It is also optional.


slow Graphics on Ubuntu 18.04, on Dell(Intel graphics drivers), while watching Youtube videos

If you are watching the youtube videos within the browser and they are at a somewhat higher resolution, this is the expected behaviour. Keep in mind that none of the available web browsers on Linux support hardware accelerated video decoding, even if the underlying system supports it. Most people don't notice this because they have a CPU that is fast enough. They should notice though because this causes very high CPU usage and battery drain.

Unfortunately this is where all common Linux web browsers are lacking support compared to those on other popular operating systems.

The only way to work around that problem currently is to download the video in some way and watch it using a dedicated application that can make use of hardware accelerated video decoding, like mpv or vlc.

With mpv you can even directly copy the youtube URL from the browser window to the command line and stream the video:

mpv "https://www.youtube.com/watch?v=Hzyw6W_njls"

Do not forget the quotes. (using random video URL here for demonstration purposes). You can choose the format and codec parameters by specifying parameters like this:

mpv --ytdl-format="bestvideo[height<=?240]" "https://www.youtube.com/watch?v=Hzyw6W_njls"

Above would limit the video to a format with a vertical resolution equal or less than 240 pixels (240p). To list avialable formats use:

youtube-dl -F "https://www.youtube.com/watch?v=Hzyw6W_njls"

See the section about --ytdl-format in the mpv manual for more information.


Is there a way for me to talk by webcam with my friends who use Windows?

emesene  is a really good app for using msn on Ubuntu.

You can direcctly download it from the software center by clicking on the button below-


Can I save a copy of the LAMP stack locally?

You can install the packages for a LAMP stack (the Linux part is Ubuntu; the other packages needed are Apache, MySQL and PHP). Because you're using a LAMP stack, you should become familiar with using a console since most servers do not have a GUI for administration at all. So, to install the packages Apache, MySQL and PHP, run:

sudo apt-get install apache2 mysql-server php5

The webroot is stored in /var/www by default, if you're doing a new installation, create a separate partition for /var/www (choose for custom partitioning in order to get the option for it). MySQL databases are stored in /var/lib/mysql, you can create a separate partition for it in the same way as you did for Apache.

Configuration files are put in /etc/, so backup those:

Apache (module config, vhost, ...): /etc/apache2/
MySQL (server settings and administration password for MySQL): /etc/mysql/
PHP (php.ini files): /etc/php5/

With those files you can setup an identical LAMP stack after a re-install.

A single command for creating a backup named "lamp-backup.tar.gz" of the config files, webroot an databases:

sudo tar cf lamp-backup.tar.gz /etc/{apache2,mysql,php5} /var/www /var/lib/mysql

For the best results, stop the database before creating the backup by running sudo stop mysql. After the backup, the database can be started again by running sudo start mysql.

To restore the previously made backup (on a fresh installation), run:

sudo tar xf lamp-backup.tar.gz -C /

Do not forget to install the packages too.


installing windows 10 theme on gnome issue

Run command sudo su and enter the password, after check there will be another updation process is running in background find that process with 'top' command and kill that   'kill pid' and then run apt-get install windos-10-themes or restart your system and then run the same command


What is the name of the "username@hostname:~$" line?

It has been called the system prompt for as long as I can remember.

The part before the @ is the username, the part after it is the hostname.


If you have removed your swap file then ensure that in step 3 that you have commented out the swap file line (it will have 'swap' in the same line) and in step 4 comment out the first (and only)

Run this dpkg-reconfigure initramfs-tools and then restart and continue

lsblk -f command, and note the UUID's

Ensure that the UUID's in this file are right /etc/fstab -- sudo nano /etc/fstab

Ensure that the UUID's in this file are also right /etc/initramfs-tools/conf.d/resume. -- sudo nano /etc/initramfs-tools/conf.d/resume.

Run sudo update-initramfs -u and restart

Sources:
https://tinycp.com/community/show/solved-print-req-error-i-o-error-dev-fd0-sector-0,43.html#sidebar
https://lists.debian.org/debian-user/2017/09/msg00866.html


apache sends me to other/"nearest" page, when virtual host is not enabled?

You need a default virtual host, which will catch all requests that are not caught by any of the other virtual hosts. Just create a new VirtualHost block in your Apache configuration, preferably with no ServerName directive, and make sure it appears before any other VirtualHost block. If you use the default sites-available infrastructure in Ubuntu, put it in a file named /etc/apache2/sites-available/000-default.conf or suchlike.


How do I set Windows to boot as the default in the boot loader?

Customizing the /etc/default/grub file

There are two ways of doing this using editing a grub file. These are described in the Ubuntu Community Documentation Grub2 page

The two ways are:

Boot which ever operating system you booted last time, the "saved method"

This is the one I use.  It lets me decide which one I going to use and will allow me to reboot into that system, handy when I'm updating.

Boot a specific operating system by default.

The answer to your exact question.

Finding the menuentry to set as the new default

To start we need to find out what we are booting or want to boot. Open a terminal with Ctrl+Alt+t and type in

  grep menuentry /boot/grub/grub.cfg

user@YourComputer:~$ grep menuentry /boot/grub/grub.cfg
menuentry 'Ubuntu, with Linux 2.6.35-31-generic' --class ubuntu --class gnu-linux --class gnu --class os {
menuentry 'Ubuntu, with Linux 2.6.35-31-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
menuentry 'Ubuntu, with Linux 2.6.35-30-generic' --class ubuntu --class gnu-linux --class gnu --class os {
menuentry 'Ubuntu, with Linux 2.6.35-30-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
menuentry "Memory test (memtest86+)" {
menuentry "Memory test (memtest86+, serial console 115200)" {
menuentry "Windows NT/2000/XP (loader) (on /dev/sda1)" {
menuentry "Ubuntu, with Linux 2.6.32-34-generic (on /dev/sdb1)" {
menuentry "Ubuntu, with Linux 2.6.32-34-generic (recovery mode) (on /dev/sdb1)" {
menuentry "Ubuntu, with Linux 2.6.32-33-generic (on /dev/sdb1)" {
menuentry "Ubuntu, with Linux 2.6.32-33-generic (recovery mode) (on /dev/sdb1)" {
menuentry "Windows Vista (loader) (on /dev/sdc1)" {

You can see that the "saved" method can come in handy when booting multiple operating systems. Save the name of the entry you want e.g. Windows NT/2000/XP (loader) (on /dev/sda1), we need it later.

Editing the /etc/default/grub file

Type in the terminal

  sudo nano -B /etc/default/grub

and your password if asked. The nano editor will open.

A. Saved method - In my preferred way, I made the following changes from the standard grub file.

I changed the value of GRUB_DEFAULT to saved:

GRUB_DEFAULT=saved

I enabled the SAVEDEFAULT functionality by adding the following line:

GRUB_SAVEDEFAULT=true

B. Specific menuentry - In the way you are asking for

Change the value of GRUB_DEFAULT to the name of the Windows system you want to always boot. The name of the corresponding Grub menuentry can be found as described in the previous section.
I wanted to have Window XP always set as default at boot, I would set GRUB_DEFAULT to "Windows NT/2000/XP (loader) (on /dev/sda1)":

GRUB_DEFAULT="Windows NT/2000/XP (loader) (on /dev/sda1)"

Note: Some versions of Ubuntu require single quote (') vice double quote (").

You could also set GRUB_DEFAULT to the line number in the menu entry list (with 0 being the first), but when the kernel in Ubuntu is updated grub adds the new kernel to the top of the list, you would have to change the number, since Windows is the last one in the menu entry list.  You can see this in my menu entry list.

Update the boot configuration

Now you have to run

  sudo update-grub

to update the system generated grub.cfg file in the /boot/grub/ directory.

user@YourComputer:~$ sudo update-grub
Generating grub.cfg ...
Found background: /usr/share/images/grub/Apollo_17_The_Last_Moon_Shot_Edit1.tga
Found linux image: /boot/vmlinuz-2.6.35-31-generic
Found initrd image: /boot/initrd.img-2.6.35-31-generic
Found linux image: /boot/vmlinuz-2.6.35-30-generic
Found initrd image: /boot/initrd.img-2.6.35-30-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows NT/2000/XP (loader) on /dev/sda1
Found Ubuntu 10.04.3 LTS (10.04) on /dev/sdb1
Found Windows Vista (loader) on /dev/sdc1
done

Addendum

Notes on nano

nano is especally easy to use in the terminal.  Move around with the arrow keys.  Type in you addtions, delete the unwanted.

The -B or --backup option backs up the previous version of it to the current filename suffixed with a ~.  Very handy in case of the dreaded Fat pfinger effect.

When you are through, Ctrl+o will allow you to save your edits by hitting Enter and Ctrl+x will close.  These and other options are shown at the bottom of the terminal screen with the ^ indicating Ctrl.

^G Get Help    ^O WriteOut    ^R Read File   ^Y Prev Page   ^K Cut Text    ^C Cur Pos
^X Exit        ^J Justify     ^W Where Is    ^V Next Page   ^U UnCut Text  ^T To Spell

Notes about nano, sudoeditor and other editors

Some in the Ubuntu community suggest sudoedit instead of nano.  I recommend nano — which is the default sudoedit editor in later distributions of Ubuntu — instead of sudoedit, because the default can be overridden in non-obvious ways, unless you are an administrator.  sudoedit is safer in that it automatically saves a backup copy of the edited file, but the -B command line option in nano does the same thing.  nano is more intuitive than editors like vi or emacs, which are very flexible but require learning a lot of commands, shortcuts or different modes.

If you prefer not to use the nano editor and prefer the Gnome Text Editor, instead of sudo nano -B use gksu gedit.  I generally do this for large files, and /etc/default/grub could easily be considered a large file.  Thus type in gksu gedit /etc/default/grub instead of sudo nano -B /etc/default/grub.  Note that the Gnome text editor does not automatically make a backup!

Notes on my grub file

I made some changes to grub for my personal needs.  Such as the background picture of the moon launch.  How to do these are discussed at the Ubuntu Community Documentation page on Grub2, recommended.

Good luck!


If this is a cisco vpn you need vpnc. Simply installing vpnc gives you the client, which can be connected using terminal. If you want to integrate it with network manager you need the network-manager-vpnc package.
This link explains the installation and set up of vpnc
CISCO VPN configuration steps


Enabling onboard WiFi during USB install

If it's not detected automatically, it may use a proprietary driver and you'd have to install it over ethernet first and then enable the driver.


How to find out how many hours a drive has been used?

smartctl -A <device> as root from the command line will show you SMART parameter 9, "Power_On_Hours", if the drive supports it.


We can confirm this issue on with 12.04 running on a Samsung NC10. You may (partly) overcome this by installing the Voria tools for brightness adjustment from the following ppa:

ppa:voria/ppa

We are also able to read about these tools on the Voria Forums.

On our netbook these issues did not resolve completely, and are mostly present when the power cord is plugged in (i.e. the system does not reduce brightness by default). Then we are only able to reduce the brightness using the keys after having logged in blindly.

Additional note: as we observed a dependency of this issue from the lid position we believe there is a (mechanical/electrical?) hardware issue involved.


Aborted during 18.04 config phase, how to resume?

Turns out that I could log in using the second option under Advanced options for Ubuntu in the Grub menu. Once inside I ran the command sudo dpkg --configure -a and the configuration continued from where I had mistakenly aborted it. Everything works now!

I'll leave this up despite overlaps with other posted questions because of the slightly different situation.


Network card does not see router anymore

It looks like the wifi card may not being detected, or other errors are happening with it. Please sesee this link specifically covering broadcom wifi cards to see about installing drivers and troubleshooting it. https://help.ubuntu.com/community/WifiDocs/Driver/bcm43xx


There is no file there, so it's not gonna download obviously. Which version of Ubuntu do you have? Try running sudo apt-get update or download updates (see if they work, and from which server). If it doesn't work, download FF from mozilla.org.


First open the software center

Install v86d

Now Press Alt + F2 and enter gksu gedit

Now click on 'Open' and  Press the pencil button .

Now paste /etc/default/grub
Now Replace the line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" (Line no 11 according to gedit) with

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset       video=uvesafb:mode_option=1280x1024-32,mtrr=3,scroll=ywrap (you can replace 1290x1024 with your own resolution .

-Also replace #GRUB_GFXMODE=640x480 (Line 25 according to gedit ) with GRUB_GFXMODE=1280x1024

-Now your grub file looks like this

Save the file .
Now click open again and paste /etc/initramfs-tools/modules in the location .
Paste uvesafb mode_option=1280x1024-32 mtrr=3 scroll=ywrap at the end of the file (again you can replace 1280x1024 with your own resolution) .

Now create a new file and paste FRAMEBUFFER=y and then save the file with the name splash to /etc/initramfs-tools/conf.d .
Now Open the terminal (Ctrl + Alt + T) and paste this.

sudo update-grub2 && sudo update-initramfs -u
You are done!!

Source


How to Create a Full Install of Ubuntu 20.04 to USB Device Step by Step

Creating a Full Install of Ubuntu 20.04 to USB that works in both BIOS and UEFI
Following is based on a 16GB Target drive, adjust for larger drive.
This looks like a long list but, should take less than ten minutes to do the work. K1tty has done an excellent job clarifying many points in this answer, see https://askubuntu.com/a/1332619/43926

Create a Live USB or DVD using SDC, UNetbootin, mkusb, dd, etc. (See Note 1 at bottom)
Turn off and unplug the computer.
Unplug the power cable from the hard drive or unplug the hard drive from the laptop. (See Note 2 at bottom)
Plug the computer back in.
Insert and boot the Live USB or Live DVD. (Booting BIOS mode preferred).
Select Language and Try Ubuntu.
Insert the target flash drive.
Start GParted.
Unmount any mounted partitions.
Select Device tab and create a GPT partition table on the Target drive.
Create a 3GB NTFS or FAT32 partition on the right side, (optional Linux / Windows data partition, See Note 3 at bottom).
Create a 1MB partition on the left side, format as unformatted.
Create a 300MB FAT32 partition next to the 1MB partition.
Create a 7GB ext partition next to the 300MB partition.
In the remaining space create an ext4 partition, (optional for /home partition).
Apply All Operations.
Flag the 1MB partition as bios_grub.
Flag the 300MB partition as boot,esp.

Start Install Ubuntu.
Select Language, click "Continue".
Select Keyboard layout, click "Continue".
Select Wireless network, click "Continue". (optional).
Select installation preference and select "Download updates while installing Ubuntu", (optional), and Select "Install third-party software ...", click "Continue". (Optional).
If asked about mounted partitions, select Yes, click "Continue".
Do not use Advanced feature disk encryption for this install method. (See Note 3 at bottom).
At "Installation type" select "Something else", click "Continue".
Under Device for boot loader installation select the target drive.
Select partition sdx4 and click change, select use as Ext4, select format this partition, and Mount point = "/" then OK.
If asked to Write previous changes... click Continue.
Select partition sdx5 and click change, select use as Ext4, select format this partition, and Mount point = "/home" then OK. (optional).
Click Install now.

Confirm partitions to be formatted if asked, click continue.

Select your location. click "Continue".

Insert your name, computer name, username, password and select if you want to log in automatically or require a password. - Click "Continue".

Wait until install is complete.

Do not reboot or unplug the target USB.

Copy the boot and the EFI folders from the Ubuntu ISO file to the boot,esp partition sdx3.

If there any problems with permissions, etc, open Nautilus using sudo -H nautilus and try copying again.

Copy grub.cfg from partition sdx4 /boot/grub/ to partition sdx3 /boot/grub/ overwriting the grub.cfg file.

Re-Install GRUB:
sudo mount /dev/sdx3 /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sdx

Turn off computer and plug in the HDD.

Replace the computer's cover.

Note 1, Booting ISO Files.

If you want the USB to have the ability to boot ISO files using GRUB, create the boot drive using mkusb with the usb-pack-efi option. (this replaces GRUB 2.04 with 2.02).
Alternatively you can put rmmod tpm anywhere above the first menuentry in grub.cfg.

Note 2: Hard drive removal.

You may omit disabling the hard drive in BIOS boot if after partitioning you choose to install grub to the root of the USB drive you are installing Ubuntu to, (ie sdx not sdx1). Be cautious, many people have overwritten the HDD MBR as default location for boot loader is sda, any items in the internal drive's grub will be added to the USB's grub. You may do an update-grub later. If you leave the HDD plugged in with UEFI install, fstab may use the HDD's UUID for /boot/efi. In this case # or delete the /boot/efi.UUID line in fstab.

Note 3: Apple compatibility.

If you own an Apple computer make this partition FAT32.

Note 4: Encryption (optional).

For method of creating Full Encryption BIOS/UEFI USB drive see: How to Make BIOS/UEFI Flash Drive with Full Disk Encryption


That might be an DOS attack of your VNC service, you could change the default port 5901 to something else, this will probably minimize the problem if it's a DOS attack.

Another go at the issue, if it's still DOS related, is to let VNC server listening on local network interface and use SSH tunneling which also would give you increased security for remote access to your desktop.

Setup tunnel from your client to server using ssh command:

ssh user@at.your.server -L 5901:localhost:5901

and then connect to localhost:5901 using vncviewer on the client.


How do I launch Ubuntu after installation

After you have logged in in the terminal type:

sudo systemctl start graphical.target

and press Enter to bring up your default login screen and then login to your Ubuntu desktop environment as usual.

If you can't login to your desktop environment because of a kernel or driver issue, then you could try installing Crouton on your Chromebook instead of Chrubuntu. Crouton runs on top of Chrome OS and at the same time as Chrome OS. Therefore, it uses the kernel provided by Chrome OS, all the drivers from Chrome OS, and everything else that is provided by Chrome OS.

The other alternative is to stay with Chrubuntu and always start the login display manager from the terminal by running sudo systemctl start graphical.target if that works.


Choosing a Kernel type for arithmetic calculations

I use a lot of computation programs which use many arithmetic calculations. Which type do you think is the most performant in my case ?

The low-latency or realtime kernels are NOT relevant for computation-heavy applications; their use is when instant response to events is needed --- think audio recording on one end, and the Space Shuttle on the other end. In fact, a very preemption-sensitive kernel (what all those you linked to are) can end up reducing the performance of compute-heavy programs (because of all the interrupts that are generated).

If this is a purely computational/server system which is NOT used (or rarely used) as an interactive desktop, what you want is a kernel compiled with the CONFIG_PREEMPT_NONE option, the help for which says:

  Select this option if you are building a kernel for a server or scientific/computation system, or if you want to maximize the raw processing power of the kernel, irrespective of scheduling latencies.

You can also try setting a lower timer frequency than 1000 Hz (the default), but this will affect interactive performance (mouse/keyboard movements, etc.).

There are many other options you can tweak in the kernel config to incrementally improve performance for computation, but doing an overview of all of them is beyond the scope of an AskUbuntu answer :)

In short: stick with the regular kernel if you also use your computer as a desktop. The gains to be had with tweaking are usually minimal -- it's not like it will suddenly improve performance by 25%.


What should I do if all my PHP pages come out blank with Apache2?

I would look at the answer given at this question: PHP returning blank pages
which boils down to "Are your permissions correct?"
According to this question: https://stackoverflow.com/questions/2096255/what-permissions-for-php-scripts-directories, "You need to set the .php file's permissions to 640 for maxiumum security."


Ubuntu 18.04 | pulseaudio Daemon startup failed

I have this same issue.  Bloody annoying.
On my machine this appears to be due to pulseaudio already running, but possibly only responding to systemctl commands.  My temporary workaround to get sound going is:

$ ps aux | grep pulseaudio
kill all pulseaudio processes
$ rm -rf /.config/pulse/ (force pulseaudio to regenerate config files)
$ pulseaudio --start

Everything works as expected.
As mentioned previously, this is not an actual solution but it should get sound going until further troubleshooting happens.


Ubuntu 18.04 Desktop Remote Access Windows

I've been using RealVNC for a while now on mutliple platforms. For a VNC connection, definitely consider it. You can download it from here. It supports all common platforms including Windows, Mac, Linux, Android, iOS etc. Install RealVNC viewer on Windows, and RealVNC server on Ubuntu.


What does the asterisk and period do in find -name "*.mp3"?

The -name predicate takes a glob, not a regular expression.
In a regular expression, * would match zero or more of the preceding item. But since this is a glob, it matches zero or more of any character. That is, * in a glob means the same thing as .* in a regular expression.
In a regular expression, . would match exactly one of any character. But since this is a glob, it is not treated specially, and simply matches a literal . character. That is, . in a glob means the same thing as \. or [.] in a regular expression.
If you did want to match a single occurrence of any character in a glob, you would use ?. In a glob, ? means the same thing as . in a regular expression. This is quite different from ? in a regular expression, which matches zero or one of the preceding item (i.e., makes the preceding item optional).
The only syntax that's mostly the same in both globs and regular expressions is character classes enclosed in [ ]. For example, [aeiou] matches any character that is either a, e, i, o, or u. If you write a [ ]-delimited character class that works in most regex dialects, it's likely to be a character class with the same meaning when used in a glob, too.

Other than as the operand to find's -name and -iname predicates, another place where globs are widely used is by your shell. Unquoted globbing metacharacters are expanded by your shell automatically into a list of separate arguments corresponding to the filenames they match.
This is why it's important to quote such a pattern when passing it to find. If you don't, your shell will try to expand it. If your shell does expand it, find won't see the pattern itself, but instead the result of its expansion. This is undesirable and often confusing.
Note that your shell (probably bash, but this is true of Unix-style shells in general) will not, as its default behavior, expand ? or * to match a leading dot in a filename. For example, unless you've told it to behave otherwise, your shell expands ? to the filenames in the current directory that are one character long, other than . , even though a . entry is always present. And it expands * to the filenames in the current directory that don't start with .. (In bash, shopt -s dotglob would change this for the shell instance you run it in, and shopt -u dotglob would restore the default behavior.) It is only leading dots that are special, not other dots.
This differs from the behavior of find's -name and -iname predicates, where ? and * are always permitted to match a leading ..


How to map a key to another on my keyboard?

To make major changes to your keyboard, including remapping characters and changing modifiers, you need to use the xmodmap utility - see man xmodmap. There are a couple ways to execute the changes:

either from the command line

xmodmap -e "your commands"

or write the commands to a file like .xmodmaprc, then execute it in your login items or your .bashrc with

xmodmap .xmodmaprc

If you use the file ~/.xmodmap it will be executed automatically on login.

Alt and Super (the Windows key) are modifiers, and behave specially to the system. The keys will need to be unmapped from their modifier before you can remap anything else. The space bar is considered a regular key.

Unmapping the modifier

Open up a terminal window (Ctrl-Alt-T, if you're unfamiliar with it).

Run the command xmodmap -pm to get a list of the modifier keys on your system. In the output, the leftmost column is the list of modifiers available to the system. The other columns list the keys bound to these modifiers as pairs by keysym (keycode). For example, one line of my output is

mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)

The keycodes correspond to physical keys, and can (hypothetically) differ between keyboards. The keysym is the 'name' of a key. If the key is a printable character, the name corresponds to the character printed.

Now you have what you need to unmap a key from its corresponding modifier. I'm going to pretend we're working with Alt_R.

Run the xmodmap command (by one of the methods up at the top)

remove mod1 = Alt_R

Remap the space bar

Next we need to know what the spacebar is. Run xmodmap -pke in your terminal window. This will print out what every key on your keyboard is mapped to. Somewhere in that four or five screens-full is a reference to the space bar. We need its name in order to map a key to it.

Spoiler alert: the spacebar is named space

We still have a key named Alt_R, but it doesn't do anything. We can use its name to remap it to the spacebar. Run this xmodmap command:

keysym Alt_R = space

It might happen while you test these out that you've changed Alt_R's name already. Maybe you accidentally remapped it to the letter 'a'. You don't want to remap 'a' to something else, because you still need one of the keys with that name. If you end up in that situation, you can still refer to Alt_R by its keycode. Remember that on my keyboard this is 0x6c. It might be different for you. You can use this xmodmap command to change it:

keycode 0x6c = space

Good luck!


Reinstalling Ubuntu in my partitioned laptop

Anything can destroy your computer.   Now that is out of the way, you should be fine.  Pay careful attention to the drive letters. The install program should detect you have ubuntu installed already and give you an option to wipe it or keep most of your files.  Choose to do a new install and delete your data (for that partitioned drive).  Do not choose to format the whole drive.  This will wipe windows too.  Simple as that.  Make sure you have a 2 gb partition as SWAP before you start.  Make it suing gparted.  Non uefi is more safer by the way.  Lastly,  Do not tweak!  I speak with experience on this one and Lubuntu is more tempting to tweak.  (I am a die hard lubuntu fan now adays).


Network unavailable when resume from suspend after updating Ubuntu 20.04.1

Sounds to me like the first thing you should check is if your wireless interface is going into powersave mode maybe? So maybe first try to configure powermanagement referencing this KBA: https://help.ubuntu.com/stable/ubuntu-help/power.html.en if you hadn't done so before.
Wireless powersaving can be changed like this:
Create a file in /etc/pm/config.d named blacklist
gksu gedit /etc/pm/config.d/blacklist

and inside the file keep:
HOOK_BLACKLIST="wireless"

If you want to disable any other hooks, default hooks are located at /usr/lib/pm-utils/power.d/.
Per this KBA:How can I prevent iwconfig power management from being turned on?
It has some alternative ways to achieve the same thing in this post.
Hope that fixes it for you.
you might have to reboot after these changes.


How to exclude a folder when using the mv command

This doesn't have anything to do with mv, but is a bash feature, citing man bash:

  If the extglob shell option is enabled using the shopt builtin,
  several
         extended pattern matching operators are recognized.  In  the  following
         description, a pattern-list is a list of one or more patterns separated
         by a |.  Composite patterns may be formed using  one  or  more  of  the
         following sub-patterns:

  !(pattern-list)
            Matches anything except one of the given patterns

!(f1) matches f2 f3 in your example, so effectively you're doing:

mv -t f3/ f2 f3 f2

To achieve your goal you should rather do:

mv -t f3/ !(f[13]) # or !(f1|f3)

This expression matches everything except f1 and f3.

This also works with *, ? and […]:

$ ls
e1  e2  e3  f1  f2  f3
$ ls !(e*|?[12])
f3


Which intel graphics firmware version is in use & how to change that

Short Answer

To change the drivers in use you need to change your kernel version. However you shouldn't do this unless there are specific reasons to do so.

Long Answer

The install.sh scripts have been deprecated and are no longer used. Now there are blobs (Binary Large Objects) that simply need to be downloaded and then copied to /lib/firmware/i915. If you follow the link you posted you will see it has been changed from the last time you downloaded.

For instructions on installing the new blobs see: Updated kernel to 4.8 now missing firmware warnings

As far as quickly seeing which i915 drivers for Skylake you have installed (but not necessarily active for current boot) use:

$ locate i915/skl_
/lib/firmware/i915/skl_dmc_ver1.bin
/lib/firmware/i915/skl_dmc_ver1_23.bin
/lib/firmware/i915/skl_dmc_ver1_26.bin
/lib/firmware/i915/skl_guc_ver1.bin
/lib/firmware/i915/skl_guc_ver1_1059.bin
/lib/firmware/i915/skl_guc_ver4.bin
/lib/firmware/i915/skl_guc_ver4_3.bin
/lib/firmware/i915/skl_guc_ver6.bin
/lib/firmware/i915/skl_guc_ver6_1.bin
/lib/firmware/i915/skl_guc_ver9_33.bin
/lib/firmware/i915/skl_huc_ver01_07_1398.bin

I noticed in your link a new version skl_dmc_ver1_27.bin so I downloaded it and then ran:

$ sudo updatedb
[sudo] password for rick:
───────────────────────────────────────────────────────────────────────────────────────────
rick@alien:~$ locate dmc_ver1_27
/home/rick/Downloads/skl_dmc_ver1_27.bin
───────────────────────────────────────────────────────────────────────────────────────────
rick@alien:~$ sudo mv /lib/firmware/i915/skl_dmc_ver1_26.bin /lib/firmware/i915/skl_dmc_ver1_26.bin.old
───────────────────────────────────────────────────────────────────────────────────────────
rick@alien:~$ sudo mv /home/rick/Downloads/skl_dmc_ver1_27.bin /lib/firmware/i915/skl_dmc_ver1_27.bin
───────────────────────────────────────────────────────────────────────────────────────────
rick@alien:~$ sudo update-initramfs -u -k `uname -r`
update-initramfs: Generating /boot/initrd.img-4.14.42-041442-generic
W: Possible missing firmware /lib/firmware/i915/skl_dmc_ver1_26.bin for module i915
Adding /lib/firmware/i915/skl_guc_ver9_33.bin

So even though skl_dmc_ver1_27.bin is available it doesn't work with the Kernel 4.14 chain and it still looks for skl_dmc_ver1_26.bin. Ubuntu 18.04 uses the 4.15 kernel chain so apparently it is using skl_dmc_ver1_26.bin as well.

I just downloaded Kernel 4.17 which came out two days ago and it uses the new skl_dmc_ver1_27.bin driver:

$ sudo mv /lib/firmware/i915/skl_dmc_ver1_27.bin /lib/firmware/i915/skl_dmc_ver1_27.bin.old
$ sudo update-initramfs -u -k 4.17.0-041700-generic
update-initramfs: Generating /boot/initrd.img-4.17.0-041700-generic
W: Possible missing firmware /lib/firmware/i915/skl_dmc_ver1_27.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_dmc_ver1_04.bin for module i915
W: Possible missing firmware /lib/firmware/i915/cnl_dmc_ver1_07.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_ver9_39.bin for module i915
W: Possible missing firmware /lib/firmware/i915/bxt_guc_ver9_29.bin for module i915
Adding /lib/firmware/i915/skl_guc_ver9_33.bin

Notice how it's looking for /lib/firmware/i915/skl_dmc_ver1_27.bin

Summary

Kernel 4.14 uses skl_dmc_ver1_26.bin.
Kernel 4.17 uses skl_dmc_ver1_27.bin.
/lib/firmware/i915/skl_guc_ver9_33.bin is used by both Kernels 4.14 and 4.17.

You also asked: "What about guc and huc?" guc is answered immediately above. As far as huc is concerned the same version is used from Kernel 4.14 (and earlier) to Kernel 4.17:

rick@alien:~/Downloads$ sudo mv /lib/firmware/i915/skl_huc_ver01_07_1398.bin /lib/firmware/i915/skl_huc_ver01_07_1398.bin.old
───────────────────────────────────────────────────────────────────────────────────────────
rick@alien:~/Downloads$ sudo update-initramfs -u -k `uname -r`
update-initramfs: Generating /boot/initrd.img-4.14.42-041442-generic
W: Possible missing firmware /lib/firmware/i915/skl_dmc_ver1_26.bin for module i915
W: Possible missing firmware /lib/firmware/i915/skl_huc_ver01_07_1398.bin for module i915
Adding /lib/firmware/i915/skl_guc_ver9_33.bin


gedit keeps some of it's preferences in gnome registry.

You can see them if you spawn gconf-editor and visit /apps/gedit-2

To export use sth like

gconftool --dump /apps/gedit-2  > gedit.settings

then copy the gedit.settins file and import with

gconftool --load gedit.settings

(or play with ~/.gconf directory but it may be less safe)

Update: some of the attributes may be not set just for gedit, but more generally. A few searches in gconf-editor may help locating them.


The webserver sends mime-type text/html, while you filter by mime-type text/css.

This does obviously not work. Either filter by text/html (which will include all html), update the mime type for CSS, or use AddOutputFilter for css file extension:

AddOutputFilter css


Ubuntu 18.04 boot loops into initramfs. Can't find disk partitions

Change the SATA settings in the BIOS setup utility from RAID mode to AHCI mode.


Browsing internet and using other applications during a distro upgrade?

No, in general it's not required to close applications before distro upgradation. But it's recommended because during upgradation process tons of libraries will be upgraded (mostly this happens as, first remove old one and then install uptated lib), and that may cause problems during application's runtime if it is using the library(s) that is going to be updated, which results in exception and data loss.


Nagios Notification via Ubuntu notify-osd

I don't know of any plugin (and I don't use Nagios), but it shouldn't be too hard to roll your own (as you mentioned your experience with Nagios and custom checks)...

The notify system is quite easy and called from the terminal (or script) via notify-send "summary" "body".

If you can the check of your hosts via a script, combining the notify and Nagios check shouldn't be too difficult.

That script could then be put into an indicator if you want and there are plenty of examples; in particular I've written indicator-fortune which simply displays a fortune in the notify-osd and will give you a good start in getting an indicator with notify.


No ATI HDMI Audio. Ubuntu 13.10. A10-6500k

OK so answering my own question here. I should have looked at this before I tried all the things I tried. On the ASRock FM2A88X-ITX+ the HDMI audio is disabled by default. That's it.


Unfortunately this is a known bug in KDE, where the font size of the shutdown dialogue is not affected by system settings. Please vote for the bug on the bug tracker if you would like it fixed.

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


Ubuntu installation not showing correct HDD size

This is simple and classic confusion of base 10 vs base 2.  For decades the computer industry defined the term "Kilobyte" to mean 1024 bytes rather than 1000.  Hard drive manufacturers like to inflate their numbers to sell more units, so they define it to be 1000, thus when they say a 320 GB drive, they mean a drive with 320,000,000,000 bytes.  In base 2 units, that is only 298 GiB.  Note the addition of the 'i' as in recent years the trend is to use this to indicate it really is base 2 rather than base 10, as one might expect with "GB".


Why Ubuntu 15.04 with kernel 3.19.0-15 is using significantly more power?

This is a kernel bug reported here: https://bugzilla.kernel.org/show_bug.cgi?id=92111 (many thanks @DougSmythies)

Workaround: add acpi_osi= to the kernel cmdline in /etc/default/grub e.g.:

GRUB_CMDLINE_LINUX="hid_apple.iso_layout=0 elevator=cfq acpi_osi="

run sudo update-grub afterwards and reboot.

This will most likely disable thunderbolt.


There are a few options:

lspci will show you most of your hardware in a nice quick way. It has varying levels of verbosity so you can get more information out of it with -v and -vv flags if you want it. The -k argument is a good way to find out which kernel driver a piece of hardware is using. -nn will let you simply know the hardware ID which is great for searching.

But it is only a very simple, quick way of getting a list of hardware. I often ask people to post the output of it here when trying to identify their wireless hardware. It's great for things like that.

It doesn't show USB hardware other than the USB busses.

Here are three real world examples:

Graphics:

$ lspci -nnk | grep VGA -A1
03:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF110 [GeForce GTX 580] [10de:1080] (rev a1)
    Kernel driver in use: nvidia

Audio:

$lspci -v | grep -A7 -i "audio"
00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Kabini HDMI/DP Audio
    Subsystem: Acer Incorporated [ALI] Device 080d
    Flags: bus master, fast devsel, latency 0, IRQ 34
    Memory at f0940000 (64-bit, non-prefetchable) [size=16K]
    Capabilities: <access denied>
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel

--
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller (rev 02)
    Subsystem: Acer Incorporated [ALI] Device 080d
    Flags: bus master, slow devsel, latency 32, IRQ 35
    Memory at f0944000 (64-bit, non-prefetchable) [size=16K]
    Capabilities: <access denied>
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel

Networking:

$ lspci -nnk | grep net -A2
00:0a.0 Ethernet controller [0200]: NVIDIA Corporation MCP79 Ethernet [10de:0ab0] (rev b1)
    Subsystem: Acer Incorporated [ALI] Device [1025:0222]
    Kernel driver in use: forcedeth
--
05:00.0 Ethernet controller [0200]: Atheros Communications Inc. AR242x / AR542x Wireless Network Adapter (PCI-Express) [168c:001c] (rev 01)
    Subsystem: AMBIT Microsystem Corp. AR5BXB63 802.11bg NIC [1468:0428]
    Kernel driver in use: ath5k

lsusb is like lspci but for USB devices. Similar functionality with similar verbosity options. Good if you want to know what's plugged in.
sudo lshw will give you a very comprehensive list of hardware and settings.

It gives you so much information, I suggest you pipe it through less or output it to a file and open that in something you can move around in:

sudo lshw | less

Of course this is usually a lot of information. You often only need info on a small subset of your hardware and lshw will let you select a category. If you just wanted to see your network devices, for example, run this:

sudo lshw -c network

If you want something graphical, I suggest you look at hardinfo. You'll need to install it first:

sudo apt-get install hardinfo

You then just run it from the same terminal with hardinfo. I don't know that it has a menu location by default.

But it can give you slightly more information (boots, available kernels, etc) than the other options, as well as giving you similar lists of PCI and USB hardware like the first two commands.

It also provides some simple benchmarking. I think the developers aim to make it a replacement for Sandra (a popular Windows hardware information gathering tool).

It even has options to output a nice report that you can send to somebody (though it can easily be too much information).


I guess you haven't used a shebang  (#! /bin/bash as the first line of your script). In that case, the script is run using /bin/sh, which is /bin/dash. And echo in dash doesn't support the non-standard -e (have a look at the POSIX standard). You really shouldn't use echo -e. Use printf instead for far more portable behaviour. See Why is printf better than echo`? on Unix and Linux. The following commands should behave identically:

bash -c 'printf "%s" "Enter your name"'
dash -c 'printf "%s" "Enter your name"'


How to create a desktop shortcut in Unity?

For Unity
You can search for the application you like to create a desktop shortcut for in the dash and drag it to the desktop. It is best done when your dash is not fully maximized and there are no maximized windows in the background as well.

For Unity-2D
Currently, you can't drag and drop from the dash to create a desktop shortcut. A bug report has been filed regarding this behaviour.
However, you can use gnome-desktop-item-edit to create a new desktop shortcut.
Enter the following command in a terminal:
gnome-desktop-item-edit Desktop --create-new

You will then get the above pop up. Enter the command and other particulars of the application that you are trying to create a desktop shortcut for.


Watermark all pdfs in folder with the file's name

Create a script gedit /home/user/folderwithpdfs/pdfstamp.sh, which will generate watermark.pdf file with shortened filename's text inside as a watermark:

#!/bin/bash
text=${1?missing text to show}
# Restricts string to 15 symbols from start, without extension and folder's path
mtext=$(echo ${text:0:15} | sed 's/.pdf//' | sed -e 's,.*/,,')
angle=45 # in degrees counterclockwise from horizontal
grey=0.75 # 0 is black 1 is white

ps2pdf - - <<!
%!PS
/cm { 28.4 mul } bind def
/draft-Bigfont /Helvetica-Bold findfont 72 scalefont def
/draft-copy {
        gsave initgraphics $grey setgray
        5 cm 10 cm moveto
        $angle rotate
        draft-Bigfont setfont
        ($mtext) show grestore
 } def
draft-copy showpage
!

Place it to folder with pdf files
Run the next command inside the folder with pdf files, which will create watermark.pdf file each time, apply it to current file and output it to the new file:

for f in ./*.pdf
  do ./pdfstamp.sh "$f" > watermark.pdf
  pdftk "$f" stamp watermark.pdf output "$f.pdf"
done

The command will create filename.pdf.pdf files with watermark of file names but without extension and with 15 symbols length.

Script mostly created by @meuh.

Result:

The next variant of the command will place watermark to the background, so it could look like transparent:

for f in ./*.pdf; do ./pdfstamp.sh "$f" > watermark.pdf && pdftk "$f" background watermark.pdf output "$f.pdf"; done

But this method has a downside: this watermark could be covered over by images.


Try restarting the Network Manager by running in terminal:

sudo systemctl restart NetworkManager.service


Is there wubi.exe that can support ubuntu-12.04.2-desktop-amd64?

Yes. It's available here: http://people.canonical.com/~evand/wubi/precise/wubi-r273-signed.exe

It's been fixed for the bug you are experiencing, but not yet released. See Wubi fails to detect 12.04.2 and 13.04 AMD64 ISO


Properly Configure Video Driver on Ubuntu Mate 16.04 on VirtualBox (mac)

I just had problem with VirtualBox on my 2016 13" MBP when the whole system was very slow and laggy. I used the same settings as you. I solved the issue by using Parallels Desktop Lite from App Store instead of VirtualBox. It is for free when you are only going to use Linux and runs very smooth. Hopefully it helps


How to permanently chmod a+w to usb scanner?

In a number of cases I have seen using gscan2pdf from the Ubuntu Software Centre works more intuitively than simple scan and others.


xorg-edgers PPA doesn't seem to include fglrx-installer package

The packages you might be looking for in this PPA are fglrx and fglrx-amdcccle.

But I recommend making a backup of your Ubuntu parititon, for example using Clonezilla, before trying this PPA.


Boot up problem: P FIFO DMA_PUSHER MEM_FAULT

OK ... I don't know how much this is going to help the community, perhaps someone with more knowledge than myself can figure out why this is the case, but:
Solution

on a hunch (remembering that I had successfully installed 12.04 to this machine previously, I decided to try it again rather than install 13.04
I had also installed that with a different optical drive (which was now installed into another physical machine)
to save time, I ran the data from one box to the other rather than pulling out the drive (I had no other spare optical drives that worked)
I installed 12.04 with that alternative optical drive .. and it booted up just fine after the install
I then installed 13.04 (again using the alternative drive), and once again success.

... so it appears the issue was entirely caused by the DVD drive not correctly reading data, and whatever fault was caused, was not a big enough fault to raise any flags during the install process, and only at boot-up was it apparent there was an issue.
FOLLOW UP?

I have neither the skill knowledge nor experience to know how to do this ... but it seems to me that is a flaw in the install software, if it can go through everything not raising a single flag that a problem exists of this type

Is there some way to detect such an issue during the install program running, and could this be incorporated into a future release of ubuntu?

UPDATE - REMAINDER OF SOLUTION

booting up with all 4 ram chips was still failing
rebooted to grub screen & selected advanced options to get a safe command line
followed a hunch that all this was somehow relating to graphics drivers (despite this machine having worked perfectly on a previous installation of Ubuntu
followed graphics driver update advice here ("[drm] nouveau 0000:04:0.0: PFIFO_DMA_PUSHER" in the kernel.log file and the boot freezes)

sudo apt-get install nvidia-current

computer successfully rebooted after this, though with low-resolution graphics on post & grub screens etc.
found this video describing how to solve low-res text in grub (http://youtu.be/RfwVWU84cnQ) ... but this only changed the grub options screen, and all the text following remained low-res
found various conflicting posts about how to solve, but finally found this one which worked: https://help.ubuntu.com/community/ChangeTTYResolution
followed instructions: "FOR 9.10 KARMIC KOALA AND LATER"
everything works perfectly now :-)


Is gpointing-device-settings in Ubuntu 16.04?

It is not in the repos for 16.04 but it is available on launchpad

Install from the .deb with

sudo dpkg -i gpointing-device-settings_1.5.1-6ubuntu2_amd64.deb


Ubuntu Core 16 and Ubuntu 16.04 are both LTS releases and thus fully supported until april 2021 (5y) with the option to buy "extended security maintenance" (ESM) for another 5 years ...

there is a java runtime environment https://snapcraft.io/java-jre-ondra that you should be able to use on armhf core installations.


how do i paste something from buffer Directly to file using terminal in ubuntu?

You can use cat, with a here document e.g.

cat > somefile

hit Enter then paste from the default buffer with a middle click or standard terminal emulator shortcut Ctrl+Shift+V, and terminate the input with Ctrl+D.

Ex.

$ cat > somefile
foo
bar
baz
^D

Use >> in place of > if you want to append to somefile instead of overwrite it.


Ubuntu 16.04 Ran out of space unable to recover

Read your output carefully:

Your /boot is only at 25%. It's not full. That's not the problem.
Your / is at 100%. Completely full. That's the problem.

Deleting packages might help a little, but not much (sudo rm /var/cache/apt/archives/*). Sometimes doing that creates other problems ("oops, I needed that!"), so don't nuke your package cache first.

Check your /var/log for runaway log files (1GB or more). Don't simply delete a huge log - read it and figure out the problem. Fix the problem that causes the log to grow.

Otherwise, look for files you can delete or archive to another media. If you encrypt the archive, keep the key you used in a safe, recoverable place. You may not remember it years from now.


What is the shortcut to open the folder in ubuntu 20.04.2lts?

If you hit the window key and start typing it should find the file. You can then click on it to open.


USB-C headphones not working despite being listed as audio device

Sounds to me like, a channel that is not seen by the user accessable puleaudio controls is muted.

Open a terminal:

cat /proc/asound/cards
#Take note of what is there.

Run alsamixer:

alsamixer

You will now see a user interface. In this user interface, you can do the following:

Select your correct sound card using F6 and select F5 to see recording controls as well
Move around with left and right arrow keys.
Increase and decrease volume with up and down arrow keys.
Increase and decrease volume for left/right channel individually with "Q", "E", "Z", and "C" keys.
Mute/Unmute with the "M" key. An "MM" means muted, and "OO" means unmuted. Note that a bar can be 100% full but still be muted, so do check for this.
Exit from alsamixer with the Esc key.


(Unity desktop) My applications became darker for unknown reason

Similar problem was solved for me with a full-upgrade. Some mesa related libraries, adapta-gtk-theme and xserver-xorg-core were updated with some additional libraries.


How do I update a program installed from a manually-downloaded deb package?

A better solution would be to add the oracle virtualbox ppa as described here

Add the following line to your /etc/apt/sources.list:

deb http://download.virtualbox.org/virtualbox/debian xenial contrib

(or even better to a new .list file in /etc/apt/sources.list.d)
The Oracle public key for apt-secure can be downloaded here. You can add this key with

sudo apt-key add oracle_vbox_2016.asc

or combine downloading and registering:

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -

The key fingerprint is

B9F8 D658 297A F3EF C18D  5CDF A2F6 83C5 2980 AECF
Oracle Corporation (VirtualBox archive signing key) <info@virtualbox.org>
<info@virtualbox.org>

To install VirtualBox, do

sudo apt-get update
sudo apt-get install virtualbox-5.1

If you want to stick to the cumbersome unlinuxy manual way, please try it using the command line, so that we can see which package would break.

dpkg -i package-file-name


How to hide my presence in the Friends app?

Perhaps it not directly related to Ubuntu and it's kind of workaround but I hope it helps. Create group of friends let's say "nochat". In group "nochat" put fake account or some friend you'll never talk. Then go into advanced settings of chat and put that group of friends in field: "Turn on chat for all friends except...". In that way it wouldn't matter if you are online or not. When you want to use chat simpy delete that group from advanced settings. :)


Software with foldable/expandable view of multiple txt/md files

It seems that VNote will suite your needs.

See official screenshot below:

You can download it and use as AppImage:

cd ~/Downloads
wget https://github.com/tamlok/vnote/releases/download/v2.4/VNote-2.4-x86_64.AppImage
chmod +x VNote-2.4-x86_64.AppImage
./VNote-2.4-x86_64.AppImage


These are my current speeds, but bear in mind I'm not doing much.

So I have a 2220 RMP and a 1046 RPM. You can double those if I'm doing something. Right now I have 17.7 GB of RAM used, and 1 CPU. I'm running a Virtual Box.

I think your first speed is fine, and the second one is suspicious - I think that is a sensor error. What is the temperature like?


How to install TP-LINK TL-WN722N on Ubuntu?

Without a lot more information, it is impossible to propose a solution. After we have more details, I will edit this answer to add a solution.

Does the driver load automatically, as expected? Check:

lsmod | grep ath

If not, try to load it and see if there are any errors or warnings at the terminal:

sudo modprobe ath9k_htc

If it loads without complaint, check to see if a wireless interface, ideally wlan0, was created:

iwconfig

If no wlan0 is created, see if the message log has any clues:

dmesg | grep -e wlan -e ath9k

Finally, in some cases, the wireless switch for an internal device will prevent a USB wireless from working. Check to see if the switch is stopping the USB:

rfkill list all

I wonder if the firmware is corrupted. I notice:

  usb 1-3: ath9k_htc: Transferred FW: htc_9271.fw, size: 11233

However, on my system, the size is different:

-rw-r--r-- 1 root root 51272 Nov 24 10:42 /lib/firmware/htc_9271.fw

Please edit your question to add the result of:

ls -al /lib/firmware/htc_9271.fw

If it is not of the size 51272, let's reinstall the firmware package:

sudo apt-get install --reinstall linux-firmware

Then reboot and check:

dmesg | grep ath9k

With further details, we will proceed.


Command syntax is given in a form that is a bit like Backus-Naur notation, described here.

The braces group together two or more options, one of which must be specified.
In the case of -I { keyword [,...] | ALL }, that means you either specify keyword [,...] or ALL.


Will compizconfig settings manager be included in Natty?

No, ccsm will never be installed by default. It is quite possibly the worst UI ever invented. It is completely autogenerated so every setting of a certain type is treated identically even if they make no sense to be shown that way. Settings depend on each other in ways the UI can't handle for you and putting the wrong values in for some of the settings will leave you with a desktop that does not work.

It is strictly a poweruser "break my toys" tool and always will be. That said, hopefully the Unity folks cook something up for adjusting the settings they deem worthy of adjustment. I could see a nice little UI for adjusting number of workspaces, launcher autohide, and maybe a couple more somewhat common options.


For 13.10 Go to files then click on Preferences

Then

For 14.04 Go to files, then click on Edit --> Preferences

Click on the Behavior Tab, and then click on Single Click to open items.  See image below

Try sudo apt-get install --reinstall nautilus


Terminator 1.91 terminal emulator overwrites existing output in Ubuntu 18.04

vim and the other graphic editors that run in the command-line window change your "TTY settings" to make their grphics easier for them, fully intending to change them back when they exit. When you stop them with SIGSTOP they don't get to restore the "TTY settings". Read man stty.

Commands that will help:

stty sane
stty echo


I did it with:

sudo apt-get install php-xml
sudo service apache2 restart

This confirms xmlwriter is installed:

php -i | grep "xml"


BIOS mode is absolutely fine. I have never head of "The CLASSIC INSTALLATION" of Ubuntu. There's Gnome Classic, which is a desktop environment. To switch to Unity log out, and where you login there should be a little icon. Click the icon and select "Ubuntu". Then you should start in Unity.

You can take a look here for other desktop environments.


Changing the ownership and permissions of system files is not a good idea and can result in this particular case you may be able to "get away" with this change, in general changing ownership and permissions on system files is asking for problems ranging from security to system failures.

You should edit the files as root

# Command line
sudo -e /path/to/php.ini

# Graphical
gksu gedit /path/to/php.ini

If you do not have root access talk to your system administrator.

See https://wiki.ubuntu.com/RootSudo for further information.


Getting my old files back after installing ubuntu

All current partitions were removed and yes you can undo that operation later if you wish. The next screen informs you that the partitions will be formatted. I hate to tell you but your data is gone.


Those are more or less harmless.

The first one is about a missing GTK engine.

For your specific error:

sudo apt-get install gtk2-engines-pixbuf

To find the package in error:

sudo apt-get install apt-file

Search for the module name that is given in your error i.e. prefix with lib and suffix with .so - so in your example pixmap, you need to search for libpixmap.so

apt-file find libpixmap.so

This will give the package to install e.g.

gtk2-engines-pixbuf: /usr/lib/i386-linux-gnu/gtk-2.0/2.10.0/engines/libpixmap.so
libgtk2.0-0-dbg: /usr/lib/debug/usr/lib/i386-linux-gnu/gtk-2.0/2.10.0/engines/libpixmap.so

The second one happens because the root user (/root directory) doesn't have a .local directory. You can create it by running:

sudo mkdir -p /root/.local/share


While trying to install Ubuntu on my chromebook I get the "illegal option" error

You misread the instructions for installing Ubuntu on a Chromebook. The correct command is supposed to be:

sudo sh ~/Downloads/crouton -e -t xfce # the -e flag is optional and can be omitted

Where a tilde character ~ instead of a hyphen is used as an abbreviation for your home directory. (example: ~/Downloads is equivalent to /home/your-username/Downloads)


You need lvm and dmraid in your initrd. Obviously you are using an nvidia "RAID" controller chip (is this a server?). This chip needs software in the OS that supports this raid - only then the raid is available in the OS. (as opposed to "real" raid controllers that present the raid as disk to the OS).


How to minimize all windows except Conky?

Here is the script minallwin.lua (made in the lua language)

-- shebang for running in several platforms
--  #!/bin/sh
--  _=[[
--  exec lua "$0" "$@"
--  ]]

f = assert (io.popen ("wmctrl -lp"))
for line in f:lines() do
    w_id = string.sub(line,1,10)
    i, j = string.find(line,"conky")
    if (i == nil) then
        os.execute("xdotool windowminimize " .. w_id)
    end
end -- for loop
f:close()


What are the pros and cons of installing and running Ubuntu from a microSD card?

I think the limit is the card reader and not the card.

But how about you install a persistent system an that card. This way it's like a live system and more parts are loaded into memory. The boot takes longer but should be faster in use.

Writing to the card won't be very fast. But I think that's an option to try.


For Ubuntu 10.04 and below

You have to know the ID of your device, so enter the command lsusb in a terminal. It will show you a list like this, remember the ID number (e.g. 083a:a701). You can unplug/plug until see the correct one.
Unplug the adapter!
In the terminal enter the following command:

echo 'install rt2870sta modprobe --ignore-install rt2870sta ; /bin/echo "XXXX YYYY" > /sys/bus/usb/drivers/rt2870/new_id' | sudo tee /etc/modprobe.d/rt2870sta.conf

Replace XXXX with the values before the colon : and YYYY with the values after it, respectively. And don't modify anything there, because the rt2870sta chip will work for you.
Enter the followings commands:

sudo modprobe -rf rt2870sta
sudo modprobe rt2870sta
dmesg | egrep 'rt28|usb|Phy'
Connect the adapter and done

Now it should be working, if you enter iwconfig you should see something like this

If you have problems restarting the system, edit the file /etc/rc.local with sudo gedit /etc/rc.local and add modprobe rt2870sta before the last line (exit 0).

NOTE: this guide was published by JJ in this thread. As I didn't test, I do not give any guarantee of its operation.


How to run scripts as user (not as root) in lightdm?

su [username] -c [command to run]

Replace the bracket instances above with:

username                 = your user name
script/command to run    = The name of the script you're want to run as you.


How can I assign a middle button press to a specific key in my laptop?

To remap the menu key you will need to-do the following.

install prerequisites

Install package xkbset:

sudo apt-get install xkbset

define keyboard layout

Next you need to define what keyboard layout you are using.  In my case gb for a british/united kingdom keyboard layout or us for United States

setxkbmap -layout gb

Note: if you run

setxkbmap -query

it will give you the output as follows - if the model and layout is your keyboard then you are using the correct layout

rules:      evdev
model:      pc105
layout:     gb

Next define that we will be next mapping mouse keys:

xkbset m
xkbset exp =m

find Menu key-code

Map the Menu key.  To do this we need the Menu key-code.   In a terminal run xev, move your mouse inside the square and press the Menu key.

End Result

In my case my Menu key-code is the value 135 and this will be mapped to Mouse Button 2

xmodmap -e "keycode 135 = Pointer_Button2"

Tested as follows:

Copy some text in a terminal  - Paste action initiated
Hover mouse over title bar - Window move to background

Putting this all together:

Ok, once we've worked out the correct keycodes, we can put this together to start from login.

First create a file in your home folder called remapkeys

gedit ~/remapkeys

now copy and paste the following

#!/bin/sh
setxkbmap -layout gb
xkbset m
xkbset exp =m
xmodmap -e "keycode 135 = Pointer_Button2"

Save.  Give the file execute rights

chmod +x ~/remapkeys

Then from Dash search for Startup Applications or if using Gnome Classic - Applications - Other - Startup Applications

Add a new Startup Applications entry

The command should be:

bash -c "sleep 5 && ~/remapkeys"

The command sleeps for 5 seconds to allow your desktop to appear before running your new script - if your desktop doesnt appear within 5 seconds (maybe you are using a slow netbook?) then increase this timeout to 10 or 15 seconds.
Logout and login to test.


How to manually specify document scanner IP address

I forgot that I had run a shell command at some point on 16.04 to get it to work:
brsaneconfig4 -a name=FRIENDLY-NAME model=MODEL-NAME ip=xx.xx.xx.xx

Not sure what it does, but it's done the trick for 20.04 as well.
Note: This is after installing the relevant Brother scanner drivers.


if I log in Guest session and someone connect on my web cam

I don't think main account person can see the webcam because we are switching between accounts and guest session scope will be up to that session only


MacBookPro display issue when booting via USB stick to live mode

I can't figure out the reason for the issue, and yes, I was able to reproduce it with my friend's Macbook as well. Yet I couldn't find any explanation online.

As a workaround, I plugged in an external monitor to be able to view the desktop and get through the install steps. Once the installation succeeded, I updated grub per instructions in the document linked above. After rebooting to the installed Ubuntu, the psychedelic glitch did not reoccur.

(Since I ran the installation with the "Update from the internet" feature enabled, I'm suspecting that some video driver patch was applied during installation.)


Install the package x11proto-xf86vidmode-dev by sudo apt-get install x11proto-xf86vidmode-dev and then retry launching the game.


Why isn't md raid assembled after reboot?

Support for intel fakeraids is new to mdadm in 14.04.  Previous Ubuntu releases used dmraid to activate them.  Note that unless you are dual booting with Windows, you should avoid the fakeraid stuff entirely and just stick to native mdadm.


How can I update Visual Studio Code on Ubuntu?

The following commands work for me:
wget 'https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64' -O /tmp/code_latest_amd64.deb
sudo dpkg -i /tmp/code_latest_amd64.deb

Place those two commands into an executable Bash script called auto-update-vscode, and you can simply run that from your shell any time Visual Studio Code says it's out of date.


zsh: read:-p: no coprocess error while using read command with -p flag

The usage is not compatible between shells.

As explained in man zshbuiltins, the way to emit a prompt string for a zsh read command is to append it to the identifier name after a ?:

          If the first argument contains a `?', the remainder of this word
          is used as a prompt on standard error when the shell is interac‐
          tive.

So for example

 % read name\?"what's your name? "
what's your name?

(the ? needs to be escaped here to prevent the shell treating it as a globbing character) or

 % read "name?what's your name? "
what's your name?

See also:

read command in zsh throws error
ZSH: Read command fails within bash function “read:1: -p: no coprocess”


Free codecs: How to use FFmpeg to convert my mp4s to ogv under Xenial?

First install FFmpeg by running the following in a Terminal window:

sudo apt-get install ffmpeg

Then change to the same folder as your mp4 file(s) and run either of the following:

1. For a single mp4 file:

ffmpeg -i input.mp4 -c:v libtheora -qscale:v 6 -c:a libvorbis -qscale:a 5 output.ogv

Of course change input.mp4 to the actual filename of your input video file!

2. For many mp4 files:

mkdir ogv && \
for j in *.mp4
do
 ffmpeg -i "$j" -c:v libtheora -qscale:v 6 -c:a libvorbis -qscale:a 5 ogv/"${j%.mp4}.ogv"
done

Options to experiment with:

-qscale:v (for video quality) takes integers from 0 - 10 with 0 being lowest quality and 10 the highest quality
-qscale:a (for audio quality) takes integers from 0 - 10 with 0 being lowest quality and 10 the highest quality

And enjoy the feeling of using libtheora and libvorbis, both codecs completely unencumbered and totally free :)

References:

FFmpeg Wiki: Theora & Vorbis


how to find the current version of gnome

Type

gnome-shell --version

in a terminal


Trouble installing ubuntu wubi 12.04 on windows xp dell dimension 3000

It sounds like this computer has issues with recent versions of Ubuntu e.g. here or here.

Now the first time you installed Wubi, it sounds like it used the diskimage install method (if you run wubi.exe standalone with no ISO). This does not use ubiquity. So if you want to try that, I'd suggest removing any Ubuntu ISOs first (i.e. Ubuntu DVDs, USBs, ISOs in the same folder as wubi.exe as well as ISOs on the root of any drive - because Wubi finds these).

Then make sure you have the latest 12.04 wubi.exe from here: http://releases.ubuntu.com/12.04/ (because they get updated from time to time on an LTS release and the old ones won't work). That's the lightweight way to install with Wubi. It will still download the 500MB diskimage (if you're concerned about bandwidth).

But if you are okay with partitioning and don't need the Unity desktop, then skipping Wubi and using lubuntu or xubuntu will probably perform better on your hardware. For the longterm this is your best bet, because Wubi is being phased out and seems to get corrupted more easily due to running off a virtual disk.


showing error in update in ubntu 16.04.2

A quick check indicates that Xenial isn't present there so your attempt to access anything for Xenial at that location fails: As you can see the directory structure here has no Xenial directory whatsoever at the time of writing this answer.


Firstly, you can upload anything you want to Launchpad. The bzr tool doesn't care what is in it, but it handles textual content best (e.g. any source code) but it can also upload images, audio, video and more.

When you create a new directory for a project and you want it to be a bzr branch, be sure to initialize it so bzr can track it in with version control (if you are using Quickly to create your app, it already did this for you).

To initialize it run:

cd <your project directory>
bzr init

If you are pushing to bzr push lp:~clem11388/pictureadventure/trunk it also presumes http://launchpad.net/pictureadventure exists (which it looks like it does).


How to disable automatic suspend warning

One workaround posted on launchpad is a script that is based on the hooks of pm-utils:

sudo wget -O /etc/pm/sleep.d/20_kill-notify-osd https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/1232454/+attachment/3942236/+files/20_kill-notify-osd
sudo chmod +x /etc/pm/sleep.d/20_kill-notify-osd

Another workaround might be the following method:

Download a script and make it executable:

wget -O ~/.suspendwarning.sh https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/1232454/+attachment/3942095/+files/myscripts
chmod +x ~/.suspendwarning.sh

Add it to ~/.bashrc:

echo "if [ -f ~/.suspendwarning.sh ]; then
. ~/.suspendwarning.sh
fi" >> ~/.bashrc

After logging out and in the notifications should not pop up anymore after resume.


How to install Ubuntu on an old laptop missing its built-in display

Yes, provided that your installer machine has the capability to connect the laptop HDD, then your approach to pull the laptop HDD, install Ubuntu onto the HDD using another machine, then put it back onto the laptop, should work, as  I have also done that.

My old laptop install

I had a Lubuntu live USB and wanted to install to an old laptop that was so old it lacked Boot-from-USB support.

So I transferred the laptop HDD to a desktop computer that could support boot from USB, plugged in the Lubuntu live USB to this desktop, installed Lubuntu to the laptop HDD, then placed the laptop HDD back into the laptop and the old laptop started Lubuntu just fine.

Not sure about what hardware you have, but for me

laptop: 2.5" laptop HDD form factor, 2.5" IDE connector
desktop: 3.5" form factor, 3.5" IDE connectors

The key piece of hardware I did have was a 2.5" to 3.5 adapter

looks like a black rectangle with many, many pins, and one Molex connector for power
cost around $5 at a local computer shop
Plus for some reason at the time I needed, but lacked a jumper, so just improvised a jumper by cutting a small piece of an aluminum pop can and folding it over the required pins to bridge a connection.

So this adapter enabled me to borrow my desktop machine to connect with the 2.5" laptop HDD and let me install Lubuntu.

So, be sure to check if you need an adapter, as that seems to be the only possible obstacle that I can think of for your situation.


If the version you installed 2 years ago is not listed here (11.04 for example), it is no longer supported and you should update to a newer release of Ubuntu.

To find your version of Ubuntu, press Ctrl + Alt + T and type lsb_release -a then Enter

Source here, plus @Powerlord's comment below


How do I pin the lowlatency kernels so apt doesn't update with a newer generic kernel?

sudo apt-get autoremove --purge linux-image-generic

If you don't ever want to use the pure -generic kernel image, then simply remove it. You might also have to separately remove the actual kernel image, as well as this meta-package. Just make sure you have a usable kernel image installed before removing some of them. Then apt will simply not update that which is not installed.

The -generic kernels do not supersede the -lowlatency kernels. However, the last kernel that was installed, becomes the default. You will still have the -lowlatency kernel installed, and you can still choose it within the grub boot menu, or even change it to be the default again.


BOOTMGR missing after installation of Boot-repair: Ubuntu 14.04 onpre-existing Windows 7

Semi-easy (I think)

Grab your Windows 7 Install Disc and repair the Windows install. It will automatically recreate the boot table.
Grab your Ubuntu Install Disc and open a commandline. In that, type sudo grub-install /dev/sda.
Boot into Ubuntu and  open up a commandline. Run sudo update-grub


Ralink RT 3290 Bluetooth Problem on Ubuntu 16.04

I use Ubuntu 16.04 (Kernel 4.8)

Run

sudo apt-get update
sudo apt-get install build-essential linux-headers-generic

Download zip from here on GitHub and unzip it to Desktop.
Change your directory to new unzipped directory (i.e. ~/Desktop/rtbth-dkms-master).
Run the following commands one by one

make
sudo make install
sudo cp -r ~/Desktop/rtbth-dkms-master /usr/src/rtbth-3.9.3
sudo dkms install rtbth/3.9.3
sudo nano /etc/modules

Add rtbth at the end, then Ctrl+O and ENTER (to save the file) and Ctrl+x to close the editor
Reboot

Ref : https://askubuntu.com/a/828925/703994 ; https://askubuntu.com/a/904222/703994


The Cairo 2D vector graphics library uses X11 and the X renderer as backend. There are no dependencies on OpenGL.


How to add separators to static quicklists in Unity?

You can put your own separator with em-dash characters buts its not an "Official" separator as per Jorge Castro's answer,and, will have a slightly different look.  Insert a shortcut group for the separator. For example:

[sep Shortcut Group]
Name=———————————
TargetEnvironment=Unity

Note that I named my separator group "sep" so you need to place "sep" (wthout quotes) into the "Ayatana-Desktop-Shortcuts=..."

Example:

X-Ayatana-Desktop-Shortcuts=Home;Desktop;Documents;Music;Pictures;sep;Win

This will place a separator below my Pictures shortcut and above my Win shortcut.
With gedit, the emdash is achieved by pressing Ctrl-Shift+U2014 (Use keypad & ensure num-lock is ON).  It is then easier to clipboard copy this character & then pasting it (using Ctrl-V) multiple times. (9 or 10 of these is good enough).

Also, you may notice that the "sep" shortcut group has no need for an Exec= line as there is no need to execute anything.


I solved the problem, as I suspected the issue was linked to the installation of fcitx-hangul.

I opened tty using ctrl+alt+F2 and removed fcitx and its dependencies, and was able to boot without any further issue.

I have no further insight as to why fcitx crashes my system, but reinstalling fcitx-hangul crashed my system again as soon as I switched the keyboard layout to Korean, and then again on boot.


Is there a tool in Linux or GIMP to dynamically lay out a grid of images for scrapbook cutouts?

I'm not sure if this is exactly what you're looking for, but photocollage
seems to do a pretty good job with a bit of tweaking (reducing the border size and hitting regenerate until you're happy).


Why does Inkscape become unresponsive all of the sudden and how can I stop it from happening?

The problem seems to be related to this bug report: https://bugs.launchpad.net/inkscape/+bug/785701, and the problem seems to be Inkscape trying to access files that are currently unavailable to it (files that may be on network shares or external disks that are currently umounted or disconnected).

Mark Roth's answer on that launchpad page had a good suggestion to run "strace inkscape" from the terminal in order to see what happens when Inkscape freezes.  You may find that, rather than restarting the system, you can instead mount the disk with the file Inkscape is having trouble stat-ing then try starting up Inkscape again.


Wifi does not work on Dell Inspiron N5520

I'm sorry. I can understand some Russian, but not answer in Russian.

Make sure that wi-fi is activated both on the keyboard, if it has a way of deactivating it, and in the network menu in Ubuntu.

If it still does not work, another option is to install 'Wicd network manager' on the computer. It might work better.

To give you better help, it would be necessary to look into system logs to find out why it is not working. I hope that Wicd can help you.


I was right. Adb works ONLY in usb debugging mode. I installed custom recovery then Android. I turned my usb debugging on and it works. So there is nothing wrong with Ubuntu; it's an Android problem.


First I recommend you to upgrade to Ubuntu 12.04LTS. To know why Ubuntu uses more battery power you could look into this site.

You can improve your battery life by installing Jupiter.

It is designed to improve battery life of a portable Linux computer by integrating with the operating system and changing parameters of the computer based on battery or powered connection.

You can install Jupiter by typing the following commands.

Open a terminal window (alt+ctrl+t) and type

sudo add-apt-repository ppa:webupd8team/jupiter

sudo apt-get update

sudo apt-get install jupiter

i advise you to check out this "link" about Power Saving Tweaks.

You can also install powertop which is a Linux tool to find out what is using power on a laptop. you can get it here.


Where does popcorn-time store downloaded movies

In Ubuntu 16.04, I found it to be under

/tmp/Butter

Popcorn time deletes the files when you close it. In advanced settings you can enable the setting(Clear Tmp folder after closing app?) if you have accidentally disabled it.


Emulate Right Click on Touchscreen in Ubuntu 13.10

It looks like Ubuntu Unity currently only supports 3/4 finger touch gestures https://wiki.ubuntu.com/Multitouch and only on a limited number of screen devices https://wiki.ubuntu.com/Multitouch/HardwareSupport...

However, it is suggested you can use Ginn to define custom gestures. See How to support right-click in Ginn on https://wiki.ubuntu.com/Multitouch/Ginn (it's not much of an instruction but it indicates it should be possible...)


No Acer laptop is certified by Ubuntu
Nonetheless, it will almost certainly work just fine - you can try it out by creating a Live USB and booting from that; that will essentially let you run Ubuntu from a USB stick, so you can test out all your hardware works fine without actually having to install the OS. Once you're happy it works, you can go ahead and install.


Does Ubuntu have a clipboard that works differently from Windows?

The problem with text vanishing from the LibreOffice clipboard in Ubuntu is discussed in some detail at this question: Clipboard: vanishing text on the Ask LibreOffice website where David says in his answer:

  This is a system level issue, not to do with LibreOffice actually.

So you should either save your documents before you close them, or else leave the document open until you have made sure that whatever you cut has been pasted correctly. You could check your /home/{your-username}/.config/libreoffice/3/user/backup directory to see if you might have an older version of your document there.


How to diff multiple files across directories?

diff -qr {DIR1} {DIR2} does all files in both directories.

q shows only differences
r does recursive. Leave it out if you do not need that

You can not tell diff directly to use wildcards but you can add:

-x PAT  --exclude=PAT
    Exclude files that match PAT.

-X FILE    --exclude-from=FILE
   Exclude files that match any pattern in FILE.

to exclude files. So if you only want *.cpp the easiest method is to create a textfile that lists all the files that are not *.cpp. You can do this with the following command:
ls -I "*.cpp" > excluded_files where the -I "*.cpp" argument ignores all the .cpp files. Note that the quotation marks are necessary.


How to upgrade from 8.04 (hardy heron) to the latest upgrade

You should install anew. Yes, there is a procedure on how to update the Ubuntu that old to a new one. But you need to be an experienced linux user to solve the problems that arise.
So - back up the data you need and install Ubuntu from zero up, with erasing and formatting the partition you want to install it to.


Standard GNU grep recognises BRE (basic regular expressions) and * is an original metacharacter in BRE while + is an extension to BRE. For + to be recognised as a metacharacter in BRE, it must be escaped. However, if you tell grep to use ERE (extended regular expressions) by using the -E flag, you do not need to escape any metacharacter (if you escape them, they will become literals instead). There's a bit of explanation in the grep manual and here's a more detailed overview

$ grep -E 'hi +hello' test
hi hello
hi  hello

You can also use egrep

$ egrep 'hi +hello' test
hi hello
hi  hello

I decide whether to use BRE or ERE based on the total number of backslashes I will have to type...


sudo update-grub not working: failed to get canonical path of `/boot/grub/unicode.pf2'

(I guess that sudo dpkg -i /var/cache/apt/archives/*.deb fixed it? :O )


Wireless connected, IP fetched, but no browsing

Made it work. If you're an AspireOne 722 owner, the best thing to do is:

First: follow the steps on the link below, be sure to install the open source video drivers, since it also installs drivers for several devices on your netbook:

UBUNTU - INSTALLATION OF ACER ASPIRE ONE 722 (AO722)

Second: run those on terminal:

sudo apt-get purge bcmwl-kernel-source broadcom-sta-common broadcom-sta-source
sudo apt-get install b43-fwcutter firmware-b43-installer

If it does not work still, reset your router to factory settings. Running the code brought my broadcomm back to live. Before the factory reset, the router worked fine with wired and wireless connections BUT both the netbook and an iPad, connected fine but refused to browse.


Recently installed Ubuntu, having issues with multiple display setup

So, personally I don't own this laptop, however I spent some time looking around. What I found was this:

https://help.ubuntu.com/community/AsusZenbook#HDMI

That help section basically says that if you want to use external displays, you'll need to leave them unplugged until you are booted up and logged in, which is what you've experienced. This seems to be an issue with the Nvidia Optimus drivers. If I find anything else in regards to this, I'll update my answer.

As for your second issue, you could get the Nvidia Optimus drivers fully updated.

This gentleman appears to have a solid tutorial on how to get those installed and configured:

http://www.linuxveda.com/2015/07/16/how-to-install-drivers-for-nvidia-optimus-cards/

I'd post his instructions, but they are rather long.

That may be worth a shot, though I'm not sure what nvidia drivers you are currently using. You should also checkout Bumblebee on Ubuntu (I'd post a link but I'm currently limited to two links).

Hope that helps!


You need to have the plugin installed.

sudo apt-get install uwsgi-plugin-python3


The type of tilde expansion you want is performed in reference to the current user of the shell. For example, when you log in as root ~ is /root. If the script runs before you log in, then ~ cannot be expanded to the directory you want.

Use the full path to the file in your script.

For future reference, here are some useful examples of using tilde expansion in scripts


GPT partitioning on a bios/non-efi motherboard with a SSD

On a sub-2TiB disk, the advantages of GPT are modest, but real. The gdisk documentation site you referenced includes information on those advantages.

If your motherboard is really only two years old, it almost certainly does use EFI. EFI became nearly universal in mid-2011. In fact, many Intel boards used EFIs well before then. Many of these implementations have user interfaces that look just like older BIOSes, though. I've got an Intel motherboard that's got just one EFI option buried somewhere in its menus, so it's easy to overlook. When enabled, the computer boots in EFI mode; when disabled (the default), it uses its Compatibility Support Module (CSM) to boot in BIOS/CSM/legacy mode.

If you boot from GPT in BIOS mode with GRUB 2, a BIOS Boot Partition (signified by a bios_grub flag in parted and related tools) is strongly recommended, although there are ways to boot without it. A BIOS Boot Partition is not required when booting in EFI mode, or with boot loaders other than GRUB 2.

When booting in EFI mode, an EFI System Partition (ESP), identified in parted by a boot flag, is required. (Note that a GPT disk's boot flag is entirely unrelated to the boot flag on an MBR disk.) Note that a disk can contain both a BIOS Boot Partition and an ESP. Setting up the disk in this way can enable you to switch boot modes relatively easily, so if you're not sure what you want to use, preparing the disk this way makes sense.

SSD partition alignment is a bit tricky. Many SSDs are happy with the same 1MiB (2048-sector) alignment that's the default for most modern partitioning programs. Others require something higher, like 1.5MiB or 2MiB. You'll need to research your specific disk to be 100% sure of what's required.


You should select manual partitioning and create one huge partition format it as ext4 and mount it as /

Then left about 2-3 GB of space for a swap partion (WHICH YOU DON'T CREATE YET)

|-----------------------|
|Root FS /     | free2GB|
|-----------------------|

Then proceed and ubuntu asks if you are sure not to create swap. Say Yes.

I the system now works fine and you can use it, you can create the swap afterwards

For example: Start gparted and create an swap parition in the freespace

Then do a swapon /dev/sdXXX (XXX the newly created partition)

Now you can check if this has worked with free
If everythink works you can add the swap to the fstab file to be automounted after a restart.