As gnome-terminal doesn't really have the configuration options you require, you will need to use a more configurable terminal emulator such as rxvt-unicode (urxvt), which allows you to change just about everything possible, including individual font hinting and anti-aliasing settings.

sudo apt-get install rxvt-unicode

After you have installed it, it can be run as urxvt. You must create an ~/.Xresources file in your home folder and specify all your settings there (or ~/.Xdefaults can be used instead). After editing that file each time you must run

xrdb -merge ~/.Xresources

so that the settings take effect and you can use the terminal with those new settings straight-away when it is restarted. If occasionally this does not clear urxvt settings properly and reload your new ones, logout and login again.

The urxvt manpage is just full of information that explains how to configure your terminal, but we will concentrate on the font settings here, as that is what you are interested in.

All options in your ~/.Xresources file are often specified in this basic format:

URxvt.option:value

although there will often be a number of variations on that pattern, as noted in this piece about urxvt configuration.

Find the list of fonts installed in your system with fc-list, or glance at gnome-terminal's list for reference. There are some good examples of font configuration in this article. A modified example from that article is similar to my setup (except that I have antialias=false):

URxvt.font:xft:Ubuntu Mono:pixelsize=14:antialias=true:hinting=true:hintsyle=hintslight
URxvt.boldFont:xft:Ubuntu Mono:bold:pixelsize=14:antialias=true:hinting=true:hintsyle=hintslight

These lines should go in your ~/.Xresources file along with all your other customisations.

There are many more possibilities (DejaVu Sans Mono is a good font as well), but this example specifies the font options you wanted such as anti-aliasing and hinting. It should get you started on developing your own urxvt configuration. Be aware that some fonts might not display correctly in urxvt, and perhaps not all fonts on your system are xft fonts, although you can only specify the options you want with xft fonts.


This was a typo in the instructions.  It should be libgsl0-dev. They erroneously substituted a numeric one for the second letter "l"


Is there any difference between sudo password and the one I used to login?

sudo, by default, asks for your password, which is the password you use to login. On the other hand su ask for the password of the target user which, unless specified, defaults to root. Note that by default Ubuntu has an invalid password field set for root, effectively making it impossible to login as root.


Use woeusb in Ubuntu to create a Windows Boot Disk from an ISO.

$ sudo add-apt-repository ppa:nilarimogard/webupd8
$ sudo apt update
$ sudo apt install woeusb

Update:
The winusb had been renamed woeusb in the webupd8 repository.


"Hard Blocked" refers to your "fn" keys on your laptop. Press "fn" along with the wifi button to toggle wifi on and off. Rfkill cannot override this switch. Don't feel bad if this is the problem I did the same thing the first time this happened to me.


Environment variables not working in Ubuntu 14.04

Every time you execute command:

export PATH=$PATH:/path/to/php/bin-directory/

you modify the environment in the current shell, i.e. the program executed in the terminal window. That change will not happen to other terminal windows (or even other tabs on the current terminal program). That change would not survive logoff/logon and/or restart.

To make that change persistent see question  How to add a directory to the PATH?


Restoring settings, apps, everything on Ubuntu 16.04

If your BIOS doesn't have any "update" tools in itself.

Download Clonezilla ISO latest version from its website,
Create a bootable USB key with "Starup Disk Creator" software in your current Ubuntu installation.
Clone your disk to your external HDD. Don't forget to check image health.
Update your BIOS with your windows installation.
Then recover your image to your HDD and continue to use your Ubuntu.


You can use Ubuntu make :

Installing Ubuntu Make :

For Ubuntu 14.04 and 14.10 :

sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
sudo apt-get update
sudo apt-get install ubuntu-make

For Ubuntu 15.04 and 15.10 :

Ubuntu make is already in the official repositories.

sudo apt-get install ubuntu-make

Installing Android Studio :

umake android

Uninstall Android Studio :

umake android --remove


Why am I unable start the Deluge daemon from connection manager?

Deluge has two 'modes' the first is the standalone application or Classic mode and the other is a split client/server model that we refer to as Thinclient mode.

I surmise that you have disabled Classic mode so Deluge is now running in Thinclient mode. If this was your intention you need to install the deluged package via the Terminal:

sudo apt-get install deluged

Otherwise to return to the normal standalone Deluge go to preferences and enable Classic Mode again.


I can't connect to internet : network manager is disabled

I had a similar problem about the need to run modprobe at every boot.
If my memory is good it was a problem with blacklisting

I think you should try to blacklist b43 and ssb by uncommenting the following lines:

# blacklist bcm43xx
# blacklist b43

since it looks like you remove them before before using wl to finally make it work.


Problems in ubuntu 16.04 with alfa AWUS036AC USB WIFI adapter in the power up sequence

Solved: Add 8812au in this file /etc/modules to force the load in boot time.


how to display chinese character in txt file on ubuntu 16.04

I am suffering this same issue while using vim.

Add these lines to vimrc where located at /etc/vim/vimrc

set fileencodings=utf-8,gb2312,gbk,gb18030
set termencoding=utf-8
set encoding=prc

Save and run source /etc/vim/vimrc.


There are a few options, but none of them are easy, and chances for data loss are high.

Please read this link and it's links,  and this link about syncing with evolution.

As for the setup of the email on the blackberry it's self, there's not a lot this forum can help you with. Blackberry configurations are very varied. IT, Telco, and you all have options to enable and disable pretty much every feature on the phone. I know many IT departments that disable "email setup" so that users have to go though corporate to get their blackberries setup. I also know a few telco providers that  disable it so that you have to go through their setup method (though I don't exactly know why).

There is also the question of BIS or BES. Most consumers use a free BIS provided by their telco provider.

I have found Crackberry Fourms to be quite helpful. You may try your blackberry support issues there.


External display on USB-C blinks on Lenovo X1 Carbon

I downgraded the system firmware from 0.1.26 to 0.1.20 using fwupdmgr downgrade, and it looks like this may have fixed the problem.  [Edit: no, it didn't]  Here is the output from current fwupdmgr get-devices:

20QD00L1MX System Firmware
  DeviceId:             f09b748a98b31bb5c7c64d83f24ddbc80dff7c5f
  Guid:                 4bbc40fa-f81e-4206-bc70-a1f7b744d964
  Plugin:               uefi
  Flags:                internal|updatable|require-ac|supported|registered|needs-reboot
  Version:              0.1.20
  VersionLowest:        0.0.1
  VersionFormat:        triplet
  Icon:                 computer
  Created:              2020-01-03
  UpdateState:          success


new ubuntu install on an IBM T 42 Thinkpad

You can use your flash drive to boot from it, without having to install anything, and feel if Ubuntu is right for you or not.

If you, then, decide to give it a go, there's a lot of tutorials. However, I'd recommend you to watch a couple of videos on YouTube, just to check your steps. Maybe you're just missing some small step.

I'm not leaving any link because I'm not the author, nor responsible for their content.


Configure '50-synaptics.conf' for kinetic scrolling?

Kinetic two-finger scrolling is called "conventional coasting" in the Synaptics driver:

  Coasting comes in two flavors: conventional (finger off) coasting, and corner (finger on) coasting. Conventional coasting is enabled when coasting is enabled, and CornerCoasting is set to false. [Synaptics manpage]

The two modes are mutually exclusive: kinetic two-finger scrolling does not work with corner coasting enabled. So let's enable conventional coasting. As per the new Ubuntu recommendations in the file, do not edit your 50-synaptics.conf directly but create a directory /etc/X11/xorg.conf.d/ and in it a file like 51-synaptics-tweaks.conf, containing:

Section "InputClass"
    Identifier "touchpad"
    Driver "synaptics"
    MatchIsTouchpad "on"
        Option "CornerCoasting" "0"
        Option "CoastingSpeed" "20"
        Option "CoastingFriction" "50"
EndSection

To see the effect, restart X.

As you noticed, the speed and friction values are hardware dependent. What works on one touchpad might not have a noticable effect on another. Some experimentation might be needed.

For experiments, it is better to use synclient, as it creates an immediate (but non-permanent) effect without having to restart X all the time. The equivalent to the above would be:

synclient CornerCoasting=0 CoastingSpeed=20 CoastingFriction=50


A "Y" VGA splitter will always mirror the image. From this nice explained article, you need a low profile card with a DMS (dual monitor solution) port, plugged to a DMS splitter cable.


Problem installing ethernet and wireless driver in ubuntu 12.10

Before installing alien software, check for proprietary drivers. Go to System Settings and open Software Sources. Then go to the Additional Drivers tab and check if there is an additional driver you can use. Maybe you have as well to install bcmwl-kernel-source


How can I determine the version number of a given Kernel driver?

I think that modinfo is the command you want, in your example:

modinfo pl2303

In the output, there should be a line starting "version"


How to add interative value to each line of a file?

Your loop is going to process the whole file Numlines times, adding the suffix to every line regardless. Also your loop variable is $line whereas you use $i in the sed command, and your assignment of Numlines is syntactically incorrect in most shells.
You could do
Numlines=$(wc -l < file.txt)
for i in $(seq 1 "$Numlines"); do sed -n "${i}s/$/ Line${i}/p" file.txt; done

Note that assignments like Numlines=$(wc -l < file.txt) or your original
Numlines = $(grep "" -c file.txt) # This works

(it probably doesn't) must not have whitespace around the = in bash and similar shells.
However using a shell loop to process files in this way is inefficient - it would be better IMHO to use something like the following in awk:
awk '{$(NF+1) = "Line" FNR} 1' file.txt

or more-or-less equivalently in perl:
perl -lpe '$_ .= " Line $."' file.txt

If sed is the only tool available to you, then you could use it twice - once using the = command to number the lines, then a second time to format the result:
sed = file.txt | sed '$!N;s/\(.*\)\n\(.*\)/\2 Line\1/'


Have you tried to boot from a different boot disk? You can download ubuntu iso for free then extract it using winrar and put it on a usb then boot onto the usb and the you can install!


Dual Boot Ubuntu 20.04 does not detect highest resolution which is available on Windows 10

I found out that the resolution is available using stock-settings of Ubuntu 20.04 in my local setup.
Therefore, I tried to reset the configuration of X-server (deleted /etc/X11/xorg.conf which I previously configured in various ways and also deleted .config/monitors.xml.
After both of these steps did not show any effect and the desired resolution was still not available, I resetted all software on my system (See this thread).
This affected the available resolutions: Only one monitor was available, showing 640x480 pixels. Then, I used sudo ubuntu-drivers autoinstall to bring a fresh install of the nvidia display drivers to my system.
After a reboot, the monitor instanteneously detects the full resolution of 2560x1440 pixels.


I've just installed CCSM and check the option with Wobbly Windows is there. Have you tried installing plugin extra?

sudo apt-get install compiz-plugins-extra


Start with the fun stuff: check out all the cool stuff that was automatically installed when you installed Ubuntu. The easiest ones to find are in the Ubuntu menu.
Continue with the basics: how to install software, keep the system up-to-date, and manage your disk space. As a beginner, it's probably easiest to use the tools you'll find in the System menu - like the "Control Center" you can find in the System menu. For the most part, that's all you really need to get a lot out of Ubuntu.
Build your knowledge: this is a process, more than an evening spent exploring. I've been using Linux for about 12 years and I'm still learning. Here are a few command-line basics to begin the journey:

Open a "terminal" (command line) and learn to get around.
Try commands like "pwd" (means "print working directory") to find out what directory you're in.
Try "ls" (means "list contents of current directory").
Try "cd mydirectory" (means "change directory" ... but use a directory you see from "ls" in place of mydirectory).
Type "help"... and you'll get a list of commands. If one looks interesting, type "man mycommand" (means "manual page for mycommand"). Manual pages tell you what a command does and how to use it. Try "info mycommand" - "info" is another way to learn about what a command is for and what it does.

This should be plenty to get you started. When you get stuck, just search for the answers. When you can't find the answer, ask the question here.

Have fun!


No network access on Ubuntu but works fine on Win10

It seems caused by the WOL configuration on Windows because the network works as normal if the Windows is completely shutdown but as mentioned when hibernating.

Just disable the option Allow this device to wake the computer of the network adapter on Device manager.

Hope this helps.


No Audio Ubuntu 18.04 with HDA Nvidia Card

I had the exact problem a couple weeks ago!!

Here's a thread I started with my problem as well, and a solution bellow that I found after intensive work

Hope it fixes yours as well.


How to sed and replace string with a folder path

In circumstances where the replacement string or pattern string contain slashes, you can make use of the fact that GNU sed allows an alternative delimiter for the substitute command. Common choices for the delimiter are the pipe character | or the hash # - the best choice of delimiting character will often depend on the type of file being processed. In your case you can try

sed -i "s#_HOME_DIR_#$HOME_DIR#"

Also note that you mistyped your variable name $HOME_DIR (it does not start with an underscore).

$ HOME_DIR=/opt/my_home
$ echo "_HOME_DIR_/config/data/_DOMAIN_/users.conf" | sed "s#_HOME_DIR_#$HOME_DIR#"
/opt/my_home/config/data/_DOMAIN_/users.conf

Just fyi you may want to avoid using all-caps for user variables in your script - they should be reserved for system variables. Also the g switch is not necessary unless you want to make multiple replacements on a single line.


Why does every installation tutorial ask me to update?

If you add a new repository, the command

sudo apt-get update

is necessary for the system to know, there is a new repository.

And the command is suggested before you install a new software, to update the repository database, to get the latest version of this package

Furthermore, it is necessary to publicize the system that new packages have been added to the repositories.


Why .cpp files can run on xterm when .c or .cc files can't?

The underlying compiler (usually gcc) uses filename extension to determine what kind of code the file contains and thus how to compile it (although this can be overridden using the -x option).

In this case, you appear to have saved what appears to be C code with the filename untitled, which the compiler doesn't know how to handle. In fact, it looks like the CodeBlocks IDE doesn't know how to handle it either, so is defaulting to attempting to execute it as a shell script.

When you give your file a .cpp extension the IDE and compiler treat it as C++ code and the file is successfully compiled.

Note that a .o file is an object code file rather than an executable program: that is essentially the difference between compiling and building.


Ubuntu 19.10, 100% GPU usage, overheating

The problem went away on its own after Ubuntu upgraded to linux package 5.3.0-40. If I boot into an older kernel (like 5.3.0-29), it still happens, so it seems there was a problem there for a while, but appears to be fixed.


Can I remove the .xsession file and similar files from my machine?

The .xsession file are log files and can be safely deleted. They will eventually cycle out as the .xsession file will replace the .xsession.old file after a reboot.

I have never seen the .Xauthority.XXXXXX, but the .Xauthority is needed while you are logged in with your graphical gui.


Unable to uninstall timedoctor from terminal

If you've installed timedoctor using it's AppImage file,
you can follow the instructions here.

Delete the downloaded AppImage file
Delete "appimagekit-timedoctor-desktop.desktop" from $HOME/.local/share/applications/. to remove it's desktop entry.

rm -rf ./appimagekit-timedoctor-desktop.desktop


How add keyboard shortcut for "show desktop" in Xubuntu 20.04?

This solution has been tested in Xubuntu 20.04.1 run as Live USB.
To check and/or change the keyboard shortcuts for "Show Desktop" feature, go to:
Settings -> Window Manager -> Keyboard tab
and look for "Show Desktop" item. Pressing the "Edit button" you can configure a new keyboard shortcut.
Below, an image as reference.


Its possible to read "shell" directly from passwd file:

echo $( getent passwd "${USER}" | cut -d: -f7 )


TP Link TL-WN725N (v2) driver install issue

Please try:

cd ~
rm -r rtl8188eu

If it is not there, that's fine, just continue:

git clone https://github.com/lwfinger/rtl8188eu
cd rtl8188eu
make
sudo make install
sudo modprobe 8188eu

It 'makes' perfectly on my 4.8.0-34 kernel; however, if you encounter any errors, please post them.

Please check the settings in the router. WPA2-AES is preferred; not any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your router is capable of N speeds, you may have better connectivity with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz, although it is likely to affect N speeds. I also have better luck with a fixed channel, either 1, 6 or 11, rather than automatic channel selection. Also, be certain the router is not set to use N speeds only; auto B, G and N is preferred. After making these changes, reboot the router.

Next, I recommend that your regulatory domain be set explicitly. Check yours:

sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Then set it temporarily:

sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:

gksudo gedit /etc/default/crda

Use nano or kate or leafpad if you don't have the text editor gedit.

Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

Next, I'd set IPv6 to Ignore in Network Manager: http://docs.fedoraproject.org/en-US/Fedora/18/html/Installation_Guide/images/netconfig/network-connections-ipv6-ignore.png  This example is for ethernet, but you want wireless.


Is it possible to remove gnome-contacts in 14.04?

Assuming you are using regular ubuntu with the unity desktop: yes, it is possible.

If you are using gnome-shell desktop instead of unity, you will run into dependency issues.

Go ahead and uninstall it if you are using just the regular "Ubuntu Desktop" and are not using the gnome desktop otherwise known as "Ubuntu Gnome".

Ubuntu Gnome looks like this:

and the regular Ubuntu desktop Unity looks like this:


Why can't apt find Packages file when compressed versions exist?

Turns out something was corrupt in my local apt repository. Resetting it using

$ sudo rm -fr /var/lib/apt/lists/*

fixed things.


I have a different tablet, but I use this script:

#!/bin/bash
#
# the darn thing change names if is on wireless or not...
#
device=$(xsetwacom --list | grep -i "pad" |  awk '{print $(NF-2)}')

xsetwacom --set "$device" button 1 "key ctrl z"
xsetwacom --set "$device" button 3 "key shift ctrl s"
xsetwacom --set "$device" button 8 "key shift ctrl l"
echo "Ok --- all set on device $device."

exit 0

It will need a bit of try and error to find the buttons; what I do is normally use a script assigning a letter to each key an clicking in a terminal to check, like

xsetwacom --set "$device" button 1 "key 1"
xsetwacom --set "$device" button 2 "key 2"

... and so on.

The manual of xsetwacom says:

 Button button-number [mapping]
          Set a mapping for the specified button-number. Mappings take the
          form of either a single numeric button or an 'action' to be per‐
          formed. If no  mapping  is  provided,  the  default  mapping  is
          restored.

          Numeric  button  mappings  indicate  what  X11 button number the
          given button-number should correspond to. For example, a mapping
          of  "3" means a press of the given button-number will produce as
          a press of X11 button 3 (i.e. right click).

so to define the buttons 1 and 2 (example out of the blue) to left and right mouse button you should do:

xsetwacom --set "$device" button 1 1
xsetwacom --set "$device" button 2 3

(not tested, I have my tablet at the office).


No sound out of MacBook speakers & red LED in headphone jack

Ubuntu 11.04 doesn't seem to be much of an upgrade to most of us :\
Try looking at the recently removed history in your Software Center, and look for a library that might be related to audio/drivers/etc. then reinstall it.


overheating laptop even on low cpu usage

If you want to use the open source driver (radeon) see some answers in this question.

If you want to install and use the fglrx driver in Ubuntu 12.10, the try this:

Open a terminal and run

sudo apt-get install linux-source
sudo apt-get install linux-headers-$(uname -r)
sudo apt-get install fglrx fglrx-amdcccle

Or (if you want to try the updates)

sudo apt-get install linux-source
sudo apt-get install linux-headers-$(uname -r)
sudo apt-get install fglrx-updates fglrx-amdcccle-updates

Reboot your system.


All you have to do is to follow the instruction of the message. Open the fprintd.service file in an editor and add the following line under the section [Install]
[Install]
WantedBy=multi-user.target

This target is in most cases a good choice. If this doesn't work or you want another target, choose one by from this list
systemctl list-units --type target


Package 'flameshot' not opening on Ubuntu 20.04

I had this problem when installing via SNAP. (Ubuntu 20.04)
Error:
$ flameshot \
Qt: Session management error: Could not open network socket

Solution:
$ unset SESSION_MANAGER


Resize and arrange pictures automatically on a canvas

Below a script to create one file from a number of images. The script uses imagemagick.

About imagemagick

From man imagemagick:
ImageMagick®, is a software suite to create, edit, and  compose  bitmap images.  It  can read, convert and write images in a variety of formats (about 100) including GIF, JPEG, JPEG-2000, PNG,  PDF,  PhotoCD,  TIFF, and  DPX.  Use ImageMagick  to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various  special effects, or draw text, lines, polygons, ellipses and Bezier curves.

Since Imagemagick is a command line tool, it is especially fit for use in scripts; to automate jobs like you mention in your question for example.

Install Imagemagick

You might have to install imagemagick first:

sudo apt-get install imagemagick

The script

The script combines and arranges a number of images into one file. Doing so, it uses the maximum space (in px), defined by you, but without changing the image proportions. Once the job is done, the output is automatically opened in Gimp (so Gimp should be installed). If for some reason the file does not show up in Gimp, it is in your images' folder, named: out_file.jpg.

An example

In the example below, your desired output is a sheet of three images (columns) x three images (rows), while the images need to be 1500px (horizontal). You will need an area of 4500px (width), and at the same time make sure the three rows fit in the area. In the head section of the script, you set:

colrows = [3, 3]            # set the number of colums/rows
max_area = [4500, 6500]     # set the area (hxv in px) the script can use

since the hight is "oversized" for our pictures, the script will fill upt the maximum width (4500/3 = 1500px per image)

The output:

The script assumes:

all pictures are of the same proportion & orientation (they may however be of different sizes)
the number of pictures inside the folder (see above) is equal to (or at least) rows x columns (9 in your example). If there are more images inside the folder, only the needed number is used.

Options / settings

The script has a number of options. In the head section of the script, you need to define:

img_dir = "/path/to/files"      # path to the images
output_extension = ".jpg"       # desired output
colrows = [3, 3]                # columns  / rows of pictures
max_area = [4500, 6500]         # the (max) size of your sheet
border = 10                     # whitespace around the images

The script

#!/usr/bin/env python3

import os
import subprocess
import shutil

# set the input below
###############################################################################
img_dir = "/path/to/files"      # path to the images
output_extension = ".jpg"       # desired output
colrows = [3, 3]                # columns  / rows of pictures
max_area = [4500, 6500]         # the (max) size of your sheet
border = 10                     # whitespace around the images
###############################################################################
cd_topics = "cd "+"'"+img_dir+"'; "
# current picture size
images = sorted([item for item in os.listdir(img_dir)])[:colrows[0]*colrows[1]]
for image in images:
    shutil.copyfile(img_dir+"/"+image, img_dir+"/fixed_"+image.replace(" ", "_"))
images = sorted([item for item in os.listdir(img_dir) if item.startswith("fixed_")]) ##
# a few functions
def get_picsize(image):
    command = cd_topics+'identify -format "%wx%h" '+image
    return subprocess.check_output(["/bin/bash", "-c", command]).decode("utf-8").strip().split("x")

def resize(img_in, img_out, size, modus=None):
    modus = "^ " if modus == "outsize" else " "
    newsize = str(size)+"x"+str(size)
    resize_command = cd_topics+"convert "+img_in+" -resize "+newsize+modus+img_out
    subprocess.call(["/bin/bash", "-c", resize_command])

def add_border(img_in, img_out, bd):
    if bd != None and str(bd) != "0":
        addborder_command = cd_topics+"convert "+img_in+" -bordercolor white -border "+bd+"x"+bd+" "+img_out
        subprocess.call(["/bin/bash", "-c", addborder_command])
# make all pictures of equal size
standard_size = get_picsize(images[0])
for pic in images:
    if not get_picsize(pic) == standard_size:
        resize(pic, pic, max(standard_size))
# calculate resize
picture_orientation = int(standard_size[0])/int(standard_size[1])
area_ratio = float(max_area[0]/max_area[1])
combi_ratio = (colrows[0]*int(standard_size[0]))/(colrows[1]*int(standard_size[1]))
fit_in = area_ratio/combi_ratio
if fit_in > 1:
    newsize = int(max_area[1]/colrows[1])-2*border
    modus = "outsize" if picture_orientation > 1 else None
else:
    newsize = int(max_area[0]/colrows[0])-2*border
    modus = "outsize" if picture_orientation < 1 else None
# resize images
for image in images:
    resize(image, "rs_"+image, newsize, modus)
    add_border("rs_"+image, "rs_"+image, bd=str(border))
# combining into rows
images = sorted([pic for pic in os.listdir(img_dir) if pic.startswith("rs_")])
rows = [images[i:i+colrows[0]] for i in range(len(images)-colrows[0]+1) if i % colrows[0]== 0]
i = 0
while i in range(len(rows)):
    row = rows[i]; images = [im for im in row]
    command = cd_topics+"convert "+" ".join(images)+" +append "+"row_"+str(i+1)+output_extension
    subprocess.call(["/bin/bash", "-c", command])
    i = i+1
# combining rows
images = sorted([pic for pic in os.listdir(img_dir) if pic.startswith("row")])
output_file = "out_file"+output_extension
command = cd_topics+"convert "+(" ").join(images)+" -append "+output_file
subprocess.call(["/bin/bash", "-c", command])
# opening image with Gimp, cleaning up
for image in sum([[img for img in os.listdir(img_dir) if img.startswith(string)] \
              for string in ["fixed_", "row_", "rs_"]], []):
    os.remove(img_dir+"/"+image)
command = cd_topics+"gimp "+output_file
subprocess.Popen(["/bin/bash", "-c", command])

How to use

Copy the script into an empty file, save it as combine.py. Set the desired information in the headsection of the script (see Options / settings, above).
Copy the approriate number of pictures into a folder
Run the script by the command:

python3 /path/to/combine.py

A few notes

The script creates a new image (outfile). If you make another combination of the same pictures (-directory) first remove it, or it might appear in the output file.
The script sorts the images by name, so if you need a particular order, just name them a.jpg, b.jpg and so on.


So, what's with the "Funky Fairy" naming system? Many sensible people have wondered why we chose this naming scheme.
It came about as a joke on a ferry between Circular Quay and somewhere else, in Sydney, Australia:
lifeless: how long before we make a first release?
sabdfl: it would need to be punchy. six months max.
lifeless: six months! thats not a lot of time for polish.
sabdfl: so we'll have to nickname it the warty warthog release.
Source.

That's how the first major Ubuntu release got his name : Warty Warthog ... and since then, the form "Adjective Animal" stayed.

Canonical, in particular Mark Shuttleworth, decides about the release name finally.
But users can propose a name here - it might be picked up by the team eventually.


Assuming you mean the Gnome 'panel', right click on it and go to 'Properties'. Then change the 'orientation' option.

Note that if you want to move it to the left or right, and are using the default Ubuntu themes, you will probably want to change the background colour to a solid fill for aesthetic purposes.


Deleted Windows bootmgr partition dual boot

You have deleted your UEFI partition.  It is a major pain, in my experience, to get it back.  I would advise you to purchase a new hard drive, disconnect/take your old one out, and install fresh on to the new drive.

Install Windows first, manually configuring your partitioning, then install your linux.  Purchase a USB adapter/caddy/enclosure for your old hard drive, and copy off your data from it.

Messing around with partitions is dangerous and if you don't have good backups, then you end up in a very unfortunate position where you have deleted your actual data.


In Korganizer,
Select the menu Settings
select Configure Date & Time
in the side panel select Formats
in the Time dropdown menu select Polska - polski(pl_PL)
click OK

A small notification box will appear telling you that Your changes will take effect the next time you login.

Logout and login.
The time bar on the left of the calendar will show in 24.00 format.


As Ubuntu 8 is very old, I feel starting from scratch would be the better option.

Does this guide help?


How do I arrange photos by visual similarities?

ImgSeek is an open-source solution that will let you search by similarity and even sketch a basic version of the photo you're looking for.

I'm not sure that the huge display of images by dominant colour is a feature, but it should do almost everything else you need. It's also being actively developed so this feature may be added in future.

The screenshot below shows searching for similar images.


New upstream version of gnome-mplayer. How do I ask for this to be considered for release / commit?

From what I've read, Canonical's team is really strict about changing a working release. But the good news is that Ubuntu is never more than 6 months late: It will come out in the next release. You can manually install the newer version (from an early or Debian-specific package, or from source) while you wait.

Incidentally, I know of a program (wesnoth) which managed to find its latest version into Ubuntu's repos by making a new package. The old package (at the time) was called wesnoth, and offered version 1.6; the new program was called wesnoth-1.8.

That ensured that anyone who's depending on the bugs or features of the previous version get to keep them, while others consciously upgrade.


When I try to run an rm -r  it just stalls and nothing happens.

Depending on what filesystem and hardware is in use, this may take significant time. Deleting a lot of small files may easily take a minute on a normal hard drive.

You can run rm -rv /path to show what rm is actually doing. You're likely to see that it's in fact busy removing things.


Unable to install Ubuntu 14.04 in Dell Vostro 15 3000 series Laptop with i5 processor

Every disterbution of linux has differentimages for different processor .So
for AMD Processors :-ubuntu-14.04.3-desktop-amd64
&
for intel processor:-ubuntu-14.04.3-desktop-i3/i586
download accordingly from utorrent
Process to dual boot:-
Here’s the basic process you’ll need to follow:

Install Windows First: If you already have Windows installed, that’s fine. If not, be sure to install Windows first, before you install the Linux system. If you install Linux second, it can set up its boot loader properly to happily co-exist with Windows. if you install Windows second, it will ignore Linux, and you’ll have to go through some trouble to get your Linux boot loader working again.
Make Room for Linux: You’ll need free space on your Windows system drive to install Linux, or possibly a second entirely different hard drive if you have a desktop PC. You’ll usually need to resize your Windows partition to make room for Linux. If you’re installing Windows from scratch, be sure to leave some free space on the drive for Linux. This will save you some time later.
Install Linux Second: Choose your Linux distribution and put its installer on a USB drive or DVD. Boot from that drive and install it on your system, making sure you select the option that installs it alongside Windows — don’t tell it to wipe your hard drive. It’ll automatically set up a Grub2 boot loader menu that lets you choose your preferred operating system each time you boot your computer.
Install Windows First
Your PC probably already has Windows installed on it, and that’s fine. If you’re setting up a PC from scratch, be sure to select the “Custom install” option and tell Windows to use only part of the hard drive, leaving some unallocated space left over for Linux. This will save you the trouble of resizing the partition later.
Make Room For Linux
You’ll probably want to resize your Windows system partition to make room for Linux. If you already have some unallocated space or a separate hard drive for Linux, that’s perfect. Otherwise, it’s time to resize that existing Windows partition so you can make space for a new Linux partition.

You can do this in several ways. Most Linux installers allow you to resize Windows NTFS partitions, so you can do this during the installation process. However, you may just want to shrink your Windows system partition from within Windows itself to avoid any potential problems.

To do so, open the Disk Management utility — press Windows Key + R, type diskmgmt.msc into the Run dialog, and press Enter. Right-click the Windows system partition — that’s likely your C:\ drive — and select “Shrink Volume.” Shrink it to free up space for your new Linux system.

Install Linux Second
Next, make installation media for your Linux system. You can download an ISO file and burn it to a disk or create a bootable USB drive. Reboot your computer and it should automatically boot from the Linux installation media you’ve inserted. If not, you’ll need to change its boot order or use the UEFI boot menu to boot from a device.

On some newer PCs, your PC may refuse to boot from the Linux installation media because Secure Boot is enabled. Many Linux distributions will now boot normally on Secure Boot systems, but not all of them. You may need to disable Secure Boot before installing Linux.

Go through the installer until you reach an option that asks where (or how) you want to install the Linux distribution. This will look different depending on your Linux distribution, but you want to choose the option that lets you install Linux alongside Windows, or choose a manual partitioning option and create your own partitions. Don’t tell the installer to take over an entire hard drive or replace Windows, as that’ll wipe away your existing Windows system.

Choosing an Operating System and Customize Grub2.
Once you’ve installed Linux, it will install the Grub2 boot loader to your system. Whenever you boot your computer, Grub2 will load first, allowing you to choose which operating system you want to boot — Windows or Linux.

You can customize Grub’s options, including which operating system is the default and how long Grub2 waits until it automatically boots that default operating system. Most Linux distributions don’t offer easy Grub2 configuration applications, so you may need to configure the Grub2 boot loader by editing its configuration files.
You can use this process to triple or quadruple-boot multiple versions of Linux along with Windows, multiple versions of Windows along with Linux, or multiple versions of each. Just install one after the other, ensuring there’s enough room for a separate partition for each operating system. Be sure to install Windows before you install Linux, too.


Unable to upgrade to Plasma-desktop 5.18

This is very odd. plasma 5.12 is ancient compared to 20.04. The cause is likely due to another package requiring explictly an old version of plasma. That package is likely old and unmaintained.

in comparison, here is the unique version number I have installed on my freshly upgraded system

mathieu:~ :-) (lifebook-wu2) $ apt search plasma | grep installed | grep -o "[: ]5[^a-z]\{6\}" | sort -u

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

:5.17.5-
 5.18.4.
:5.18.4.
 5.68.0-
:5.68.0-
mathieu:~ :-) (lifebook-wu2) $

5.17 is a single them package I have plasma-look-and-feel-org-kde-breezedark-desktop

5.18.4 being plasma related package
5.68 is the KDE Framework

====

I recommend you scan for those 5.12 packages and see if you can remove them.

it will tell you which package keeps requiring it.

you should be able to clean this up.

hope it helps.
please post which package you ended up removing for future reference for others

cheers,


How to copy files from a dead Ubuntu 12.04

Start nautilus as root with command sudo nautilus

Note: You might not be able to mount other partitions from a nautilus running with root permissions


How to change file permissions and then revert them back

files should be "644", directories should be "755". What you want is not permissions but you want to set the files and directories to a user and group that is allowed to write files into /var/www/html/.

sudo chown -R $USER:$USER /var/www/html/*

would set all to your current user or if you need something like "www-data" (the default apache user) change it to that. Wordpress has its own user, if you include that user to your group or the "www-data" group it can write files.
so this is not needed.


Unlocking keepassxc database on login...so close, but how to remove remaining issue?

Short answer
What you see is normal behaviour. The terminal will be released only once KeePassXC terminates.
Long answer
The Database password:  prompt that you see on the terminal is a result of the --pw-stdin option you provided to the keepassxc option. Since there is a pipe, standard input is not your keyboard, but the output of the previous echo command.
As long as KeepassXC is running, your prompt is blocked. That is normal and happens with any other program. For example, try starting nautilus at the terminal.
You can release the prompt by moving that process to the background: press Ctrl+Z, then type bg to continue running the process in the background. fg will bring it to the foreground again. That is "traditional" terminal practice.
With the process on the foreground, the terminal will be released when you quit KeePassXC, either from quiting it in the graphical user interface, or pressing Ctrl+C in the terminal.
This behavior is unnoticed when you do not run the command from a terminal emulator, e.g. from a desktop launcher or from a shortcut key binding, or even using the Alt+F2 run dialog.


How to solve ram usage excessive on Ubuntu 18.04.2 LTS

Open a terminal and run the swapon command.  If you don't see any swap spaces listed, then run the following command:

sudo apt install zram-config

That will enable ZRAM swap space, which is better than nothing.

If do you have a swapspace listed and you do not see /dev/zram0 listed then you can try enabling ZSWAP to create a compressed swap cache to speed up swap performance.

At the terminal, run sudoedit /etc/default/grub

find the line with GRUB_CMDLINE_LINUX_DEFAULT=quiet splash and amend as follows:

  GRUB_CMDLINE_LINUX_DEFAULT="quiet splash zswap.enabled=1
  zswap.compressor=lz4 zswap.max_pool_percent=25 zswap.zpool=z3fold"

Save the changes

run sudo update-grub then reboot to apply the changes.

This will use up to 25% of your system memory as compressed swap cache, with typically 2.7:1 compression ratio.  So if you have 4G of RAM it will use 1G of memory to create a 2.7GB swap cache, which will make your system feel similar to how it would with 5.7GB of RAM, under ideal circumstances.  If you have an SSD it will also reduce the amount of writes to the swap space by a significant amount.

Having said all of this, consider the value of adding RAM or faster storage.  If you work from home and you can make a $600 laptop run more than twice as fast for your workload by spending $28 on a 4G UDIMM, or $55 on a 256G SSD, then you will increase your productivity enough to pay for that storage in under a month.  I have an Asus UX310UA with 6200U/1TBHDD/8GRAM and adding an M.2 SSD turned this thing from a slouch that felt it needed replacing ASAP into a rocket that will last another 4-5 years.  Also your battery life will increase if the OS can put the storage to sleep - it can't do that when you're swapping.


Moving 11.10 complete system to a new bigger Harddisk

Use clonezilla.

It will allow you to clone your current system including the mbr without actually copying unused space that dd does hence doing it faster

Since its reading / writing on a filesystem level you can only use it on a supported filesystem, on the contrary to dd, which works on a device level, allowing the copy of any filesystem.

Clonezilla's front page has a list of the software's limitations:

  The destination partition must be equal or larger than the source one.
  Differential/incremental backup is not implemented yet.
  Online imaging/cloning is not implemented yet. The partition to be imaged or cloned has to be unmounted.
  Software RAID/fake RAID/firmware RAID is not supported by default. It can be done manually only.
  Due to the image format limitation, the image cannot be explored or mounted. You can not recovery single file from the image. However, you
  still have workaround to make it, read this.
  Recovery Clonezilla live with multiple CDs or DVDs is not implemented yet. Now all the files have to be in one CD or DVD if you
  choose to create the recovery iso file.


Want partitioning scheme for Dual booting Linux alongside Windows 10 in SSD+HDD setup

I am running exactly that way. Since the majority of data "bulk" is going to be located in side your users' home folders I migrated my home folder to the HDD.

Assuming you are not using any partition on the HDD for linux currently you can dismount the HDD and make a new home folder partition.
 You will need gparted and nano or your own choice of partition tool and text file editor.CAUTION: these instructions have you blindly erasing hard drive space

Open gparted and create a partition for your home folder on the HDD by selecting the hard disk from the list. It should be labeled something like “sda”.
Either format the hard drive as you wish or split up a current partition and make a new home folder partition.

Migrating the Home folder
To migrate your current Home folder to an HDD partition, there are four things that you need to do:

Mount the HDD partition onto a temporary Home location.
Copy the files from your current Home folder to this temporary Home folder.
Relocate the current Home folder
Mount the new Home folder.

Create a temporary Home folder

Open a terminal and type the following:

sudo blkid

This will display the UUID(a pseudo-random identifier for every each and every partition) of all the partitions. Record down the UUID for the partition that you have created in gparted.

Next, open the fstab file (contains the necessary information to automate the process of mounting partitions
):

sudo nano /etc/fstab

and add the following line to the end of the file.

UUID=xxx-xxxxx-xxxxx   /media/home    ext4          nodev,nosuid       0       2
Replace the UUID with the UUID value of the external partition

Save (Ctrl + o) and exit (ctrl + x) the file.

Next, create a mount point to make a place to put your file from the SSD onto the HDD:

sudo mkdir /media/home

and reload the updated fstab.

sudo mount -a

Copy the files from your SSD Home folder to the HDD Home folder

sudo rsync -aXS /home/. /media/home/.
both periods needed(it means "everything")

Relocate the current Home folder

cd /
sudo mv /home /home_backup
sudo mkdir /home

Mount the new Home folder

sudo nano /etc/fstab
and change to line which says

UUID=XXXX.XXXXX.XXXX.XXXX       /media/home    ext4
to
UUID=XXXX.XXXXX.XXXX.XXXX       /home    ext4

Save(ctrl+o) and exit(ctrl+x) the file.

Lastly, reload the fstab file:

sudo mount -a

remove the back-up copy and regain the space on your SSD

sudo rm -rf /home_backup

This allows the kernel and all the binaries to be run from SSD and you can use the slower HDD to store your bulky data.

Answers excerpted from https://www.tecmint.com/move-home-directory-to-new-partition-disk-in-linux/


Drag-and-drop functionality no longer working after upgrade to 19.04

Yup: https://gitlab.gnome.org/World/ShellExtensions/desktop-icons/issues/22

Just the most recent installment of the long, proud tradition of new GNOME releases breaking significant functionality used by many people. "Move fast and break things," and all that. sigh


default volume level for a new or unknown stream

Open pulse audio make sure you tick EQ Enabled and Keep Settings.
Open audio setting -> output make sure to chose LADSPA Plugin (installed by default with pulse audio ubuntu 16.04 LTS).
For more customize or if you not found LADSPA Plugin check this link.


No wireless Ubuntu 15.10 for Lenovo Yoga 3 11

Your wireless driver requires firmware that is not installed by default. Please download this file on some other computer and transfer it with a flash drive or similar: http://archive.ubuntu.com/ubuntu/pool/main/l/linux-firmware/linux-firmware_1.149.3_all.deb

Transfer it to the Ubuntu computer and drag and drop it to the desktop. Now, on the Ubuntu computer, open a terminal and do:

cd ~/Desktop
sudo dpkg -i linux*.deb

After it is done, please do:

sudo modprobe -r ath10k_pci
sudo modprobe ath10k_pci

Your wireless should be working but it might take a reboot.


Why the files which are not present on desktop are being listed on terminal?

I think you'll find your answer here and some more here.

It's not a bug, some files are hidden because they are needed by some programs (for configurations, backup files, etc) but which are generally not needed by the user directly, and are made hidden to clear up the visual space.

For example when you edit a file say with gedit, when you create or modify a text file, it will create a new file with a '~' at the end which is used as a backup file, which autosaves your work automatically and can be restored if gedit or your computer crashes and you forgot to save your work. But you don't to see it to be able to use it, so it's made hidden.


Git commit and push via batch file on Ubuntu

You can do this with a bash script, example:

#!/bin/bash
### project 1 ###
cd /project1path/
git add all
git commit -m "Automatic save commit initiated at $(date)"
git push origin master --repo https://name:password@domain.name/name/repo.git

### project 2 ###
cd /project2path/
git add all
git commit -m "Automatic save commit initiated at $(date)"
git push origin master --repo https://name:password@domain.name/name/repo.git

...

Then you can chmod this bash script with 755 permissions like this:

chmod 755 autosave-script

After that change to UI and open nautilus and create a link on the desktop and youre done.

If the script wont start at a double click in nautilus open the file properties and change it according to the following screenshot:

You will have to do this step on each machine you want to use that script.


You can just use echo or printf to print the variable and redirect to a file:

#!/bin/bash
read -p "saisir votre nom: "  name
printf "%s\n" "$name" > file.txt

Alternatively, just print it and run the script redirecting its output:

#!/bin/bash
read -p "saisir votre nom: "  name
printf "%s\n" "$name"

Then:

myscript.sh > file.txt


Can one access an open terminal on the computer via SSH?

Simply due to how terminals are built, it is not possible to access everything, i.e. you cannot view a running terminal and interact with it if you don't have a detachable session running within the said terminal, such as screen or tmux session, or if you haven't started that command with logging via script command.

What can be done is partially view TTY via sudo cat /dev/vcs1 command. /dev/vcs[1-6] correspond to their respective TTY consoles. This is limited by the scrollback buffer size of the respective TTY, which means you can only see whatever is held in memory up to certain number of lines. This of course can be tuned to increase the number of lines as shown in muru's answer here. Alternatively, you probably should try

setterm -file log.txt -dump [ttynumbers]

which was mentioned in this ssh question.

At the end of the day, bodhi.zazen properly noted in their comment, that your refusal to use screen or tmux is the biggest problem. I totally understand, I often forget to track long-running programs myself, but with some commands you should start thinking ahead.


Dell XPS 15-9550 doesn't boot 14.04 (Live USB)

To boot the Ubuntu 14.04.3 installation USB media successfully,
highlight Try Ubuntu without installing and  press the E key.

Add nouveau.modeset=0 to the end of the linux line.
Then press the F10 key to boot to the Live desktop.

Ubuntu 14.04.3 comes with kernel 3.19, Ubuntu 15.10 with kernel 4.2.
Choose which one you want and download the ISO image accordingly.

LTS Hardware Enablement Stack - the main information from the release notes :
The 14.04.3 point release will ship with an updated kernel and X stack by default.
This newer stack will be comprised of the kernel and X stack from Ubuntu 15.04.

Explanation :

Ubuntu 14.04.1 -> kernel 3.13 (from Ubuntu 14.04)
Ubuntu 14.04.2 -> kernel 3.16 (from Ubuntu 14.10)
Ubuntu 14.04.3 -> kernel 3.19 (from Ubuntu 15.04)

This means that you can update an existing installation to the newer hardware stack.
When you make a clean install of Ubuntu 14.04.3, the latest stack is already included.
But when you want to use the latest kernel 4.2, you will have to install Ubuntu 15.10.


apt-get fails any install: "dpkg: error processing grub-pc"

I had 2 identical servers and only one was giving this error. I simply copied the 00_header file from the working server.

Here are the details of the environment

Kernel:

Linux 3.2.0-53-generic #81-Ubuntu SMP Thu Aug 22 21:01:03 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

/etc/lsb-release

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.4 LTS"

Here is the /etc/grub.d/00_header file I used

#! /bin/sh
set -e

# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009,2010  Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.

transform="s,x,x,"

prefix="/usr"
exec_prefix="${prefix}"
datarootdir="${prefix}/share"
locale_dir=`echo ${GRUB_PREFIX}/locale | sed ${transform}`
grub_lang=`echo $LANG | cut -d . -f 1`

. "${datarootdir}/grub/grub-mkconfig_lib"

# Do this as early as possible, since other commands might depend on it.
# (e.g. the `loadfont' command might need lvm or raid modules)
for i in ${GRUB_PRELOAD_MODULES} ; do
  echo "insmod $i"
done

if [ "x${GRUB_DEFAULT}" = "x" ] ; then GRUB_DEFAULT=0 ; fi
if [ "x${GRUB_DEFAULT}" = "xsaved" ] ; then GRUB_DEFAULT='${saved_entry}' ; fi
if [ "x${GRUB_TIMEOUT}" = "x" ] ; then GRUB_TIMEOUT=5 ; fi
if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=auto ; fi

if [ "x${GRUB_DEFAULT_BUTTON}" = "x" ] ; then GRUB_DEFAULT_BUTTON="$GRUB_DEFAULT" ; fi
if [ "x${GRUB_DEFAULT_BUTTON}" = "xsaved" ] ; then GRUB_DEFAULT_BUTTON='${saved_entry}' ; fi
if [ "x${GRUB_TIMEOUT_BUTTON}" = "x" ] ; then GRUB_TIMEOUT_BUTTON="$GRUB_TIMEOUT" ; fi

cat << EOF
if [ -s \$prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
EOF
if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ]; then
    cat <<EOF
if cmostest $GRUB_BUTTON_CMOS_ADDRESS ; then
   set default="${GRUB_DEFAULT_BUTTON}"
else
   set default="${GRUB_DEFAULT}"
fi
EOF
else
    cat <<EOF
set default="${GRUB_DEFAULT}"
EOF
fi
cat <<EOF
if [ "\${prev_saved_entry}" ]; then
  set saved_entry="\${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "\${boot_once}" ]; then
    saved_entry="\${chosen}"
    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n "\${have_grubenv}" ]; then if [ -z "\${boot_once}" ]; then save_env recordfail; fi; fi
}

function load_video {
EOF
if [ -n "${GRUB_VIDEO_BACKEND}" ]; then
    cat <<EOF
  insmod ${GRUB_VIDEO_BACKEND}
EOF
else
    # Insert all available backends; GRUB will use the most appropriate.
    have_video=0;
    for backend in $(cat "${GRUB_PREFIX}/video.lst"); do
        have_video=1;
        cat <<EOF
  insmod ${backend}
EOF
    done
    if [ x$have_video = x0 ]; then
        echo "true"
    fi
fi
cat <<EOF
}

EOF

serial=0;
gfxterm=0;
for x in ${GRUB_TERMINAL_INPUT} ${GRUB_TERMINAL_OUTPUT}; do
    if [ xserial = "x$x" ]; then
        serial=1;
    fi
    if [ xgfxterm = "x$x" ]; then
        gfxterm=1;
    fi
done

if [ "x$serial" = x1 ]; then
    if ! test -e "${GRUB_PREFIX}/serial.mod" ; then
        echo "Serial terminal not available on this platform." >&2 ; exit 1
    fi

    if [ "x${GRUB_SERIAL_COMMAND}" = "x" ] ; then
        grub_warn "Requested serial terminal but GRUB_SERIAL_COMMAND is unspecified. Default parameters will be used."
        GRUB_SERIAL_COMMAND=serial
    fi
    echo "${GRUB_SERIAL_COMMAND}"
fi

if [ "x$gfxterm" = x1 ]; then
    # Make the font accessible
    prepare_grub_to_access_device `${grub_probe} --target=device "${GRUB_FONT_PATH}"`

    cat << EOF
if loadfont `make_system_path_relative_to_its_root "${GRUB_FONT_PATH}"` ; then
  set gfxmode=${GRUB_GFXMODE}
  load_video
  insmod gfxterm
EOF

# Gettext variables and module
if [ "x${LANG}" != "xC" ] && [ -d "${locale_dir}" ] ; then
    prepare_grub_to_access_device $(${grub_probe} --target=device ${locale_dir}) | sed -e "s/^/  /"
  cat << EOF
  set locale_dir=(\$root)$(make_system_path_relative_to_its_root ${locale_dir})
  set lang=${grub_lang}
  insmod gettext
EOF
fi

cat <<EOF
fi
EOF
fi

case x${GRUB_TERMINAL_INPUT} in
  x)
    # Just use the native terminal
  ;;
  x*)
    cat << EOF
terminal_input ${GRUB_TERMINAL_INPUT}
EOF
  ;;
esac

case x${GRUB_TERMINAL_OUTPUT} in
  x)
    # Just use the native terminal
  ;;
  x*)
    cat << EOF
terminal_output ${GRUB_TERMINAL_OUTPUT}
EOF
  ;;
esac

if [ "x$gfxterm" = x1 ]; then
    if [ "x$GRUB_THEME" != x ] && [ -f "$GRUB_THEME" ] \
        && is_path_readable_by_grub "$GRUB_THEME"; then
        echo "Found theme: $GRUB_THEME" >&2
        prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_THEME"`
        cat << EOF
insmod gfxmenu
EOF
        themedir="`dirname "$GRUB_THEME"`"
        for x in "$themedir"/*.pf2 "$themedir"/f/*.pf2; do
            if [ -f "$x" ]; then
                cat << EOF
loadfont (\$root)`make_system_path_relative_to_its_root $x`
EOF
            fi
        done
        if [ x"`echo "$themedir"/*.jpg`" != x"$themedir/*.jpg" ] || [ x"`echo "$themedir"/*.jpeg`" != x"$themedir/*.jpeg" ]; then
            cat << EOF
insmod jpeg
EOF
        fi
        if [ x"`echo "$themedir"/*.png`" != x"$themedir/*.png" ]; then
            cat << EOF
insmod png
EOF
        fi
        if [ x"`echo "$themedir"/*.tga`" != x"$themedir/*.tga" ]; then
            cat << EOF
insmod tga
EOF
        fi

        cat << EOF
set theme=(\$root)`make_system_path_relative_to_its_root $GRUB_THEME`
EOF
    elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
            && is_path_readable_by_grub "$GRUB_BACKGROUND"; then
        echo "Found background: $GRUB_BACKGROUND" >&2
        case "$GRUB_BACKGROUND" in
            *.png)         reader=png ;;
            *.tga)         reader=tga ;;
            *.jpg|*.jpeg)  reader=jpeg ;;
            *)             echo "Unsupported image format" >&2; exit 1 ;;
        esac
        prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_BACKGROUND"`
        cat << EOF
insmod $reader
background_image -m stretch `make_system_path_relative_to_its_root "$GRUB_BACKGROUND"`
EOF
    fi
fi

make_timeout ()
{
    cat << EOF
if [ "\${recordfail}" = 1 ] ; then
  set timeout=${GRUB_RECORDFAIL_TIMEOUT:--1}
else
EOF
    if [ "x${1}${3}" != "x" ] ; then
        if [ "x${3}" != "x" ] ; then
            timeout="${2}"
            style="${3}"
        else
            # Handle the deprecated GRUB_HIDDEN_TIMEOUT scheme.
            timeout="${1}"
            if [ "x${2}" != "x0" ] ; then
                grub_warn "$(gettext "Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.")"
            fi
            if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
                style="hidden"
            else
                style="countdown"
            fi
        fi
        if [ "x${style}" = "xcountdown" ] ; then
            verbose=" --verbose"
        else
            verbose=
        fi
        cat << EOF
  if [ x\$feature_timeout_style = xy ] ; then
    set timeout_style=${style}
    set timeout=${timeout}
EOF
        if [ "x${style}" != "xmenu" ] ; then
            cat << EOF
  # Fallback hidden-timeout code in case the timeout_style feature is
  # unavailable.
  elif sleep${verbose} --interruptible ${timeout} ; then
    set timeout=0
EOF
        fi
        cat << EOF
  fi
EOF
    else
        cat << EOF
  set timeout=${2}
EOF
    fi
    cat << EOF
fi
EOF
}

if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ]; then
    cat <<EOF
if cmostest $GRUB_BUTTON_CMOS_ADDRESS ; then
EOF
make_timeout "${GRUB_HIDDEN_TIMEOUT_BUTTON}" "${GRUB_TIMEOUT_BUTTON}" "${GRUB_TIMEOUT_STYLE_BUTTON}"
echo else
make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}" "${GRUB_TIMEOUT_STYLE}"
echo fi
else
make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}" "${GRUB_TIMEOUT_STYLE}"
fi

if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ] && [ "x$GRUB_BUTTON_CMOS_CLEAN" = "xyes" ]; then
    cat <<EOF
cmosclean $GRUB_BUTTON_CMOS_ADDRESS
EOF
fi

# Play an initial tune
if [ "x${GRUB_INIT_TUNE}" != "x" ] ; then
  echo "play ${GRUB_INIT_TUNE}"
fi

if [ "x${GRUB_BADRAM}" != "x" ] ; then
  echo "badram ${GRUB_BADRAM}"
fi


How to add external SSD over already existing HDD and boot Ubuntu through it

You will have to install Ubuntu again on the SSD.
You don't have to wipe the HDD and use it as a Data storage with the help of fstab.

Once you install the SSD those are the following steps you will need to take to have the HDD mounted:

Find out the UUID of the HDD

ls -l /dev/disk/by-uuid

This will give you and out put like this:

lrwxrwxrwx 1 root root 10 Jan 27 08:11 4bfee3b6-b62e-4214-bfb8-507e5ab3d09b -> ../../sda1

The long number is your UUID so in my situation

bfee3b6-b62e-4214-bfb8-507e5ab3d09b

Create a mount location such as /Data

mkdir /Data

3.Edit /etc/fstab to include your HDD

UUID=4bfee3b6-b62e-4214-bfb8-507e5ab3d09b       /Data       ext4    errors=remount-ro       0       1

That should mount the disk for you on your next restart under /Data


How to copy a flash USB content to a folder in my hard drive

Make dir for mount : mkdir /media/flashdrive1
Mount it : mount /dev/sdb /media/flashdrive1
Copy it : cp -R /media/flashdrive1 destination


Why does dig not use the right IPv6 DNS server?

This is not working because there are no IPv6 nameservers defined in /etc/resolv.conf. In case of Ubuntu 16.04.3 the only entry in this file is

nameserver 127.0.1.1

and maybe a search domain.

As "dig -6" only uses IPv6, there is simply no nameserver to ask. An easy fix would be to let the dnsmasqd which is listening on port 53 on localhost IPv4 also listen on the IPv6 localhost address "::1/128" and add the IPv6 localhost address also to /etc/resolv.conf.


How do I enable the touchpad on a MacbookPro8,1?

If you can get to the menu's find the mouse/touchpad settings in the system-settings. You can also talk to it via the command-line using synclient. So for instance synclient TouchpadOff=0 could switch back on the touchpad (if that was causing it). If it doesn't work or it complains with some errors, try to unload/reload the driver:

I made a small script that I've put in ~/bin (for instance reset_mouse) and made executable with chmod u+x ~/bin/reset_mouse. This is the script:

#!/bin/bash
device="bcm5974" ;
xterm -e "sudo modprobe -r $device && sudo modprob $device"

You might have another device (this is mine on my Macbook Pro 6,2). You can Google it or search via lsmod.

Hope this helps.


How do you get rosegarden to play sound when playing a midi in it?

You do not need to have Jack running in order to playback MIDIs with Rosegarden.

What I now have running is MIDI file playback via Rosegarden and QSynth.

The process as of Ubuntu 17.10 is largely the same as here, but follow these steps:

install QSynth apt-get install fluidsynth
install a soundfont library apt-get install fluid-soundfont-gs
configure QSynth to Enable MIDI Input by checking the box in Setup > MIDI
configure QSynth to use alsa Audio Driver under Setup > Audio
configure QSynth to use the soundfont under Setup > Soundfonts; point to /usr/share/sounds/sf2/FluidR3_GM.sf2 or your soundfont location
allow QSynth to restart when it prompts you
install Rosegarden apt-get install rosegarden
with QSynth open, launch Rosegarden
Tell Rosegarden to play through QSynth Studio > Manage MIDI Devices and set the General MIDI Device to whatever QSynth broadcasts as its MIDI input option, ie 129:0 Synth input port or similar.


top panel black again after I set the transparency

I had the same issue. Was the 'launcher capture mouse' option in the Unity Compiz plugin disabled? I flicked mine back on and the top panel opacity started working again just fine.


How to use source command for exporting path?

As muru suggests, your problem might just be a typo. If your file is called "list" you could source it using:

source list

or just

. list

Note the space between the . and the filename. A dot on its own is a synonym for "source ".

If your file is called ".list" (ie it is hidden), then:

source .list

or

. .list

is what you need.


Keyboard style different from region language

Open System Settings, and click keyboard:

Click input sources:

Click +:

Find German (I had to search you probably will just have to scroll), select it and click Add.

Chose that as your default.


How to autoinstall config "fill disk" option on Ubuntu 20.04 Automated Server Insall?

I have not tried this, but the docs suggest a negative value will 'fill'.

Source: https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls/ConfigReference#storage

  the server installer allows sizes to be specified as percentages of the containing device. Also, a negative size can be used for the final partition to indicate that the partition should use all the remaining space.

edit

I tried this out.  Using size: -1 for the final partition did fill the disk.  I tried using size: 100% and size: -1 for an LVM Logical Volume to use all the available space and it did not work.  The installer errored in align_down in subiquity/models/filesystem.py.

I also tried 100%FREE but subiquity errored on dehumanize_size

I also tried removing the size property for the lvm_partition because the curtin docs say (at https://curtin.readthedocs.io/en/latest/topics/storage.html)

  If the size key is omitted then all remaining space on the volgroup will be used for the logical volume.

This does not work as subiquity errors if there is no size property

This is unfortunate as using a percentage for an LVM Volume would be a pretty basic use case

The full storage config I tried.

  storage:
    grub:
      reorder_uefi: False
    swap:
      size: 0
    config:
    - {ptable: gpt, path: /dev/sda, preserve: false, name: '', grub_device: false,
      type: disk, id: disk-sda}
    - {device: disk-sda, size: 512M, wipe: superblock, flag: boot, number: 1,
      preserve: false, grub_device: true, type: partition, id: partition-sda1}
    - {fstype: fat32, volume: partition-sda1, preserve: false, type: format, id: format-2}
    - {device: disk-sda, size: 1G, wipe: superblock, flag: linux, number: 2,
      preserve: false, grub_device: false, type: partition, id: partition-sda2}
    - {fstype: ext4, volume: partition-sda2, preserve: false, type: format, id: format-0}
    - {device: disk-sda, size: -1, flag: linux, number: 3, preserve: false,
      grub_device: false, type: partition, id: partition-sda3}
    - name: vg-0
      devices: [partition-sda3]
      preserve: false
      type: lvm_volgroup
      id: lvm-volgroup-vg-0
    - {name: lv-root, volgroup: lvm-volgroup-vg-0, size: 100%, preserve: false,
      type: lvm_partition, id: lvm-partition-lv-root}
    - {fstype: ext4, volume: lvm-partition-lv-root, preserve: false, type: format,
      id: format-1}
    - {device: format-1, path: /, type: mount, id: mount-2}
    - {device: format-0, path: /boot, type: mount, id: mount-1}
    - {device: format-2, path: /boot/efi, type: mount, id: mount-3}

edit 2

I kept digging into this and it seems that sometimes subiquity stores disk sizes as a float, which led to the uncaught exception.  I was actually able to work around this by not using human readable format.  E.g. instead of size: 512M, use size: 536870912.

This is a sample storage config that uses the autofill option with property size: -1 and also  configures a logical volume to fill a volume group with the property size: 100%

  storage:
    grub:
      reorder_uefi: False
    swap:
      size: 0
    config:
    - {ptable: gpt, path: /dev/sda, preserve: false, name: '', grub_device: false,
      type: disk, id: disk-sda}
    - {device: disk-sda, size: 536870912, wipe: superblock, flag: boot, number: 1,
      preserve: false, grub_device: true, type: partition, id: partition-sda1}
    - {fstype: fat32, volume: partition-sda1, preserve: false, type: format, id: format-2}
    - {device: disk-sda, size: 1073741824, wipe: superblock, flag: linux, number: 2,
      preserve: false, grub_device: false, type: partition, id: partition-sda2}
    - {fstype: ext4, volume: partition-sda2, preserve: false, type: format, id: format-0}
    - {device: disk-sda, size: -1, flag: linux, number: 3, preserve: false,
      grub_device: false, type: partition, id: partition-sda3}
    - name: vg-0
      devices: [partition-sda3]
      preserve: false
      type: lvm_volgroup
      id: lvm-volgroup-vg-0
    - {name: lv-root, volgroup: lvm-volgroup-vg-0, size: 100%, preserve: false,
      type: lvm_partition, id: lvm-partition-lv-root}
    - {fstype: ext4, volume: lvm-partition-lv-root, preserve: false, type: format,
      id: format-1}
    - {device: format-1, path: /, type: mount, id: mount-2}
    - {device: format-0, path: /boot, type: mount, id: mount-1}
    - {device: format-2, path: /boot/efi, type: mount, id: mount-3}

It looks like the float bug may have been fixed with this commit and might be avoided if the automatic installer update feature is used

https://github.com/CanonicalLtd/subiquity/commit/8a84e470c59e292138482a0b1bd7144fbb4644db#diff-1ca44bce35f59e931cbe850119e630db


How can I install Manycam or a Manycam equivalent in Ubuntu 10.04?

Try WebcamStudio. Should be able to find it in Synaptic.


How can I automatically add workspaces, only if I need them?

Automatically set the number of workspaces; add and remove columns and rows, depending on your needs

Below a version of a (the) backround script that will automatically add workspaces if you entered the last column or row of your workspace-matrix.

This is how it works:

If you arrive at the last column or row, additional viewports are added:

If your workspaces are unused for 5-10 seconds and there are no windows on it, the additional workspaces will be removed again. You will however always keep one extra row below, and one extra column right of your current viewport:

The script:

#!/usr/bin/env python3
import subprocess
import time
import math

# --- set default workspaces below (horizontally, vertically)
hsize = 2
vsize = 2
# --- set the maximum number of workspaces below
max_ws = 10

def set_workspaces(size, axis):
    subprocess.Popen([
        "dconf", "write", "/org/compiz/profiles/unity/plugins/core/"+axis,
                str(size)
                ])

def get_res():
    resdata = subprocess.check_output(["xrandr"]).decode("utf-8").split()
    curr = resdata.index("current")
    return (int(resdata[curr+1]), int(resdata[curr+3].replace(",", "")))

def wspace():
    try:
        sp = subprocess.check_output(["wmctrl", "-d"]).decode("utf-8").split()
        return ([int(n) for n in sp[3].split("x")],
                [int(n) for n in sp[5].split(",")])

    except subprocess.CalledProcessError:
        pass

def clean_up(curr_col, curr_row):
    try:
        w_list = [l.split() for l in subprocess.check_output(["wmctrl", "-lG"]).decode("utf-8").splitlines()]
        xpos = max([math.ceil((int(w[2])+span[1][0])/res[0]) for w in w_list])
        min_x = max(xpos, curr_col+1, hsize)
        if xpos >= hsize:
            set_workspaces(min_x, "hsize")
        else:
            set_workspaces(min_x, "hsize")
        ypos = max([math.ceil((int(w[3])+span[1][1])/res[1]) for w in w_list])
        min_y = max(ypos, curr_row+1, vsize)
        if ypos >= vsize:
            set_workspaces(min_y, "vsize")
        else:
            set_workspaces(min_y, "vsize")
    except subprocess.CalledProcessError:
        pass

res = get_res()
t = 0

while True:
    span = wspace()
    if span != None:
        cols = int(span[0][0]/res[0]); rows = int(span[0][1]/res[1])
        currcol = int((span[1][0]+res[0])/res[0])
        if all([currcol == cols, cols*rows < max_ws]):
            set_workspaces(cols+1, "hsize")
        currrow = int((span[1][1]+res[1])/res[1])
        if all([currrow == rows, cols*rows < max_ws]):
            set_workspaces(rows+1, "vsize")
        if t == 10:
            clean_up(currcol, currrow)
            t = 0
        else:
            t = t+1
        time.sleep(1)

How to use

Copy the script below into an empty file, save it as add_space.py
In the head section of the script, edit the lines if you like other settings (maximum number of workspaces, default matrix e.g. 2x2):

# --- set default workspaces below (horizontally, vertically)
hsize = 2
vsize = 2
# --- set the maximum number of workspaces below
max_ws = 10

Test- run it by the command:

python3 /path/to/add_space.py

If all works fine, add it to your startup applications: Dash > Startup Applications > Add the command:

/bin/bash -c "sleep 15 &&  python3 /path/to/add_space.py`

Note

As always, the script is extremely "low on juice", and does not add any noticeable load to your processor.

Explanation

The story below is a bit complicated and mostly an explanation on the concept and the procedure, rather than the coding. Only read if you're interested.

How to calculate the needed workspaces (example columns)

The output of wmctrl -d looks like:

0  * DG: 3360x2100  VP: 1680,1050  WA: 65,24 1615x1026  N/A

In the output, VP: 1680,1050 gives us information on where we are on the spanning workspace (the matrix of all viewports). This information is only useful if we also have the screen's resolution, since e.g. 1680 could be the width of two (unlikely, but still) or one time the screen.
Luckily, we can parse out the screen's resolution from the command xrandr.

Then if we know the screen's x-size is 1680 and we currently are on VP: 1680,1050, we know we are on the second column in the workspace's matrix. Since we also know the size of the total matrix (DG: 3360x2100, also from the output of wmctrl -d), we know the current matrix includes two columns (3360/1680), and we are on the "last" one.

The script will then send an instruction to add a column to the matrix by the command:

dconf write /org/compiz/profiles/unity/plugins/core/hsize <current_viewport_column+1>

This is the principle.

How to calculate the workspaces to remove  (example columns)

Once per 10 seconds, the script runs the command to list all currently opened windows, with the command:

wmctrl -lG

This gives us information on the window's position also, looking like:

0x04604837  0 3425 24   1615 1026 jacob-System-Product-Name Niet-opgeslagen document 2 - gedit

In the output, 3425 is the x-position of the window. This figure is however relative to the current workspace (left side). To know the absolute position of the window (x-wise) in the workspace-matrix, we have to add the first number of the current viewport information (e.g. VP: 1680,1050, from the output of wmctrl -d).
Let's however, for simplicity reasons, assume we are on viewport 1,1 (topleft viewport), so the window's relative position equals its absolute position.

Since the screen's resolution is 1680, we know the window is on column 3425/1680, rounded up, since everything between 3360 and 5040 is on the same column in the matrix (between 3 and 4 times the resolution). For proper calculation we use math.ceil() (python)

Since the script also practices the rule to always have an extra workspace on the right/below, we need to set the number of columns to the highest value of:

the current workspace column + 1
the last column with a window on it
the default number of columns, as set in the head of the script

And so the script does :)

The rows are managed in exactly the same procedure.


Server autoinstall encrypt voluem but prompt for password

I don't think theres a way to cause the installer to do that.  What we've ended up with different autoinstall files for different hardware profiles.


You can add manually repository

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E1DD270288B4E6030699E45FA1715D88E1DF1F24
sudo su -c "echo 'deb http://ppa.launchpad.net/git-core/ppa/ubuntu trusty main' > /etc/apt/sources.list.d/git.list"

sudo apt-get update
sudo apt-get install git


The relation between usernames and their number

UID's are used on the file system. This is commonly a problem if you have NFS volumes shared across many computers, as it follows UID and not username. Also, different distros may start UID numbering at different points.

But yes, what you say is in effect true. Note that Unix FS ACL's does not protect against someone having a offline copy of the data. They're free to mount the drive on a box where they're root. ACLs protect data from unintended access while the OS is running.


Is no reboot kernel patching enabled in 16.04?

Ubuntu has livepatch, which is a livepatching service for Ubuntu 16.04.

https://www.ubuntu.com/server/livepatch
http://insights.ubuntu.com/2016/10/20/live-kernel-patching-from-canonical-now-available-for-ubuntu/


ubuntu boot stick black screens, what should i do?

It is possible, your live USB stick just needs to have persistent storage enabled so you can save packages.


How to open .deb from nautilus with apturl?

Right click the .deb, click properties, and then go to the open with tab. Then click show other applications, select apt-url from the list, and then click set as default. Try opening ~/.local/share/applications/mimeapps.list and adding this line to the default associations section: application/x-deb=AptURL.desktop;


Ubuntu terminal cant type special characters like backslash (\), slash(/), semicolon (:), etc properly

You're probably using the wrong keyboard layout. You can change this by using the following command:

sudo dpkg-reconfigure keyboard-configuration


Difference between apt search and apt-cache search

Looks like you cannot filter apt-cache search but I have found a way that could function similar to what you want. Type sudo nano .bashrc and add the line alias apt-search='apt-cache search' to the end of the file. There are few limitations though:
1. You cannot use sudo before typing apt-search in the command line. It will tell you command not found
2. Can't override the apt search name. Bash will not allow it.

This will be applied when you logout and log back in. Hope this helped.


The encrypted message you have received contains the instructions for confirming that the PGP key you have registered is yours. In order to follow the instructions, you will have to decrypt it.

After you have pasted your encrypted text into gpg, try ctrl-D ; this informs programs eating STDIN (the terminal input) that you have finished.

Upon Decryption, the decrypted message will have a link, which you must visit and click the Confirm button there.

See : http://lists.gnupg.org/pipermail/gnupg-users/2003-October/020558.html

Alternately, you could install the Enigmail addins for Thunderbird and read the mail using that.


Kalarm does the job, unfortunately for some reason it doesn't run httpio(asyncio) asynchronous web request in python, so if there is other solution it will be appreciated.


Data recovery from old windows SATA drives using Ubuntu

First off, your new Windows computer supports USB2 (unless it's a "new" computer from your Grandma who purchased it in 2001) but if you must use Ubuntu

Make sure your external hard drive is mounted
Make sure you have permissions
Just to be safe, you can use sudo cp -r ~/"mount folder" to new drive

I typically create a mount point in Ubuntu in case I want to mount it again in the future and make it easy to get to

mkdir external-hdd
sudo fdisk -l
sudo mount /dev/sdx ~/external-hdd
copy files through GUI if using full desktop or sudo cp -r ~/external-hdd ~/newfolder


The password that you set-up on installation process is the password of your account, not the administrator account.

In normal cases, you can change your password using passwd, but since you forgot the password for your account, so you need to log in as the root account.

http://www.debuntu.org/how-to-recover-root-password-under-linux-with-single-user-mode/

Follow above link and do processes. When you change password, put passwd *youraccount* command.


What is the way to display the documents only in 'recent files' (Nautilus/Files) on Ubuntu 20.04?

Unfortunately, there is no control. An issue about this problem was closed, pointing to a location to raise issues on the Settings dialog.
Failing that, you still can quickly filter the recent files by typing a file extension, or some characters of the file name.


How Can I Change Close/Minimize/Max buttons in unity?

These buttons are usually image files (.png) located in /usr/share/themes/[name of current theme]/unity/assets.

EDIT: corrected path to themes folder after muru's comment.


Edimax EW-7811Un USB Wirless Adapter Stopped Working

The latest realtek driver doesn't require those changes, since, according to the release notes, the support for kernel 3.0.2 has been added. Keep the original module blacklisted, and simply run the install.sh script.


Yelp help browser and the scrollkeeper catalogue

I had downloaded source code of modern Yelp 3.26 (shipped with 18.04 LTS) and grep-ed it for scrollkeeper occurencies:

apt-get source yelp
cd yelp-3.26.0

Grepping does not get results in code, only in text files

$ grep -ir scroll.*keeper . | awk '{print $1}' | sort | uniq
./ChangeLog:
./debian/changelog:
./NEWS:

One of the results from Changelog states:

  ./ChangeLog:   Update slightly to remove scrollkeeper references
  ./ChangeLog:   - Switch to using rarian instead of scrollkeeper

But they do not use even rarian in application code:

$ grep -ir rarian .
./ChangeLog:    Port to Rarian 0.8 series
./ChangeLog:    - Switch to using rarian instead of scrollkeeper
./ChangeLog:    Convert search across to use Rarian
./ChangeLog:    Now Rarian is fast, don't split out man and info pages.
./ChangeLog:    Spoon is now Rarian.  Bump min version to 0.5.0
./NEWS:* Port to Rarian 0.8 series
./NEWS:  - Remove scrollkeeper in favour of Rarian
./debian/changelog:      - Build depend on librarian-dev (>= 0.7.0).
./debian/changelog:    + added build-depends on librarian-dev.

So full-text search is not available in Yelp because of removed ScrollKeeper and Rarian indexers.

Notes:

some patch exists in old GNOME bugzilla #652057 and modern GitLab. But it is not applied on master branch.
if you are using Ubuntu 16.04 LTS you can install build-dependencies, download and apply this patch:

# software-properties-gtk # enable Source code repositories
sudo apt-get build-dep yelp
sudo apt-get install devscripts

cd ~/Downloads
wget https://gitlab.gnome.org/GNOME/yelp/uploads/b51ee8a2dc22f423f06e0293476328e5/xref-handling-and-indexing-for-help-list.patch

mv xref-handling-and-indexing-for-help-list.patch yelp-3.18.1/debian/patches
cd yelp-3.18.1
echo "xref-handling-and-indexing-for-help-list.patch" >> debian/patches/series
debuild -uc -us
sudo dpkg -i ../*yelp*.deb

After installation you can test patched version of Yelp. Launch it, navigate to All Help, press Ctrl+S and enter for example calculator and press Enter:

But it seems that search works only in titles, not in full text.


Wifi Direct P2P-go and P2P-client support in ubuntu

see the FAQ http://www.wi-fi.org/knowledge-center/faq/will-legacy-devices-be-upgradeable-support-specification-underlying-wi-fi which states that wifi-direct does not require any new hardware.For drivers check http://madwifi-project.org/. Fo atheros, ath9k drivers support wifi direct.


which browser gives best performance on ubuntu 16.04

I appreciate Google Chrome, primarily for its amazing syncing capabilities and reliable ad blocking extensions. It runs each tab as a different process, and is very fast in Ubuntu.

I heard firefox is reliable as well, and might have a bit more support than Chrome in the Linux realm (since Ubuntu ships with firefox).

Many other browsers seem to be lacking in features/compatibility/workability in all websites. For example, Chrome runs flash perfectly well with it's in-built flash. Firefox can run flash as well, but many other browsers (Midori for example) have trouble with flash.

Whichever browser you do choose, be sure it passes the most recent Acid Test with flying colors and 100/100. This will ensure your browsing experience is at its best.


You can recover your data from formatted disk using testdisk and photorec, these are good open source software that is used by thousands of user when such case arrived in Linux type system.
Here are your steps how can you restore your datas:

Boot from live CD/DVD/USB or Ubuntu, if it is opening fine..

Install testdisk:
  sudo apt-get install testdisk

Run testdisk to fix your partition.

If testdisk fails then you can give a try to another s/w photorec. Find out here How to use Photorec step by step

If you had valuable data then you can give a try to this.. I recommend to use PhotoRec.


How to format my usb stick? 'No space left on device'

I was told it's expected. it filled my drive with 000000

sudo hexdump /dev/sdc
0000000 0000 0000 0000 0000 0000 0000 0000 0000
*

I will continue with the guide now.


Ubuntu 12.04 doesn't install on my laptop with Win-7

Why not try making a bootable USB? Also do verify that the iso you downloaded is not corrupt.

How should the iso be corrupt when it installs Ubuntu 12.04 on a desktop??


Why are some snaps fast, and others so slow?

This is not a direct answer as it isn't a way to speed up snaps, but it may help anyway.
Spotify is available as a .deb which you can install in Ubuntu instead of using the snap.
I tested both options on my system and got the following approximate results:
Snap -> 7.5 seconds
Apt -> 0.5 seconds
Which raises another point. You mentioned in a comment that you're running on a 2.5gb/s NVME SSD which suggests to me you have a fairly modern PC. I'm running something similar but I can load Spotify as a snap in 7.5 seconds compared to your 43 seconds. Perhaps you have some other issue on your system. 43 seconds does seem excessively slow on a modern PC, even for a snap.


This works for me: Add the following to ~/.config/gtk-3.0/gtk.css:

* {
    -GtkWindow-resize-grip-default: true;
    -GtkWindow-resize-grip-width: 15;
    -GtkWindow-resize-grip-height: 15;
}


writing a script, making it executable then assigning it keys

su <user> -c <command>

You will still have to provide the password, though.


I want Ubuntu to be a Miracast host, and the video coming in to be available as /dev/videoX

It's been several months, but you might want to look into the Miraclecast project, or better still, contact the developer of that project directly to see if you can use /dev/videoX.


How can I upgrade my OS from the terminal? Each time I try, I'm told everything is up to date

Test this procedure:

First: You need to update the system.

Open a terminal,Press Ctrl+Alt+T

Run it:

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

Reboot your system to finish installing updates, and to upgrade to new available version:

Open a terminal,Press Ctrl+Alt+T

Run it:

sudo -i
nano /etc/apt/sources.list

In the open file, delete the content and paste this:

deb http://ar.archive.ubuntu.com/ubuntu/ trusty main restricted
# deb-src http://ar.archive.ubuntu.com/ubuntu/ trusty main restricted
deb http://ar.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
# deb-src http://ar.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb http://ar.archive.ubuntu.com/ubuntu/ trusty universe
# deb-src http://ar.archive.ubuntu.com/ubuntu/ trusty universe
deb http://ar.archive.ubuntu.com/ubuntu/ trusty-updates universe
# deb-src http://ar.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb http://ar.archive.ubuntu.com/ubuntu/ trusty multiverse
# deb-src http://ar.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://ar.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
# deb-src http://ar.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb http://ar.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
# deb-src http://ar.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu trusty-security main restricted
# deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
deb http://security.ubuntu.com/ubuntu trusty-security universe
# deb-src http://security.ubuntu.com/ubuntu trusty-security universe
deb http://security.ubuntu.com/ubuntu trusty-security multiverse
# deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse
deb http://archive.canonical.com/ubuntu trusty partner
# deb-src http://archive.canonical.com/ubuntu trusty partner
deb http://extras.ubuntu.com/ubuntu trusty main
# deb-src http://extras.ubuntu.com/ubuntu trusty main
deb http://ar.archive.ubuntu.com/ubuntu/ trusty-proposed universe multiverse restricted main

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

Continue run in a terminal:

sudo -i
apt-get clean
apt-get update
apt-get dist-upgrade
apt-get autoremove
apt-get -f install
dpkg --configure -a
apt-get clean
reboot


Windows boots instead of asking which OS to boot

Disable secure boot. It worked in my Pavilion x360. I did it before installing Ubuntu. But because Grub and Windows Boot partition issues I installed the Grub in my Ubuntu root partition.


I installed GRUB bootloader on the Win SSD, should I be worried? Dual Boot

No, you shouldn't worry because:

You can get rid of Ubuntu without touching GRUB
You can boot your Windows 8.1 recovery CD and it'll automatically get rid of grub (and Ubuntu!  Be careful!)
If you have UEFI, it's even less of a problem: just delete some files...

Changing boot stuff after it's been installed is always trickier then just deleting things.  So if in a half a year or so you want to delete Windows 8.1 just open a new question and you'll find tons of people wanting to help you!  ;-)

P.S. We'll also help you to delete Ubuntu, but I deleted Windows about a year ago to make space for more Ubuntu and deleted the Windows 10 preview about 2 weeks ago, so it's not inconceivable you will too!


Trying to dual boot Windows 7 with Ubuntu. Install isn't recognizing windows partition

Use boot-repair (https://help.ubuntu.com/community/Boot-Repair) for fix your Problem.


Any plans to update Ubuntu 140.04 Kernel beyond 3.16.0-34-generic

Latest available Ubuntu 14.04  is 14.04.03 and it comes with kernel version 3.19. If you already have an older version, you can install new kernel version this way:

How can I use Kernel 3.19 in 14.04 now?


The photorec terminal program can selectively recover files based on their filetype(s), for example it can recover only .odt documents, but photorec/testdisk can't selectively scan an individual directory for lost files unless you had mounted a whole hard drive partition as this directory. In some cases, the filename is stored in the file itself. PhotoRec tries to recover the filename in this case, but most of the time PhotoRec can't recover the filenames.
photorec is provided by the testdisk package from the default Ubuntu repositories.

Recover files based on filetype using photorec
It is preferable to boot from an Ubuntu live DVD/USB before following these steps, in order to avoid using the operating system in which the deleted file is located.

Install testdisk from the default Ubuntu repositories.
 sudo apt-get install testdisk

Launch PhotoRec.
Open a terminal and launch photorec (as root).
 sudo photorec

Select hard disk.

Select partition type.
If your hard disk has Linux partitions, then select [Intel].

Select filetype option.
Move to [File Opt] and press Enter. Here you can disable all file types by pressing s. Use space to toggle the check button. Select filetype(s) to recover.

Select options.
Photorec also has a list of different options. Under normal circumstances you don’t need to modify them.

Select partition.
Move the selector up or down to the partition from which you have removed the file(s). Then select [Search] and press Enter.

Select filesystem type.
If you are using Linux, it's going to be ext2/ext3/ext4, so the default selection is ext2/ext3. Otherwise if you are recovering files from a partition formatted as FAT or NTFS select Other.

Select space for analysis.
Select Free if you didn’t write to that partition after removing the particular file, otherwise select Whole.

Select a directory for the recovered files.
Select the path where the recovered files will be stored. Then press Y.

Photorec will show how many files it has recovered.
Source: revised from How To Recover Deleted Files in Linux Using Photorec


You can use  Wwidd for video  file and

EasyTag (for mp4 + audio files).
To install EasyTag type:

sudo apt-get install easytag


I cannot give your full details, but can point you at some sites that should allow you to build up your own view at least of Upstart...

Upstart has been used by Ubuntu for some 6 years now (since Jaunty (6.10)). It's therefore proven itself on both the desktop and in complex environments on Ubuntu Server (and now Cloud!). To learn more about Upstart, take a look at the Upstart Cookbook:

http://upstart.ubuntu.com/cookbook/
http://upstart.ubuntu.com/cookbook/upstart_cookbook.pdf

Of particular interest to you will be:

http://upstart.ubuntu.com/cookbook/#introduction
http://upstart.ubuntu.com/cookbook/#design-history
http://upstart.ubuntu.com/cookbook/#critique-of-the-system-v-init-system
http://upstart.ubuntu.com/cookbook/#critique-of-dependency-based-init-systems

Upstart was written for performance and reliability from the outset. It is also revolutionary compared to all other init systems available today:

http://upstart.ubuntu.com/cookbook/#upstart-s-design-why-it-is-revolutionary


smartctl overall-health self-assessment test returned this message:

SMART overall-health self-assessment result: FAILED!
Drive failure expected in less than 24 hours. SAVE ALL DATA.

SMART overall-health self-assessment test result that returns FAILED is almost always a sure indicator of failure.

Immediately stop using the hard drive because drive failure is expected in less than 24 hours, and save all data. Boot from the live DVD/USB that you used to install Ubuntu and backup all your personal files to an external hard drive. You should seriously consider getting an external hard drive for backup purposes if you don't already have one.


Bash is interpreting the URL. The < and & mean things to it so they're being ripped around and aren't being passed to lynx.

The simple answer is to quote the url:

lynx -accept_all_cookies 'https://github.com/search?q=jquery+stars%3A>10+forks%3A<10&type=Repositories'

I'm using single quotes here so that even $ isn't interpreted.


Error creating custom install of ubuntu 18.04 live server

The preseed file mechanism works well with the Debian Installer, but Ubuntu 18.04 LTS Live images uses a new installer called Subiquity, which instead uses an answers.yml file mechanism to provide answers to installer questions.

However, if you download from the CD Image directory, you can still find  18.04 LTS images with the old Debian installer, which will use your preseed file.


possible solution

boot into earlier kernel (4.13 in my case). couldnt login due to unknown issues.
reboot into the latest kernel (4.15, installed by 18.04). hdmi detected :)

background:
I migrated from 17.10->18.04 (kubuntu). on installation completion restart, booting to kernel (4.15), hdmi is not detected (xrandr shows hdmi-1-1 disconnected) .
searched around, didnt find any solution (laptop is dell 3450 latitude, nvidia geforce 830M graphics card, intel onboard graphics card)


How do I monitor which file changes during changing settings?

You can use the command line tool inotifywatch from the package inotify-tools.

If you want to monitor all files in you home directory for change, use this command:

inotifywatch -r $HOME

Probably the command will raise an error because the upper limit of watches is reached. You can change those with

sudo sh -c 'echo 16384 > /proc/sys/fs/inotify/max_user_watches'

(adjust the number accordingly)


Edit:

So apparently there is an even easier method. aclocal didn't like the line break characters in acinclude.m4 on line 41 and 42:

41: AC_CHECK_MEMBERS([struct icmp.icmp_type, struct icmp.icmp_code,\
42: struct icmp.icmp_cksum, struct icmp.icmp_seq,\
43: struct icmp.icmp_id],[],

The only other thing you have to fix (unrelated to the error above) is in doc/Makefile.am. Just change this line:

STYLESHEET_DIR=/usr/share/sgml/docbook/xsl-stylesheets

to this:

STYLESHEET_DIR=/usr/share/sgml/docbook/stylesheet/xsl/docbook-xsl


.desktop files not launching from desktop in Ubuntu 20.04 LTS

Make sure you've allowed launching and, maybe, selected it as Run Software on Open With tab.

Configure your shortcut the next way:

[Desktop Entry]
Version=1.0
Name=Firefox Web Browser
Comment=Browse the World Wide Web
GenericName=Web Browser
Keywords=Internet;WWW;Browser;Web;Explorer
Exec=/home/alvaro/Desktop/Laptop_screen_config.sh
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=/home/alvaro/Desktop/Ubuntu/screen.png
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
StartupNotify=true
Actions=new-window;new-private-window;

I've copied firefox's shortcut settings and modified them to allow to launch your script. With this it allows changing its launching configuration. You could remove unneeded options and check if it works without them.


This is really a bug. Anyway, here is a temporary fix.

For amd64:

sudo ln -s /usr/lib/x86_64-linux-gnu/libnotify.so.4 /usr/lib/x86_64-linux-gnu/libnotify.so.1

For i386:

sudo ln -s /usr/lib/i386-linux-gnu/libnotify.so.4 /usr/lib/i386-linux-gnu/libnotify.so.1


want to get Numlock on at startup in kubuntu

Edit /etc/kde4/kdm/Xsetup (if you are still running kde3 you'll need to edit /etc/kde3/kdm/Xsetup instead) and add the following code to it:

if [ -x /usr/bin/numlockx ]; then
  /usr/bin/numlockx on
fi

That code should work if you install numlockx (sudo apt-get install numlockx)